]> Kevux Git Server - fll/commitdiff
Update: Consistency improvements with *_append() and *_append_all(), add tests, and...
authorKevin Day <thekevinday@gmail.com>
Mon, 14 Mar 2022 03:10:17 +0000 (22:10 -0500)
committerKevin Day <thekevinday@gmail.com>
Mon, 14 Mar 2022 03:10:17 +0000 (22:10 -0500)
The array functions for managing structures needs to be consistent with the *_append() functions.
This introduces the *_append() all across the board.
The previous *_append() behavior is essentially refactored into *_append_all().

The *_append() now accepts a single type for a given structure rather than a set.
(The single type can still be representative of a set itself.)

Add a lot of tests.
Add missing f_iki tests.
The f_string tests are not fully implemented, the f_dynamic_* functions are only partially tested.
All of the other f_string structures should be fully tested now.

Make the macro_f_string_range_t_initialize() macro consistency with all other macros.
That is, the macro initialize that does not have a digit initializes using all of the structures members.
This effectively refactors macro_f_string_range_t_initialize() into macro_f_string_range_t_initialize2() and macro_f_string_range_t_initialize2() into macro_f_string_range_t_initialize().

Change the behavior of the *_resize() and *_adjust() functions to return F_none rather than a direct f_memory status code.

Update some of the string functions to return F_data_not_eos.

Restructure some of the code to be a bit more organized.
Specifically, the f_iki_data_t is moved into its own source and header files.
Reduce the clutter in some of the private source and header files by moving some of their content into separate individual files as appropriate.

877 files changed:
build/level_0/settings
build/monolithic/settings
level_0/f_control_group/c/control_group.c
level_0/f_control_group/c/control_group.h
level_0/f_fss/c/fss/comment.h
level_0/f_fss/c/fss/common.h
level_0/f_fss/c/fss/delimit.h
level_0/f_fss/c/private-fss.c
level_0/f_iki/c/iki.h
level_0/f_iki/c/iki/common.c
level_0/f_iki/c/iki/common.h
level_0/f_iki/c/iki/data.c [new file with mode: 0644]
level_0/f_iki/c/iki/data.h [new file with mode: 0644]
level_0/f_iki/c/iki/private-data.c [new file with mode: 0644]
level_0/f_iki/c/iki/private-data.h [new file with mode: 0644]
level_0/f_iki/c/private-iki.c
level_0/f_iki/c/private-iki.h
level_0/f_iki/data/build/settings
level_0/f_iki/data/build/settings-tests
level_0/f_iki/tests/unit/c/test-iki-content_partial_is.c
level_0/f_iki/tests/unit/c/test-iki-datas_adjust.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_adjust.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_append.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_append.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_append_all.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_append_all.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_decimate_by.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_decimate_by.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_decrease_by.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_decrease_by.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_increase.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_increase.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_increase_by.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_increase_by.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_resize.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datas_resize.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_adjust.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_adjust.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_append.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_append.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_append_all.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_append_all.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_decimate_by.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_decimate_by.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_decrease_by.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_decrease_by.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_increase.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_increase.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_increase_by.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_increase_by.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_resize.c [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-datass_resize.h [new file with mode: 0644]
level_0/f_iki/tests/unit/c/test-iki-object_partial_is.c
level_0/f_iki/tests/unit/c/test-iki-read.c
level_0/f_iki/tests/unit/c/test-iki.c
level_0/f_iki/tests/unit/c/test-iki.h
level_0/f_memory/c/private-memory.c
level_0/f_string/c/private-string.c
level_0/f_string/c/private-string.h
level_0/f_string/c/string.h
level_0/f_string/c/string/dynamic.c
level_0/f_string/c/string/dynamic.h
level_0/f_string/c/string/map.c
level_0/f_string/c/string/map.h
level_0/f_string/c/string/map_multi.c [new file with mode: 0644]
level_0/f_string/c/string/map_multi.h [new file with mode: 0644]
level_0/f_string/c/string/private-dynamic.c [new file with mode: 0644]
level_0/f_string/c/string/private-dynamic.h [new file with mode: 0644]
level_0/f_string/c/string/private-map.c [new file with mode: 0644]
level_0/f_string/c/string/private-map.h [new file with mode: 0644]
level_0/f_string/c/string/private-map_multi.c [new file with mode: 0644]
level_0/f_string/c/string/private-map_multi.h [new file with mode: 0644]
level_0/f_string/c/string/private-quantity.c [new file with mode: 0644]
level_0/f_string/c/string/private-quantity.h [new file with mode: 0644]
level_0/f_string/c/string/private-range.c [new file with mode: 0644]
level_0/f_string/c/string/private-range.h [new file with mode: 0644]
level_0/f_string/c/string/private-triple.c [new file with mode: 0644]
level_0/f_string/c/string/private-triple.h [new file with mode: 0644]
level_0/f_string/c/string/quantity.c
level_0/f_string/c/string/quantity.h
level_0/f_string/c/string/range.c
level_0/f_string/c/string/range.h
level_0/f_string/c/string/triple.c
level_0/f_string/c/string/triple.h
level_0/f_string/data/build/settings
level_0/f_string/data/build/settings-tests [new file with mode: 0644]
level_0/f_string/data/build/testfile [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamics_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-dynamicss_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multis_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-map_multiss_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-maps_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-mapss_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantitys_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-quantityss_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-ranges_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-rangess_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-triples_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_adjust.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_adjust.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_append.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_append.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_append_all.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_append_all.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_decimate_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_decimate_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_decrease_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_decrease_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_increase.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_increase.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_increase_by.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_increase_by.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_resize.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string-tripless_resize.h [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string.c [new file with mode: 0644]
level_0/f_string/tests/unit/c/test-string.h [new file with mode: 0644]
level_0/f_thread/c/private-thread.c
level_0/f_type/c/type.h
level_0/f_type_array/c/type_array.h
level_0/f_type_array/c/type_array/array_length.c
level_0/f_type_array/c/type_array/array_length.h
level_0/f_type_array/c/type_array/cell.c
level_0/f_type_array/c/type_array/cell.h
level_0/f_type_array/c/type_array/fll_id.c
level_0/f_type_array/c/type_array/fll_id.h
level_0/f_type_array/c/type_array/int128.c
level_0/f_type_array/c/type_array/int128.h
level_0/f_type_array/c/type_array/int16.c
level_0/f_type_array/c/type_array/int16.h
level_0/f_type_array/c/type_array/int32.c
level_0/f_type_array/c/type_array/int32.h
level_0/f_type_array/c/type_array/int64.c
level_0/f_type_array/c/type_array/int64.h
level_0/f_type_array/c/type_array/int8.c
level_0/f_type_array/c/type_array/int8.h
level_0/f_type_array/c/type_array/private-array_length.c
level_0/f_type_array/c/type_array/private-array_length.h
level_0/f_type_array/c/type_array/private-cell.c
level_0/f_type_array/c/type_array/private-cell.h
level_0/f_type_array/c/type_array/private-fll_id.c
level_0/f_type_array/c/type_array/private-fll_id.h
level_0/f_type_array/c/type_array/private-int128.c
level_0/f_type_array/c/type_array/private-int128.h
level_0/f_type_array/c/type_array/private-int16.c
level_0/f_type_array/c/type_array/private-int16.h
level_0/f_type_array/c/type_array/private-int32.c
level_0/f_type_array/c/type_array/private-int32.h
level_0/f_type_array/c/type_array/private-int64.c
level_0/f_type_array/c/type_array/private-int64.h
level_0/f_type_array/c/type_array/private-int8.c
level_0/f_type_array/c/type_array/private-int8.h
level_0/f_type_array/c/type_array/private-state.c
level_0/f_type_array/c/type_array/private-state.h
level_0/f_type_array/c/type_array/private-status.c
level_0/f_type_array/c/type_array/private-status.h
level_0/f_type_array/c/type_array/private-uint128.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/private-uint128.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/private-uint16.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/private-uint16.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/private-uint32.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/private-uint32.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/private-uint64.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/private-uint64.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/private-uint8.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/private-uint8.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/state.c
level_0/f_type_array/c/type_array/state.h
level_0/f_type_array/c/type_array/status.c
level_0/f_type_array/c/type_array/status.h
level_0/f_type_array/c/type_array/uint128.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/uint128.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/uint16.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/uint16.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/uint32.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/uint32.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/uint64.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/uint64.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/uint8.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/uint8.h [new file with mode: 0644]
level_0/f_type_array/data/build/settings
level_0/f_type_array/data/build/settings-tests
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_append.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_append.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-cells_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cells_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-cells_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-cellss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-cellss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-cellss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int128s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int128ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int16s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int16ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int32s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int32ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int64s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int64ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int8s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-int8ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-states_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-states_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-states_append.c
level_0/f_type_array/tests/unit/c/test-type_array-states_append.h
level_0/f_type_array/tests/unit/c/test-type_array-states_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-states_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-states_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-states_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-states_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-states_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-states_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-states_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-states_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_append.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_append.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statess_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statess_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statess_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-statess_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statuss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-statuss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statusss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-statusss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-statusss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-statusss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8s_resize.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_adjust.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_adjust.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_decimate_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_decimate_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_decrease_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_decrease_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_increase.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_increase.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_increase_by.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_increase_by.h
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_resize.c
level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_resize.h
level_0/f_type_array/tests/unit/c/test-type_array.c
level_0/f_type_array/tests/unit/c/test-type_array.h
level_0/f_utf/c/utf/private-string.c
level_1/fl_fss/c/private-fss.c
level_2/fll_fss/c/fss/basic.c
level_2/fll_fss/c/fss/basic_list.c
level_2/fll_fss/c/fss/embedded_list.c
level_2/fll_fss/c/fss/extended.c
level_2/fll_fss/c/fss/extended_list.c
level_2/fll_fss/c/fss/payload.c
level_2/fll_iki/c/iki.c
level_3/control/c/private-control.c
level_3/controller/c/common/private-process.c
level_3/controller/c/common/private-rule.c
level_3/controller/c/common/private-task.c
level_3/controller/c/controller/private-controller.c
level_3/controller/c/entry/private-entry.c
level_3/controller/c/rule/private-rule.c
level_3/controller/c/rule/private-rule.h
level_3/fake/c/private-build-load.c
level_3/fake/c/private-make-load_fakefile.c
level_3/fake/c/private-make-operate.c
level_3/fake/c/private-make.c
level_3/firewall/c/private-firewall.c
level_3/fss_basic_list_read/c/fss_basic_list_read.c
level_3/fss_basic_list_read/c/private-common.c
level_3/fss_basic_list_read/c/private-read.c
level_3/fss_basic_list_write/c/fss_basic_list_write.c
level_3/fss_basic_read/c/fss_basic_read.c
level_3/fss_basic_read/c/private-common.c
level_3/fss_basic_read/c/private-read.c
level_3/fss_basic_write/c/fss_basic_write.c
level_3/fss_embedded_list_read/c/fss_embedded_list_read.c
level_3/fss_embedded_list_read/c/private-read.c
level_3/fss_embedded_list_write/c/fss_embedded_list_write.c
level_3/fss_extended_list_read/c/fss_extended_list_read.c
level_3/fss_extended_list_read/c/private-common.c
level_3/fss_extended_list_read/c/private-read.c
level_3/fss_extended_list_write/c/fss_extended_list_write.c
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_read/c/private-common.c
level_3/fss_extended_read/c/private-read.c
level_3/fss_extended_write/c/fss_extended_write.c
level_3/fss_identify/c/fss_identify.c
level_3/fss_identify/c/private-identify.c
level_3/fss_payload_read/c/fss_payload_read.c
level_3/fss_payload_read/c/private-common.c
level_3/fss_payload_read/c/private-read.c
level_3/fss_payload_write/c/fss_payload_write.c
level_3/iki_read/c/private-print.c
level_3/iki_read/c/private-read.c

index fedeaeff3e21a81ff199076cd2a5888a64d89d65..bf18cfc13a536106d61d44f2b2eca26b3c8a1385 100644 (file)
@@ -43,7 +43,7 @@ build_sources_library environment.c
 build_sources_library execute.c
 build_sources_library file.c file/common.c private-file.c
 build_sources_library fss.c private-fss.c fss/common.c fss/named.c fss/nest.c fss/set.c
-build_sources_library iki.c iki/common.c private-iki.c
+build_sources_library iki.c iki/common.c iki/data.c private-iki.c iki/private-data.c
 build_sources_library limit.c
 build_sources_library memory.c private-memory.c memory/structure.c
 build_sources_library path.c private-path.c path/common.c
@@ -53,9 +53,9 @@ build_sources_library serialize.c private-serialize.c serialize/common.c
 build_sources_library signal.c
 build_sources_library socket.c
 build_sources_library status_string.c
-build_sources_library string.c private-string.c string/common.c string/dynamic.c string/map.c string/quantity.c string/range.c string/static.c string/triple.c
-build_sources_library type_array/array_length.c type_array/cell.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/state.c type_array/status.c
-build_sources_library type_array/private-array_length.c type_array/private-cell.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-state.c type_array/private-status.c
+build_sources_library string.c private-string.c string/common.c string/private-dynamic.c string/private-map.c string/private-map_multi.c string/private-quantity.c string/private-range.c string/private-triple.c string/dynamic.c string/map.c string/map_multi.c string/quantity.c string/range.c string/static.c string/triple.c
+build_sources_library type_array/array_length.c type_array/cell.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
+build_sources_library type_array/private-array_length.c type_array/private-cell.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c
 build_sources_library utf.c private-utf.c utf/common.c utf/dynamic.c utf/map.c utf/private-is_unassigned.c utf/private-string.c utf/string.c utf/triple.c
 build_sources_library-level thread.c private-thread.c
 build_sources_library_shared
@@ -77,7 +77,7 @@ build_sources_headers environment.h environment/common.h
 build_sources_headers execute.h execute/common.h
 build_sources_headers file.h file/common.h
 build_sources_headers fss.h fss/comment.h fss/common.h fss/delimit.h fss/named.h fss/nest.h fss/quote.h fss/set.h
-build_sources_headers iki.h iki/common.h
+build_sources_headers iki.h iki/common.h iki/data.h
 build_sources_headers limit.h limit/common.h
 build_sources_headers memory.h memory/structure.h memory/common.h
 build_sources_headers path.h path/common.h
@@ -88,10 +88,10 @@ build_sources_headers signal.h signal/common.h
 build_sources_headers socket.h socket/common.h
 build_sources_headers status.h
 build_sources_headers status_string.h
-build_sources_headers string.h string/common.h string/dynamic.h string/map.h string/quantity.h string/range.h string/static.h string/triple.h
+build_sources_headers string.h string/common.h string/dynamic.h string/map.h string/map_multi.h string/quantity.h string/range.h string/static.h string/triple.h
 build_sources_headers type.h
 build_sources_headers type_array.h type_array/common.h
-build_sources_headers type_array/array_length.h type_array/cell.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/state.h type_array/status.h
+build_sources_headers type_array/array_length.h type_array/cell.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
 build_sources_headers utf.h utf/common.h utf/dynamic.h utf/map.h utf/string.h utf/triple.h
 build_sources_headers-level thread.h thread/common.h
 build_sources_headers_shared
index eb6c0fa83ad7816f7b8b616226402c3a7e75a36b..6984a24aec03c541b4bac7548833082f69fdf40d 100644 (file)
@@ -43,7 +43,7 @@ build_sources_library level_0/environment.c
 build_sources_library level_0/execute.c
 build_sources_library level_0/file.c level_0/file/common.c level_0/private-file.c
 build_sources_library level_0/fss.c level_0/private-fss.c level_0/fss/common.c level_0/fss/named.c level_0/fss/nest.c level_0/fss/set.c
-build_sources_library level_0/iki.c level_0/iki/common.c level_0/private-iki.c
+build_sources_library level_0/iki.c level_0/iki/common.c level_0/iki/data.c level_0/private-iki.c level_0/iki/private-data.c
 build_sources_library level_0/limit.c
 build_sources_library level_0/memory.c level_0/private-memory.c level_0/memory/structure.c
 build_sources_library level_0/path.c level_0/private-path.c level_0/path/common.c
@@ -53,9 +53,9 @@ build_sources_library level_0/serialize.c level_0/private-serialize.c level_0/se
 build_sources_library level_0/signal.c
 build_sources_library level_0/socket.c
 build_sources_library level_0/status_string.c
-build_sources_library level_0/string.c level_0/private-string.c level_0/string/common.c level_0/string/dynamic.c level_0/string/map.c level_0/string/quantity.c level_0/string/range.c level_0/string/static.c level_0/string/triple.c
-build_sources_library level_0/type_array/array_length.c level_0/type_array/cell.c level_0/type_array/fll_id.c level_0/type_array/int8.c level_0/type_array/int16.c level_0/type_array/int32.c level_0/type_array/int64.c level_0/type_array/int128.c level_0/type_array/state.c level_0/type_array/status.c
-build_sources_library level_0/type_array/private-array_length.c level_0/type_array/private-cell.c level_0/type_array/private-fll_id.c level_0/type_array/private-int8.c level_0/type_array/private-int16.c level_0/type_array/private-int32.c level_0/type_array/private-int64.c level_0/type_array/private-int128.c level_0/type_array/private-state.c level_0/type_array/private-status.c
+build_sources_library level_0/string.c level_0/private-string.c level_0/string/common.c level_0/string/private-dynamic.c level_0/string/private-map.c level_0/string/private-map_multi.c level_0/string/private-quantity.c level_0/string/private-range.c level_0/string/private-triple.c level_0/string/dynamic.c level_0/string/map.c level_0/string/map_multi.c level_0/string/quantity.c level_0/string/range.c level_0/string/static.c level_0/string/triple.c
+build_sources_library level_0/type_array/array_length.c level_0/type_array/cell.c level_0/type_array/fll_id.c level_0/type_array/int8.c level_0/type_array/int16.c level_0/type_array/int32.c level_0/type_array/int64.c level_0/type_array/int128.c level_0/type_array/state.c level_0/type_array/status.c level_0/type_array/uint8.c level_0/type_array/uint16.c level_0/type_array/uint32.c level_0/type_array/uint64.c level_0/type_array/uint128.c
+build_sources_library level_0/type_array/private-array_length.c level_0/type_array/private-cell.c level_0/type_array/private-fll_id.c level_0/type_array/private-int8.c level_0/type_array/private-int16.c level_0/type_array/private-int32.c level_0/type_array/private-int64.c level_0/type_array/private-int128.c level_0/type_array/private-state.c level_0/type_array/private-status.c level_0/type_array/private-uint8.c level_0/type_array/private-uint16.c level_0/type_array/private-uint32.c level_0/type_array/private-uint64.c level_0/type_array/private-uint128.c
 build_sources_library level_0/utf.c level_0/private-utf.c level_0/utf/common.c level_0/utf/dynamic.c level_0/utf/map.c level_0/utf/string.c level_0/utf/triple.c level_0/utf/private-is_unassigned.c level_0/utf/private-string.c
 build_sources_library level_1/control_group.c
 build_sources_library level_1/conversion.c level_1/private-conversion.c
@@ -99,7 +99,7 @@ build_sources_headers level_0/environment.h level_0/environment/common.h
 build_sources_headers level_0/execute.h level_0/execute/common.h
 build_sources_headers level_0/file.h level_0/file/common.h
 build_sources_headers level_0/fss.h level_0/fss/comment.h level_0/fss/common.h level_0/fss/delimit.h level_0/fss/named.h level_0/fss/nest.h level_0/fss/quote.h level_0/fss/set.h
-build_sources_headers level_0/iki.h level_0/iki/common.h
+build_sources_headers level_0/iki.h level_0/iki/common.h level_0/iki/data.h
 build_sources_headers level_0/limit.h level_0/limit/common.h
 build_sources_headers level_0/memory.h level_0/memory/structure.h level_0/memory/common.h
 build_sources_headers level_0/path.h level_0/path/common.h
@@ -110,10 +110,10 @@ build_sources_headers level_0/signal.h level_0/signal/common.h
 build_sources_headers level_0/socket.h level_0/socket/common.h
 build_sources_headers level_0/status.h
 build_sources_headers level_0/status_string.h
-build_sources_headers level_0/string.h level_0/string/common.h level_0/string/dynamic.h level_0/string/map.h level_0/string/quantity.h level_0/string/range.h level_0/string/static.h level_0/string/triple.h
+build_sources_headers level_0/string.h level_0/string/common.h level_0/string/dynamic.h level_0/string/map.h level_0/string/map_multi.h level_0/string/quantity.h level_0/string/range.h level_0/string/static.h level_0/string/triple.h
 build_sources_headers level_0/type.h
 build_sources_headers level_0/type_array.h level_0/type_array/common.h
-build_sources_headers level_0/type_array/array_length.h level_0/type_array/cell.h level_0/type_array/fll_id.h level_0/type_array/int8.h level_0/type_array/int16.h level_0/type_array/int32.h level_0/type_array/int64.h level_0/type_array/int128.h level_0/type_array/state.h level_0/type_array/status.h
+build_sources_headers level_0/type_array/array_length.h level_0/type_array/cell.h level_0/type_array/fll_id.h level_0/type_array/int8.h level_0/type_array/int16.h level_0/type_array/int32.h level_0/type_array/int64.h level_0/type_array/int128.h level_0/type_array/state.h level_0/type_array/status.h level_0/type_array/uint8.h level_0/type_array/uint16.h level_0/type_array/uint32.h level_0/type_array/uint64.h level_0/type_array/uint128.h
 build_sources_headers level_0/utf.h level_0/utf/common.h level_0/utf/dynamic.h level_0/utf/map.h level_0/utf/string.h level_0/utf/triple.h
 build_sources_headers level_1/control_group.h
 build_sources_headers level_1/conversion.h
index 1b55f6721697abaffd03947e7c3d6813e29583e0..d947009ff71d761da3b0a4f1caff510e1495ead0 100644 (file)
@@ -22,7 +22,7 @@ extern "C" {
     }
 
     if (source.groups.used) {
-      status = f_string_dynamics_append(source.groups, &destination->groups);
+      status = f_string_dynamics_append_all(source.groups, &destination->groups);
       if (F_status_is_error(status)) return status;
     }
 
index f738f582f9a73ec980a1468d6dd1052232a5c1c2..629e8ddb1916d2147560e39bd825ddbd1b3d1583 100644 (file)
@@ -45,10 +45,10 @@ extern "C" {
  *   F_parameter (with error bit) if a parameter is invalid.
  *
  *   Errors (with error bit) from: f_string_dynamic_append().
- *   Errors (with error bit) from: f_string_dynamics_append().
+ *   Errors (with error bit) from: f_string_dynamics_append_all().
  *
  * @see f_string_dynamic_append()
- * @see f_string_dynamics_append()
+ * @see f_string_dynamics_append_all()
  */
 #ifndef _di_f_control_group_copy_
   extern f_status_t f_control_group_copy(const f_control_group_t source, f_control_group_t * const destination);
index 399a4af58b2c01e67617ffd6eeb85a4c5979bf94..bd258cbfc3ef52e54fabee67a38bfbbc2366823a 100644 (file)
@@ -24,7 +24,7 @@ extern "C" {
 
   #define f_fss_comment_t_initialize f_string_range_t_initialize
 
-  #define macro_f_fss_comment_t_initialize(length) macro_f_string_range_t_initialize(length)
+  #define macro_f_fss_comment_t_initialize(length) macro_f_string_range_t_initialize2(length)
 
   #define macro_f_fss_comment_t_clear(comment) macro_f_string_range_t_clear(comment)
 #endif // _di_f_fss_comment_t_
index 6fc61a79aabef3781c58b6071d8602c0b47e1be0..c3be49f29a83092d35181bdafb2e7aabbd6686b8 100644 (file)
@@ -268,7 +268,7 @@ enum {
 
   #define f_fss_object_t_initialize f_string_range_t_initialize
 
-  #define macro_f_fss_object_t_initialize(length) macro_f_string_range_t_initialize(length)
+  #define macro_f_fss_object_t_initialize(length) macro_f_string_range_t_initialize2(length)
 
   #define macro_f_fss_object_t_clear(object) macro_f_string_range_t_clear(object)
 #endif // _di_f_fss_object_t_
index 91a3442506f372151496f1c5333805f71b8d044c..ee9d09a6b77ceb7ff0391468ff937a1a173f04da 100644 (file)
@@ -22,7 +22,7 @@ extern "C" {
 #ifndef _di_f_fss_delimit_t_
   typedef f_array_length_t f_fss_delimit_t;
 
-  #define macro_f_fss_object_t_initialize(length) macro_f_string_range_t_initialize(length)
+  #define macro_f_fss_object_t_initialize(length) macro_f_string_range_t_initialize2(length)
 #endif // _di_f_fss_delimit_t_
 
 /**
index 5c952fad97d303a968ac8b764260b4bfc10a8b09..66ed67ea192a96723a88243f7944bc1067d8a692 100644 (file)
@@ -40,17 +40,14 @@ extern "C" {
     } // for
 
     status = f_memory_resize(items->size, length, sizeof(f_fss_item_t), (void **) & items->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      items->size = length;
+    items->size = length;
 
-      if (items->used > items->size) {
-        items->used = length;
-      }
+    if (items->used > items->size) {
+      items->used = length;
     }
 
-    if (F_status_is_error(status)) return status;
-
     return F_none;
   }
 #endif // !defined(_di_f_fss_items_decrease_by_) || !defined(_di_f_fss_items_increase_) || !defined(_di_f_fss_items_increase_by_) || !defined(_di_f_fss_items_resize_)
@@ -128,17 +125,14 @@ extern "C" {
     } // for
 
     status = f_memory_resize(nameds->size, length, sizeof(f_fss_named_t), (void **) & nameds->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      nameds->size = length;
+    nameds->size = length;
 
-      if (nameds->used > nameds->size) {
-        nameds->used = length;
-      }
+    if (nameds->used > nameds->size) {
+      nameds->used = length;
     }
 
-    if (F_status_is_error(status)) return status;
-
     return F_none;
   }
 #endif // !defined(_di_f_fss_nameds_decrease_by_) || !defined(_di_f_fss_nameds_increase_) || !defined(_di_f_fss_nameds_increase_by_) || !defined(_di_f_fss_nameds_resize_)
@@ -180,17 +174,14 @@ extern "C" {
     } // for
 
     status = f_memory_resize(nest->size, length, sizeof(f_fss_items_t), (void **) & nest->depth);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      nest->size = length;
+    nest->size = length;
 
-      if (nest->used > nest->size) {
-        nest->used = length;
-      }
+    if (nest->used > nest->size) {
+      nest->used = length;
     }
 
-    if (F_status_is_error(status)) return status;
-
     return F_none;
   }
 #endif // !defined(_di_f_fss_nest_decrease_by_) || !defined(_di_f_fss_nest_increase_) || !defined(_di_f_fss_nest_increase_by_) || !defined(_di_f_fss_nest_resize_)
@@ -232,17 +223,14 @@ extern "C" {
     } // for
 
     status = f_memory_resize(nests->size, length, sizeof(f_fss_nest_t), (void **) & nests->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      nests->size = length;
+    nests->size = length;
 
-      if (nests->used > nests->size) {
-        nests->used = length;
-      }
+    if (nests->used > nests->size) {
+      nests->used = length;
     }
 
-    if (F_status_is_error(status)) return status;
-
     return F_none;
   }
 #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_)
@@ -375,17 +363,14 @@ extern "C" {
     } // for
 
     status = f_memory_resize(set_quotes->size, length, sizeof(f_fss_set_quote_t), (void **) & set_quotes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      set_quotes->size = length;
+    set_quotes->size = length;
 
-      if (set_quotes->used > set_quotes->size) {
-        set_quotes->used = length;
-      }
+    if (set_quotes->used > set_quotes->size) {
+      set_quotes->used = length;
     }
 
-    if (F_status_is_error(status)) return status;
-
     return F_none;
   }
 #endif // !defined(_di_f_fss_set_quotes_decrease_by_) || !defined(_di_f_fss_set_quotes_increase_) || !defined(_di_f_fss_set_quotes_increase_by_) || !defined(_di_f_fss_set_quotes_resize_)
@@ -435,17 +420,14 @@ extern "C" {
     } // for
 
     status = f_memory_resize(sets->size, length, sizeof(f_fss_set_t), (void **) & sets->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      sets->size = length;
+    sets->size = length;
 
-      if (sets->used > sets->size) {
-        sets->used = length;
-      }
+    if (sets->used > sets->size) {
+      sets->used = length;
     }
 
-    if (F_status_is_error(status)) return status;
-
     return F_none;
   }
 #endif // !defined(_di_f_fss_sets_decrease_by_) || !defined(_di_f_fss_sets_increase_) || !defined(_di_f_fss_sets_increase_by_) || !defined(_di_f_fss_sets_resize_)
index fd79afb43505b21f30034048b317bd0964bf26ed..ded0ee5d2f42242da20d28f78867cc9dd2081548 100644 (file)
@@ -27,6 +27,7 @@
 
 // FLL-0 iki includes.
 #include <fll/level_0/iki/common.h>
+#include <fll/level_0/iki/data.h>
 
 #ifdef __cplusplus
 extern "C" {
index 6fc4869896610ce66ef8e37a173cfa213a3f6ab0..566a314e6beb7ebb1f4cef33dfbe2a87b75c4d69 100644 (file)
@@ -32,191 +32,6 @@ extern "C" {
   const f_string_static_t f_iki_vocabulary_0002_parameter_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_parameter_s, 0, F_iki_vocabulary_0002_parameter_s_length);
 #endif // _di_f_iki_vocabulary_0002_s_
 
-#ifndef _di_f_iki_data_delete_
-  f_status_t f_iki_data_delete(f_iki_data_t *data) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!data) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    f_status_t status = f_string_ranges_resize(0, &data->content);
-    if (F_status_is_error(status)) return status;
-
-    status = f_array_lengths_resize(0, &data->delimits);
-    if (F_status_is_error(status)) return status;
-
-    status = f_string_ranges_resize(0, &data->variable);
-    if (F_status_is_error(status)) return status;
-
-    status = f_string_ranges_resize(0, &data->vocabulary);
-    if (F_status_is_error(status)) return status;
-
-    return F_none;
-  }
-#endif // _di_f_iki_data_delete_
-
-#ifndef _di_f_iki_data_destroy_
-  f_status_t f_iki_data_destroy(f_iki_data_t *data) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!data) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    f_status_t status = f_string_ranges_adjust(0, &data->content);
-    if (F_status_is_error(status)) return status;
-
-    status = f_array_lengths_adjust(0, &data->delimits);
-    if (F_status_is_error(status)) return status;
-
-    status = f_string_ranges_adjust(0, &data->variable);
-    if (F_status_is_error(status)) return status;
-
-    status = f_string_ranges_adjust(0, &data->vocabulary);
-    if (F_status_is_error(status)) return status;
-
-    return F_none;
-  }
-#endif // _di_f_iki_data_destroy_
-
-#ifndef _di_f_iki_datas_adjust_
-  f_status_t f_iki_datas_adjust(const f_array_length_t length, f_iki_datas_t *datas) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!datas) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_iki_datas_adjust(length, datas);
-  }
-#endif // _di_f_iki_datas_adjust_
-
-#ifndef _di_f_iki_datas_append_
-  f_status_t f_iki_datas_append(const f_iki_datas_t source, f_iki_datas_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_iki_datas_resize(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-
-      destination->array[destination->used].content.used = 0;
-      destination->array[destination->used].delimits.used = 0;
-      destination->array[destination->used].variable.used = 0;
-      destination->array[destination->used].vocabulary.used = 0;
-
-      status = f_string_ranges_append(source.array[i].content, &destination->array[destination->used].content);
-      if (F_status_is_error(status)) return status;
-
-      status = f_array_lengths_append(source.array[i].delimits, &destination->array[destination->used].delimits);
-      if (F_status_is_error(status)) return status;
-
-      status = f_string_ranges_append(source.array[i].variable, &destination->array[destination->used].variable);
-      if (F_status_is_error(status)) return status;
-
-      status = f_string_ranges_append(source.array[i].vocabulary, &destination->array[destination->used].vocabulary);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return F_none;
-  }
-#endif // _di_f_iki_datas_append_
-
-#ifndef _di_f_iki_datas_decimate_by_
-  f_status_t f_iki_datas_decimate_by(const f_array_length_t amount, f_iki_datas_t *datas) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!datas) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (datas->size - amount > 0) {
-      return private_f_iki_datas_adjust(datas->size - amount, datas);
-    }
-
-    return private_f_iki_datas_adjust(0, datas);
-  }
-#endif // _di_f_iki_datas_decimate_by_
-
-#ifndef _di_f_iki_datas_decrease_by_
-  f_status_t f_iki_datas_decrease_by(const f_array_length_t amount, f_iki_datas_t *datas) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!datas) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (datas->size - amount > 0) {
-      return private_f_iki_datas_resize(datas->size - amount, datas);
-    }
-
-    return private_f_iki_datas_resize(0, datas);
-  }
-#endif // _di_f_iki_datas_decrease_by_
-
-#ifndef _di_f_iki_datas_increase_
-  f_status_t f_iki_datas_increase(const f_array_length_t step, f_iki_datas_t *datas) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!datas) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && datas->used + 1 > datas->size) {
-      f_array_length_t size = datas->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (datas->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_iki_datas_resize(size, datas);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_iki_datas_increase_
-
-#ifndef _di_f_iki_datas_increase_by_
-  f_status_t f_iki_datas_increase_by(const f_array_length_t amount, f_iki_datas_t *datas) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!datas) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (datas->used + amount > datas->size) {
-      if (datas->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_iki_datas_resize(datas->used + amount, datas);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_iki_datas_increase_by_
-
-#ifndef _di_f_iki_datas_resize_
-  f_status_t f_iki_datas_resize(const f_array_length_t length, f_iki_datas_t *datas) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!datas) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_iki_datas_resize(length, datas);
-  }
-#endif // _di_f_iki_datas_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index c0e25aeb1cfc46200bddbd675e9a83b934aeb208..38a56ac520fd992cc3923dcb92443088e9ac79bf 100644 (file)
@@ -343,7 +343,7 @@ extern "C" {
 /**
  * An array of f_iki_data_t.
  *
- * array: The array of fss quotes.
+ * array: The array of IKI data.
  * size:  Total amount of allocated space.
  * used:  Total number of allocated spaces used.
  */
@@ -355,231 +355,72 @@ extern "C" {
     f_array_length_t used;
   } f_iki_datas_t;
 
-  #define f_fss_iki_datas_t_initialize { 0, 0, 0 }
+  #define f_iki_datas_t_initialize { 0, 0, 0 }
 
   #define macro_f_iki_datas_t_initialize(content, size, used) { array, size, used }
   #define macro_f_iki_datas_t_initialize2(array, length) { array, length, length }
 
-  #define macro_f_fss_iki_datas_t_clear(datas) macro_f_memory_structure_clear(datas)
+  #define macro_f_iki_datas_t_clear(datas) macro_f_memory_structure_clear(datas)
 
-  #define macro_f_fss_iki_datas_t_resize(status, datas, length) status = f_iki_datas_resize(length, &datas);
-  #define macro_f_fss_iki_datas_t_adjust(status, datas, length) status = f_iki_datas_adjust(length, &datas);
+  #define macro_f_iki_datas_t_resize(status, datas, length) status = f_iki_datas_resize(length, &datas);
+  #define macro_f_iki_datas_t_adjust(status, datas, length) status = f_iki_datas_adjust(length, &datas);
 
-  #define macro_f_fss_iki_datas_t_delete_simple(datas)  status = f_iki_datas_resize(0, &datas);
-  #define macro_f_fss_iki_datas_t_destroy_simple(datas) status = f_iki_datas_adjust(0, &datas);
+  #define macro_f_iki_datas_t_delete_simple(datas)  status = f_iki_datas_resize(0, &datas);
+  #define macro_f_iki_datas_t_destroy_simple(datas) status = f_iki_datas_adjust(0, &datas);
 
-  #define macro_f_fss_iki_datas_t_increase(status, step, datas)      status = f_iki_datas_increase(step, &datas);
-  #define macro_f_fss_iki_datas_t_increase_by(status, datas, amount) status = f_iki_datas_increase_by(amount, &datas);
-  #define macro_f_fss_iki_datas_t_decrease_by(status, datas, amount) status = f_iki_datas_decrease_by(amount, &datas);
-  #define macro_f_fss_iki_datas_t_decimate_by(status, datas, amount) status = f_iki_datas_decimate_by(amount, &datas);
+  #define macro_f_iki_datas_t_increase(status, step, datas)      status = f_iki_datas_increase(step, &datas);
+  #define macro_f_iki_datas_t_increase_by(status, datas, amount) status = f_iki_datas_increase_by(amount, &datas);
+  #define macro_f_iki_datas_t_decrease_by(status, datas, amount) status = f_iki_datas_decrease_by(amount, &datas);
+  #define macro_f_iki_datas_t_decimate_by(status, datas, amount) status = f_iki_datas_decimate_by(amount, &datas);
 #endif // _di_f_iki_datas_t_
 
 /**
- * Provide a default allocation step.
- *
- * For a UTF-8 friendly allocation step, set to at least 4.
- */
-#ifndef _di_f_iki_default_allocation_step_
-  #define F_iki_default_allocation_step_d 4
-#endif // _di_f_iki_default_allocation_step_
-
-/**
- * Delete the IKI data.
- *
- * @param data
- *   The IKI data to delete.
+ * An array of f_iki_datas_t.
  *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_array_lengths_resize().
- *   Errors (with error bit) from: f_string_ranges_resize().
- *
- * @see f_array_lengths_resize()
- * @see f_string_ranges_resize()
+ * array: The array of IKI datas.
+ * size:  Total amount of allocated space.
+ * used:  Total number of allocated spaces used.
  */
-#ifndef _di_f_iki_data_delete_
-  extern f_status_t f_iki_data_delete(f_iki_data_t *data);
-#endif // _di_f_iki_data_delete_
+#ifndef _di_f_iki_datass_t_
+  typedef struct {
+    f_iki_datas_t *array;
 
-/**
- * Destroy the IKI data.
- *
- * @param data
- *   The IKI data to destroy.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_array_lengths_adjust().
- *   Errors (with error bit) from: f_string_ranges_adjust().
- *
- * @see f_array_lengths_adjust()
- * @see f_string_ranges_adjust()
- */
-#ifndef _di_f_iki_data_destroy_
-  extern f_status_t f_iki_data_destroy(f_iki_data_t *data);
-#endif // _di_f_iki_data_destroy_
+    f_array_length_t size;
+    f_array_length_t used;
+  } f_iki_datass_t;
 
-/**
- * Resize the string lengths array.
- *
- * @param length
- *   The new size to use.
- * @param lengths
- *   The string lengths array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_iki_datas_adjust_
-  extern f_status_t f_iki_datas_adjust(const f_array_length_t length, f_iki_datas_t *datas);
-#endif // _di_f_iki_datas_adjust_
+  #define f_iki_datass_t_initialize { 0, 0, 0 }
 
-/**
- * Append the source lengths onto the destination.
- *
- * @param source
- *   The source lengths to append.
- * @param destination
- *   The destination lengths the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_iki_datas_append_
-  extern f_status_t f_iki_datas_append(const f_iki_datas_t source, f_iki_datas_t *destination);
-#endif // _di_f_iki_datas_append_
+  #define macro_f_iki_datass_t_initialize(content, size, used) { array, size, used }
+  #define macro_f_iki_datass_t_initialize2(array, length) { array, length, length }
 
-/**
- * Resize the string lengths array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decimate the size by.
- * @param lengths
- *   The string lengths array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_iki_datas_decimate_by_
-  extern f_status_t f_iki_datas_decimate_by(const f_array_length_t amount, f_iki_datas_t *datas);
-#endif // _di_f_iki_datas_decimate_by_
+  #define macro_f_iki_datass_t_clear(datas) macro_f_memory_structure_clear(datas)
 
-/**
- * Resize the string lengths array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decrease the size by.
- * @param lengths
- *   The string lengths array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_iki_datas_decrease_by_
-  extern f_status_t f_iki_datas_decrease_by(const f_array_length_t amount, f_iki_datas_t *datas);
-#endif // _di_f_iki_datas_decrease_by_
+  #define macro_f_iki_datass_t_resize(status, datas, length) status = f_iki_datass_resize(length, &datas);
+  #define macro_f_iki_datass_t_adjust(status, datas, length) status = f_iki_datass_adjust(length, &datas);
 
-/**
- * Increase the size of the string lengths array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 lengths
- *   The string lengths array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_iki_datas_increase_
-  extern f_status_t f_iki_datas_increase(const f_array_length_t step, f_iki_datas_t *datas);
-#endif // _di_f_iki_datas_increase_
+  #define macro_f_iki_datass_t_delete_simple(datas)  status = f_iki_datass_resize(0, &datas);
+  #define macro_f_iki_datass_t_destroy_simple(datas) status = f_iki_datass_adjust(0, &datas);
 
-/**
- * Resize the string lengths array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 lengths
- *   The string lengths array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_iki_datas_increase_by_
-  extern f_status_t f_iki_datas_increase_by(const f_array_length_t amount, f_iki_datas_t *datas);
-#endif // _di_f_iki_datas_increase_by_
+  #define macro_f_iki_datass_t_increase(status, step, datas)      status = f_iki_datass_increase(step, &datas);
+  #define macro_f_iki_datass_t_increase_by(status, datas, amount) status = f_iki_datass_increase_by(amount, &datas);
+  #define macro_f_iki_datass_t_decrease_by(status, datas, amount) status = f_iki_datass_decrease_by(amount, &datas);
+  #define macro_f_iki_datass_t_decimate_by(status, datas, amount) status = f_iki_datass_decimate_by(amount, &datas);
+#endif // _di_f_iki_datass_t_
 
 /**
- * Resize the string lengths array.
- *
- * @param length
- *   The new size to use.
- * @param lengths
- *   The string lengths array to adjust.
- *
- * @return
- *   F_none on success.
+ * Provide a default allocation step.
  *
- *   F_parameter (with error bit) if a parameter is invalid.
+ * For a UTF-8 friendly allocation step, set to at least 4.
  *
- *   Errors (with error bit) from: f_memory_resize().
+ * F_iki_default_allocation_*:
+ *   - large: The large allocation size.
+ *   - small: The small allocation size, in particular used for allocation iki strings.
  */
-#ifndef _di_f_iki_datas_resize_
-  extern f_status_t f_iki_datas_resize(const f_array_length_t length, f_iki_datas_t *datas);
-#endif // _di_f_iki_datas_resize_
+#ifndef _di_f_iki_default_allocation_step_
+  #define F_iki_default_allocation_large_d F_memory_default_allocation_large_d
+  #define F_iki_default_allocation_small_d 4
+#endif // _di_f_iki_default_allocation_step_
 
 #ifdef __cplusplus
 } // extern "C"
diff --git a/level_0/f_iki/c/iki/data.c b/level_0/f_iki/c/iki/data.c
new file mode 100644 (file)
index 0000000..d25f6d3
--- /dev/null
@@ -0,0 +1,334 @@
+#include "../iki.h"
+#include "data.h"
+#include "private-data.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_iki_data_delete_
+  f_status_t f_iki_data_delete(f_iki_data_t *data) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!data) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    f_status_t status = f_string_ranges_resize(0, &data->content);
+    if (F_status_is_error(status)) return status;
+
+    status = f_array_lengths_resize(0, &data->delimits);
+    if (F_status_is_error(status)) return status;
+
+    status = f_string_ranges_resize(0, &data->variable);
+    if (F_status_is_error(status)) return status;
+
+    status = f_string_ranges_resize(0, &data->vocabulary);
+    if (F_status_is_error(status)) return status;
+
+    return F_none;
+  }
+#endif // _di_f_iki_data_delete_
+
+#ifndef _di_f_iki_data_destroy_
+  f_status_t f_iki_data_destroy(f_iki_data_t *data) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!data) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    f_status_t status = f_string_ranges_adjust(0, &data->content);
+    if (F_status_is_error(status)) return status;
+
+    status = f_array_lengths_adjust(0, &data->delimits);
+    if (F_status_is_error(status)) return status;
+
+    status = f_string_ranges_adjust(0, &data->variable);
+    if (F_status_is_error(status)) return status;
+
+    status = f_string_ranges_adjust(0, &data->vocabulary);
+    if (F_status_is_error(status)) return status;
+
+    return F_none;
+  }
+#endif // _di_f_iki_data_destroy_
+
+#ifndef _di_f_iki_datas_adjust_
+  f_status_t f_iki_datas_adjust(const f_array_length_t length, f_iki_datas_t *datas) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datas) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_iki_datas_adjust(length, datas);
+  }
+#endif // _di_f_iki_datas_adjust_
+
+#ifndef _di_f_iki_datas_append_
+  f_status_t f_iki_datas_append(const f_iki_data_t source, f_iki_datas_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_iki_datas_append(source, destination);
+  }
+#endif // _di_f_iki_datas_append_
+
+#ifndef _di_f_iki_datas_append_all_
+  f_status_t f_iki_datas_append_all(const f_iki_datas_t source, f_iki_datas_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_iki_datas_append_all(source, destination);
+  }
+#endif // _di_f_iki_datas_append_all_
+
+#ifndef _di_f_iki_datas_decimate_by_
+  f_status_t f_iki_datas_decimate_by(const f_array_length_t amount, f_iki_datas_t *datas) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datas) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (datas->size - amount > 0) {
+      return private_f_iki_datas_adjust(datas->size - amount, datas);
+    }
+
+    return private_f_iki_datas_adjust(0, datas);
+  }
+#endif // _di_f_iki_datas_decimate_by_
+
+#ifndef _di_f_iki_datas_decrease_by_
+  f_status_t f_iki_datas_decrease_by(const f_array_length_t amount, f_iki_datas_t *datas) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datas) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (datas->size - amount > 0) {
+      return private_f_iki_datas_resize(datas->size - amount, datas);
+    }
+
+    return private_f_iki_datas_resize(0, datas);
+  }
+#endif // _di_f_iki_datas_decrease_by_
+
+#ifndef _di_f_iki_datas_increase_
+  f_status_t f_iki_datas_increase(const f_array_length_t step, f_iki_datas_t *datas) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datas) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && datas->used + 1 > datas->size) {
+      f_array_length_t size = datas->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (datas->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_iki_datas_resize(size, datas);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_iki_datas_increase_
+
+#ifndef _di_f_iki_datas_increase_by_
+  f_status_t f_iki_datas_increase_by(const f_array_length_t amount, f_iki_datas_t *datas) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datas) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (datas->used + amount > datas->size) {
+      if (datas->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_iki_datas_resize(datas->used + amount, datas);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_iki_datas_increase_by_
+
+#ifndef _di_f_iki_datas_resize_
+  f_status_t f_iki_datas_resize(const f_array_length_t length, f_iki_datas_t *datas) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datas) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_iki_datas_resize(length, datas);
+  }
+#endif // _di_f_iki_datas_resize_
+
+#ifndef _di_f_iki_datass_adjust_
+  f_status_t f_iki_datass_adjust(const f_array_length_t length, f_iki_datass_t *datass) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datass) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_iki_datass_adjust(length, datass);
+  }
+#endif // _di_f_iki_datass_adjust_
+
+#ifndef _di_f_iki_datass_append_
+  f_status_t f_iki_datass_append(const f_iki_datas_t source, f_iki_datass_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_iki_datass_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      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;
+
+    return F_none;
+  }
+#endif // _di_f_iki_datass_append_
+
+#ifndef _di_f_iki_datass_append_all_
+  f_status_t f_iki_datass_append_all(const f_iki_datass_t source, f_iki_datass_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_iki_datass_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      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
+
+    return F_none;
+  }
+#endif // _di_f_iki_datass_append_all_
+
+#ifndef _di_f_iki_datass_decimate_by_
+  f_status_t f_iki_datass_decimate_by(const f_array_length_t amount, f_iki_datass_t *datass) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datass) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (datass->size - amount > 0) {
+      return private_f_iki_datass_adjust(datass->size - amount, datass);
+    }
+
+    return private_f_iki_datass_adjust(0, datass);
+  }
+#endif // _di_f_iki_datass_decimate_by_
+
+#ifndef _di_f_iki_datass_decrease_by_
+  f_status_t f_iki_datass_decrease_by(const f_array_length_t amount, f_iki_datass_t *datass) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datass) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (datass->size - amount > 0) {
+      return private_f_iki_datass_resize(datass->size - amount, datass);
+    }
+
+    return private_f_iki_datass_resize(0, datass);
+  }
+#endif // _di_f_iki_datass_decrease_by_
+
+#ifndef _di_f_iki_datass_increase_
+  f_status_t f_iki_datass_increase(const f_array_length_t step, f_iki_datass_t *datass) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datass) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && datass->used + 1 > datass->size) {
+      f_array_length_t size = datass->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (datass->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_iki_datass_resize(size, datass);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_iki_datass_increase_
+
+#ifndef _di_f_iki_datass_increase_by_
+  f_status_t f_iki_datass_increase_by(const f_array_length_t amount, f_iki_datass_t *datass) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datass) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (datass->used + amount > datass->size) {
+      if (datass->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_iki_datass_resize(datass->used + amount, datass);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_iki_datass_increase_by_
+
+#ifndef _di_f_iki_datass_resize_
+  f_status_t f_iki_datass_resize(const f_array_length_t length, f_iki_datass_t *datass) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!datass) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_iki_datass_resize(length, datass);
+  }
+#endif // _di_f_iki_datass_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_iki/c/iki/data.h b/level_0/f_iki/c/iki/data.h
new file mode 100644 (file)
index 0000000..5fd8d56
--- /dev/null
@@ -0,0 +1,421 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines data to be used for/by type (array) related functionality.
+ *
+ * This is auto-included by type_array.h and should not need to be explicitly included.
+ */
+#ifndef _F_iki_data_h
+#define _F_iki_data_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Delete the IKI data.
+ *
+ * @param data
+ *   The IKI data to delete.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_array_lengths_resize().
+ *   Errors (with error bit) from: f_string_ranges_resize().
+ *
+ * @see f_array_lengths_resize()
+ * @see f_string_ranges_resize()
+ */
+#ifndef _di_f_iki_data_delete_
+  extern f_status_t f_iki_data_delete(f_iki_data_t *data);
+#endif // _di_f_iki_data_delete_
+
+/**
+ * Destroy the IKI data.
+ *
+ * @param data
+ *   The IKI data to destroy.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_array_lengths_adjust().
+ *   Errors (with error bit) from: f_string_ranges_adjust().
+ *
+ * @see f_array_lengths_adjust()
+ * @see f_string_ranges_adjust()
+ */
+#ifndef _di_f_iki_data_destroy_
+  extern f_status_t f_iki_data_destroy(f_iki_data_t *data);
+#endif // _di_f_iki_data_destroy_
+
+/**
+ * Resize the iki_datas array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param iki_datas
+ *   The iki_datas array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_iki_datas_adjust_
+  extern f_status_t f_iki_datas_adjust(const f_array_length_t length, f_iki_datas_t *datas);
+#endif // _di_f_iki_datas_adjust_
+
+/**
+ * Append the single source iki_data onto the destination.
+ *
+ * @param source
+ *   The source iki_data to append.
+ * @param destination
+ *   The destination iki_datas the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_iki_datas_append_
+  extern f_status_t f_iki_datas_append(const f_iki_data_t source, f_iki_datas_t *destination);
+#endif // _di_f_iki_datas_append_
+
+/**
+ * Append the source iki_datas onto the destination.
+ *
+ * @param source
+ *   The source iki_datas to append.
+ * @param destination
+ *   The destination iki_datas the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_iki_datas_append_all_
+  extern f_status_t f_iki_datas_append_all(const f_iki_datas_t source, f_iki_datas_t *destination);
+#endif // _di_f_iki_datas_append_all_
+
+/**
+ * Resize the iki_datas array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decimate the size by.
+ * @param iki_datas
+ *   The iki_datas array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_iki_datas_decimate_by_
+  extern f_status_t f_iki_datas_decimate_by(const f_array_length_t amount, f_iki_datas_t *datas);
+#endif // _di_f_iki_datas_decimate_by_
+
+/**
+ * Resize the iki_datas array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decrease the size by.
+ * @param iki_datas
+ *   The iki_datas array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_iki_datas_decrease_by_
+  extern f_status_t f_iki_datas_decrease_by(const f_array_length_t amount, f_iki_datas_t *datas);
+#endif // _di_f_iki_datas_decrease_by_
+
+/**
+ * Increase the size of the iki_datas array, but only if necesary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 iki_datas
+ *   The iki_datas array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_iki_datas_increase_
+  extern f_status_t f_iki_datas_increase(const f_array_length_t step, f_iki_datas_t *datas);
+#endif // _di_f_iki_datas_increase_
+
+/**
+ * Resize the iki_datas array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 iki_datas
+ *   The iki_datas array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_iki_datas_increase_by_
+  extern f_status_t f_iki_datas_increase_by(const f_array_length_t amount, f_iki_datas_t *datas);
+#endif // _di_f_iki_datas_increase_by_
+
+/**
+ * Resize the iki_datas array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param iki_datas
+ *   The iki_datas array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_iki_datas_resize_
+  extern f_status_t f_iki_datas_resize(const f_array_length_t length, f_iki_datas_t *datas);
+#endif // _di_f_iki_datas_resize_
+
+/**
+ * Resize the iki_datass array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param iki_datass
+ *   The iki_datass array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_iki_datass_adjust_
+  extern f_status_t f_iki_datass_adjust(const f_array_length_t length, f_iki_datass_t *datass);
+#endif // _di_f_iki_datass_adjust_
+
+/**
+ * Append the single source iki_datas onto the destination.
+ *
+ * @param source
+ *   The source iki_datas to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_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 *destination);
+#endif // _di_f_iki_datass_append_
+
+/**
+ * Append the source iki_datass onto the destination.
+ *
+ * @param source
+ *   The source iki_datass to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_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 *destination);
+#endif // _di_f_iki_datass_append_all_
+
+/**
+ * Resize the iki_datass 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 iki_datass
+ *   The iki_datass array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_iki_datass_decimate_by_
+  extern f_status_t f_iki_datass_decimate_by(const f_array_length_t amount, f_iki_datass_t *datass);
+#endif // _di_f_iki_datass_decimate_by_
+
+/**
+ * Resize the iki_datass 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 iki_datass
+ *   The iki_datass array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_iki_datass_decrease_by_
+  extern f_status_t f_iki_datass_decrease_by(const f_array_length_t amount, f_iki_datass_t *datass);
+#endif // _di_f_iki_datass_decrease_by_
+
+/**
+ * Increase the size of the iki_datass array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 iki_datass
+ *   The iki_datass array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_iki_datass_increase_
+  extern f_status_t f_iki_datass_increase(const f_array_length_t step, f_iki_datass_t *datass);
+#endif // _di_f_iki_datass_increase_
+
+/**
+ * Resize the iki_datass array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 iki_datass
+ *   The iki_datass array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_iki_datass_increase_by_
+  extern f_status_t f_iki_datass_increase_by(const f_array_length_t amount, f_iki_datass_t *datass);
+#endif // _di_f_iki_datass_increase_by_
+
+/**
+ * Resize the iki_datass array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param iki_datass
+ *   The iki_datass array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_iki_datass_resize_
+  extern f_status_t f_iki_datass_resize(const f_array_length_t length, f_iki_datass_t *datass);
+#endif // _di_f_iki_datass_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_iki_data_h
diff --git a/level_0/f_iki/c/iki/private-data.c b/level_0/f_iki/c/iki/private-data.c
new file mode 100644 (file)
index 0000000..9be4bc3
--- /dev/null
@@ -0,0 +1,221 @@
+#include "../iki.h"
+#include "private-data.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_)
+  f_status_t private_f_iki_datas_adjust(const f_array_length_t length, f_iki_datas_t *datas) {
+
+    if (datas->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < datas->size; ++i) {
+
+      status = f_string_ranges_adjust(0, &datas->array[i].content);
+      if (F_status_is_error(status)) return status;
+
+      status = f_array_lengths_adjust(0, &datas->array[i].delimits);
+      if (F_status_is_error(status)) return status;
+
+      status = f_string_ranges_adjust(0, &datas->array[i].variable);
+      if (F_status_is_error(status)) return status;
+
+      status = f_string_ranges_adjust(0, &datas->array[i].vocabulary);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(datas->size, length, sizeof(f_iki_data_t), (void **) & datas->array);
+    if (F_status_is_error(status)) return status;
+
+    datas->size = length;
+
+    if (datas->used > datas->size) {
+      datas->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_)
+
+#if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datass_append_)
+  extern f_status_t private_f_iki_datas_append(const f_iki_data_t source, f_iki_datas_t *destination) {
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_iki_datas_resize(destination->used + F_iki_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used].content.used = 0;
+    destination->array[destination->used].delimits.used = 0;
+    destination->array[destination->used].variable.used = 0;
+    destination->array[destination->used].vocabulary.used = 0;
+
+    if (source.content.used) {
+      status = f_string_ranges_append_all(source.content, &destination->array[destination->used].content);
+      if (F_status_is_error(status)) return status;
+    }
+
+    if (source.delimits.used) {
+      status = f_array_lengths_append_all(source.delimits, &destination->array[destination->used].delimits);
+      if (F_status_is_error(status)) return status;
+    }
+
+    if (source.variable.used) {
+      status = f_string_ranges_append_all(source.variable, &destination->array[destination->used].variable);
+      if (F_status_is_error(status)) return status;
+    }
+
+    if (source.vocabulary.used) {
+      status = f_string_ranges_append_all(source.vocabulary, &destination->array[destination->used].vocabulary);
+      if (F_status_is_error(status)) return status;
+    }
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datass_append_)
+
+#if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_append_all_) || !defined(_di_f_iki_datass_append_all_)
+  extern f_status_t private_f_iki_datas_append_all(const f_iki_datas_t source, f_iki_datas_t *destination) {
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_iki_datas_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      destination->array[destination->used].content.used = 0;
+      destination->array[destination->used].delimits.used = 0;
+      destination->array[destination->used].variable.used = 0;
+      destination->array[destination->used].vocabulary.used = 0;
+
+      if (source.array[i].content.used) {
+        status = f_string_ranges_append_all(source.array[i].content, &destination->array[destination->used].content);
+        if (F_status_is_error(status)) return status;
+      }
+
+      if (source.array[i].delimits.used) {
+        status = f_array_lengths_append_all(source.array[i].delimits, &destination->array[destination->used].delimits);
+        if (F_status_is_error(status)) return status;
+      }
+
+      if (source.array[i].variable.used) {
+        status = f_string_ranges_append_all(source.array[i].variable, &destination->array[destination->used].variable);
+        if (F_status_is_error(status)) return status;
+      }
+
+      if (source.array[i].vocabulary.used) {
+        status = f_string_ranges_append_all(source.array[i].vocabulary, &destination->array[destination->used].vocabulary);
+        if (F_status_is_error(status)) return status;
+      }
+    } // for
+
+    return F_none;
+  }
+#endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_append_all_) || !defined(_di_f_iki_datass_append_all_)
+
+#if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decrease_by_) || !defined(_di_f_iki_datas_increase_) || !defined(_di_f_iki_datas_increase_by_) || !defined(_di_f_iki_datas_resize_)
+  f_status_t private_f_iki_datas_resize(const f_array_length_t length, f_iki_datas_t *datas) {
+
+    if (datas->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < datas->size; ++i) {
+
+      status = f_string_ranges_resize(0, &datas->array[i].content);
+      if (F_status_is_error(status)) return status;
+
+      status = f_array_lengths_resize(0, &datas->array[i].delimits);
+      if (F_status_is_error(status)) return status;
+
+      status = f_string_ranges_resize(0, &datas->array[i].variable);
+      if (F_status_is_error(status)) return status;
+
+      status = f_string_ranges_resize(0, &datas->array[i].vocabulary);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(datas->size, length, sizeof(f_iki_data_t), (void **) & datas->array);
+    if (F_status_is_error(status)) return status;
+
+    datas->size = length;
+
+    if (datas->used > datas->size) {
+      datas->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decrease_by_) || !defined(_di_f_iki_datas_increase_) || !defined(_di_f_iki_datas_increase_by_) || !defined(_di_f_iki_datas_resize_)
+
+#if !defined(_di_f_iki_datass_adjust_) || !defined(_di_f_iki_datass_decimate_by_)
+  f_status_t private_f_iki_datass_adjust(const f_array_length_t length, f_iki_datass_t *datass) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < datass->size; ++i) {
+
+      status = f_memory_destroy(datass->array[i].size, sizeof(f_iki_datas_t), (void **) & datass->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      datass->array[i].size = 0;
+      datass->array[i].used = 0;
+    } // for
+
+    status = f_memory_adjust(datass->size, length, sizeof(f_iki_datas_t), (void **) & datass->array);
+    if (F_status_is_error(status)) return status;
+
+    datass->size = length;
+
+    if (datass->used > datass->size) {
+      datass->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_iki_datass_adjust_) || !defined(_di_f_iki_datass_decimate_by_)
+
+#if !defined(_di_f_iki_datass_decrease_by_) || !defined(_di_f_iki_datass_increase_) || !defined(_di_f_iki_datass_increase_by_) || !defined(_di_f_iki_datass_resize_)
+  f_status_t private_f_iki_datass_resize(const f_array_length_t length, f_iki_datass_t *datass) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < datass->size; ++i) {
+
+      status = f_memory_delete(datass->array[i].size, sizeof(f_iki_datas_t), (void **) & datass->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      datass->array[i].size = 0;
+      datass->array[i].used = 0;
+    } // for
+
+    status = f_memory_resize(datass->size, length, sizeof(f_iki_datas_t), (void **) & datass->array);
+    if (F_status_is_error(status)) return status;
+
+    datass->size = length;
+
+    if (datass->used > datass->size) {
+      datass->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_iki_datass_decrease_by_) || !defined(_di_f_iki_datass_increase_) || !defined(_di_f_iki_datass_increase_by_) || !defined(_di_f_iki_datass_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_iki/c/iki/private-data.h b/level_0/f_iki/c/iki/private-data.h
new file mode 100644 (file)
index 0000000..bac0cb7
--- /dev/null
@@ -0,0 +1,175 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_iki_data_h
+#define _PRIVATE_F_iki_data_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing the iki_datas array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param iki_datas
+ *   The iki_datas array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see f_iki_datas_adjust()
+ * @see f_iki_datas_decimate_by()
+ */
+#if !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_)
+  extern f_status_t private_f_iki_datas_adjust(const f_array_length_t length, f_iki_datas_t *datas) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_)
+
+/**
+ * Private implementation for appending the iki_data array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source iki_data to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_iki_datas_append()
+ * @see f_iki_datass_append()
+ */
+#if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datass_append_)
+  extern f_status_t private_f_iki_datas_append(const f_iki_data_t source, f_iki_datas_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datass_append_)
+
+/**
+ * Private implementation for appending the iki_data array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source iki_datas to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_iki_datas_append_all()
+ * @see f_iki_datass_append()
+ * @see f_iki_datass_append_all()
+ */
+#if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_append_all_) || !defined(_di_f_iki_datass_append_all_)
+  extern f_status_t private_f_iki_datas_append_all(const f_iki_datas_t source, f_iki_datas_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_append_all_) || !defined(_di_f_iki_datass_append_all_)
+
+/**
+ * Private implementation for resizing the iki_datas array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param iki_datas
+ *   The iki_datas array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_iki_datas_resize()
+ * @see f_iki_datas_append()
+ * @see f_iki_datas_decimate_by()
+ * @see f_iki_datass_append()
+ */
+#if !defined(_di_f_iki_datas_resize_) || !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decimate_by_) || !defined(_di_f_iki_datass_append_)
+  extern f_status_t private_f_iki_datas_resize(const f_array_length_t length, f_iki_datas_t *datas) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_datas_resize_) || !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decimate_by_) || !defined(_di_f_iki_datass_append_)
+
+/**
+ * Private implementation for resizing the iki_datass array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param iki_datass
+ *   The iki_datass array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ *
+ * @see f_iki_datass_adjust()
+ * @see f_iki_datass_decimate_by()
+ */
+#if !defined(_di_f_iki_datass_adjust_) || !defined(_di_f_iki_datass_decimate_by_)
+  extern f_status_t private_f_iki_datass_adjust(const f_array_length_t length, f_iki_datass_t *datass) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_datass_adjust_) || !defined(_di_f_iki_datass_decimate_by_)
+
+/**
+ * Private implementation for resizing the iki_datass array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to resize to.
+ * @param iki_datass
+ *   The iki_datass array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_iki_datass_decrease_by()
+ * @see f_iki_datass_increase()
+ * @see f_iki_datass_increase_by()
+ * @see f_iki_datass_resize()
+ */
+#if !defined(_di_f_iki_datass_decrease_by_) || !defined(_di_f_iki_datass_increase_) || !defined(_di_f_iki_datass_increase_by_) || !defined(_di_f_iki_datass_resize_)
+  extern f_status_t private_f_iki_datass_resize(const f_array_length_t length, f_iki_datass_t *datass) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_datass_decrease_by_) || !defined(_di_f_iki_datass_increase_) || !defined(_di_f_iki_datass_increase_by_) || !defined(_di_f_iki_datass_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_iki_data_h
index dba7008c1d138ef90dbccc5ac9d07a9d6b74a0bb..d972285f813771732804e2a21e714048d57f5070 100644 (file)
@@ -5,82 +5,6 @@
 extern "C" {
 #endif
 
-#if !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_)
-  f_status_t private_f_iki_datas_adjust(const f_array_length_t length, f_iki_datas_t *datas) {
-
-    if (datas->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < datas->size; ++i) {
-
-      status = f_string_ranges_adjust(0, &datas->array[i].content);
-      if (F_status_is_error(status)) return status;
-
-      status = f_array_lengths_adjust(0, &datas->array[i].delimits);
-      if (F_status_is_error(status)) return status;
-
-      status = f_string_ranges_adjust(0, &datas->array[i].variable);
-      if (F_status_is_error(status)) return status;
-
-      status = f_string_ranges_adjust(0, &datas->array[i].vocabulary);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(datas->size, length, sizeof(f_iki_data_t), (void **) & datas->array);
-
-    if (F_status_is_error_not(status)) {
-      datas->size = length;
-
-      if (datas->used > datas->size) {
-        datas->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_)
-
-#if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decrease_by_) || !defined(_di_f_iki_datas_increase_) || !defined(_di_f_iki_datas_increase_by_) || !defined(_di_f_iki_datas_resize_)
-  f_status_t private_f_iki_datas_resize(const f_array_length_t length, f_iki_datas_t *datas) {
-
-    if (datas->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < datas->size; ++i) {
-
-      status = f_string_ranges_resize(0, &datas->array[i].content);
-      if (F_status_is_error(status)) return status;
-
-      status = f_array_lengths_resize(0, &datas->array[i].delimits);
-      if (F_status_is_error(status)) return status;
-
-      status = f_string_ranges_resize(0, &datas->array[i].variable);
-      if (F_status_is_error(status)) return status;
-
-      status = f_string_ranges_resize(0, &datas->array[i].vocabulary);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(datas->size, length, sizeof(f_iki_data_t), (void **) & datas->array);
-
-    if (F_status_is_error_not(status)) {
-      datas->size = length;
-
-      if (datas->used > datas->size) {
-        datas->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decrease_by_) || !defined(_di_f_iki_datas_increase_) || !defined(_di_f_iki_datas_increase_by_) || !defined(_di_f_iki_datas_resize_)
-
 #if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
   f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const f_char_t quote) {
 
index 6fed8605c33e6dac3e570350257fb87cb8caf205..bed8a0ae2d1c01835a9bc436747e2a6218eb2c45 100644 (file)
@@ -16,6 +16,34 @@ extern "C" {
 #endif
 
 /**
+ * Private implementation of f_iki_content_partial_is().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param buffer
+ *   The string to validate as an content name.
+ * @param length
+ *   The length of the string to validate.
+ * @param range
+ *   The range within the buffer that represents the content name.
+ * @param quote
+ *   The quote character in use.
+ *   This must be either a single (') or double (") quote.
+ *
+ * @return
+ *   F_true on success and string is a valid content name.
+ *   F_false on success and string is not a valid content name.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see f_iki_content_is()
+ * @see f_iki_content_partial_is()
+ */
+#if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
+  extern f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const f_char_t quote) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
+
+/**
  * Private implementation for resizing the iki_datas array.
  *
  * Intended to be shared to each of the different implementation variations.
@@ -42,6 +70,30 @@ extern "C" {
 #endif // !defined(_di_f_iki_datas_adjust_) || !defined(_di_f_iki_datas_decimate_by_)
 
 /**
+ * Private implementation for appending the iki_data array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source iki_datas to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_iki_datas_append_all()
+ * @see f_iki_datass_append()
+ * @see f_iki_datass_append_all()
+ */
+#if !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_append_all_) || !defined(_di_f_iki_datass_append_all_)
+  extern f_status_t private_f_iki_datas_append_all(const f_iki_datas_t source, f_iki_datas_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_append_all_) || !defined(_di_f_iki_datass_append_all_)
+
+/**
  * Private implementation for resizing the iki_datas array.
  *
  * Intended to be shared to each of the different implementation variations.
@@ -68,32 +120,62 @@ extern "C" {
 #endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decrease_by_) || !defined(_di_f_iki_datas_increase_) || !defined(_di_f_iki_datas_increase_by_) || !defined(_di_f_iki_datas_resize_)
 
 /**
- * Private implementation of f_iki_content_partial_is().
+ * Private implementation for resizing the iki_datass array.
  *
  * Intended to be shared to each of the different implementation variations.
  *
- * @param buffer
- *   The string to validate as an content name.
  * @param length
- *   The length of the string to validate.
- * @param range
- *   The range within the buffer that represents the content name.
- * @param quote
- *   The quote character in use.
- *   This must be either a single (') or double (") quote.
+ *   The length to adjust to.
+ * @param iki_datass
+ *   The iki_datass array to adjust.
  *
  * @return
- *   F_true on success and string is a valid content name.
- *   F_false on success and string is not a valid content name.
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
  *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- * @see f_iki_content_is()
- * @see f_iki_content_partial_is()
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ *
+ * @see f_iki_datass_adjust()
+ * @see f_iki_datass_decimate_by()
  */
-#if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
-  extern f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const f_char_t quote) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
+#if !defined(_di_f_iki_datass_adjust_) || !defined(_di_f_iki_datass_decimate_by_)
+  extern f_status_t private_f_iki_datass_adjust(const f_array_length_t length, f_iki_datass_t *datass) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_datass_adjust_) || !defined(_di_f_iki_datass_decimate_by_)
+
+/**
+ * Private implementation for resizing the iki_datass array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to resize to.
+ * @param iki_datass
+ *   The iki_datass array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_iki_datass_decrease_by()
+ * @see f_iki_datass_increase()
+ * @see f_iki_datass_increase_by()
+ * @see f_iki_datass_resize()
+ */
+#if !defined(_di_f_iki_datass_decrease_by_) || !defined(_di_f_iki_datass_increase_) || !defined(_di_f_iki_datass_increase_by_) || !defined(_di_f_iki_datass_resize_)
+  extern f_status_t private_f_iki_datass_resize(const f_array_length_t length, f_iki_datass_t *datass) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_iki_datass_decrease_by_) || !defined(_di_f_iki_datass_increase_) || !defined(_di_f_iki_datass_increase_by_) || !defined(_di_f_iki_datass_resize_)
 
 /**
  * Private implementation of f_iki_object_partial_is().
index f185d9719c2b9435e7e70563c43de32e3fdf6c52..74a91ce02ffbce506cd855fb1ad3a317ad696868 100644 (file)
@@ -31,7 +31,7 @@ build_objects_library_static
 build_objects_program
 build_objects_program_shared
 build_objects_program_static
-build_sources_library iki.c private-iki.c iki/common.c
+build_sources_library iki.c private-iki.c iki/common.c iki/private-data.c iki/data.c
 build_sources_library_shared
 build_sources_library_static
 build_sources_object
@@ -40,7 +40,7 @@ build_sources_object_static
 build_sources_program
 build_sources_program_shared
 build_sources_program_static
-build_sources_headers iki.h iki/common.h
+build_sources_headers iki.h iki/common.h iki/data.h
 build_sources_headers_shared
 build_sources_headers_static
 build_sources_script
index 4a1264a121f41f9d2107eef4845840205698faa7..e015d53782b6f2a9b0162adf43a48b2915181067 100644 (file)
@@ -20,7 +20,9 @@ build_libraries -lc -lcmocka
 build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_iki
 build_libraries-level -lfll_0
 build_libraries-monolithic -lfll
-build_sources_program test-iki-content_is.c test-iki-content_partial_is.c test-iki-object_is.c test-iki-object_partial_is.c test-iki-read.c test-iki.c
+build_sources_program test-iki-content_is.c test-iki-content_partial_is.c test-iki-object_is.c test-iki-object_partial_is.c test-iki-read.c
+build_sources_program test-iki-datas_adjust.c test-iki-datas_append.c test-iki-datas_append_all.c test-iki-datas_decimate_by.c test-iki-datas_decrease_by.c test-iki-datas_increase.c test-iki-datas_increase_by.c test-iki-datas_resize.c test-iki-datass_adjust.c test-iki-datass_append.c test-iki-datass_append_all.c test-iki-datass_decimate_by.c test-iki-datass_decrease_by.c test-iki-datass_increase.c test-iki-datass_increase_by.c test-iki-datass_resize.c
+build_sources_program test-iki.c
 build_script no
 build_shared yes
 build_static no
index 96ba5796695a242002dca54d8b58ab42629a2b76..5e135bd750bf94801b826d957f1c488730ace451 100644 (file)
@@ -24,17 +24,17 @@ void test__f_iki_content_partial_is__returns_false(void **state) {
   };
 
   const f_string_range_t ranges[] = {
-    macro_f_string_range_t_initialize2(4, 10),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 10),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 5),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 10),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 5),
+    macro_f_string_range_t_initialize(4, 10),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 10),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 5),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 10),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 5),
   };
 
   const f_string_static_t quotes[] = {
@@ -86,7 +86,7 @@ void test__f_iki_content_partial_is__returns_data_not(void **state) {
 void test__f_iki_content_partial_is__returns_data_not_eos(void **state) {
 
   {
-    const f_string_range_t range = macro_f_string_range_t_initialize2(f_string_ascii_a_s.used, f_string_ascii_a_s.used);
+    const f_string_range_t range = macro_f_string_range_t_initialize(f_string_ascii_a_s.used, f_string_ascii_a_s.used);
 
     const f_status_t status = f_iki_content_partial_is(f_string_ascii_a_s, range, f_string_ascii_quote_single_s);
 
@@ -121,14 +121,14 @@ void test__f_iki_content_partial_is__returns_true(void **state) {
   };
 
   const f_string_range_t ranges[] = {
-    macro_f_string_range_t_initialize2(4, 8),
-    macro_f_string_range_t_initialize2(4, 13),
-    macro_f_string_range_t_initialize2(4, 12),
-    macro_f_string_range_t_initialize2(4, 13),
-    macro_f_string_range_t_initialize2(4, 14),
-    macro_f_string_range_t_initialize2(4, 12),
-    macro_f_string_range_t_initialize2(4, 13),
-    macro_f_string_range_t_initialize2(4, 14),
+    macro_f_string_range_t_initialize(4, 8),
+    macro_f_string_range_t_initialize(4, 13),
+    macro_f_string_range_t_initialize(4, 12),
+    macro_f_string_range_t_initialize(4, 13),
+    macro_f_string_range_t_initialize(4, 14),
+    macro_f_string_range_t_initialize(4, 12),
+    macro_f_string_range_t_initialize(4, 13),
+    macro_f_string_range_t_initialize(4, 14),
   };
 
   const f_string_static_t quotes[] = {
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_adjust.c b/level_0/f_iki/tests/unit/c/test-iki-datas_adjust.c
new file mode 100644 (file)
index 0000000..e528630
--- /dev/null
@@ -0,0 +1,42 @@
+#include "test-iki.h"
+#include "test-iki-datas_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datas_adjust__works(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_adjust(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_iki_datas_adjust__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_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_iki/tests/unit/c/test-iki-datas_adjust.h b/level_0/f_iki/tests/unit/c/test-iki-datas_adjust.h
new file mode 100644 (file)
index 0000000..69d3c54
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datas_adjust_h
+#define _TEST__F_iki_datas_adjust_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_adjust()
+ */
+extern void test__f_iki_datas_adjust__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datas_adjust()
+ */
+extern void test__f_iki_datas_adjust__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datas_adjust_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_append.c b/level_0/f_iki/tests/unit/c/test-iki-datas_append.c
new file mode 100644 (file)
index 0000000..f81780f
--- /dev/null
@@ -0,0 +1,111 @@
+#include "test-iki.h"
+#include "test-iki-datas_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datas_append__works(void **state) {
+
+  const f_array_length_t length = 5;
+  f_iki_data_t source = f_iki_data_t_initialize;
+  f_iki_datas_t destination = f_iki_datas_t_initialize;
+
+  {
+    f_array_length_t i = 1;
+
+    f_status_t status = f_string_ranges_resize(length, &source.content);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.content.size, length);
+
+    status = f_array_lengths_resize(length, &source.delimits);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.delimits.size, length);
+
+    status = f_string_ranges_resize(length, &source.variable);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.variable.size, length);
+
+    status = f_string_ranges_resize(length, &source.vocabulary);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.vocabulary.size, length);
+
+    for (; source.content.used < length; ++i) {
+
+      source.content.array[source.content.used].start = i - 1;
+      source.content.array[source.content.used++].stop = i;
+    } // for
+
+    for (; source.delimits.used < length; ++i) {
+      source.delimits.array[source.delimits.used++] = i;
+    } // for
+
+    for (; source.variable.used < length; ++i) {
+
+      source.variable.array[source.variable.used].start = i - 1;
+      source.variable.array[source.variable.used++].stop = i;
+    } // for
+
+    for (; source.vocabulary.used < length; ++i) {
+
+      source.vocabulary.array[source.vocabulary.used].start = i - 1;
+      source.vocabulary.array[source.vocabulary.used++].stop = i;
+    } // for
+  }
+
+  {
+    const f_status_t status = f_iki_datas_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].content.used, source.content.used);
+    assert_int_equal(destination.array[0].delimits.used, source.delimits.used);
+    assert_int_equal(destination.array[0].variable.used, source.variable.used);
+    assert_int_equal(destination.array[0].vocabulary.used, source.vocabulary.used);
+
+    for (f_array_length_t i = 0; i < length; ++i) {
+
+      assert_int_equal(destination.array[0].content.array[i].start, source.content.array[i].start);
+      assert_int_equal(destination.array[0].content.array[i].stop, source.content.array[i].stop);
+
+      assert_int_equal(destination.array[0].delimits.array[i], source.delimits.array[i]);
+
+      assert_int_equal(destination.array[0].variable.array[i].start, source.variable.array[i].start);
+      assert_int_equal(destination.array[0].variable.array[i].stop, source.variable.array[i].stop);
+
+      assert_int_equal(destination.array[0].vocabulary.array[i].start, source.vocabulary.array[i].start);
+      assert_int_equal(destination.array[0].vocabulary.array[i].stop, source.vocabulary.array[i].stop);
+    } // for
+  }
+
+  free((void *) source.content.array);
+  free((void *) source.delimits.array);
+  free((void *) source.variable.array);
+  free((void *) source.vocabulary.array);
+
+  free((void *) destination.array[0].content.array);
+  free((void *) destination.array[0].delimits.array);
+  free((void *) destination.array[0].variable.array);
+  free((void *) destination.array[0].vocabulary.array);
+
+  free((void *) destination.array);
+}
+
+void test__f_iki_datas_append__parameter_checking(void **state) {
+
+  const f_iki_data_t data = f_iki_data_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_append.h b/level_0/f_iki/tests/unit/c/test-iki-datas_append.h
new file mode 100644 (file)
index 0000000..1467f37
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datas_append_h
+#define _TEST__F_iki_datas_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_append()
+ */
+extern void test__f_iki_datas_append__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datas_append()
+ */
+extern void test__f_iki_datas_append__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datas_append_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_append_all.c b/level_0/f_iki/tests/unit/c/test-iki-datas_append_all.c
new file mode 100644 (file)
index 0000000..e01ec3c
--- /dev/null
@@ -0,0 +1,161 @@
+#include "test-iki.h"
+#include "test-iki-datas_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datas_append_all__works(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t source = f_iki_datas_t_initialize;
+  f_iki_datas_t destination = f_iki_datas_t_initialize;
+
+  {
+    f_status_t status = f_iki_datas_resize(2, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.size, 2);
+
+    f_array_length_t i = 1;
+    f_array_length_t j = 0;
+
+    for (; j < 2; ++j) {
+
+      status = f_string_ranges_resize(length, &source.array[j].content);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[j].content.size, length);
+
+      status = f_array_lengths_resize(length, &source.array[j].delimits);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[j].delimits.size, length);
+
+      status = f_string_ranges_resize(length, &source.array[j].variable);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[j].variable.size, length);
+
+      status = f_string_ranges_resize(length, &source.array[j].vocabulary);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[j].vocabulary.size, length);
+
+      for (; source.array[j].content.used < length; ++i) {
+
+        source.array[j].content.array[source.array[j].content.used].start = i - 1;
+        source.array[j].content.array[source.array[j].content.used++].stop = i;
+      } // for
+
+      for (; source.array[j].delimits.used < length; ++i) {
+
+        source.array[j].delimits.array[source.array[j].delimits.used++] = i;
+      } // for
+
+      for (; source.array[j].variable.used < length; ++i) {
+
+        source.array[j].variable.array[source.array[j].variable.used].start = i - 1;
+        source.array[j].variable.array[source.array[j].variable.used++].stop = i;
+      } // for
+
+      for (; source.array[j].vocabulary.used < length; ++i) {
+
+        source.array[j].vocabulary.array[source.array[j].vocabulary.used].start = i - 1;
+        source.array[j].vocabulary.array[source.array[j].vocabulary.used++].stop = i;
+      } // for
+    } // for
+
+    source.used = 2;
+  }
+
+  {
+    const f_status_t status = f_iki_datas_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t j = 0; j < 2; ++j) {
+
+      assert_int_equal(destination.array[j].content.used, source.array[j].content.used);
+      assert_int_equal(destination.array[j].delimits.used, source.array[j].delimits.used);
+      assert_int_equal(destination.array[j].variable.used, source.array[j].variable.used);
+      assert_int_equal(destination.array[j].vocabulary.used, source.array[j].vocabulary.used);
+
+      for (f_array_length_t i = 0; i < length; ++i) {
+
+        assert_int_equal(destination.array[j].content.array[i].start, source.array[j].content.array[i].start);
+        assert_int_equal(destination.array[j].content.array[i].stop, source.array[j].content.array[i].stop);
+
+        assert_int_equal(destination.array[j].delimits.array[i], source.array[j].delimits.array[i]);
+
+        assert_int_equal(destination.array[j].variable.array[i].start, source.array[j].variable.array[i].start);
+        assert_int_equal(destination.array[j].variable.array[i].stop, source.array[j].variable.array[i].stop);
+
+        assert_int_equal(destination.array[j].vocabulary.array[i].start, source.array[j].vocabulary.array[i].start);
+        assert_int_equal(destination.array[j].vocabulary.array[i].stop, source.array[j].vocabulary.array[i].stop);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+
+    free((void *) source.array[i].content.array);
+    free((void *) source.array[i].delimits.array);
+    free((void *) source.array[i].variable.array);
+    free((void *) source.array[i].vocabulary.array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+    free((void *) destination.array[i].content.array);
+    free((void *) destination.array[i].delimits.array);
+    free((void *) destination.array[i].variable.array);
+    free((void *) destination.array[i].vocabulary.array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_iki_datas_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t source = f_iki_datas_t_initialize;
+  f_iki_datas_t destination = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_iki_datas_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_iki_datas_append_all__parameter_checking(void **state) {
+
+  const f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_append_all.h b/level_0/f_iki/tests/unit/c/test-iki-datas_append_all.h
new file mode 100644 (file)
index 0000000..35c22e3
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datas_append_all_h
+#define _TEST__F_iki_datas_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_append_all()
+ */
+extern void test__f_iki_datas_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_iki_datas_append_all()
+ */
+extern void test__f_iki_datas_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datas_append_all()
+ */
+extern void test__f_iki_datas_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datas_append_all_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_decimate_by.c b/level_0/f_iki/tests/unit/c/test-iki-datas_decimate_by.c
new file mode 100644 (file)
index 0000000..d0dbd0e
--- /dev/null
@@ -0,0 +1,50 @@
+#include "test-iki.h"
+#include "test-iki-datas_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datas_decimate_by__works(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_iki_datas_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, 0);
+  }
+
+  assert_null(data.array);
+}
+
+void test__f_iki_datas_decimate_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_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_iki/tests/unit/c/test-iki-datas_decimate_by.h b/level_0/f_iki/tests/unit/c/test-iki-datas_decimate_by.h
new file mode 100644 (file)
index 0000000..8206822
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datas_decimate_by_h
+#define _TEST__F_iki_datas_decimate_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_decimate_by()
+ */
+extern void test__f_iki_datas_decimate_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datas_decimate_by()
+ */
+extern void test__f_iki_datas_decimate_by__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datas_decimate_by_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_decrease_by.c b/level_0/f_iki/tests/unit/c/test-iki-datas_decrease_by.c
new file mode 100644 (file)
index 0000000..3bd1865
--- /dev/null
@@ -0,0 +1,50 @@
+#include "test-iki.h"
+#include "test-iki-datas_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datas_decrease_by__works(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_iki_datas_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, 0);
+  }
+
+  assert_null(data.array);
+}
+
+void test__f_iki_datas_decrease_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_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_iki/tests/unit/c/test-iki-datas_decrease_by.h b/level_0/f_iki/tests/unit/c/test-iki-datas_decrease_by.h
new file mode 100644 (file)
index 0000000..fe33755
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datas_decrease_by_h
+#define _TEST__F_iki_datas_decrease_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_decrease_by()
+ */
+extern void test__f_iki_datas_decrease_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datas_decrease_by()
+ */
+extern void test__f_iki_datas_decrease_by__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datas_decrease_by_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_increase.c b/level_0/f_iki/tests/unit/c/test-iki-datas_increase.c
new file mode 100644 (file)
index 0000000..16fe997
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-iki.h"
+#include "test-iki-datas_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datas_increase__works(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_iki_datas_increase(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_iki_datas_increase__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_iki_datas_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_iki_datas_increase__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_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_iki/tests/unit/c/test-iki-datas_increase.h b/level_0/f_iki/tests/unit/c/test-iki-datas_increase.h
new file mode 100644 (file)
index 0000000..289e2ba
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datas_increase_h
+#define _TEST__F_iki_datas_increase_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_increase()
+ */
+extern void test__f_iki_datas_increase__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_iki_datas_increase()
+ */
+extern void test__f_iki_datas_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datas_increase()
+ */
+extern void test__f_iki_datas_increase__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datas_increase_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_increase_by.c b/level_0/f_iki/tests/unit/c/test-iki-datas_increase_by.c
new file mode 100644 (file)
index 0000000..ba53394
--- /dev/null
@@ -0,0 +1,52 @@
+#include "test-iki.h"
+#include "test-iki-datas_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datas_increase_by__works(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_iki_datas_increase_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, length);
+    assert_int_equal(data.size, length * 2);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_iki_datas_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_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_iki/tests/unit/c/test-iki-datas_increase_by.h b/level_0/f_iki/tests/unit/c/test-iki-datas_increase_by.h
new file mode 100644 (file)
index 0000000..2c8ddb9
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datas_increase_by_h
+#define _TEST__F_iki_datas_increase_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_increase_by()
+ */
+extern void test__f_iki_datas_increase_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datas_increase_by()
+ */
+extern void test__f_iki_datas_increase_by__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datas_increase_by_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datas_resize.c b/level_0/f_iki/tests/unit/c/test-iki-datas_resize.c
new file mode 100644 (file)
index 0000000..e647f00
--- /dev/null
@@ -0,0 +1,42 @@
+#include "test-iki.h"
+#include "test-iki-datas_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datas_resize__works(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_iki_datas_resize__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_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_iki/tests/unit/c/test-iki-datas_resize.h b/level_0/f_iki/tests/unit/c/test-iki-datas_resize.h
new file mode 100644 (file)
index 0000000..915f835
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datas_resize_h
+#define _TEST__F_iki_datas_resize_H
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datas_resize()
+ */
+extern void test__f_iki_datas_resize__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datas_resize()
+ */
+extern void test__f_iki_datas_resize__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datas_resize_H
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_adjust.c b/level_0/f_iki/tests/unit/c/test-iki-datass_adjust.c
new file mode 100644 (file)
index 0000000..d6f562d
--- /dev/null
@@ -0,0 +1,42 @@
+#include "test-iki.h"
+#include "test-iki-datass_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_adjust__works(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datass_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_adjust(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_iki_datass_adjust__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datass_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_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_iki/tests/unit/c/test-iki-datass_adjust.h b/level_0/f_iki/tests/unit/c/test-iki-datass_adjust.h
new file mode 100644 (file)
index 0000000..304ea41
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datass_adjust_h
+#define _TEST__F_iki_datass_adjust_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_adjust()
+ */
+extern void test__f_iki_datass_adjust__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datass_adjust()
+ */
+extern void test__f_iki_datass_adjust__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datass_adjust_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_append.c b/level_0/f_iki/tests/unit/c/test-iki-datass_append.c
new file mode 100644 (file)
index 0000000..e69b5e0
--- /dev/null
@@ -0,0 +1,166 @@
+#include "test-iki.h"
+#include "test-iki-datass_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_append__works(void **state) {
+
+  const int length = 5;
+  const int length_outer = 2;
+  f_iki_datas_t source = f_iki_datas_t_initialize;
+  f_iki_datass_t destination = f_iki_datass_t_initialize;
+
+  {
+    f_status_t status = f_iki_datas_resize(length_outer, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.size, length_outer);
+
+    f_array_length_t i = 1;
+
+    for (f_array_length_t j = 0; j < length_outer; ++j) {
+
+      status = f_string_ranges_resize(length, &source.array[j].content);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[j].content.size, length);
+
+      status = f_array_lengths_resize(length, &source.array[j].delimits);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[j].delimits.size, length);
+
+      status = f_string_ranges_resize(length, &source.array[j].variable);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[j].variable.size, length);
+
+      status = f_string_ranges_resize(length, &source.array[j].vocabulary);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[j].vocabulary.size, length);
+
+      for (; source.array[j].content.used < length; ++i) {
+
+        source.array[j].content.array[source.array[j].content.used].start = i - 1;
+        source.array[j].content.array[source.array[j].content.used++].stop = i;
+      } // for
+
+      for (; source.array[j].delimits.used < length; ++i) {
+
+        source.array[j].delimits.array[source.array[j].delimits.used++] = i;
+      } // for
+
+      for (; source.array[j].variable.used < length; ++i) {
+
+        source.array[j].variable.array[source.array[j].variable.used].start = i - 1;
+        source.array[j].variable.array[source.array[j].variable.used++].stop = i;
+      } // for
+
+      for (; source.array[j].vocabulary.used < length; ++i) {
+
+        source.array[j].vocabulary.array[source.array[j].vocabulary.used].start = i - 1;
+        source.array[j].vocabulary.array[source.array[j].vocabulary.used++].stop = i;
+      } // for
+    } // for
+
+    source.used = length_outer;
+  }
+
+  {
+    const f_status_t status = f_iki_datass_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+
+    for (f_array_length_t j = 0; j < length_outer; ++j) {
+
+      assert_int_equal(destination.array[0].array[j].content.used, source.array[j].content.used);
+      assert_int_equal(destination.array[0].array[j].delimits.used, source.array[j].delimits.used);
+      assert_int_equal(destination.array[0].array[j].variable.used, source.array[j].variable.used);
+      assert_int_equal(destination.array[0].array[j].vocabulary.used, source.array[j].vocabulary.used);
+
+      for (f_array_length_t i = 0; i < length; ++i) {
+
+        assert_int_equal(destination.array[0].array[j].content.array[i].start, source.array[j].content.array[i].start);
+        assert_int_equal(destination.array[0].array[j].content.array[i].stop, source.array[j].content.array[i].stop);
+
+        assert_int_equal(destination.array[0].array[j].delimits.array[i], source.array[j].delimits.array[i]);
+
+        assert_int_equal(destination.array[0].array[j].variable.array[i].start, source.array[j].variable.array[i].start);
+        assert_int_equal(destination.array[0].array[j].variable.array[i].stop, source.array[j].variable.array[i].stop);
+
+        assert_int_equal(destination.array[0].array[j].vocabulary.array[i].start, source.array[j].vocabulary.array[i].start);
+        assert_int_equal(destination.array[0].array[j].vocabulary.array[i].stop, source.array[j].vocabulary.array[i].stop);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+
+    free((void *) source.array[i].content.array);
+    free((void *) source.array[i].delimits.array);
+    free((void *) source.array[i].variable.array);
+    free((void *) source.array[i].vocabulary.array);
+  } // for
+
+  for (f_array_length_t j = 0; j < length_outer; ++j) {
+
+    for (f_array_length_t i = 0; i < destination.array[j].used; ++i) {
+
+      free((void *) destination.array[j].array[i].content.array);
+      free((void *) destination.array[j].array[i].delimits.array);
+      free((void *) destination.array[j].array[i].variable.array);
+      free((void *) destination.array[j].array[i].vocabulary.array);
+    } // for
+
+    free((void *) destination.array[j].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_iki_datass_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_iki_datas_t source = f_iki_datass_t_initialize;
+  f_iki_datass_t destination = f_iki_datass_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datas_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_iki_datass_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_iki_datass_append__parameter_checking(void **state) {
+
+  f_iki_datas_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_append.h b/level_0/f_iki/tests/unit/c/test-iki-datass_append.h
new file mode 100644 (file)
index 0000000..924d4a2
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datass_append_h
+#define _TEST__F_iki_datass_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_append()
+ */
+extern void test__f_iki_datass_append__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_iki_datass_append()
+ */
+extern void test__f_iki_datass_append__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datass_append()
+ */
+extern void test__f_iki_datass_append__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datass_append_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_append_all.c b/level_0/f_iki/tests/unit/c/test-iki-datass_append_all.c
new file mode 100644 (file)
index 0000000..9351919
--- /dev/null
@@ -0,0 +1,182 @@
+#include "test-iki.h"
+#include "test-iki-datass_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  const int length_outer = 2;
+  f_iki_datass_t source = f_iki_datass_t_initialize;
+  f_iki_datass_t destination = f_iki_datass_t_initialize;
+
+  {
+    f_status_t status = f_iki_datass_resize(length_outer, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.size, length_outer);
+
+    f_array_length_t i = 1;
+    f_array_length_t j = 0;
+
+    for (; source.used < length_outer; ++source.used) {
+
+      status = f_iki_datas_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[source.used].size, length_inner);
+
+      for (j = 0; j < length_inner; ++j) {
+
+        status = f_string_ranges_resize(length, &source.array[source.used].array[j].content);
+
+        assert_int_equal(status, F_none);
+        assert_int_equal(source.array[source.used].array[j].content.size, length);
+
+        status = f_array_lengths_resize(length, &source.array[source.used].array[j].delimits);
+
+        assert_int_equal(status, F_none);
+        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);
+
+        assert_int_equal(status, F_none);
+        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);
+
+        assert_int_equal(status, F_none);
+        assert_int_equal(source.array[source.used].array[j].vocabulary.size, length);
+
+        for (; source.array[source.used].array[j].content.used < length; ++i) {
+
+          source.array[source.used].array[j].content.array[source.array[source.used].array[j].content.used].start = i - 1;
+          source.array[source.used].array[j].content.array[source.array[source.used].array[j].content.used++].stop = i;
+        } // for
+
+        for (; source.array[source.used].array[j].delimits.used < length; ++i) {
+          source.array[source.used].array[j].delimits.array[source.array[source.used].array[j].delimits.used++] = i;
+        } // for
+
+        for (; source.array[source.used].array[j].variable.used < length; ++i) {
+
+          source.array[source.used].array[j].variable.array[source.array[source.used].array[j].variable.used].start = i - 1;
+          source.array[source.used].array[j].variable.array[source.array[source.used].array[j].variable.used++].stop = i;
+        } // for
+
+        for (; source.array[source.used].array[j].vocabulary.used < length; ++i) {
+
+          source.array[source.used].array[j].vocabulary.array[source.array[source.used].array[j].vocabulary.used].start = i - 1;
+          source.array[source.used].array[j].vocabulary.array[source.array[source.used].array[j].vocabulary.used++].stop = i;
+        } // for
+      } // for
+
+      source.array[source.used].used = length_inner;
+    } // for
+  }
+
+  {
+    const f_status_t status = f_iki_datass_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+
+    for (f_array_length_t k = 0; k < length_outer; ++k) {
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+
+        assert_int_equal(destination.array[k].array[j].content.used, source.array[k].array[j].content.used);
+        assert_int_equal(destination.array[k].array[j].delimits.used, source.array[k].array[j].delimits.used);
+        assert_int_equal(destination.array[k].array[j].variable.used, source.array[k].array[j].variable.used);
+        assert_int_equal(destination.array[k].array[j].vocabulary.used, source.array[k].array[j].vocabulary.used);
+
+        for (f_array_length_t i = 0; i < length; ++i) {
+
+          assert_int_equal(destination.array[k].array[j].content.array[i].start, source.array[k].array[j].content.array[i].start);
+          assert_int_equal(destination.array[k].array[j].content.array[i].stop, source.array[k].array[j].content.array[i].stop);
+
+          assert_int_equal(destination.array[k].array[j].delimits.array[i], source.array[k].array[j].delimits.array[i]);
+
+          assert_int_equal(destination.array[k].array[j].variable.array[i].start, source.array[k].array[j].variable.array[i].start);
+          assert_int_equal(destination.array[k].array[j].variable.array[i].stop, source.array[k].array[j].variable.array[i].stop);
+
+          assert_int_equal(destination.array[k].array[j].vocabulary.array[i].start, source.array[k].array[j].vocabulary.array[i].start);
+          assert_int_equal(destination.array[k].array[j].vocabulary.array[i].stop, source.array[k].array[j].vocabulary.array[i].stop);
+        } // for
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t j = 0; j < source.used; ++j) {
+
+    for (f_array_length_t i = 0; i < source.array[j].used; ++i) {
+
+      free((void *) source.array[j].array[i].content.array);
+      free((void *) source.array[j].array[i].delimits.array);
+      free((void *) source.array[j].array[i].variable.array);
+      free((void *) source.array[j].array[i].vocabulary.array);
+    } // for
+
+    free((void *) source.array[j].array);
+  } // for
+
+  for (f_array_length_t j = 0; j < destination.used; ++j) {
+
+    for (f_array_length_t i = 0; i < destination.array[j].used; ++i) {
+
+      free((void *) destination.array[j].array[i].content.array);
+      free((void *) destination.array[j].array[i].delimits.array);
+      free((void *) destination.array[j].array[i].variable.array);
+      free((void *) destination.array[j].array[i].vocabulary.array);
+    } // for
+
+    free((void *) destination.array[j].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_iki_datass_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t source = f_iki_datass_t_initialize;
+  f_iki_datass_t destination = f_iki_datass_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_iki_datass_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_iki_datass_append_all__parameter_checking(void **state) {
+
+  const f_iki_datass_t data = f_iki_datass_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_append_all.h b/level_0/f_iki/tests/unit/c/test-iki-datass_append_all.h
new file mode 100644 (file)
index 0000000..688b573
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datass_append_all_h
+#define _TEST__F_iki_datass_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_append_all()
+ */
+extern void test__f_iki_datass_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_iki_datass_append_all()
+ */
+extern void test__f_iki_datass_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datass_append_all()
+ */
+extern void test__f_iki_datass_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datass_append_all_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_decimate_by.c b/level_0/f_iki/tests/unit/c/test-iki-datass_decimate_by.c
new file mode 100644 (file)
index 0000000..8866b8a
--- /dev/null
@@ -0,0 +1,50 @@
+#include "test-iki.h"
+#include "test-iki-datass_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_decimate_by__works(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_iki_datass_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, 0);
+  }
+
+  assert_null(data.array);
+}
+
+void test__f_iki_datass_decimate_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_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_iki/tests/unit/c/test-iki-datass_decimate_by.h b/level_0/f_iki/tests/unit/c/test-iki-datass_decimate_by.h
new file mode 100644 (file)
index 0000000..7642275
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datass_decimate_by_h
+#define _TEST__F_iki_datass_decimate_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_decimate_by()
+ */
+extern void test__f_iki_datass_decimate_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datass_decimate_by()
+ */
+extern void test__f_iki_datass_decimate_by__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datass_decimate_by_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_decrease_by.c b/level_0/f_iki/tests/unit/c/test-iki-datass_decrease_by.c
new file mode 100644 (file)
index 0000000..dea8c3f
--- /dev/null
@@ -0,0 +1,50 @@
+#include "test-iki.h"
+#include "test-iki-datass_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_decrease_by__works(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_iki_datass_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, 0);
+  }
+
+  assert_null(data.array);
+}
+
+void test__f_iki_datass_decrease_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_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_iki/tests/unit/c/test-iki-datass_decrease_by.h b/level_0/f_iki/tests/unit/c/test-iki-datass_decrease_by.h
new file mode 100644 (file)
index 0000000..c022ce7
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datass_decrease_by_h
+#define _TEST__F_iki_datass_decrease_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_decrease_by()
+ */
+extern void test__f_iki_datass_decrease_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datass_decrease_by()
+ */
+extern void test__f_iki_datass_decrease_by__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datass_decrease_by_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_increase.c b/level_0/f_iki/tests/unit/c/test-iki-datass_increase.c
new file mode 100644 (file)
index 0000000..a2e3912
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-iki.h"
+#include "test-iki-datass_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_increase__works(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_iki_datass_increase(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_iki_datass_increase__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_iki_datass_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_iki_datass_increase__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_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_iki/tests/unit/c/test-iki-datass_increase.h b/level_0/f_iki/tests/unit/c/test-iki-datass_increase.h
new file mode 100644 (file)
index 0000000..43b7f66
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datass_increase_h
+#define _TEST__F_iki_datass_increase_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_increase()
+ */
+extern void test__f_iki_datass_increase__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_iki_datass_increase()
+ */
+extern void test__f_iki_datass_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datass_increase()
+ */
+extern void test__f_iki_datass_increase__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datass_increase_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_increase_by.c b/level_0/f_iki/tests/unit/c/test-iki-datass_increase_by.c
new file mode 100644 (file)
index 0000000..24e07c4
--- /dev/null
@@ -0,0 +1,52 @@
+#include "test-iki.h"
+#include "test-iki-datass_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_increase_by__works(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_iki_datass_increase_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, length);
+    assert_int_equal(data.size, length * 2);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_iki_datass_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datas_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_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_iki/tests/unit/c/test-iki-datass_increase_by.h b/level_0/f_iki/tests/unit/c/test-iki-datass_increase_by.h
new file mode 100644 (file)
index 0000000..f77e196
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datass_increase_by_h
+#define _TEST__F_iki_datass_increase_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_increase_by()
+ */
+extern void test__f_iki_datass_increase_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datass_increase_by()
+ */
+extern void test__f_iki_datass_increase_by__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datass_increase_by_h
diff --git a/level_0/f_iki/tests/unit/c/test-iki-datass_resize.c b/level_0/f_iki/tests/unit/c/test-iki-datass_resize.c
new file mode 100644 (file)
index 0000000..852ef54
--- /dev/null
@@ -0,0 +1,42 @@
+#include "test-iki.h"
+#include "test-iki-datass_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_datass_resize__works(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datass_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_iki_datass_resize__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_iki_datass_t data = f_iki_datass_t_initialize;
+
+  {
+    const f_status_t status = f_iki_datass_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_iki/tests/unit/c/test-iki-datass_resize.h b/level_0/f_iki/tests/unit/c/test-iki-datass_resize.h
new file mode 100644 (file)
index 0000000..9ee0a01
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_iki_datass_resize_h
+#define _TEST__F_iki_datass_resize_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_iki_datass_resize()
+ */
+extern void test__f_iki_datass_resize__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_iki_datass_resize()
+ */
+extern void test__f_iki_datass_resize__parameter_checking(void **state);
+
+#endif // _TEST__F_iki_datass_resize_h
index 562d548b3eb2611f06317426ade61f00e1284a6b..63a39c61c3729562b25439e570c2ae63cab88175 100644 (file)
@@ -27,20 +27,20 @@ void test__f_iki_object_partial_is__returns_false(void **state) {
   };
 
   const f_string_range_t ranges[] = {
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 10),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 10),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 10),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 10),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 10),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 10),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 10),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 10),
   };
 
   for (uint8_t i = 0; i < 14; ++i) {
@@ -65,7 +65,7 @@ void test__f_iki_object_partial_is__returns_data_not(void **state) {
 void test__f_iki_object_partial_is__returns_data_not_eos(void **state) {
 
   {
-    const f_string_range_t range = macro_f_string_range_t_initialize2(f_string_ascii_a_s.used, f_string_ascii_a_s.used);
+    const f_string_range_t range = macro_f_string_range_t_initialize(f_string_ascii_a_s.used, f_string_ascii_a_s.used);
 
     const f_status_t status = f_iki_object_partial_is(f_string_ascii_a_s, range);
 
@@ -97,11 +97,11 @@ void test__f_iki_object_partial_is__returns_true(void **state) {
   };
 
   const f_string_range_t ranges[] = {
-    macro_f_string_range_t_initialize2(4, 8),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 9),
-    macro_f_string_range_t_initialize2(4, 10),
-    macro_f_string_range_t_initialize2(4, 8),
+    macro_f_string_range_t_initialize(4, 8),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 9),
+    macro_f_string_range_t_initialize(4, 10),
+    macro_f_string_range_t_initialize(4, 8),
   };
 
   for (uint8_t i = 0; i < 5; ++i) {
index a96c4c2b5e0503b1932e9875d76f8f34af6fe97f..163c262cb09722e8c4e84331b88a90ad624792d6 100644 (file)
@@ -59,7 +59,7 @@ void test__f_iki_read__returns_data_not_eos(void **state) {
   f_string_static_t ascii_a = macro_f_string_static_t_initialize(f_string_ascii_a_s.string, f_string_ascii_a_s.size, f_string_ascii_a_s.used);
 
   {
-    f_string_range_t range = macro_f_string_range_t_initialize2(f_string_ascii_a_s.used, f_string_ascii_a_s.used);
+    f_string_range_t range = macro_f_string_range_t_initialize(f_string_ascii_a_s.used, f_string_ascii_a_s.used);
     f_iki_data_t iki = f_iki_data_t_initialize;
 
     const f_status_t status = f_iki_read(the_state, &ascii_a, &range, &iki);
@@ -167,81 +167,81 @@ void test__f_iki_read__works(void **state) {
   const f_string_range_t variables[][22] = {
     { f_string_range_t_initialize, f_string_range_t_initialize },
     { f_string_range_t_initialize, f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(0, 8), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 12), macro_f_string_range_t_initialize2(14, 33) },
-    { macro_f_string_range_t_initialize2(0, 8), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 12), macro_f_string_range_t_initialize2(14, 33) },
-    { macro_f_string_range_t_initialize2(24, 36), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(24, 36), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 22), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 22), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 23), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 21), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 22), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 22), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 23), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 21), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 42), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 42), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 43), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 43), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(0, 66), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(0, 66), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(0, 8), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 12), macro_f_string_range_t_initialize(14, 33) },
+    { macro_f_string_range_t_initialize(0, 8), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 12), macro_f_string_range_t_initialize(14, 33) },
+    { macro_f_string_range_t_initialize(24, 36), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(24, 36), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 22), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 22), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 23), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 21), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 22), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 22), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 23), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 21), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 42), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 42), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 43), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 43), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(0, 66), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(0, 66), f_string_range_t_initialize },
   };
 
   const f_string_range_t vocabularys[][22] = {
     { f_string_range_t_initialize, f_string_range_t_initialize },
     { f_string_range_t_initialize, f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(0, 2), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 6), macro_f_string_range_t_initialize2(14, 16) },
-    { macro_f_string_range_t_initialize2(0, 2), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 6), macro_f_string_range_t_initialize2(14, 16) },
-    { macro_f_string_range_t_initialize2(24, 27), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(24, 27), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 10), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 10), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 11), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 9), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 10), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 10), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 11), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 9), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 10), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 10), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 10), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(4, 10), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(0, 2), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(0, 2), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(0, 2), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 6), macro_f_string_range_t_initialize(14, 16) },
+    { macro_f_string_range_t_initialize(0, 2), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 6), macro_f_string_range_t_initialize(14, 16) },
+    { macro_f_string_range_t_initialize(24, 27), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(24, 27), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 10), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 10), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 11), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 9), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 10), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 10), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 11), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 9), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 10), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 10), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 10), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(4, 10), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(0, 2), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(0, 2), f_string_range_t_initialize },
   };
 
   const f_string_range_t contents[][22] = {
     { f_string_range_t_initialize, f_string_range_t_initialize },
     { f_string_range_t_initialize, f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 7), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(9, 11), macro_f_string_range_t_initialize2(19, 32) },
-    { macro_f_string_range_t_initialize2(5, 7), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(9, 11), macro_f_string_range_t_initialize2(19, 32) },
-    { macro_f_string_range_t_initialize2(30, 35), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(30, 35), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(13, 21), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(13, 21), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(14, 22), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(12, 20), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(13, 21), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(13, 21), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(14, 22), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(12, 20), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(13, 41), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(13, 41), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(13, 42), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(13, 42), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 65), f_string_range_t_initialize },
-    { macro_f_string_range_t_initialize2(5, 65), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 7), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(9, 11), macro_f_string_range_t_initialize(19, 32) },
+    { macro_f_string_range_t_initialize(5, 7), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(9, 11), macro_f_string_range_t_initialize(19, 32) },
+    { macro_f_string_range_t_initialize(30, 35), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(30, 35), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(13, 21), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(13, 21), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(14, 22), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(12, 20), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(13, 21), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(13, 21), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(14, 22), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(12, 20), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(13, 41), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(13, 41), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(13, 42), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(13, 42), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 65), f_string_range_t_initialize },
+    { macro_f_string_range_t_initialize(5, 65), f_string_range_t_initialize },
   };
 
   for (uint8_t i = 0; i < 22; ++i) {
 
-    f_string_range_t range = macro_f_string_range_t_initialize(buffers[i].used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(buffers[i].used);
     f_iki_data_t iki = f_iki_data_t_initialize;
 
     const f_status_t status = f_iki_read(the_state, &buffers[i], &range, &iki);
index 633c3801b4433fee06f42d9a5fbb36ac61a50b10..8e46be3e302752022127826f7664d6b190d40c4b 100644 (file)
@@ -29,6 +29,29 @@ int main(void) {
     cmocka_unit_test(test__f_iki_content_partial_is__returns_false),
     cmocka_unit_test(test__f_iki_content_partial_is__returns_true),
 
+    cmocka_unit_test(test__f_iki_datas_adjust__works),
+    cmocka_unit_test(test__f_iki_datas_append__works),
+    cmocka_unit_test(test__f_iki_datas_append_all__works),
+    cmocka_unit_test(test__f_iki_datas_append_all__returns_data_not),
+    cmocka_unit_test(test__f_iki_datas_decimate_by__works),
+    cmocka_unit_test(test__f_iki_datas_decrease_by__works),
+    cmocka_unit_test(test__f_iki_datas_increase__works),
+    cmocka_unit_test(test__f_iki_datas_increase__returns_data_not),
+    cmocka_unit_test(test__f_iki_datas_increase_by__works),
+    cmocka_unit_test(test__f_iki_datas_resize__works),
+
+    cmocka_unit_test(test__f_iki_datass_adjust__works),
+    cmocka_unit_test(test__f_iki_datass_append__works),
+    cmocka_unit_test(test__f_iki_datass_append__returns_data_not),
+    cmocka_unit_test(test__f_iki_datass_append_all__works),
+    cmocka_unit_test(test__f_iki_datass_append_all__returns_data_not),
+    cmocka_unit_test(test__f_iki_datass_decimate_by__works),
+    cmocka_unit_test(test__f_iki_datass_decrease_by__works),
+    cmocka_unit_test(test__f_iki_datass_increase__works),
+    cmocka_unit_test(test__f_iki_datass_increase__returns_data_not),
+    cmocka_unit_test(test__f_iki_datass_increase_by__works),
+    cmocka_unit_test(test__f_iki_datass_resize__works),
+
     cmocka_unit_test(test__f_iki_object_is__returns_data_not),
     cmocka_unit_test(test__f_iki_object_is__returns_false),
     cmocka_unit_test(test__f_iki_object_is__returns_true),
@@ -47,8 +70,28 @@ int main(void) {
     #ifndef _di_level_0_parameter_checking_
       cmocka_unit_test(test__f_iki_content_is__parameter_checking),
       cmocka_unit_test(test__f_iki_content_partial_is__parameter_checking),
+
+      cmocka_unit_test(test__f_iki_datas_adjust__parameter_checking),
+      cmocka_unit_test(test__f_iki_datas_append__parameter_checking),
+      cmocka_unit_test(test__f_iki_datas_append_all__parameter_checking),
+      cmocka_unit_test(test__f_iki_datas_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_iki_datas_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_iki_datas_increase__parameter_checking),
+      cmocka_unit_test(test__f_iki_datas_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_iki_datas_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_iki_datass_adjust__parameter_checking),
+      cmocka_unit_test(test__f_iki_datass_append__parameter_checking),
+      cmocka_unit_test(test__f_iki_datass_append_all__parameter_checking),
+      cmocka_unit_test(test__f_iki_datass_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_iki_datass_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_iki_datass_increase__parameter_checking),
+      cmocka_unit_test(test__f_iki_datass_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_iki_datass_resize__parameter_checking),
+
       // f_iki_object_is() doesn't use parameter checking.
       // f_iki_object_partial_is() doesn't use parameter checking.
+
       cmocka_unit_test(test__f_iki_read__parameter_checking),
     #endif // _di_level_0_parameter_checking_
   };
index c1bc15e00430ebf27a6066f07517b91ac48d9605..4e5c148c622e325c0ade480fd137d7441b15d5a0 100644 (file)
 // Test includes.
 #include "test-iki-content_is.h"
 #include "test-iki-content_partial_is.h"
+#include "test-iki-datas_adjust.h"
+#include "test-iki-datas_append.h"
+#include "test-iki-datas_append_all.h"
+#include "test-iki-datas_decimate_by.h"
+#include "test-iki-datas_decrease_by.h"
+#include "test-iki-datas_increase.h"
+#include "test-iki-datas_increase_by.h"
+#include "test-iki-datas_resize.h"
+#include "test-iki-datass_adjust.h"
+#include "test-iki-datass_append.h"
+#include "test-iki-datass_append_all.h"
+#include "test-iki-datass_decimate_by.h"
+#include "test-iki-datass_decrease_by.h"
+#include "test-iki-datass_increase.h"
+#include "test-iki-datass_increase_by.h"
+#include "test-iki-datass_resize.h"
 #include "test-iki-object_is.h"
 #include "test-iki-object_partial_is.h"
 #include "test-iki-read.h"
index a4cea450865a417c3eeff79bfc6146d708e002ab..7a3aef33c7c0bd92694a6da79859634870e48795 100644 (file)
@@ -131,16 +131,15 @@ extern "C" {
   f_status_t private_f_memory_structure_resize(const size_t length_new, const size_t type_size, void ** const structure, f_array_length_t * const used, f_array_length_t * const size) {
 
     const f_status_t status = private_f_memory_resize(*size, length_new, type_size, structure);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      *size = length_new;
+    *size = length_new;
 
-      if (*used > *size) {
-        *used = *size;
-      }
+    if (*used > *size) {
+      *used = *size;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_memory_structure_decrease_by_) || !defined(_di_memory_structure_increase_) || !defined(_di_memory_structure_increase_by_) || !defined(_di_f_memory_structure_resize_)
 
index 10710c3b66a5b58670a6656e76488284df9a9e2c..8636c9790ab33889e78410e91ead43a80a27de85 100644 (file)
@@ -1,5 +1,6 @@
 #include "string.h"
 #include "private-string.h"
+#include "string/private-dynamic.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -72,581 +73,6 @@ extern "C" {
   }
 #endif // !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
 
-#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-  f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t * const dynamic) {
-
-    f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_char_t), (void **) & dynamic->string);
-
-    if (F_status_is_error_not(status)) {
-      dynamic->size = length;
-
-      if (dynamic->used > dynamic->size) {
-        dynamic->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-
-#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-  f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t * const dynamic) {
-
-    if (dynamic->used + amount > dynamic->size) {
-      if (dynamic->used + amount > F_string_t_size_d) {
-        return F_status_set_error(F_string_too_large);
-      }
-
-      return private_f_string_dynamic_resize(dynamic->used + amount, dynamic);
-    }
-
-    return F_data_not;
-  }
-#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-
-#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-  f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t * const dynamic) {
-
-    const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_char_t), (void **) & dynamic->string);
-
-    if (F_status_is_error_not(status)) {
-      dynamic->size = length;
-
-      if (dynamic->used > dynamic->size) {
-        dynamic->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-
-#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
-  f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t * const dynamics) {
-
-    if (dynamics->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < dynamics->size; ++i) {
-
-      status = private_f_string_dynamic_adjust(0, &dynamics->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(dynamics->size, length, sizeof(f_string_dynamic_t), (void **) & dynamics->array);
-
-    if (F_status_is_error_not(status)) {
-      dynamics->size = length;
-
-      if (dynamics->used > dynamics->size) {
-        dynamics->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
-
-#if !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_)
-  f_status_t private_f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t * const destination) {
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_dynamics_resize(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_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_none;
-  }
-#endif // !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_)
-
-#if !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_)
-  f_status_t private_f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t * const dynamics) {
-
-    if (dynamics->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < dynamics->size; ++i) {
-
-      status = private_f_string_dynamic_resize(0, &dynamics->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(dynamics->size, length, sizeof(f_string_dynamic_t), (void **) & dynamics->array);
-
-    if (F_status_is_error_not(status)) {
-      dynamics->size = length;
-
-      if (dynamics->used > dynamics->size) {
-        dynamics->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_)
-
-#if !defined(_di_f_string_dynamicss_adjust_) || !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_dynamicss_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
-  f_status_t private_f_string_dynamicss_adjust(const f_array_length_t length, f_string_dynamicss_t * const dynamicss) {
-
-    if (dynamicss->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < dynamicss->size; ++i) {
-
-      status = private_f_string_dynamics_adjust(0, &dynamicss->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(dynamicss->size, length, sizeof(f_string_dynamics_t), (void **) & dynamicss->array);
-
-    if (F_status_is_error_not(status)) {
-      dynamicss->size = length;
-
-      if (dynamicss->used > dynamicss->size) {
-        dynamicss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_dynamicss_adjust_) || !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_dynamicss_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
-
-#if !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_map_multis_append_)
-  f_status_t private_f_string_dynamicss_append(const f_string_dynamicss_t source, f_string_dynamicss_t *destination) {
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_dynamicss_resize(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-
-      destination->array[destination->used].used = 0;
-
-      if (source.array[i].used) {
-        status = private_f_string_dynamics_append(source.array[i], &destination->array[destination->used]);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
-
-    return F_none;
-  }
-#endif // !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_map_multis_append_)
-
-#if !defined(_di_f_string_dynamicss_decrease_by_) || !defined(_di_f_string_dynamicss_increase_) || !defined(_di_f_string_dynamicss_increase_by_)
-  f_status_t private_f_string_dynamicss_resize(const f_array_length_t length, f_string_dynamicss_t * const dynamicss) {
-
-    if (dynamicss->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < dynamicss->size; ++i) {
-
-      status = private_f_string_dynamics_resize(0, &dynamicss->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(dynamicss->size, length, sizeof(f_string_dynamics_t), (void **) & dynamicss->array);
-
-    if (F_status_is_error_not(status)) {
-      dynamicss->size = length;
-
-      if (dynamicss->used > dynamicss->size) {
-        dynamicss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_dynamicss_decrease_by_) || !defined(_di_f_string_dynamicss_increase_) || !defined(_di_f_string_dynamicss_increase_by_)
-
-#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_array_length_t length, f_string_map_multis_t * const map_multis) {
-
-    if (map_multis->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < map_multis->size; ++i) {
-
-      status = private_f_string_dynamic_adjust(0, &map_multis->array[i].name);
-      if (F_status_is_error(status)) return status;
-
-      status = private_f_string_dynamics_adjust(0, &map_multis->array[i].value);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(map_multis->size, length, sizeof(f_string_map_multi_t), (void **) & map_multis->array);
-
-    if (F_status_is_error_not(status)) {
-      map_multis->size = length;
-
-      if (map_multis->used > map_multis->size) {
-        map_multis->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_)
-
-#if !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multis_append_)
-  f_status_t private_f_string_map_multis_append(const f_string_map_multi_t source, f_string_map_multis_t * const destination) {
-
-    f_status_t status = F_none;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_map_multis_resize(destination->used + F_memory_default_allocation_small_d, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    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.value.used) {
-      status = private_f_string_dynamics_append(source.value, &destination->array[destination->used].value);
-      if (F_status_is_error(status)) return status;
-    }
-
-    ++destination->used;
-
-    return F_none;
-  }
-#endif // !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multis_append_)
-
-#if !defined(_di_f_string_map_multiss_append_all_) || !defined(_di_f_string_map_multis_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_none;
-
-    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_array_length_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(source.array[i].value, &destination->array[destination->used].value);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
-
-    return F_none;
-  }
-#endif // !defined(_di_f_string_map_multiss_append_all_) || !defined(_di_f_string_map_multis_append_all_)
-
-#if !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_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
-  f_status_t private_f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t * const map_multis) {
-
-    if (map_multis->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < map_multis->size; ++i) {
-
-      status = private_f_string_dynamic_resize(0, &map_multis->array[i].name);
-      if (F_status_is_error(status)) return status;
-
-      status = private_f_string_dynamics_resize(0, &map_multis->array[i].value);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(map_multis->size, length, sizeof(f_string_map_multi_t), (void **) & map_multis->array);
-
-    if (F_status_is_error_not(status)) {
-      map_multis->size = length;
-
-      if (map_multis->used > map_multis->size) {
-        map_multis->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !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_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
-
-#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_array_length_t length, f_string_map_multiss_t * const map_multiss) {
-
-    if (map_multiss->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < map_multiss->size; ++i) {
-
-      status = private_f_string_map_multis_adjust(0, &map_multiss->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(map_multiss->size, length, sizeof(f_string_map_multis_t), (void **) & map_multiss->array);
-
-    if (F_status_is_error_not(status)) {
-      map_multiss->size = length;
-
-      if (map_multiss->used > map_multiss->size) {
-        map_multiss->used = length;
-      }
-    }
-
-    return status;
-  }
-#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_) || !defined(_di_f_string_map_multiss_terminate_) || !defined(_di_f_string_map_multiss_terminate_after_)
-  f_status_t private_f_string_map_multiss_resize(const f_array_length_t length, f_string_map_multiss_t * const map_multiss) {
-
-    if (map_multiss->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < map_multiss->size; ++i) {
-
-      status = private_f_string_map_multis_resize(0, &map_multiss->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(map_multiss->size, length, sizeof(f_string_map_multis_t), (void **) & map_multiss->array);
-
-    if (F_status_is_error_not(status)) {
-      map_multiss->size = length;
-
-      if (map_multiss->used > map_multiss->size) {
-        map_multiss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_) || !defined(_di_f_string_map_multiss_terminate_) || !defined(_di_f_string_map_multiss_terminate_after_)
-
-#if !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_)
-  f_status_t private_f_string_maps_adjust(const f_array_length_t length, f_string_maps_t * const maps) {
-
-    if (maps->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < maps->size; ++i) {
-
-      status = private_f_string_dynamic_adjust(0, &maps->array[i].name);
-      if (F_status_is_error(status)) return status;
-
-      status = private_f_string_dynamic_adjust(0, &maps->array[i].value);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(maps->size, length, sizeof(f_string_map_t), (void **) & maps->array);
-
-    if (F_status_is_error_not(status)) {
-      maps->size = length;
-
-      if (maps->used > maps->size) {
-        maps->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_)
-
-#if !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_maps_append_)
-  f_status_t private_f_string_maps_append(const f_string_map_t source, f_string_maps_t * const destination) {
-
-    f_status_t status = F_none;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_maps_resize(destination->used + F_memory_default_allocation_small_d, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    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.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;
-
-    return F_none;
-  }
-#endif // !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_maps_append_)
-
-#if !defined(_di_f_string_mapss_append_all_) || !defined(_di_f_string_maps_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_none;
-
-    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_array_length_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_none;
-  }
-#endif // !defined(_di_f_string_mapss_append_all_) || !defined(_di_f_string_maps_append_all_)
-
-#if !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_terminate_) || !defined(_di_f_string_maps_terminate_after_)
-  f_status_t private_f_string_maps_resize(const f_array_length_t length, f_string_maps_t * const maps) {
-
-    if (maps->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < maps->size; ++i) {
-
-      status = private_f_string_dynamic_resize(0, &maps->array[i].name);
-      if (F_status_is_error(status)) return status;
-
-      status = private_f_string_dynamic_resize(0, &maps->array[i].value);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(maps->size, length, sizeof(f_string_map_t), (void **) & maps->array);
-
-    if (F_status_is_error_not(status)) {
-      maps->size = length;
-
-      if (maps->used > maps->size) {
-        maps->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !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_terminate_) || !defined(_di_f_string_maps_terminate_after_)
-
-#if !defined(_di_f_string_mapss_adjust_) || !defined(_di_f_string_mapss_decimate_by_)
-  f_status_t private_f_string_mapss_adjust(const f_array_length_t length, f_string_mapss_t * const mapss) {
-
-    if (mapss->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < mapss->size; ++i) {
-
-      status = private_f_string_maps_adjust(0, &mapss->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(mapss->size, length, sizeof(f_string_maps_t), (void **) & mapss->array);
-
-    if (F_status_is_error_not(status)) {
-      mapss->size = length;
-
-      if (mapss->used > mapss->size) {
-        mapss->used = length;
-      }
-    }
-
-    return status;
-  }
-#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_) || !defined(_di_f_string_mapss_terminate_) || !defined(_di_f_string_mapss_terminate_after_)
-  f_status_t private_f_string_mapss_resize(const f_array_length_t length, f_string_mapss_t * const mapss) {
-
-    if (mapss->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < mapss->size; ++i) {
-
-      status = private_f_string_maps_resize(0, &mapss->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(mapss->size, length, sizeof(f_string_maps_t), (void **) & mapss->array);
-
-    if (F_status_is_error_not(status)) {
-      mapss->size = length;
-
-      if (mapss->used > mapss->size) {
-        mapss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_) || !defined(_di_f_string_mapss_terminate_) || !defined(_di_f_string_mapss_terminate_after_)
-
 #if !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_)
   f_status_t private_f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t * const destination) {
 
@@ -738,334 +164,6 @@ extern "C" {
   }
 #endif // !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_)
 
-#if !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_)
-  f_status_t private_f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t * const quantitys) {
-
-    if (quantitys->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    const f_status_t status = f_memory_adjust(quantitys->size, length, sizeof(f_string_quantity_t), (void **) & quantitys->array);
-
-    if (F_status_is_error_not(status)) {
-      quantitys->size = length;
-
-      if (quantitys->used > quantitys->size) {
-        quantitys->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_)
-
-#if !defined(_di_f_string_quantitys_decrease_) || !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
-  f_status_t private_f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t * const quantitys) {
-
-    if (quantitys->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    const f_status_t status = f_memory_resize(quantitys->size, length, sizeof(f_string_quantity_t), (void **) & quantitys->array);
-
-    if (F_status_is_error_not(status)) {
-      quantitys->size = length;
-
-      if (quantitys->used > quantitys->size) {
-        quantitys->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_quantitys_decrease_) || !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
-
-#if !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_)
-  f_status_t private_f_string_quantityss_adjust(const f_array_length_t length, f_string_quantityss_t * const quantityss) {
-
-    if (quantityss->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < quantityss->size; ++i) {
-
-      status = private_f_string_quantitys_adjust(0, &quantityss->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(quantityss->size, length, sizeof(f_string_quantitys_t), (void **) & quantityss->array);
-
-    if (F_status_is_error_not(status)) {
-      quantityss->size = length;
-
-      if (quantityss->used > quantityss->size) {
-        quantityss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_)
-
-#if !defined(_di_f_string_quantityss_decrease_) || !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
-  f_status_t private_f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t * const quantityss) {
-
-    if (quantityss->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < quantityss->size; ++i) {
-
-      status = private_f_string_quantitys_resize(0, &quantityss->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(quantityss->size, length, sizeof(f_string_quantitys_t), (void **) & quantityss->array);
-
-    if (F_status_is_error_not(status)) {
-      quantityss->size = length;
-
-      if (quantityss->used > quantityss->size) {
-        quantityss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_quantityss_decrease_) || !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
-
-#if !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_)
-  f_status_t private_f_string_ranges_adjust(const f_array_length_t length, f_string_ranges_t * const ranges) {
-
-    if (ranges->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    const f_status_t status = f_memory_adjust(ranges->size, length, sizeof(f_string_range_t), (void **) & ranges->array);
-
-    if (F_status_is_error_not(status)) {
-      ranges->size = length;
-
-      if (ranges->used > ranges->size) {
-        ranges->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_)
-
-#if !defined(_di_f_string_ranges_decrease_) || !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_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
-  f_status_t private_f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t * const ranges) {
-
-    if (ranges->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    const f_status_t status = f_memory_resize(ranges->size, length, sizeof(f_string_range_t), (void **) & ranges->array);
-
-    if (F_status_is_error_not(status)) {
-      ranges->size = length;
-
-      if (ranges->used > ranges->size) {
-        ranges->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_ranges_decrease_) || !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_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
-
-#if !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_)
-  f_status_t private_f_string_rangess_adjust(const f_array_length_t length, f_string_rangess_t * const rangess) {
-
-    if (rangess->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < rangess->size; ++i) {
-
-      status = private_f_string_ranges_adjust(0, &rangess->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(rangess->size, length, sizeof(f_string_ranges_t), (void **) & rangess->array);
-
-    if (F_status_is_error_not(status)) {
-      rangess->size = length;
-
-      if (rangess->used > rangess->size) {
-        rangess->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_)
-
-#if !defined(_di_f_string_rangess_decrease_) || !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
-  f_status_t private_f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t * const rangess) {
-
-    if (rangess->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < rangess->size; ++i) {
-
-      status = private_f_string_ranges_resize(0, &rangess->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(rangess->size, length, sizeof(f_string_ranges_t), (void **) & rangess->array);
-
-    if (F_status_is_error_not(status)) {
-      rangess->size = length;
-
-      if (rangess->used > rangess->size) {
-        rangess->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_rangess_decrease_) || !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
-
-#if !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-  f_status_t private_f_string_triples_adjust(const f_array_length_t length, f_string_triples_t * const triples) {
-
-    if (triples->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < triples->size; ++i) {
-
-      status = private_f_string_dynamic_adjust(0, &triples->array[i].a);
-      if (F_status_is_error(status)) return status;
-
-      status = private_f_string_dynamic_adjust(0, &triples->array[i].b);
-      if (F_status_is_error(status)) return status;
-
-      status = private_f_string_dynamic_adjust(0, &triples->array[i].c);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(triples->size, length, sizeof(f_string_triple_t), (void **) & triples->array);
-
-    if (F_status_is_error_not(status)) {
-      triples->size = length;
-
-      if (triples->used > triples->size) {
-        triples->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-
-#if !defined(_di_f_string_triples_decrease_) || !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
-  f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t * const triples) {
-
-    if (triples->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < triples->size; ++i) {
-
-      status = private_f_string_dynamic_resize(0, &triples->array[i].a);
-      if (F_status_is_error(status)) return status;
-
-      status = private_f_string_dynamic_resize(0, &triples->array[i].b);
-      if (F_status_is_error(status)) return status;
-
-      status = private_f_string_dynamic_resize(0, &triples->array[i].c);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(triples->size, length, sizeof(f_string_triple_t), (void **) & triples->array);
-
-    if (F_status_is_error_not(status)) {
-      triples->size = length;
-
-      if (triples->used > triples->size) {
-        triples->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_triples_decrease_) || !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
-
-#if !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
-  f_status_t private_f_string_tripless_adjust(const f_array_length_t length, f_string_tripless_t * const tripless) {
-
-    if (tripless->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < tripless->size; ++i) {
-
-      status = private_f_string_triples_adjust(0, &tripless->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_adjust(tripless->size, length, sizeof(f_string_triples_t), (void **) & tripless->array);
-
-    if (F_status_is_error_not(status)) {
-      tripless->size = length;
-
-      if (tripless->used > tripless->size) {
-        tripless->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
-
-#if !defined(_di_f_string_tripless_decrease_) || !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
-  f_status_t private_f_string_tripless_resize(const f_array_length_t length, f_string_tripless_t * const tripless) {
-
-    if (tripless->used + length > F_array_length_t_size_d) {
-      return F_status_set_error(F_array_too_large);
-    }
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < tripless->size; ++i) {
-
-      status = private_f_string_triples_resize(0, &tripless->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    status = f_memory_resize(tripless->size, length, sizeof(f_string_triples_t), (void **) & tripless->array);
-
-    if (F_status_is_error_not(status)) {
-      tripless->size = length;
-
-      if (tripless->used > tripless->size) {
-        tripless->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_string_tripless_decrease_) || !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index c76fce0031becacb6d8d2171e74eb052916e2bf1..8217b5f83c2769d8d5d5683f9773fc1732aa2fd8 100644 (file)
@@ -88,602 +88,6 @@ extern "C" {
 #endif // !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
 
 /**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param dynamic
- *   The string to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_memory_adjust()
- * @see f_string_dynamic_adjust()
- * @see f_string_dynamic_decimate_by()
- * @see f_string_dynamics_adjust()
- * @see f_string_dynamics_append()
- * @see f_string_dynamics_decimate_by()
- * @see f_string_map_multis_adjust()
- * @see f_string_map_multis_append()
- * @see f_string_triples_adjust()
- * @see f_string_triples_decimate_by()
- */
-#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-  extern f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t * const dynamic) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
-
-/**
- * Private implementation of f_string_dynamic_increase_by().
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param amount
- *   A positive number representing how much to increase the size by.
- * @param dynamic
- *   The string to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_string_too_large (with error bit) if the combined string is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see memcpy()
- *
- * @see f_string_append()
- * @see f_string_append_assure()
- * @see f_string_append_mash()
- * @see f_string_append_nulless()
- * @see f_string_dynamic_append()
- * @see f_string_dynamic_append_assure()
- * @see f_string_dynamic_append_nulless()
- * @see f_string_dynamic_increase_by()
- * @see f_string_dynamic_mash()
- * @see f_string_dynamic_mash_nulless()
- * @see f_string_dynamic_partial_append)
- * @see f_string_dynamic_partial_append_assure()
- * @see f_string_dynamic_partial_mash()
- * @see f_string_dynamic_prepend()
- * @see f_string_dynamic_prepend_nulless()
- * @see f_string_dynamics_append()
- * @see f_string_map_multis_append()
- * @see f_string_mash()
- * @see f_string_mash_nulless()
- * @see f_string_maps_append()
- * @see f_string_prepend()
- * @see f_string_prepend_nulless()
- * @see f_string_triples_append()
- */
-#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-  extern f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t * const dynamic) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param dynamic
- *   The string to resize.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_memory_resize()
- * @see f_string_append()
- * @see f_string_append_assure()
- * @see f_string_append_mash()
- * @see f_string_append_nulless()
- * @see f_string_dynamic_append()
- * @see f_string_dynamic_append_assure()
- * @see f_string_dynamic_append_nulless()
- * @see f_string_dynamic_decrease_by()
- * @see f_string_dynamic_increase()
- * @see f_string_dynamic_increase_by()
- * @see f_string_dynamic_mash()
- * @see f_string_dynamic_mash_nulless()
- * @see f_string_dynamic_partial_append)
- * @see f_string_dynamic_partial_append_assure()
- * @see f_string_dynamic_partial_mash()
- * @see f_string_dynamic_prepend()
- * @see f_string_dynamic_prepend_nulless()
- * @see f_string_dynamic_terminate()
- * @see f_string_dynamic_terminate_after()
- * @see f_string_dynamics_append()
- * @see f_string_map_multis_append()
- * @see f_string_mash_nulless()
- * @see f_string_mash()
- * @see f_string_maps_append()
- * @see f_string_prepend()
- * @see f_string_prepend_nulless()
- * @see f_string_triples_append()
- */
-#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-  extern f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t * const dynamic) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param dynamics
- *   The strings to adjust.
- *
- * @return
- *   F_none 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_dynamics_adjust()
- * @see f_string_dynamics_append()
- * @see f_string_dynamics_decimate_by()
- * @see f_string_map_multis_adjust()
- * @see f_string_map_multis_append()
- */
-#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
-  extern f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t * const dynamics) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
-
-/**
- * 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 strings the source is appended onto.
- *
- * @return
- *   F_none 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()
- */
-#if !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_)
-  extern f_status_t private_f_string_dynamics_append(const f_string_dynamics_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_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param dynamics
- *   The strings to resize.
- *
- * @return
- *   F_none 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_decrease_by()
- * @see f_string_dynamics_increase()
- * @see f_string_dynamics_increase_by()
- */
-#if !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_)
-  extern f_status_t private_f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t * const dynamics) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_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 dynamicss
- *   The strings to adjust.
- *
- * @return
- *   F_none 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_dynamicss_adjust()
- * @see f_string_dynamicss_append()
- * @see f_string_dynamicss_decimate_by()
- * @see f_string_map_multis_adjust()
- * @see f_string_map_multis_append()
- */
-#if !defined(_di_f_string_dynamicss_adjust_) || !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_dynamicss_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
-  extern f_status_t private_f_string_dynamicss_adjust(const f_array_length_t length, f_string_dynamicss_t * const dynamicss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_dynamicss_adjust_) || !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_dynamicss_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
-
-/**
- * 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 strings the source is appended onto.
- *
- * @return
- *   F_none 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_dynamicss_append()
- * @see f_string_map_multis_append()
- */
-#if !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_map_multis_append_)
-  extern f_status_t private_f_string_dynamicss_append(const f_string_dynamicss_t source, f_string_dynamicss_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_map_multis_append_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param dynamicss
- *   The strings to resize.
- *
- * @return
- *   F_none 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_dynamicss_decrease_by()
- * @see f_string_dynamicss_increase()
- * @see f_string_dynamicss_increase_by()
- */
-#if !defined(_di_f_string_dynamicss_decrease_by_) || !defined(_di_f_string_dynamicss_increase_) || !defined(_di_f_string_dynamicss_increase_by_)
-  extern f_status_t private_f_string_dynamicss_resize(const f_array_length_t length, f_string_dynamicss_t * const dynamicss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_dynamicss_decrease_by_) || !defined(_di_f_string_dynamicss_increase_) || !defined(_di_f_string_dynamicss_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 map_multis
- *   The map_multis to adjust.
- *
- * @return
- *   F_none 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_array_length_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 multi-map to append.
- * @param destination
- *   The destination multi-maps the source is appended onto.
- *
- * @return
- *   F_none on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *   Errors (with error bit) from: f_string_map_multis_append().
- *   Errors (with error bit) from: f_string_map_multiss_append().
- *
- * @see f_memory_resize()
- * @see f_string_map_multis_append()
- * @see f_string_map_multiss_append()
- */
-#if !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multis_append_)
-  extern f_status_t private_f_string_map_multis_append(const f_string_map_multi_t source, f_string_map_multis_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_map_multiss_append_) || !defined(_di_f_string_map_multis_append_)
-
-/**
- * Private implementation for appending.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source multi-maps to append.
- * @param destination
- *   The destination multi-maps the source is appended onto.
- *
- * @return
- *   F_none on success.
- *
- *   F_array_too_large (with error bit) if the combined array is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *   Errors (with error bit) from: f_string_map_multis_append().
- *   Errors (with error bit) from: f_string_map_multiss_append().
- *
- * @see f_memory_resize()
- * @see f_string_map_multis_append()
- * @see f_string_map_multiss_append()
- */
-#if !defined(_di_f_string_map_multiss_append_all_) || !defined(_di_f_string_map_multis_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_multiss_append_all_) || !defined(_di_f_string_map_multis_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_none 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_adjust()
- * @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_terminate()
- * @see f_string_map_multis_terminate_after()
- */
-#if !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_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
-  extern f_status_t private_f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t * const map_multis) F_attribute_visibility_internal_d;
-#endif // !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_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param map_multiss
- *   The map_multiss to adjust.
- *
- * @return
- *   F_none 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_array_length_t length, f_string_map_multiss_t * const map_multiss) 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 map_multiss
- *   The map_multiss to resize.
- *
- * @return
- *   F_none 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_adjust()
- * @see f_string_map_multiss_decrease_by()
- * @see f_string_map_multiss_increase()
- * @see f_string_map_multiss_increase_by()
- * @see f_string_map_multiss_terminate()
- * @see f_string_map_multiss_terminate_after()
- */
-#if !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_) || !defined(_di_f_string_map_multiss_terminate_) || !defined(_di_f_string_map_multiss_terminate_after_)
-  extern f_status_t private_f_string_map_multiss_resize(const f_array_length_t length, f_string_map_multiss_t * const map_multiss) 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_) || !defined(_di_f_string_map_multiss_terminate_) || !defined(_di_f_string_map_multiss_terminate_after_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param maps
- *   The maps to adjust.
- *
- * @return
- *   F_none 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_array_length_t length, f_string_maps_t * const maps) 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 map to append.
- * @param destination
- *   The destination maps the source is appended onto.
- *
- * @return
- *   F_none 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_mapss_append()
- */
-#if !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_maps_append_)
-  extern f_status_t private_f_string_maps_append(const f_string_map_t source, f_string_maps_t * const destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_mapss_append_) || !defined(_di_f_string_maps_append_)
-
-/**
- * Private implementation for appending.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source maps to append.
- * @param destination
- *   The destination maps the source is appended onto.
- *
- * @return
- *   F_none 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_mapss_append()
- */
-#if !defined(_di_f_string_mapss_append_all_) || !defined(_di_f_string_maps_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_mapss_append_all_) || !defined(_di_f_string_maps_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 maps
- *   The maps to resize.
- *
- * @return
- *   F_none 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_adjust()
- * @see f_string_maps_decrease_by()
- * @see f_string_maps_increase()
- * @see f_string_maps_increase_by()
- * @see f_string_maps_terminate()
- * @see f_string_maps_terminate_after()
- */
-#if !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_terminate_) || !defined(_di_f_string_maps_terminate_after_)
-  extern f_status_t private_f_string_maps_resize(const f_array_length_t length, f_string_maps_t * const maps) F_attribute_visibility_internal_d;
-#endif // !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_terminate_) || !defined(_di_f_string_maps_terminate_after_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param mapss
- *   The mapss to adjust.
- *
- * @return
- *   F_none 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_array_length_t length, f_string_mapss_t * const mapss) 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 mapss
- *   The mapss to resize.
- *
- * @return
- *   F_none 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_adjust()
- * @see f_string_mapss_decrease_by()
- * @see f_string_mapss_increase()
- * @see f_string_mapss_increase_by()
- * @see f_string_mapss_terminate()
- * @see f_string_mapss_terminate_after()
- */
-#if !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_) || !defined(_di_f_string_mapss_terminate_) || !defined(_di_f_string_mapss_terminate_after_)
-  extern f_status_t private_f_string_mapss_resize(const f_array_length_t length, f_string_mapss_t * const mapss) 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_) || !defined(_di_f_string_mapss_terminate_) || !defined(_di_f_string_mapss_terminate_after_)
-
-/**
  * Private implementation of f_string_prepend().
  *
  * Intended to be shared to each of the different implementation variations.
@@ -755,324 +159,6 @@ extern "C" {
   extern f_status_t private_f_string_prepend_nulless(const f_string_t source, f_array_length_t length, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_)
 
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param quantitys
- *   The quantitys to adjust.
- *
- * @return
- *   F_none 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_quantitys_adjust()
- * @see f_string_quantitys_decimate_by()
- */
-#if !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_)
-  extern f_status_t private_f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t * const quantitys) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_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 quantitys
- *   The quantitys to resize.
- *
- * @return
- *   F_none 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_quantitys_decrease_by()
- * @see f_string_quantitys_increase()
- * @see f_string_quantitys_increase_by()
- * @see f_string_quantitys_terminate()
- * @see f_string_quantitys_terminate_after()
- */
-#if !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
-  extern f_status_t private_f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t * const quantitys) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param quantityss
- *   The quantityss to adjust.
- *
- * @return
- *   F_none 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()
- * @see f_string_quantityss_decimate_by()
- */
-#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_array_length_t length, f_string_quantityss_t * const quantityss) 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 quantityss
- *   The quantityss to resize.
- *
- * @return
- *   F_none 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()
- * @see f_string_quantityss_terminate()
- * @see f_string_quantityss_terminate_after()
- */
-#if !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
-  extern f_status_t private_f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t * const quantityss) 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_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param ranges
- *   The ranges to adjust.
- *
- * @return
- *   F_none 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_ranges_adjust()
- * @see f_string_ranges_decimate_by()
- */
-#if !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_)
-  extern f_status_t private_f_string_ranges_adjust(const f_array_length_t length, f_string_ranges_t * const ranges) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_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 ranges
- *   The ranges to resize.
- *
- * @return
- *   F_none 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_decrease_by()
- * @see f_string_ranges_increase()
- * @see f_string_ranges_increase_by()
- * @see f_string_ranges_terminate()
- * @see f_string_ranges_terminate_after()
- */
-#if !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_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
-  extern f_status_t private_f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t * const ranges) F_attribute_visibility_internal_d;
-#endif // !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_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param rangess
- *   The rangess to adjust.
- *
- * @return
- *   F_none 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()
- * @see f_string_rangess_decimate_by()
- */
-#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_array_length_t length, f_string_rangess_t * const rangess) 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 rangess
- *   The rangess to resize.
- *
- * @return
- *   F_none 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_decrease_by()
- * @see f_string_rangess_increase()
- * @see f_string_rangess_increase_by()
- * @see f_string_rangess_terminate()
- * @see f_string_rangess_terminate_after()
- */
-#if !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
-  extern f_status_t private_f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t * const rangess) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param triples
- *   The triples to adjust.
- *
- * @return
- *   F_none 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()
- * @see f_string_triples_decimate_by()
- */
-#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_array_length_t length, f_string_triples_t * const triples) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_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 triples
- *   The triples to resize.
- *
- * @return
- *   F_none 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()
- * @see f_string_triples_terminate()
- * @see f_string_triples_terminate_after()
- */
-#if !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
-  extern f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t * const triples) 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_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param tripless
- *   The tripless to adjust.
- *
- * @return
- *   F_none 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()
- * @see f_string_tripless_decimate_by()
- */
-#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_array_length_t length, f_string_tripless_t * const tripless) 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 tripless
- *   The tripless to resize.
- *
- * @return
- *   F_none 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()
- * @see f_string_tripless_terminate()
- * @see f_string_tripless_terminate_after()
- */
-#if !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
-  extern f_status_t private_f_string_tripless_resize(const f_array_length_t length, f_string_tripless_t * const tripless) 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_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 8a853eca8496beb4babe68b05fc1f4e67729803e..19746fa13b45503307c66ef1c35429bfda2abb7e 100644 (file)
@@ -27,6 +27,7 @@
 #include <fll/level_0/string/static.h>
 #include <fll/level_0/string/dynamic.h>
 #include <fll/level_0/string/map.h>
+#include <fll/level_0/string/map_multi.h>
 #include <fll/level_0/string/quantity.h>
 #include <fll/level_0/string/triple.h>
 
index fc1cee0430537e0a7b98b341d22cdd3d4c6870d3..c462b0ef5326cf5a57874ccb1e7f7379c9e4f0d5 100644 (file)
@@ -1,5 +1,6 @@
 #include "../string.h"
 #include "../private-string.h"
+#include "private-dynamic.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -21,9 +22,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     return private_f_string_append(source.string, source.used, destination);
   }
@@ -35,9 +34,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     if (destination->used < source.used) {
       return private_f_string_append(source.string, source.used, destination);
@@ -78,9 +75,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     if (destination->used < source.used) {
       return private_f_string_append_nulless(source.string, source.used, destination);
@@ -121,9 +116,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     return private_f_string_append_nulless(source.string, source.used, destination);
   }
@@ -135,9 +128,7 @@ extern "C" {
       if (!dynamic) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (dynamic->size - amount > 0) {
       return private_f_string_dynamic_adjust(dynamic->size - amount, dynamic);
@@ -153,9 +144,7 @@ extern "C" {
       if (!dynamic) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (dynamic->size - amount > 0) {
       return private_f_string_dynamic_resize(dynamic->size - amount, dynamic);
@@ -195,9 +184,7 @@ extern "C" {
       if (!dynamic) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     return private_f_string_dynamic_increase_by(amount, dynamic);
   }
@@ -209,9 +196,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     if (glue.used && destination->used) {
       const f_status_t status = private_f_string_append(glue.string, glue.used, destination);
@@ -228,9 +213,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     if (glue.used && destination->used) {
       const f_status_t status = private_f_string_append_nulless(glue.string, glue.used, destination);
@@ -247,9 +230,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     if (glue.used && destination->used) {
       const f_status_t status = private_f_string_prepend(glue.string, glue.used, destination);
@@ -266,9 +247,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     if (glue.used && destination->used) {
       const f_status_t status = private_f_string_prepend_nulless(glue.string, glue.used, destination);
@@ -282,16 +261,15 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_append_
   f_status_t f_string_dynamic_partial_append(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
-    if (range.start > range.stop) {
-      return F_data_not_stop;
+    if (range.stop >= source.used) {
+      return private_f_string_append(source.string + range.start, source.used - range.start, destination);
     }
 
     return private_f_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
@@ -301,19 +279,14 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_append_assure_
   f_status_t f_string_dynamic_partial_append_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
-
-    if (range.start > range.stop) {
-      return F_data_not_stop;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
-    const f_array_length_t length = (range.stop - range.start) + 1;
+    const f_array_length_t length = range.stop >= source.used ? source.used - range.start : (range.stop - range.start) + 1;
 
     if (destination->used < length) {
       return private_f_string_append(source.string + range.start, length, destination);
@@ -351,19 +324,14 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_append_assure_nulless_
   f_status_t f_string_dynamic_partial_append_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
-
-    if (range.start > range.stop) {
-      return F_data_not_stop;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
-    const f_array_length_t length = (range.stop - range.start) + 1;
+    const f_array_length_t length = range.stop >= source.used ? source.used - range.start : (range.stop - range.start) + 1;
 
     if (destination->used < length) {
       return private_f_string_append_nulless(source.string + range.start, length, destination);
@@ -401,16 +369,15 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_append_nulless_
   f_status_t f_string_dynamic_partial_append_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
-    if (range.start > range.stop) {
-      return F_data_not_stop;
+    if (range.stop >= source.used) {
+      return private_f_string_append_nulless(source.string + range.start, source.used - range.start, destination);
     }
 
     return private_f_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
@@ -420,23 +387,22 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_mash_
   f_status_t f_string_dynamic_partial_mash(const f_string_static_t glue, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
-
-    if (range.start > range.stop) {
-      return F_data_not_stop;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
     if (glue.used && destination->used) {
-      f_status_t status = private_f_string_append(glue.string, glue.used, destination);
+      const f_status_t status = private_f_string_append(glue.string, glue.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
+    if (range.stop >= source.used) {
+      return private_f_string_append(source.string + range.start, source.used - range.start, destination);
+    }
+
     return private_f_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
   }
 #endif // _di_f_string_dynamic_partial_mash_
@@ -444,23 +410,22 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_mash_nulless_
   f_status_t f_string_dynamic_partial_mash_nulless(const f_string_static_t glue, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
-
-    if (range.start > range.stop) {
-      return F_data_not_stop;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
     if (glue.used && destination->used) {
-      f_status_t status = private_f_string_append_nulless(glue.string, glue.used, destination);
+      const f_status_t status = private_f_string_append_nulless(glue.string, glue.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
+    if (range.stop >= source.used) {
+      return private_f_string_append(source.string + range.start, source.used - range.start, destination);
+    }
+
     return private_f_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
   }
 #endif // _di_f_string_dynamic_partial_mash_nulless_
@@ -468,23 +433,22 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_mish_
   f_status_t f_string_partial_dynamic_mish(const f_string_static_t glue, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
-
-    if (range.start > range.stop) {
-      return F_data_not_stop;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
     if (glue.used && destination->used) {
-      f_status_t status = private_f_string_prepend(glue.string, glue.used, destination);
+      const f_status_t status = private_f_string_prepend(glue.string, glue.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
+    if (range.stop >= source.used) {
+      return private_f_string_append(source.string + range.start, source.used - range.start, destination);
+    }
+
     return private_f_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
   }
 #endif // _di_f_string_dynamic_partial_mish_
@@ -492,23 +456,22 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_mish_nulless_
   f_status_t f_string_dynamic_partial_mish_nulless(const f_string_static_t glue, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
-
-    if (range.start > range.stop) {
-      return F_data_not_stop;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
     if (glue.used && destination->used) {
-      f_status_t status = private_f_string_prepend_nulless(glue.string, glue.used, destination);
+      const f_status_t status = private_f_string_prepend_nulless(glue.string, glue.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
+    if (range.stop >= source.used) {
+      return private_f_string_append(source.string + range.start, source.used - range.start, destination);
+    }
+
     return private_f_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
   }
 #endif // _di_f_string_dynamic_partial_mish_nulless_
@@ -516,16 +479,15 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_prepend_
   f_status_t f_string_dynamic_partial_prepend(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
-    if (range.start > range.stop) {
-      return F_data_not_stop;
+    if (range.stop >= source.used) {
+      return private_f_string_append(source.string + range.start, source.used - range.start, destination);
     }
 
     return private_f_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
@@ -535,19 +497,14 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_prepend_assure_
   f_status_t f_string_dynamic_partial_prepend_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
-
-    if (range.start > range.stop) {
-      return F_data_not_stop;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
-    const f_array_length_t length = (range.stop - range.start) + 1;
+    const f_array_length_t length = range.stop >= source.used ? source.used - range.start : (range.stop - range.start) + 1;
 
     if (destination->used < length) {
       return private_f_string_prepend(source.string + range.start, length, destination);
@@ -585,19 +542,14 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_prepend_assure_nulless_
   f_status_t f_string_dynamic_partial_prepend_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
-
-    if (range.start > range.stop) {
-      return F_data_not_stop;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
-    const f_array_length_t length = (range.stop - range.start) + 1;
+    const f_array_length_t length = range.stop >= source.used ? source.used - range.start : (range.stop - range.start) + 1;
 
     if (destination->used < length) {
       return private_f_string_prepend_nulless(source.string + range.start, length, destination);
@@ -635,17 +587,12 @@ extern "C" {
 #ifndef _di_f_string_dynamic_partial_prepend_nulless_
   f_status_t f_string_dynamic_partial_prepend_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
-      if (source.used <= range.stop) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
-
-    if (range.start > range.stop) {
-      return F_data_not_stop;
-    }
+    if (!source.used) return F_data_not;
+    if (range.start > range.stop) return F_data_not_stop;
+    if (range.start >= source.used) return F_data_not_eos;
 
     return private_f_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
   }
@@ -657,9 +604,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     return private_f_string_prepend(source.string, source.used, destination);
   }
@@ -671,9 +616,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     if (destination->used < source.used) {
       return private_f_string_prepend(source.string, source.used, destination);
@@ -714,9 +657,7 @@ extern "C" {
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     if (destination->used < source.used) {
       return private_f_string_prepend_nulless(source.string, source.used, destination);
@@ -901,28 +842,36 @@ extern "C" {
 #endif // _di_f_string_dynamics_adjust_
 
 #ifndef _di_f_string_dynamics_append_
-  f_status_t f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t * const destination) {
+  f_status_t f_string_dynamics_append(const f_string_dynamic_t source, f_string_dynamics_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
-    }
+    if (!source.used) return F_data_not;
 
     return private_f_string_dynamics_append(source, destination);
   }
 #endif // _di_f_string_dynamics_append_
 
+#ifndef _di_f_string_dynamics_append_all_
+  f_status_t f_string_dynamics_append_all(const f_string_dynamics_t source, f_string_dynamics_t * const destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_string_dynamics_append_all(source, destination);
+  }
+#endif // _di_f_string_dynamics_append_all_
+
 #ifndef _di_f_string_dynamics_decimate_by_
   f_status_t f_string_dynamics_decimate_by(const f_array_length_t amount, f_string_dynamics_t * const dynamics) {
     #ifndef _di_level_0_parameter_checking_
       if (!dynamics) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (dynamics->size - amount > 0) {
       return private_f_string_dynamics_adjust(dynamics->size - amount, dynamics);
@@ -938,9 +887,7 @@ extern "C" {
       if (!dynamics) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (dynamics->size - amount > 0) {
       return private_f_string_dynamics_resize(dynamics->size - amount, dynamics);
@@ -956,9 +903,7 @@ extern "C" {
       if (!dynamics) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!step) {
-      return F_data_not;
-    }
+    if (!step) return F_data_not;
 
     if (dynamics->used + 1 > dynamics->size) {
       f_array_length_t size = dynamics->used + step;
@@ -1017,28 +962,69 @@ extern "C" {
 #endif // _di_f_string_dynamicss_adjust_
 
 #ifndef _di_f_string_dynamicss_append_
-  f_status_t f_string_dynamicss_append(const f_string_dynamicss_t source, f_string_dynamicss_t * const destination) {
+  f_status_t f_string_dynamicss_append(const f_string_dynamics_t source, f_string_dynamicss_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_string_dynamicss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used].used = 0;
+
+    if (source.used) {
+      status = private_f_string_dynamics_append_all(source, &destination->array[destination->used]);
+      if (F_status_is_error(status)) return status;
     }
 
-    return private_f_string_dynamicss_append(source, destination);
+    ++destination->used;
+
+    return F_none;
   }
 #endif // _di_f_string_dynamicss_append_
 
+#ifndef _di_f_string_dynamicss_append_all_
+  f_status_t f_string_dynamicss_append_all(const f_string_dynamicss_t source, f_string_dynamicss_t * const destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_string_dynamicss_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      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]);
+        if (F_status_is_error(status)) return status;
+      }
+    } // for
+
+    return F_none;
+  }
+#endif // _di_f_string_dynamicss_append_all_
+
 #ifndef _di_f_string_dynamicss_decimate_by_
   f_status_t f_string_dynamicss_decimate_by(const f_array_length_t amount, f_string_dynamicss_t * const dynamicss) {
     #ifndef _di_level_0_parameter_checking_
       if (!dynamicss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (dynamicss->size - amount > 0) {
       return private_f_string_dynamicss_adjust(dynamicss->size - amount, dynamicss);
@@ -1054,9 +1040,7 @@ extern "C" {
       if (!dynamicss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (dynamicss->size - amount > 0) {
       return private_f_string_dynamicss_resize(dynamicss->size - amount, dynamicss);
@@ -1072,9 +1056,7 @@ extern "C" {
       if (!dynamicss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!step) {
-      return F_data_not;
-    }
+    if (!step) return F_data_not;
 
     if (dynamicss->used + 1 > dynamicss->size) {
       f_array_length_t size = dynamicss->used + step;
@@ -1100,9 +1082,7 @@ extern "C" {
       if (!dynamicss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (dynamicss->used + amount > dynamicss->size) {
       if (dynamicss->used + amount > F_array_length_t_size_d) {
index 126bfa3ab3c005ffd274d0afb6374cba254fb509..be5e8aa61581afeeb87b0dd31e8e0e40aae97862 100644 (file)
@@ -422,6 +422,8 @@ extern "C" {
 /**
  * Append the source string onto the destination, but restricted to the given range.
  *
+ * If range.stop is on or after source.used, then source.used - 1 is used as the stopping point.
+ *
  * @param source
  *   The source string to append.
  * @param range
@@ -432,6 +434,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -458,6 +461,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -486,6 +490,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -512,6 +517,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -540,6 +546,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -570,6 +577,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -598,6 +606,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -628,6 +637,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -654,6 +664,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -682,6 +693,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -710,6 +722,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -736,6 +749,7 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
+ *   F_data_not_eos if range.start >= source.used.
  *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
@@ -760,7 +774,6 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
- *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *   F_string_too_large (with error bit) if the combined string is too large.
@@ -786,7 +799,6 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
- *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *   F_string_too_large (with error bit) if the combined string is too large.
@@ -812,7 +824,6 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
- *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *   F_string_too_large (with error bit) if the combined string is too large.
@@ -836,7 +847,6 @@ extern "C" {
  * @return
  *   F_none on success.
  *   F_data_not if source length is 0.
- *   F_data_not_stop if range.start > range.stop.
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *   F_string_too_large (with error bit) if the combined string is too large.
@@ -1010,10 +1020,10 @@ extern "C" {
 #endif // _di_f_string_dynamics_adjust_
 
 /**
- * Append the source strings onto the destination.
+ * Append the single source string onto the destination.
  *
  * @param source
- *   The source strings to append.
+ *   The source string to append.
  * @param destination
  *   The destination strings the source is appended onto.
  *
@@ -1027,10 +1037,31 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_string_dynamics_append_
-  extern f_status_t f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t * const destination);
+  extern f_status_t f_string_dynamics_append(const f_string_dynamic_t source, f_string_dynamics_t * const destination);
 #endif // _di_f_string_dynamics_append_
 
 /**
+ * Append the source strings onto the destination.
+ *
+ * @param source
+ *   The source strings to append.
+ * @param destination
+ *   The destination strings the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamics_append_all_
+  extern f_status_t f_string_dynamics_append_all(const f_string_dynamics_t source, f_string_dynamics_t * const destination);
+#endif // _di_f_string_dynamics_append_all_
+
+/**
  * Resize the dynamic string array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -1167,10 +1198,10 @@ extern "C" {
 #endif // _di_f_string_dynamicss_adjust_
 
 /**
- * Append the source strings onto the destination.
+ * Append the single source string onto the destination.
  *
  * @param source
- *   The source strings to append.
+ *   The source string to append.
  * @param destination
  *   The destination strings the source is appended onto.
  *
@@ -1184,10 +1215,31 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_string_dynamicss_append_
-  extern f_status_t f_string_dynamicss_append(const f_string_dynamicss_t source, f_string_dynamicss_t * const destination);
+  extern f_status_t f_string_dynamicss_append(const f_string_dynamics_t source, f_string_dynamicss_t * const destination);
 #endif // _di_f_string_dynamicss_append_
 
 /**
+ * Append the source strings onto the destination.
+ *
+ * @param source
+ *   The source strings to append.
+ * @param destination
+ *   The destination strings the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamicss_append_all_
+  extern f_status_t f_string_dynamicss_append_all(const f_string_dynamicss_t source, f_string_dynamicss_t * const destination);
+#endif // _di_f_string_dynamicss_append_all_
+
+/**
  * Resize the dynamics string array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
index 7bcfb7d29f2da0552b3bf7cb9d34f2170127d908..a3ea79710f7cf50612cc83e1ecfd3744011bab20 100644 (file)
@@ -1,22 +1,23 @@
 #include "../string.h"
 #include "../private-string.h"
+#include "private-map.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_map_multis_adjust_
-  f_status_t f_string_map_multis_adjust(const f_array_length_t length, f_string_map_multis_t * const map_multis) {
+#ifndef _di_f_string_maps_adjust_
+  f_status_t f_string_maps_adjust(const f_array_length_t length, f_string_maps_t * const maps) {
     #ifndef _di_level_0_parameter_checking_
-      if (!map_multis) return F_status_set_error(F_parameter);
+      if (!maps) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_string_map_multis_adjust(length, map_multis);
+    return private_f_string_maps_adjust(length, maps);
   }
-#endif // _di_f_string_map_multis_adjust_
+#endif // _di_f_string_maps_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_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_
@@ -24,7 +25,7 @@ extern "C" {
     f_status_t status = F_none;
 
     if (destination->used + 1 > destination->size) {
-      status = private_f_string_map_multis_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      status = private_f_string_maps_resize(destination->used + F_memory_default_allocation_small_d, destination);
       if (F_status_is_error(status)) return status;
     }
 
@@ -37,168 +38,7 @@ extern "C" {
     }
 
     if (source.value.used) {
-      status = private_f_string_dynamics_append(source.value, &destination->array[destination->used].value);
-      if (F_status_is_error(status)) return status;
-    }
-
-    ++destination->used;
-
-    return F_none;
-  }
-#endif // _di_f_string_map_multis_append_
-
-#ifndef _di_f_string_map_multis_append_all_
-  f_status_t f_string_map_multis_append_all(const f_string_map_multis_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_none;
-
-    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_array_length_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(source.array[i].value, &destination->array[destination->used].value);
-        if (F_status_is_error(status)) return status;
-      }
-    } // for
-
-    return F_none;
-  }
-#endif // _di_f_string_map_multis_append_all_
-
-#ifndef _di_f_string_map_multis_decimate_by_
-  f_status_t f_string_map_multis_decimate_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multis) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (map_multis->size - amount > 0) {
-      return private_f_string_map_multis_adjust(map_multis->size - amount, map_multis);
-    }
-
-    return private_f_string_map_multis_adjust(0, map_multis);
-  }
-#endif // _di_f_string_map_multis_decimate_by_
-
-#ifndef _di_f_string_map_multis_decrease_by_
-  f_status_t f_string_map_multis_decrease_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multis) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (map_multis->size - amount > 0) {
-      return private_f_string_map_multis_resize(map_multis->size - amount, map_multis);
-    }
-
-    return private_f_string_map_multis_resize(0, map_multis);
-  }
-#endif // _di_f_string_map_multis_decrease_by_
-
-#ifndef _di_f_string_map_multis_increase_
-  f_status_t f_string_map_multis_increase(const f_array_length_t step, f_string_map_multis_t * const map_multis) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multis) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && map_multis->used + 1 > map_multis->size) {
-      f_array_length_t size = map_multis->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (map_multis->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_string_map_multis_resize(size, map_multis);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_string_map_multis_increase_
-
-#ifndef _di_f_string_map_multis_increase_by_
-  f_status_t f_string_map_multis_increase_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multis) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (map_multis->used + amount > map_multis->size) {
-      if (map_multis->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_string_map_multis_resize(map_multis->used + amount, map_multis);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_string_map_multis_increase_by_
-
-#ifndef _di_f_string_map_multis_resize_
-  f_status_t f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t * const map_multis) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multis) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_map_multis_resize(length, map_multis);
-  }
-#endif // _di_f_string_map_multis_resize_
-
-#ifndef _di_f_string_map_multiss_adjust_
-  f_status_t f_string_map_multiss_adjust(const f_array_length_t length, f_string_map_multiss_t * const map_multiss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multiss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_map_multiss_adjust(length, map_multiss);
-  }
-#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_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    f_status_t status = F_none;
-
-    if (destination->used + 1 > destination->size) {
-      status = private_f_string_map_multiss_resize(destination->used + F_memory_default_allocation_small_d, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    destination->array[destination->used].used = 0;
-
-    if (source.used) {
-      status = private_f_string_map_multis_append_all(source, &destination->array[destination->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;
     }
 
@@ -206,145 +46,6 @@ extern "C" {
 
     return F_none;
   }
-#endif // _di_f_string_map_multiss_append_
-
-#ifndef _di_f_string_map_multiss_append_all_
-  f_status_t f_string_map_multiss_append_all(const f_string_map_multiss_t source, f_string_map_multiss_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_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_map_multiss_resize(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-
-      destination->array[destination->used].used = 0;
-
-      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
-
-    return F_none;
-  }
-#endif // _di_f_string_map_multiss_append_all_
-
-#ifndef _di_f_string_map_multiss_decimate_by_
-  f_status_t f_string_map_multiss_decimate_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multiss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (map_multiss->size - amount > 0) {
-      return private_f_string_map_multiss_adjust(map_multiss->size - amount, map_multiss);
-    }
-
-    return private_f_string_map_multiss_adjust(0, map_multiss);
-  }
-#endif // _di_f_string_map_multiss_decimate_by_
-
-#ifndef _di_f_string_map_multiss_decrease_by_
-  f_status_t f_string_map_multiss_decrease_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multiss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (map_multiss->size - amount > 0) {
-      return private_f_string_map_multiss_resize(map_multiss->size - amount, map_multiss);
-    }
-
-    return private_f_string_map_multiss_resize(0, map_multiss);
-  }
-#endif // _di_f_string_map_multiss_decrease_by_
-
-#ifndef _di_f_string_map_multiss_increase_
-  f_status_t f_string_map_multiss_increase(const f_array_length_t step, f_string_map_multiss_t * const map_multiss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multiss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && map_multiss->used + 1 > map_multiss->size) {
-      f_array_length_t size = map_multiss->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (map_multiss->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_string_map_multiss_resize(size, map_multiss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_string_map_multiss_increase_
-
-#ifndef _di_f_string_map_multiss_increase_by_
-  f_status_t f_string_map_multiss_increase_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multiss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (map_multiss->used + amount > map_multiss->size) {
-      if (map_multiss->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_string_map_multiss_resize(map_multiss->used + amount, map_multiss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_string_map_multiss_increase_by_
-
-#ifndef _di_f_string_map_multiss_resize_
-  f_status_t f_string_map_multiss_resize(const f_array_length_t length, f_string_map_multiss_t * const map_multiss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!map_multiss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_map_multiss_resize(length, map_multiss);
-  }
-#endif // _di_f_string_map_multiss_resize_
-
-#ifndef _di_f_string_maps_adjust_
-  f_status_t f_string_maps_adjust(const f_array_length_t length, f_string_maps_t * const maps) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!maps) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_string_maps_adjust(length, maps);
-  }
-#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_
-
-    return private_f_string_maps_append(source, destination);
-  }
 #endif // _di_f_string_maps_append_
 
 #ifndef _di_f_string_maps_append_all_
@@ -365,9 +66,7 @@ extern "C" {
       if (!maps) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (maps->size - amount > 0) {
       return private_f_string_maps_adjust(maps->size - amount, maps);
@@ -383,9 +82,7 @@ extern "C" {
       if (!maps) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (maps->size - amount > 0) {
       return private_f_string_maps_resize(maps->size - amount, maps);
@@ -425,9 +122,7 @@ extern "C" {
       if (!maps) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (maps->used + amount > maps->size) {
       if (maps->used + amount > F_array_length_t_size_d) {
@@ -524,9 +219,7 @@ extern "C" {
       if (!mapss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (mapss->size - amount > 0) {
       return private_f_string_mapss_adjust(mapss->size - amount, mapss);
@@ -542,9 +235,7 @@ extern "C" {
       if (!mapss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (mapss->size - amount > 0) {
       return private_f_string_mapss_resize(mapss->size - amount, mapss);
@@ -584,9 +275,7 @@ extern "C" {
       if (!mapss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (mapss->used + amount > mapss->size) {
       if (mapss->used + amount > F_array_length_t_size_d) {
index c54d47ddd6638875c245ea98c0c8b0d63ead847c..2f7e3914b0a93a08f0b7e0bab8f4ddecce6644e7 100644 (file)
@@ -114,279 +114,6 @@ extern "C" {
 #endif // _di_f_string_mapss_t_
 
 /**
- * A string map consisting of a name and multiple values.
- *
- * name:  A string representing the map name.
- * value: An array of strings representing the map value.
- */
-#ifndef _di_f_string_map_multi_t_
-  typedef struct {
-    f_string_dynamic_t name;
-    f_string_dynamics_t value;
-  } f_string_map_multi_t;
-
-  #define f_string_map_multi_t_initialize { f_string_dynamic_t_initialize, f_string_dynamics_t_initialize }
-
-  #define macro_f_string_map_t_initialize(name, value) { name, value }
-
-  #define macro_f_string_map_multi_t_clear(map) \
-    macro_f_string_dynamic_t_clear(map.name) \
-    macro_f_string_dynamics_t_clear(map.value)
-
-  #define macro_f_string_map_multi_t_delete_simple(map) \
-    macro_f_string_dynamic_t_delete_simple(map.name) \
-    macro_f_string_dynamics_t_delete_simple(map.value)
-
-  #define macro_f_string_map_multi_t_destroy_simple(map) \
-    macro_f_string_dynamic_t_destroy_simple(map.name) \
-    macro_f_string_dynamics_t_destroy_simple(map.value)
-#endif // _di_f_string_map_multi_t_
-
-/**
- * An array of string maps.
- *
- * array: the array of string maps.
- * size:  total amount of allocated space.
- * used:  total number of allocated spaces used.
- */
-#ifndef _di_f_string_map_multis_t_
-  typedef struct {
-    f_string_map_multi_t *array;
-
-    f_array_length_t size;
-    f_array_length_t used;
-  } f_string_map_multis_t;
-
-  #define f_string_map_multis_t_initialize f_string_statics_t_initialize
-
-  #define macro_f_string_map_multis_t_initialize(array, size, used) { array, size, used }
-  #define macro_f_string_map_multis_t_initialize2(array, length) { array, length, length }
-
-  #define macro_f_string_map_multis_t_clear(map_multis) macro_f_memory_structure_clear(map_multis)
-
-  #define macro_f_string_map_multis_t_resize(status, map_multis, length) status = f_string_map_multis_resize(length, &map_multis);
-  #define macro_f_string_map_multis_t_adjust(status, map_multis, length) status = f_string_map_multis_adjust(length, &map_multis);
-
-  #define macro_f_string_map_multis_t_delete_simple(map_multis)  f_string_map_multis_resize(0, &map_multis);
-  #define macro_f_string_map_multis_t_destroy_simple(map_multis) f_string_map_multis_adjust(0, &map_multis);
-
-  #define macro_f_string_map_multis_t_increase(status, step, map_multis)      status = f_string_map_multis_increase(step, &map_multis);
-  #define macro_f_string_map_multis_t_increase_by(status, map_multis, amount) status = f_string_map_multis_increase_by(amount, &map_multis);
-  #define macro_f_string_map_multis_t_decrease_by(status, map_multis, amount) status = f_string_map_multis_decrease_by(amount, &map_multis);
-  #define macro_f_string_map_multis_t_decimate_by(status, map_multis, amount) status = f_string_map_multis_decimate_by(amount, &map_multis);
-#endif // _di_f_string_map_multis_t_
-
-/**
- * An array of string maps.
- *
- * array: the array of an array of string maps.
- * size:  total amount of allocated space.
- * used:  total number of allocated spaces used.
- */
-#ifndef _di_f_string_map_multiss_t_
-  typedef struct {
-    f_string_map_multis_t *array;
-
-    f_array_length_t size;
-    f_array_length_t used;
-  } f_string_map_multiss_t;
-
-  #define f_string_map_multiss_t_initialize f_string_statics_t_initialize
-
-  #define macro_f_string_map_multiss_t_initialize(array, size, used) { array, size, used }
-  #define macro_f_string_map_multiss_t_initialize2(array, length) { array, length, length }
-
-  #define macro_f_string_map_multiss_t_clear(map_multis) macro_f_memory_structure_clear(map_multis)
-
-  #define macro_f_string_map_multiss_t_resize(status, map_multis, length) status = f_string_map_multiss_resize(length, &map_multis);
-  #define macro_f_string_map_multiss_t_adjust(status, map_multis, length) status = f_string_map_multiss_adjust(length, &map_multis);
-
-  #define macro_f_string_map_multiss_t_delete_simple(map_multis)  f_string_map_multiss_resize(0, &map_multis);
-  #define macro_f_string_map_multiss_t_destroy_simple(map_multis) f_string_map_multiss_adjust(0, &map_multis);
-
-  #define macro_f_string_map_multiss_t_increase(status, step, map_multis)      status = f_string_map_multiss_increase(step, &map_multis);
-  #define macro_f_string_map_multiss_t_increase_by(status, map_multis, amount) status = f_string_map_multiss_increase_by(amount, &map_multis);
-  #define macro_f_string_map_multiss_t_decrease_by(status, map_multis, amount) status = f_string_map_multiss_decrease_by(amount, &map_multis);
-  #define macro_f_string_map_multiss_t_decimate_by(status, map_multis, amount) status = f_string_map_multiss_decimate_by(amount, &map_multis);
-#endif // _di_f_string_map_multiss_t_
-
-/**
- * Resize the map_multis array.
- *
- * @param length
- *   The new size to use.
- * @param map_multis
- *   The map_multis array to resize.
- *
- * @return
- *   F_none 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_array_length_t length, f_string_map_multis_t * const map_multis);
-#endif // _di_f_string_map_multis_adjust_
-
-/**
- * Append a single source map_multi onto the destination.
- *
- * @param source
- *   The source maps to append.
- * @param destination
- *   The destination maps the source is appended onto.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *   F_string_too_large (with error bit) if the combined string is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#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 *destination);
-#endif // _di_f_string_map_multis_append_
-
-/**
- * Append the source map_multis onto the destination.
- *
- * @param source
- *   The source maps to append.
- * @param destination
- *   The destination maps the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *   F_string_too_large (with error bit) if the combined string is too large.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_map_multis_append_all_
-  f_status_t f_string_map_multis_append_all(const f_string_map_multis_t source, f_string_map_multis_t *destination);
-#endif // _di_f_string_map_multis_append_all_
-
-/**
- * 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 decimate the size by.
- * @param map_multis
- *   The map_multis array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_map_multis_decimate_by_
-  extern f_status_t f_string_map_multis_decimate_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis);
-#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 map_multis
- *   The map_multis array to resize.
- *
- * @return
- *   F_none 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_array_length_t amount, f_string_map_multis_t * const map_multis);
-#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_array_length_t_size_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 map_multis
- *   The map_multis array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_map_multis_increase_
-  extern f_status_t f_string_map_multis_increase(const f_array_length_t step, f_string_map_multis_t * const map_multis);
-#endif // _di_f_string_map_multis_increase_
-
-/**
- * Resize the map_multis array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 map_multis
- *   The map_multis array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_array_length_t amount, f_string_map_multis_t * const map_multis);
-#endif // _di_f_string_map_multis_increase_by_
-
-/**
- * Resize the map_multis array.
- *
- * @param length
- *   The new size to use.
- * @param map_multis
- *   The map_multis array to adjust.
- *
- * @return
- *   F_none 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_resize_
-  extern f_status_t f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t * const map_multis);
-#endif // _di_f_string_map_multis_resize_
-
-/**
  * Resize the string maps array.
  *
  * @param length
diff --git a/level_0/f_string/c/string/map_multi.c b/level_0/f_string/c/string/map_multi.c
new file mode 100644 (file)
index 0000000..27faa0c
--- /dev/null
@@ -0,0 +1,305 @@
+#include "../string.h"
+#include "../private-string.h"
+#include "private-dynamic.h"
+#include "private-map_multi.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_string_map_multis_adjust_
+  f_status_t f_string_map_multis_adjust(const f_array_length_t length, f_string_map_multis_t * const map_multis) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multis) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_string_map_multis_adjust(length, map_multis);
+  }
+#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_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_string_map_multis_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    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.value.used) {
+      status = private_f_string_dynamics_append_all(source.value, &destination->array[destination->used].value);
+      if (F_status_is_error(status)) return status;
+    }
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_string_map_multis_append_
+
+#ifndef _di_f_string_map_multis_append_all_
+  f_status_t f_string_map_multis_append_all(const f_string_map_multis_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_
+
+    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_
+
+#ifndef _di_f_string_map_multis_decimate_by_
+  f_status_t f_string_map_multis_decimate_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multis) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) return F_data_not;
+
+    if (map_multis->size - amount > 0) {
+      return private_f_string_map_multis_adjust(map_multis->size - amount, map_multis);
+    }
+
+    return private_f_string_map_multis_adjust(0, map_multis);
+  }
+#endif // _di_f_string_map_multis_decimate_by_
+
+#ifndef _di_f_string_map_multis_decrease_by_
+  f_status_t f_string_map_multis_decrease_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multis) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) return F_data_not;
+
+    if (map_multis->size - amount > 0) {
+      return private_f_string_map_multis_resize(map_multis->size - amount, map_multis);
+    }
+
+    return private_f_string_map_multis_resize(0, map_multis);
+  }
+#endif // _di_f_string_map_multis_decrease_by_
+
+#ifndef _di_f_string_map_multis_increase_
+  f_status_t f_string_map_multis_increase(const f_array_length_t step, f_string_map_multis_t * const map_multis) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multis) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && map_multis->used + 1 > map_multis->size) {
+      f_array_length_t size = map_multis->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (map_multis->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_string_map_multis_resize(size, map_multis);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_string_map_multis_increase_
+
+#ifndef _di_f_string_map_multis_increase_by_
+  f_status_t f_string_map_multis_increase_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multis) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) return F_data_not;
+
+    if (map_multis->used + amount > map_multis->size) {
+      if (map_multis->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_string_map_multis_resize(map_multis->used + amount, map_multis);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_string_map_multis_increase_by_
+
+#ifndef _di_f_string_map_multis_resize_
+  f_status_t f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t * const map_multis) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multis) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_string_map_multis_resize(length, map_multis);
+  }
+#endif // _di_f_string_map_multis_resize_
+
+#ifndef _di_f_string_map_multiss_adjust_
+  f_status_t f_string_map_multiss_adjust(const f_array_length_t length, f_string_map_multiss_t * const map_multiss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multiss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_string_map_multiss_adjust(length, map_multiss);
+  }
+#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_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_string_map_multiss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used].used = 0;
+
+    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->used;
+
+    return F_none;
+  }
+#endif // _di_f_string_map_multiss_append_
+
+#ifndef _di_f_string_map_multiss_append_all_
+  f_status_t f_string_map_multiss_append_all(const f_string_map_multiss_t source, f_string_map_multiss_t * const destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_string_map_multiss_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      destination->array[destination->used].used = 0;
+
+      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
+
+    return F_none;
+  }
+#endif // _di_f_string_map_multiss_append_all_
+
+#ifndef _di_f_string_map_multiss_decimate_by_
+  f_status_t f_string_map_multiss_decimate_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multiss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) return F_data_not;
+
+    if (map_multiss->size - amount > 0) {
+      return private_f_string_map_multiss_adjust(map_multiss->size - amount, map_multiss);
+    }
+
+    return private_f_string_map_multiss_adjust(0, map_multiss);
+  }
+#endif // _di_f_string_map_multiss_decimate_by_
+
+#ifndef _di_f_string_map_multiss_decrease_by_
+  f_status_t f_string_map_multiss_decrease_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multiss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) return F_data_not;
+
+    if (map_multiss->size - amount > 0) {
+      return private_f_string_map_multiss_resize(map_multiss->size - amount, map_multiss);
+    }
+
+    return private_f_string_map_multiss_resize(0, map_multiss);
+  }
+#endif // _di_f_string_map_multiss_decrease_by_
+
+#ifndef _di_f_string_map_multiss_increase_
+  f_status_t f_string_map_multiss_increase(const f_array_length_t step, f_string_map_multiss_t * const map_multiss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multiss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && map_multiss->used + 1 > map_multiss->size) {
+      f_array_length_t size = map_multiss->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (map_multiss->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_string_map_multiss_resize(size, map_multiss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_string_map_multiss_increase_
+
+#ifndef _di_f_string_map_multiss_increase_by_
+  f_status_t f_string_map_multiss_increase_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multiss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) return F_data_not;
+
+    if (map_multiss->used + amount > map_multiss->size) {
+      if (map_multiss->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_string_map_multiss_resize(map_multiss->used + amount, map_multiss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_string_map_multiss_increase_by_
+
+#ifndef _di_f_string_map_multiss_resize_
+  f_status_t f_string_map_multiss_resize(const f_array_length_t length, f_string_map_multiss_t * const map_multiss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!map_multiss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_string_map_multiss_resize(length, map_multiss);
+  }
+#endif // _di_f_string_map_multiss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/c/string/map_multi.h b/level_0/f_string/c/string/map_multi.h
new file mode 100644 (file)
index 0000000..afcb054
--- /dev/null
@@ -0,0 +1,472 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines map string data.
+ *
+ * This is auto-included by string.h and should not need to be explicitly included.
+ */
+#ifndef _F_string_map_multi_h
+#define _F_string_map_multi_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A string map consisting of a name and multiple values.
+ *
+ * name:  A string representing the map name.
+ * value: An array of strings representing the map value.
+ */
+#ifndef _di_f_string_map_multi_t_
+  typedef struct {
+    f_string_dynamic_t name;
+    f_string_dynamics_t value;
+  } f_string_map_multi_t;
+
+  #define f_string_map_multi_t_initialize { f_string_dynamic_t_initialize, f_string_dynamics_t_initialize }
+
+  #define macro_f_string_map_t_initialize(name, value) { name, value }
+
+  #define macro_f_string_map_multi_t_clear(map) \
+    macro_f_string_dynamic_t_clear(map.name) \
+    macro_f_string_dynamics_t_clear(map.value)
+
+  #define macro_f_string_map_multi_t_delete_simple(map) \
+    macro_f_string_dynamic_t_delete_simple(map.name) \
+    macro_f_string_dynamics_t_delete_simple(map.value)
+
+  #define macro_f_string_map_multi_t_destroy_simple(map) \
+    macro_f_string_dynamic_t_destroy_simple(map.name) \
+    macro_f_string_dynamics_t_destroy_simple(map.value)
+#endif // _di_f_string_map_multi_t_
+
+/**
+ * An array of string maps.
+ *
+ * array: the array of string maps.
+ * size:  total amount of allocated space.
+ * used:  total number of allocated spaces used.
+ */
+#ifndef _di_f_string_map_multis_t_
+  typedef struct {
+    f_string_map_multi_t *array;
+
+    f_array_length_t size;
+    f_array_length_t used;
+  } f_string_map_multis_t;
+
+  #define f_string_map_multis_t_initialize f_string_statics_t_initialize
+
+  #define macro_f_string_map_multis_t_initialize(array, size, used) { array, size, used }
+  #define macro_f_string_map_multis_t_initialize2(array, length) { array, length, length }
+
+  #define macro_f_string_map_multis_t_clear(map_multis) macro_f_memory_structure_clear(map_multis)
+
+  #define macro_f_string_map_multis_t_resize(status, map_multis, length) status = f_string_map_multis_resize(length, &map_multis);
+  #define macro_f_string_map_multis_t_adjust(status, map_multis, length) status = f_string_map_multis_adjust(length, &map_multis);
+
+  #define macro_f_string_map_multis_t_delete_simple(map_multis)  f_string_map_multis_resize(0, &map_multis);
+  #define macro_f_string_map_multis_t_destroy_simple(map_multis) f_string_map_multis_adjust(0, &map_multis);
+
+  #define macro_f_string_map_multis_t_increase(status, step, map_multis)      status = f_string_map_multis_increase(step, &map_multis);
+  #define macro_f_string_map_multis_t_increase_by(status, map_multis, amount) status = f_string_map_multis_increase_by(amount, &map_multis);
+  #define macro_f_string_map_multis_t_decrease_by(status, map_multis, amount) status = f_string_map_multis_decrease_by(amount, &map_multis);
+  #define macro_f_string_map_multis_t_decimate_by(status, map_multis, amount) status = f_string_map_multis_decimate_by(amount, &map_multis);
+#endif // _di_f_string_map_multis_t_
+
+/**
+ * An array of string maps.
+ *
+ * array: the array of an array of string maps.
+ * size:  total amount of allocated space.
+ * used:  total number of allocated spaces used.
+ */
+#ifndef _di_f_string_map_multiss_t_
+  typedef struct {
+    f_string_map_multis_t *array;
+
+    f_array_length_t size;
+    f_array_length_t used;
+  } f_string_map_multiss_t;
+
+  #define f_string_map_multiss_t_initialize f_string_statics_t_initialize
+
+  #define macro_f_string_map_multiss_t_initialize(array, size, used) { array, size, used }
+  #define macro_f_string_map_multiss_t_initialize2(array, length) { array, length, length }
+
+  #define macro_f_string_map_multiss_t_clear(map_multis) macro_f_memory_structure_clear(map_multis)
+
+  #define macro_f_string_map_multiss_t_resize(status, map_multis, length) status = f_string_map_multiss_resize(length, &map_multis);
+  #define macro_f_string_map_multiss_t_adjust(status, map_multis, length) status = f_string_map_multiss_adjust(length, &map_multis);
+
+  #define macro_f_string_map_multiss_t_delete_simple(map_multis)  f_string_map_multiss_resize(0, &map_multis);
+  #define macro_f_string_map_multiss_t_destroy_simple(map_multis) f_string_map_multiss_adjust(0, &map_multis);
+
+  #define macro_f_string_map_multiss_t_increase(status, step, map_multis)      status = f_string_map_multiss_increase(step, &map_multis);
+  #define macro_f_string_map_multiss_t_increase_by(status, map_multis, amount) status = f_string_map_multiss_increase_by(amount, &map_multis);
+  #define macro_f_string_map_multiss_t_decrease_by(status, map_multis, amount) status = f_string_map_multiss_decrease_by(amount, &map_multis);
+  #define macro_f_string_map_multiss_t_decimate_by(status, map_multis, amount) status = f_string_map_multiss_decimate_by(amount, &map_multis);
+#endif // _di_f_string_map_multiss_t_
+
+/**
+ * Resize the map_multis array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param map_multis
+ *   The map_multis array to resize.
+ *
+ * @return
+ *   F_none 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_array_length_t length, f_string_map_multis_t * const map_multis);
+#endif // _di_f_string_map_multis_adjust_
+
+/**
+ * Append a single source map_multi onto the destination.
+ *
+ * @param source
+ *   The source maps to append.
+ * @param destination
+ *   The destination maps the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#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 *destination);
+#endif // _di_f_string_map_multis_append_
+
+/**
+ * Append the source map_multis onto the destination.
+ *
+ * @param source
+ *   The source maps to append.
+ * @param destination
+ *   The destination maps the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_map_multis_append_all_
+  f_status_t f_string_map_multis_append_all(const f_string_map_multis_t source, f_string_map_multis_t *destination);
+#endif // _di_f_string_map_multis_append_all_
+
+/**
+ * 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 decimate the size by.
+ * @param map_multis
+ *   The map_multis array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_map_multis_decimate_by_
+  extern f_status_t f_string_map_multis_decimate_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis);
+#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 map_multis
+ *   The map_multis array to resize.
+ *
+ * @return
+ *   F_none 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_array_length_t amount, f_string_map_multis_t * const map_multis);
+#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_array_length_t_size_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 map_multis
+ *   The map_multis array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_map_multis_increase_
+  extern f_status_t f_string_map_multis_increase(const f_array_length_t step, f_string_map_multis_t * const map_multis);
+#endif // _di_f_string_map_multis_increase_
+
+/**
+ * Resize the map_multis array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 map_multis
+ *   The map_multis array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_array_length_t amount, f_string_map_multis_t * const map_multis);
+#endif // _di_f_string_map_multis_increase_by_
+
+/**
+ * Resize the map_multis array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param map_multis
+ *   The map_multis array to adjust.
+ *
+ * @return
+ *   F_none 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_resize_
+  extern f_status_t f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t * const map_multis);
+#endif // _di_f_string_map_multis_resize_
+
+/**
+ * Resize the map_multiss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param map_multiss
+ *   The map_multiss array to resize.
+ *
+ * @return
+ *   F_none 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_array_length_t length, f_string_map_multiss_t * const map_multiss);
+#endif // _di_f_string_map_multiss_adjust_
+
+/**
+ * Append a single source map_multis onto the destination.
+ *
+ * @param source
+ *   The source maps to append.
+ * @param destination
+ *   The destination maps the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#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 *destination);
+#endif // _di_f_string_map_multiss_append_
+
+/**
+ * Append the source map_multiss onto the destination.
+ *
+ * @param source
+ *   The source maps to append.
+ * @param destination
+ *   The destination maps the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_map_multiss_append_all_
+  f_status_t f_string_map_multiss_append_all(const f_string_map_multiss_t source, f_string_map_multiss_t *destination);
+#endif // _di_f_string_map_multiss_append_all_
+
+/**
+ * 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 decimate the size by.
+ * @param map_multiss
+ *   The map_multiss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_map_multiss_decimate_by_
+  extern f_status_t f_string_map_multiss_decimate_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss);
+#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 map_multiss
+ *   The map_multiss array to resize.
+ *
+ * @return
+ *   F_none 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_array_length_t amount, f_string_map_multiss_t * const map_multiss);
+#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_array_length_t_size_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 map_multiss
+ *   The map_multiss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_map_multiss_increase_
+  extern f_status_t f_string_map_multiss_increase(const f_array_length_t step, f_string_map_multiss_t * const map_multiss);
+#endif // _di_f_string_map_multiss_increase_
+
+/**
+ * Resize the map_multiss array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 map_multiss
+ *   The map_multiss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_array_length_t amount, f_string_map_multiss_t * const map_multiss);
+#endif // _di_f_string_map_multiss_increase_by_
+
+/**
+ * Resize the map_multiss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param map_multiss
+ *   The map_multiss array to adjust.
+ *
+ * @return
+ *   F_none 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_resize_
+  extern f_status_t f_string_map_multiss_resize(const f_array_length_t length, f_string_map_multiss_t * const map_multiss);
+#endif // _di_f_string_map_multiss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_string_map_multi_h
diff --git a/level_0/f_string/c/string/private-dynamic.c b/level_0/f_string/c/string/private-dynamic.c
new file mode 100644 (file)
index 0000000..b452066
--- /dev/null
@@ -0,0 +1,218 @@
+#include "../string.h"
+#include "../private-string.h"
+#include "private-dynamic.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
+  f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t * const dynamic) {
+
+    const f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_char_t), (void **) & dynamic->string);
+    if (F_status_is_error(status)) return status;
+
+    dynamic->size = length;
+
+    if (dynamic->used > dynamic->size) {
+      dynamic->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
+
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
+  f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t * const dynamic) {
+
+    if (dynamic->used + amount > dynamic->size) {
+      if (dynamic->used + amount > F_string_t_size_d) {
+        return F_status_set_error(F_string_too_large);
+      }
+
+      return private_f_string_dynamic_resize(dynamic->used + amount, dynamic);
+    }
+
+    return F_data_not;
+  }
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
+
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
+  f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t * const dynamic) {
+
+    const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_char_t), (void **) & dynamic->string);
+    if (F_status_is_error(status)) return status;
+
+    dynamic->size = length;
+
+    if (dynamic->used > dynamic->size) {
+      dynamic->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
+
+#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
+  f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t * const dynamics) {
+
+    if (dynamics->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < dynamics->size; ++i) {
+
+      status = private_f_string_dynamic_adjust(0, &dynamics->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(dynamics->size, length, sizeof(f_string_dynamic_t), (void **) & dynamics->array);
+    if (F_status_is_error(status)) return status;
+
+    dynamics->size = length;
+
+    if (dynamics->used > dynamics->size) {
+      dynamics->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
+
+#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_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_string_dynamics_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      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_none;
+  }
+#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_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_string_dynamics_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_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_none;
+  }
+#endif // !defined(_di_f_string_dynamics_append_all_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_map_multis_append_all_)
+
+#if !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_) || !defined(f_string_map_multis_append)
+  f_status_t private_f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t * const dynamics) {
+
+    if (dynamics->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < dynamics->size; ++i) {
+
+      status = private_f_string_dynamic_resize(0, &dynamics->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(dynamics->size, length, sizeof(f_string_dynamic_t), (void **) & dynamics->array);
+    if (F_status_is_error(status)) return status;
+
+    dynamics->size = length;
+
+    if (dynamics->used > dynamics->size) {
+      dynamics->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_) || !defined(f_string_map_multis_append)
+
+#if !defined(_di_f_string_dynamicss_adjust_) || !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_dynamicss_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
+  f_status_t private_f_string_dynamicss_adjust(const f_array_length_t length, f_string_dynamicss_t * const dynamicss) {
+
+    if (dynamicss->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < dynamicss->size; ++i) {
+
+      status = private_f_string_dynamics_adjust(0, &dynamicss->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(dynamicss->size, length, sizeof(f_string_dynamics_t), (void **) & dynamicss->array);
+    if (F_status_is_error(status)) return status;
+
+    dynamicss->size = length;
+
+    if (dynamicss->used > dynamicss->size) {
+      dynamicss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_dynamicss_adjust_) || !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_dynamicss_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
+
+#if !defined(_di_f_string_dynamicss_decrease_by_) || !defined(_di_f_string_dynamicss_increase_) || !defined(_di_f_string_dynamicss_increase_by_) || !defined(_di_f_string_dynamicss_append_all_) || !defined(_di_f_string_map_multis_append_all_)
+  f_status_t private_f_string_dynamicss_resize(const f_array_length_t length, f_string_dynamicss_t * const dynamicss) {
+
+    if (dynamicss->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < dynamicss->size; ++i) {
+
+      status = private_f_string_dynamics_resize(0, &dynamicss->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(dynamicss->size, length, sizeof(f_string_dynamics_t), (void **) & dynamicss->array);
+    if (F_status_is_error(status)) return status;
+
+    dynamicss->size = length;
+
+    if (dynamicss->used > dynamicss->size) {
+      dynamicss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_dynamicss_decrease_by_) || !defined(_di_f_string_dynamicss_increase_) || !defined(_di_f_string_dynamicss_increase_by_) || !defined(_di_f_string_dynamicss_append_all_) || !defined(_di_f_string_map_multis_append_all_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/c/string/private-dynamic.h b/level_0/f_string/c/string/private-dynamic.h
new file mode 100644 (file)
index 0000000..582dd3a
--- /dev/null
@@ -0,0 +1,382 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.5
+ * 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_dynamic_h
+#define _PRIVATE_F_string_dynamic_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation of f_string_append().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source string to append.
+ * @param length
+ *   Length of source to append.
+ * @param destination
+ *   The destination string the source and glue are appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see memcpy()
+ *
+ * @see f_string_append()
+ * @see f_string_append_assure()
+ * @see f_string_dynamic_append()
+ * @see f_string_dynamic_append_assure()
+ * @see f_string_dynamic_mash()
+ * @see f_string_dynamic_partial_append)
+ * @see f_string_dynamic_partial_append_assure()
+ * @see f_string_dynamic_partial_mash()
+ * @see f_string_dynamics_append()
+ * @see f_string_map_multis_append()
+ * @see f_string_mash()
+ * @see f_string_maps_append()
+ * @see f_string_triples_append()
+ */
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_mash_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_triples_append_)
+  extern f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_mash_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_triples_append_)
+
+/**
+ * Private implementation of f_string_append_nulless().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source string to append.
+ * @param length
+ *   Length of source to append.
+ * @param destination
+ *   The destination string the source and glue are appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * @see memcpy()
+ *
+ * @see f_string_append_assure_nulless()
+ * @see f_string_append_nulless()
+ * @see f_string_dynamic_append_assure_nulless()
+ * @see f_string_dynamic_append_nulless()
+ * @see f_string_dynamic_mash_nulless()
+ * @see f_string_dynamic_partial_append_assure_nulless()
+ * @see f_string_dynamic_partial_append_nulless()
+ * @see f_string_dynamic_partial_mash_nulless()
+ * @see f_string_mash_nulless()
+ */
+#if !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
+  extern f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param dynamic
+ *   The string to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see f_memory_adjust()
+ * @see f_string_dynamic_adjust()
+ * @see f_string_dynamic_decimate_by()
+ * @see f_string_dynamics_adjust()
+ * @see f_string_dynamics_append()
+ * @see f_string_dynamics_decimate_by()
+ * @see f_string_map_multis_adjust()
+ * @see f_string_map_multis_append()
+ * @see f_string_triples_adjust()
+ * @see f_string_triples_decimate_by()
+ */
+#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
+  extern f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t * const dynamic) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
+
+/**
+ * Private implementation of f_string_dynamic_increase_by().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param amount
+ *   A positive number representing how much to increase the size by.
+ * @param dynamic
+ *   The string to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see memcpy()
+ *
+ * @see f_string_append()
+ * @see f_string_append_assure()
+ * @see f_string_append_mash()
+ * @see f_string_append_nulless()
+ * @see f_string_dynamic_append()
+ * @see f_string_dynamic_append_assure()
+ * @see f_string_dynamic_append_nulless()
+ * @see f_string_dynamic_increase_by()
+ * @see f_string_dynamic_mash()
+ * @see f_string_dynamic_mash_nulless()
+ * @see f_string_dynamic_partial_append)
+ * @see f_string_dynamic_partial_append_assure()
+ * @see f_string_dynamic_partial_mash()
+ * @see f_string_dynamic_prepend()
+ * @see f_string_dynamic_prepend_nulless()
+ * @see f_string_dynamics_append()
+ * @see f_string_map_multis_append()
+ * @see f_string_mash()
+ * @see f_string_mash_nulless()
+ * @see f_string_maps_append()
+ * @see f_string_prepend()
+ * @see f_string_prepend_nulless()
+ * @see f_string_triples_append()
+ */
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
+  extern f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t * const dynamic) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param dynamic
+ *   The string to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_string_append()
+ * @see f_string_append_assure()
+ * @see f_string_append_mash()
+ * @see f_string_append_nulless()
+ * @see f_string_dynamic_append()
+ * @see f_string_dynamic_append_assure()
+ * @see f_string_dynamic_append_nulless()
+ * @see f_string_dynamic_decrease_by()
+ * @see f_string_dynamic_increase()
+ * @see f_string_dynamic_increase_by()
+ * @see f_string_dynamic_mash()
+ * @see f_string_dynamic_mash_nulless()
+ * @see f_string_dynamic_partial_append)
+ * @see f_string_dynamic_partial_append_assure()
+ * @see f_string_dynamic_partial_mash()
+ * @see f_string_dynamic_prepend()
+ * @see f_string_dynamic_prepend_nulless()
+ * @see f_string_dynamic_terminate()
+ * @see f_string_dynamic_terminate_after()
+ * @see f_string_dynamics_append()
+ * @see f_string_map_multis_append()
+ * @see f_string_mash_nulless()
+ * @see f_string_mash()
+ * @see f_string_maps_append()
+ * @see f_string_prepend()
+ * @see f_string_prepend_nulless()
+ * @see f_string_triples_append()
+ */
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
+  extern f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t * const dynamic) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param dynamics
+ *   The strings to adjust.
+ *
+ * @return
+ *   F_none 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_dynamics_adjust()
+ * @see f_string_dynamics_append()
+ * @see f_string_dynamics_decimate_by()
+ * @see f_string_map_multis_adjust()
+ * @see f_string_map_multis_append()
+ */
+#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
+  extern f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t * const dynamics) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
+
+/**
+ * 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 strings the source is appended onto.
+ *
+ * @return
+ *   F_none 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 strings the source is appended onto.
+ *
+ * @return
+ *   F_none 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_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param dynamics
+ *   The strings to resize.
+ *
+ * @return
+ *   F_none 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_decrease_by()
+ * @see f_string_dynamics_increase()
+ * @see f_string_dynamics_increase_by()
+ */
+#if !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_)
+  extern f_status_t private_f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t * const dynamics) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_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 dynamicss
+ *   The strings to adjust.
+ *
+ * @return
+ *   F_none 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_dynamicss_adjust()
+ * @see f_string_dynamicss_append()
+ * @see f_string_dynamicss_decimate_by()
+ * @see f_string_map_multis_adjust()
+ * @see f_string_map_multis_append()
+ */
+#if !defined(_di_f_string_dynamicss_adjust_) || !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_dynamicss_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
+  extern f_status_t private_f_string_dynamicss_adjust(const f_array_length_t length, f_string_dynamicss_t * const dynamicss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_dynamicss_adjust_) || !defined(_di_f_string_dynamicss_append_) || !defined(_di_f_string_dynamicss_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param dynamicss
+ *   The strings to resize.
+ *
+ * @return
+ *   F_none 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_dynamicss_append_all()
+ * @see f_string_dynamicss_decrease_by()
+ * @see f_string_dynamicss_increase()
+ * @see f_string_dynamicss_increase_by()
+ * @see f_string_map_multis_append_all()
+ */
+#if !defined(_di_f_string_dynamicss_decrease_by_) || !defined(_di_f_string_dynamicss_increase_) || !defined(_di_f_string_dynamicss_increase_by_) || !defined(_di_f_string_dynamicss_append_all_) || !defined(_di_f_string_map_multis_append_all_)
+  extern f_status_t private_f_string_dynamicss_resize(const f_array_length_t length, f_string_dynamicss_t * const dynamicss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_dynamicss_decrease_by_) || !defined(_di_f_string_dynamicss_increase_) || !defined(_di_f_string_dynamicss_increase_by_) || !defined(_di_f_string_dynamicss_append_all_) || !defined(_di_f_string_map_multis_append_all_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_string_dynamic_h
diff --git a/level_0/f_string/c/string/private-map.c b/level_0/f_string/c/string/private-map.c
new file mode 100644 (file)
index 0000000..da7a9b1
--- /dev/null
@@ -0,0 +1,160 @@
+#include "../string.h"
+#include "../private-string.h"
+#include "private-dynamic.h"
+#include "private-map.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_array_length_t length, f_string_maps_t * const maps) {
+
+    if (maps->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < maps->size; ++i) {
+
+      status = private_f_string_dynamic_adjust(0, &maps->array[i].name);
+      if (F_status_is_error(status)) return status;
+
+      status = private_f_string_dynamic_adjust(0, &maps->array[i].value);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(maps->size, length, sizeof(f_string_map_t), (void **) & maps->array);
+    if (F_status_is_error(status)) return status;
+
+    maps->size = length;
+
+    if (maps->used > maps->size) {
+      maps->used = length;
+    }
+
+    return F_none;
+  }
+#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_none;
+
+    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_array_length_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_none;
+  }
+#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_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_terminate_) || !defined(_di_f_string_maps_terminate_after_)
+  f_status_t private_f_string_maps_resize(const f_array_length_t length, f_string_maps_t * const maps) {
+
+    if (maps->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < maps->size; ++i) {
+
+      status = private_f_string_dynamic_resize(0, &maps->array[i].name);
+      if (F_status_is_error(status)) return status;
+
+      status = private_f_string_dynamic_resize(0, &maps->array[i].value);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(maps->size, length, sizeof(f_string_map_t), (void **) & maps->array);
+    if (F_status_is_error(status)) return status;
+
+    maps->size = length;
+
+    if (maps->used > maps->size) {
+      maps->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !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_terminate_) || !defined(_di_f_string_maps_terminate_after_)
+
+#if !defined(_di_f_string_mapss_adjust_) || !defined(_di_f_string_mapss_decimate_by_)
+  f_status_t private_f_string_mapss_adjust(const f_array_length_t length, f_string_mapss_t * const mapss) {
+
+    if (mapss->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < mapss->size; ++i) {
+
+      status = private_f_string_maps_adjust(0, &mapss->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(mapss->size, length, sizeof(f_string_maps_t), (void **) & mapss->array);
+    if (F_status_is_error(status)) return status;
+
+    mapss->size = length;
+
+    if (mapss->used > mapss->size) {
+      mapss->used = length;
+    }
+
+    return F_none;
+  }
+#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_) || !defined(_di_f_string_mapss_terminate_) || !defined(_di_f_string_mapss_terminate_after_)
+  f_status_t private_f_string_mapss_resize(const f_array_length_t length, f_string_mapss_t * const mapss) {
+
+    if (mapss->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < mapss->size; ++i) {
+
+      status = private_f_string_maps_resize(0, &mapss->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(mapss->size, length, sizeof(f_string_maps_t), (void **) & mapss->array);
+    if (F_status_is_error(status)) return status;
+
+    mapss->size = length;
+
+    if (mapss->used > mapss->size) {
+      mapss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_) || !defined(_di_f_string_mapss_terminate_) || !defined(_di_f_string_mapss_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/c/string/private-map.h b/level_0/f_string/c/string/private-map.h
new file mode 100644 (file)
index 0000000..e5de81d
--- /dev/null
@@ -0,0 +1,152 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.5
+ * 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_h
+#define _PRIVATE_F_string_map_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 maps
+ *   The maps to adjust.
+ *
+ * @return
+ *   F_none 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_array_length_t length, f_string_maps_t * const maps) 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 maps to append.
+ * @param destination
+ *   The destination maps the source is appended onto.
+ *
+ * @return
+ *   F_none 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 maps
+ *   The maps to resize.
+ *
+ * @return
+ *   F_none 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_adjust()
+ * @see f_string_maps_decrease_by()
+ * @see f_string_maps_increase()
+ * @see f_string_maps_increase_by()
+ * @see f_string_maps_terminate()
+ * @see f_string_maps_terminate_after()
+ */
+#if !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_terminate_) || !defined(_di_f_string_maps_terminate_after_)
+  extern f_status_t private_f_string_maps_resize(const f_array_length_t length, f_string_maps_t * const maps) F_attribute_visibility_internal_d;
+#endif // !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_terminate_) || !defined(_di_f_string_maps_terminate_after_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param mapss
+ *   The mapss to adjust.
+ *
+ * @return
+ *   F_none 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_array_length_t length, f_string_mapss_t * const mapss) 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 mapss
+ *   The mapss to resize.
+ *
+ * @return
+ *   F_none 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_adjust()
+ * @see f_string_mapss_decrease_by()
+ * @see f_string_mapss_increase()
+ * @see f_string_mapss_increase_by()
+ * @see f_string_mapss_terminate()
+ * @see f_string_mapss_terminate_after()
+ */
+#if !defined(_di_f_string_mapss_decrease_by_) || !defined(_di_f_string_mapss_increase_) || !defined(_di_f_string_mapss_increase_by_) || !defined(_di_f_string_mapss_terminate_) || !defined(_di_f_string_mapss_terminate_after_)
+  extern f_status_t private_f_string_mapss_resize(const f_array_length_t length, f_string_mapss_t * const mapss) 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_) || !defined(_di_f_string_mapss_terminate_) || !defined(_di_f_string_mapss_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_string_map_h
diff --git a/level_0/f_string/c/string/private-map_multi.c b/level_0/f_string/c/string/private-map_multi.c
new file mode 100644 (file)
index 0000000..b7f9604
--- /dev/null
@@ -0,0 +1,160 @@
+#include "../string.h"
+#include "../private-string.h"
+#include "private-dynamic.h"
+#include "private-map_multi.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_array_length_t length, f_string_map_multis_t * const map_multis) {
+
+    if (map_multis->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < map_multis->size; ++i) {
+
+      status = private_f_string_dynamic_adjust(0, &map_multis->array[i].name);
+      if (F_status_is_error(status)) return status;
+
+      status = private_f_string_dynamics_adjust(0, &map_multis->array[i].value);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(map_multis->size, length, sizeof(f_string_map_multi_t), (void **) & map_multis->array);
+    if (F_status_is_error(status)) return status;
+
+    map_multis->size = length;
+
+    if (map_multis->used > map_multis->size) {
+      map_multis->used = length;
+    }
+
+    return F_none;
+  }
+#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_none;
+
+    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_array_length_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_none;
+  }
+#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_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
+  f_status_t private_f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t * const map_multis) {
+
+    if (map_multis->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < map_multis->size; ++i) {
+
+      status = private_f_string_dynamic_resize(0, &map_multis->array[i].name);
+      if (F_status_is_error(status)) return status;
+
+      status = private_f_string_dynamics_resize(0, &map_multis->array[i].value);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(map_multis->size, length, sizeof(f_string_map_multi_t), (void **) & map_multis->array);
+    if (F_status_is_error(status)) return status;
+
+    map_multis->size = length;
+
+    if (map_multis->used > map_multis->size) {
+      map_multis->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !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_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
+
+#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_array_length_t length, f_string_map_multiss_t * const map_multiss) {
+
+    if (map_multiss->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < map_multiss->size; ++i) {
+
+      status = private_f_string_map_multis_adjust(0, &map_multiss->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(map_multiss->size, length, sizeof(f_string_map_multis_t), (void **) & map_multiss->array);
+    if (F_status_is_error(status)) return status;
+
+    map_multiss->size = length;
+
+    if (map_multiss->used > map_multiss->size) {
+      map_multiss->used = length;
+    }
+
+    return F_none;
+  }
+#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_) || !defined(_di_f_string_map_multiss_terminate_) || !defined(_di_f_string_map_multiss_terminate_after_)
+  f_status_t private_f_string_map_multiss_resize(const f_array_length_t length, f_string_map_multiss_t * const map_multiss) {
+
+    if (map_multiss->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < map_multiss->size; ++i) {
+
+      status = private_f_string_map_multis_resize(0, &map_multiss->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(map_multiss->size, length, sizeof(f_string_map_multis_t), (void **) & map_multiss->array);
+    if (F_status_is_error(status)) return status;
+
+    map_multiss->size = length;
+
+    if (map_multiss->used > map_multiss->size) {
+      map_multiss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_) || !defined(_di_f_string_map_multiss_terminate_) || !defined(_di_f_string_map_multiss_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/c/string/private-map_multi.h b/level_0/f_string/c/string/private-map_multi.h
new file mode 100644 (file)
index 0000000..da722db
--- /dev/null
@@ -0,0 +1,152 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.5
+ * 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_multi_h
+#define _PRIVATE_F_string_map_multi_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_none 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_array_length_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 map_multis to append.
+ * @param destination
+ *   The destination map_multis the source is appended onto.
+ *
+ * @return
+ *   F_none 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_none 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_adjust()
+ * @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_terminate()
+ * @see f_string_map_multis_terminate_after()
+ */
+#if !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_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
+  extern f_status_t private_f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t * const map_multis) F_attribute_visibility_internal_d;
+#endif // !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_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param map_multiss
+ *   The map_multiss to adjust.
+ *
+ * @return
+ *   F_none 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_array_length_t length, f_string_map_multiss_t * const map_multiss) 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 map_multiss
+ *   The map_multiss to resize.
+ *
+ * @return
+ *   F_none 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_adjust()
+ * @see f_string_map_multiss_decrease_by()
+ * @see f_string_map_multiss_increase()
+ * @see f_string_map_multiss_increase_by()
+ * @see f_string_map_multiss_terminate()
+ * @see f_string_map_multiss_terminate_after()
+ */
+#if !defined(_di_f_string_map_multiss_decrease_by_) || !defined(_di_f_string_map_multiss_increase_) || !defined(_di_f_string_map_multiss_increase_by_) || !defined(_di_f_string_map_multiss_terminate_) || !defined(_di_f_string_map_multiss_terminate_after_)
+  extern f_status_t private_f_string_map_multiss_resize(const f_array_length_t length, f_string_map_multiss_t * const map_multiss) 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_) || !defined(_di_f_string_map_multiss_terminate_) || !defined(_di_f_string_map_multiss_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_string_map_multi_h
diff --git a/level_0/f_string/c/string/private-quantity.c b/level_0/f_string/c/string/private-quantity.c
new file mode 100644 (file)
index 0000000..9056663
--- /dev/null
@@ -0,0 +1,125 @@
+#include "../string.h"
+#include "../private-string.h"
+#include "private-quantity.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_)
+  f_status_t private_f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t * const quantitys) {
+
+    if (quantitys->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    const f_status_t status = f_memory_adjust(quantitys->size, length, sizeof(f_string_quantity_t), (void **) & quantitys->array);
+    if (F_status_is_error(status)) return status;
+
+    quantitys->size = length;
+
+    if (quantitys->used > quantitys->size) {
+      quantitys->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_)
+
+#if !defined(_di_f_string_quantitys_append_all_) || !defined(_di_f_string_quantityss_append_) || !defined(_di_f_string_quantityss_append_all_)
+  f_status_t private_f_string_quantitys_append_all(const f_string_quantitys_t source, f_string_quantitys_t * const destination) {
+
+    if (destination->used + source.used > destination->size) {
+      const f_status_t status = private_f_string_quantitys_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+
+      destination->array[destination->used].start = source.array[i].start;
+      destination->array[destination->used++].total = source.array[i].total;
+    } // for
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_quantitys_append_all_) || !defined(_di_f_string_quantityss_append_) || !defined(_di_f_string_quantityss_append_all_)
+
+#if !defined(_di_f_string_quantitys_decrease_) || !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
+  f_status_t private_f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t * const quantitys) {
+
+    if (quantitys->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    const f_status_t status = f_memory_resize(quantitys->size, length, sizeof(f_string_quantity_t), (void **) & quantitys->array);
+    if (F_status_is_error(status)) return status;
+
+    quantitys->size = length;
+
+    if (quantitys->used > quantitys->size) {
+      quantitys->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_quantitys_decrease_) || !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
+
+#if !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_)
+  f_status_t private_f_string_quantityss_adjust(const f_array_length_t length, f_string_quantityss_t * const quantityss) {
+
+    if (quantityss->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < quantityss->size; ++i) {
+
+      status = private_f_string_quantitys_adjust(0, &quantityss->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(quantityss->size, length, sizeof(f_string_quantitys_t), (void **) & quantityss->array);
+    if (F_status_is_error(status)) return status;
+
+    quantityss->size = length;
+
+    if (quantityss->used > quantityss->size) {
+      quantityss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_)
+
+#if !defined(_di_f_string_quantityss_decrease_) || !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
+  f_status_t private_f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t * const quantityss) {
+
+    if (quantityss->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < quantityss->size; ++i) {
+
+      status = private_f_string_quantitys_resize(0, &quantityss->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(quantityss->size, length, sizeof(f_string_quantitys_t), (void **) & quantityss->array);
+    if (F_status_is_error(status)) return status;
+
+    quantityss->size = length;
+
+    if (quantityss->used > quantityss->size) {
+      quantityss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_quantityss_decrease_) || !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/c/string/private-quantity.h b/level_0/f_string/c/string/private-quantity.h
new file mode 100644 (file)
index 0000000..0699786
--- /dev/null
@@ -0,0 +1,152 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.5
+ * 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_quantity_h
+#define _PRIVATE_F_string_quantity_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 quantitys
+ *   The quantitys to adjust.
+ *
+ * @return
+ *   F_none 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_quantitys_adjust()
+ */
+#if !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_)
+  extern f_status_t private_f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t * const quantitys) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_)
+
+/**
+ * Private implementation for appending.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source quantitys to append.
+ * @param destination
+ *   The destination quantitys the source is appended onto.
+ *
+ * @return
+ *   F_none 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_quantitys_append_all()
+ * @see f_string_quantityss_append()
+ * @see f_string_quantityss_append_all()
+ */
+#if !defined(_di_f_string_quantitys_append_all_) || !defined(_di_f_string_quantityss_append_) || !defined(_di_f_string_quantityss_append_all_)
+  extern f_status_t private_f_string_quantitys_append_all(const f_string_quantitys_t source, f_string_quantitys_t * const destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_quantitys_append_all_) || !defined(_di_f_string_quantityss_append_) || !defined(_di_f_string_quantityss_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 quantitys
+ *   The quantitys to resize.
+ *
+ * @return
+ *   F_none 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_adjust()
+ * @see f_string_quantitys_decrease_by()
+ * @see f_string_quantitys_increase()
+ * @see f_string_quantitys_increase_by()
+ * @see f_string_quantitys_terminate()
+ * @see f_string_quantitys_terminate_after()
+ */
+#if !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
+  extern f_status_t private_f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t * const quantitys) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param quantityss
+ *   The quantityss to adjust.
+ *
+ * @return
+ *   F_none 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_array_length_t length, f_string_quantityss_t * const quantityss) 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 quantityss
+ *   The quantityss to resize.
+ *
+ * @return
+ *   F_none 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_adjust()
+ * @see f_string_quantityss_decrease_by()
+ * @see f_string_quantityss_increase()
+ * @see f_string_quantityss_increase_by()
+ * @see f_string_quantityss_terminate()
+ * @see f_string_quantityss_terminate_after()
+ */
+#if !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
+  extern f_status_t private_f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t * const quantityss) 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_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_string_quantity_h
diff --git a/level_0/f_string/c/string/private-range.c b/level_0/f_string/c/string/private-range.c
new file mode 100644 (file)
index 0000000..2091fa3
--- /dev/null
@@ -0,0 +1,125 @@
+#include "../string.h"
+#include "../private-string.h"
+#include "private-range.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_)
+  f_status_t private_f_string_ranges_adjust(const f_array_length_t length, f_string_ranges_t * const ranges) {
+
+    if (ranges->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    const f_status_t status = f_memory_adjust(ranges->size, length, sizeof(f_string_range_t), (void **) & ranges->array);
+    if (F_status_is_error(status)) return status;
+
+    ranges->size = length;
+
+    if (ranges->used > ranges->size) {
+      ranges->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_)
+
+#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 = private_f_string_ranges_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_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_none;
+  }
+#endif // !defined(_di_f_string_ranges_append_all_) || !defined(_di_f_string_rangess_append_) || !defined(_di_f_string_rangess_append_all_)
+
+#if !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_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
+  f_status_t private_f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t * const ranges) {
+
+    if (ranges->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    const f_status_t status = f_memory_resize(ranges->size, length, sizeof(f_string_range_t), (void **) & ranges->array);
+    if (F_status_is_error(status)) return status;
+
+    ranges->size = length;
+
+    if (ranges->used > ranges->size) {
+      ranges->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !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_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
+
+#if !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_)
+  f_status_t private_f_string_rangess_adjust(const f_array_length_t length, f_string_rangess_t * const rangess) {
+
+    if (rangess->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < rangess->size; ++i) {
+
+      status = private_f_string_ranges_adjust(0, &rangess->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(rangess->size, length, sizeof(f_string_ranges_t), (void **) & rangess->array);
+    if (F_status_is_error(status)) return status;
+
+    rangess->size = length;
+
+    if (rangess->used > rangess->size) {
+      rangess->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_)
+
+#if !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
+  f_status_t private_f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t * const rangess) {
+
+    if (rangess->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < rangess->size; ++i) {
+
+      status = private_f_string_ranges_resize(0, &rangess->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(rangess->size, length, sizeof(f_string_ranges_t), (void **) & rangess->array);
+    if (F_status_is_error(status)) return status;
+
+    rangess->size = length;
+
+    if (rangess->used > rangess->size) {
+      rangess->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/c/string/private-range.h b/level_0/f_string/c/string/private-range.h
new file mode 100644 (file)
index 0000000..6449c3b
--- /dev/null
@@ -0,0 +1,152 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.5
+ * 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_range_h
+#define _PRIVATE_F_string_range_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 ranges
+ *   The ranges to adjust.
+ *
+ * @return
+ *   F_none 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_ranges_adjust()
+ */
+#if !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_)
+  extern f_status_t private_f_string_ranges_adjust(const f_array_length_t length, f_string_ranges_t * const ranges) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_)
+
+/**
+ * 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_none 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_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param ranges
+ *   The ranges to resize.
+ *
+ * @return
+ *   F_none 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_adjust()
+ * @see f_string_ranges_decrease_by()
+ * @see f_string_ranges_increase()
+ * @see f_string_ranges_increase_by()
+ * @see f_string_ranges_terminate()
+ * @see f_string_ranges_terminate_after()
+ */
+#if !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_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
+  extern f_status_t private_f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t * const ranges) F_attribute_visibility_internal_d;
+#endif // !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_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param rangess
+ *   The rangess to adjust.
+ *
+ * @return
+ *   F_none 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_array_length_t length, f_string_rangess_t * const rangess) 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 rangess
+ *   The rangess to resize.
+ *
+ * @return
+ *   F_none 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_adjust()
+ * @see f_string_rangess_decrease_by()
+ * @see f_string_rangess_increase()
+ * @see f_string_rangess_increase_by()
+ * @see f_string_rangess_terminate()
+ * @see f_string_rangess_terminate_after()
+ */
+#if !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
+  extern f_status_t private_f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t * const rangess) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_string_range_h
diff --git a/level_0/f_string/c/string/private-triple.c b/level_0/f_string/c/string/private-triple.c
new file mode 100644 (file)
index 0000000..3f46a3e
--- /dev/null
@@ -0,0 +1,172 @@
+#include "../string.h"
+#include "../private-string.h"
+#include "private-dynamic.h"
+#include "private-triple.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_array_length_t length, f_string_triples_t * const triples) {
+
+    if (triples->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < triples->size; ++i) {
+
+      status = private_f_string_dynamic_adjust(0, &triples->array[i].a);
+      if (F_status_is_error(status)) return status;
+
+      status = private_f_string_dynamic_adjust(0, &triples->array[i].b);
+      if (F_status_is_error(status)) return status;
+
+      status = private_f_string_dynamic_adjust(0, &triples->array[i].c);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(triples->size, length, sizeof(f_string_triple_t), (void **) & triples->array);
+    if (F_status_is_error(status)) return status;
+
+    triples->size = length;
+
+    if (triples->used > triples->size) {
+      triples->used = length;
+    }
+
+    return F_none;
+  }
+#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_none;
+
+    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_array_length_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_none;
+  }
+#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_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
+  f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t * const triples) {
+
+    if (triples->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < triples->size; ++i) {
+
+      status = private_f_string_dynamic_resize(0, &triples->array[i].a);
+      if (F_status_is_error(status)) return status;
+
+      status = private_f_string_dynamic_resize(0, &triples->array[i].b);
+      if (F_status_is_error(status)) return status;
+
+      status = private_f_string_dynamic_resize(0, &triples->array[i].c);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(triples->size, length, sizeof(f_string_triple_t), (void **) & triples->array);
+    if (F_status_is_error(status)) return status;
+
+    triples->size = length;
+
+    if (triples->used > triples->size) {
+      triples->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
+
+#if !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
+  f_status_t private_f_string_tripless_adjust(const f_array_length_t length, f_string_tripless_t * const tripless) {
+
+    if (tripless->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < tripless->size; ++i) {
+
+      status = private_f_string_triples_adjust(0, &tripless->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_adjust(tripless->size, length, sizeof(f_string_triples_t), (void **) & tripless->array);
+    if (F_status_is_error(status)) return status;
+
+    tripless->size = length;
+
+    if (tripless->used > tripless->size) {
+      tripless->used = length;
+    }
+
+    return F_none;
+  }
+#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_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
+  f_status_t private_f_string_tripless_resize(const f_array_length_t length, f_string_tripless_t * const tripless) {
+
+    if (tripless->used + length > F_array_length_t_size_d) {
+      return F_status_set_error(F_array_too_large);
+    }
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < tripless->size; ++i) {
+
+      status = private_f_string_triples_resize(0, &tripless->array[i]);
+      if (F_status_is_error(status)) return status;
+    } // for
+
+    status = f_memory_resize(tripless->size, length, sizeof(f_string_triples_t), (void **) & tripless->array);
+    if (F_status_is_error(status)) return status;
+
+    tripless->size = length;
+
+    if (tripless->used > tripless->size) {
+      tripless->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/c/string/private-triple.h b/level_0/f_string/c/string/private-triple.h
new file mode 100644 (file)
index 0000000..a8b2878
--- /dev/null
@@ -0,0 +1,152 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.5
+ * 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 triples
+ *   The triples to adjust.
+ *
+ * @return
+ *   F_none 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_array_length_t length, f_string_triples_t * const triples) 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 triples to append.
+ * @param destination
+ *   The destination triples the source is appended onto.
+ *
+ * @return
+ *   F_none 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 triples
+ *   The triples to resize.
+ *
+ * @return
+ *   F_none 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_adjust()
+ * @see f_string_triples_decrease_by()
+ * @see f_string_triples_increase()
+ * @see f_string_triples_increase_by()
+ * @see f_string_triples_terminate()
+ * @see f_string_triples_terminate_after()
+ */
+#if !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
+  extern f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t * const triples) 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_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The new size to use.
+ * @param tripless
+ *   The tripless to adjust.
+ *
+ * @return
+ *   F_none 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_array_length_t length, f_string_tripless_t * const tripless) 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 tripless
+ *   The tripless to resize.
+ *
+ * @return
+ *   F_none 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_adjust()
+ * @see f_string_tripless_decrease_by()
+ * @see f_string_tripless_increase()
+ * @see f_string_tripless_increase_by()
+ * @see f_string_tripless_terminate()
+ * @see f_string_tripless_terminate_after()
+ */
+#if !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
+  extern f_status_t private_f_string_tripless_resize(const f_array_length_t length, f_string_tripless_t * const tripless) 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_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_string_triple_h
index a1923002119fe9eb003a1f6bd7dd488a8ae716b7..7a6c12d2c0f5dc52cc28b6cfa8bfed5308049b31 100644 (file)
@@ -1,5 +1,6 @@
 #include "../string.h"
 #include "../private-string.h"
+#include "private-quantity.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -16,41 +17,42 @@ extern "C" {
 #endif // _di_f_string_quantitys_adjust_
 
 #ifndef _di_f_string_quantitys_append_
-  f_status_t f_string_quantitys_append(const f_string_quantitys_t source, f_string_quantitys_t * const destination) {
+  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 (!source.used) {
-      return F_data_not;
-    }
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_string_quantitys_adjust(destination->used + source.used, destination);
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_string_quantitys_adjust(destination->used + F_memory_default_allocation_small_d, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-
-      destination->array[destination->used].start = source.array[i].start;
-      destination->array[destination->used].total = source.array[i].total;
-    } // for
+    destination->array[destination->used].start = source.start;
+    destination->array[destination->used++].total = source.total;
 
     return F_none;
   }
 #endif // _di_f_string_quantitys_append_
 
+#ifndef _di_f_string_quantitys_append_all_
+  f_status_t f_string_quantitys_append_all(const f_string_quantitys_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 (!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_array_length_t amount, f_string_quantitys_t * const quantitys) {
     #ifndef _di_level_0_parameter_checking_
       if (!quantitys) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (quantitys->size - amount > 0) {
       return private_f_string_quantitys_adjust(quantitys->size - amount, quantitys);
@@ -66,9 +68,7 @@ extern "C" {
       if (!quantitys) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (quantitys->size - amount > 0) {
       return private_f_string_quantitys_resize(quantitys->size - amount, quantitys);
@@ -108,9 +108,7 @@ extern "C" {
       if (!quantitys) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (quantitys->used + amount > quantitys->size) {
       if (quantitys->used + amount > F_array_length_t_size_d) {
@@ -144,15 +142,70 @@ extern "C" {
   }
 #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_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_string_quantityss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used].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;
+    }
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_string_quantityss_append_
+
+#ifndef _di_f_string_quantityss_append_all_
+  f_status_t f_string_quantityss_append_all(const f_string_quantityss_t source, f_string_quantityss_t * const destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_string_quantityss_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_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
+
+    return F_none;
+  }
+#endif // _di_f_string_quantityss_append_all_
+
 #ifndef _di_f_string_quantityss_decimate_by_
   f_status_t f_string_quantityss_decimate_by(const f_array_length_t amount, f_string_quantityss_t * const quantityss) {
     #ifndef _di_level_0_parameter_checking_
       if (!quantityss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (quantityss->size - amount > 0) {
       return private_f_string_quantityss_adjust(quantityss->size - amount, quantityss);
@@ -168,9 +221,7 @@ extern "C" {
       if (!quantityss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (quantityss->size - amount > 0) {
       return private_f_string_quantityss_resize(quantityss->size - amount, quantityss);
@@ -210,9 +261,7 @@ extern "C" {
       if (!quantityss) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (quantityss->used + amount > quantityss->size) {
       if (quantityss->used + amount > F_array_length_t_size_d) {
index f3603e7590ca5a1ea98c680bf68702c121ed1b07..fc1b9256642d7e6650d0770b9f6a24db7e24698c 100644 (file)
@@ -131,10 +131,10 @@ extern "C" {
 #endif // _di_f_string_quantitys_adjust_
 
 /**
- * Append the source quantitys onto the destination.
+ * Append the single source quantity onto the destination.
  *
  * @param source
- *   The source quantitys to append.
+ *   The source quantity to append.
  * @param destination
  *   The destination quantitys the source is appended onto.
  *
@@ -147,10 +147,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_string_quantitys_append_
-  extern f_status_t f_string_quantitys_append(const f_string_quantitys_t source, f_string_quantitys_t * const destination);
+  extern f_status_t f_string_quantitys_append(const f_string_quantity_t source, f_string_quantitys_t * const destination);
 #endif // _di_f_string_quantitys_append_
 
 /**
+ * Append the source quantitys onto the destination.
+ *
+ * @param source
+ *   The source quantitys to append.
+ * @param destination
+ *   The destination quantitys the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_quantitys_append_all_
+  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).
@@ -284,6 +304,46 @@ extern "C" {
 #endif // _di_f_string_quantityss_adjust_
 
 /**
+ * Append the single source quantitys onto the destination.
+ *
+ * @param source
+ *   The source quantitys to append.
+ * @param destination
+ *   The destination quantityss the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_quantityss_append_
+  extern f_status_t f_string_quantityss_append(const f_string_quantitys_t source, f_string_quantityss_t * const destination);
+#endif // _di_f_string_quantityss_append_
+
+/**
+ * Append the source quantityss onto the destination.
+ *
+ * @param source
+ *   The source quantityss to append.
+ * @param destination
+ *   The destination quantityss the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_quantityss_append_all_
+  extern f_status_t f_string_quantityss_append_all(const f_string_quantityss_t source, f_string_quantityss_t * const destination);
+#endif // _di_f_string_quantityss_append_all_
+
+/**
  * Resize the string quantityss array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
index 8daf267b56c5e7990d37b321d67cd0db4972e18d..b1caca5fa1ffd309481695e4e6c4058d30a18e24 100644 (file)
@@ -1,5 +1,6 @@
 #include "../string.h"
 #include "../private-string.h"
+#include "private-range.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -16,31 +17,45 @@ extern "C" {
 #endif // _di_f_string_ranges_adjust_
 
 #ifndef _di_f_string_ranges_append_
-  f_status_t f_string_ranges_append(const f_string_ranges_t source, f_string_ranges_t * const destination) {
+  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_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) {
-      return F_data_not;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_string_ranges_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
     }
 
-    f_status_t status = F_none;
+    destination->array[destination->used].start = source.start;
+    destination->array[destination->used++].stop = source.stop;
+
+    return F_none;
+  }
+#endif // _di_f_string_ranges_append_
+
+#ifndef _di_f_string_ranges_append_all_
+  f_status_t f_string_ranges_append_all(const f_string_ranges_t source, f_string_ranges_t * const destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_string_ranges_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_string_ranges_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+    for (f_array_length_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;
+      destination->array[destination->used++].stop = source.array[i].stop;
     } // for
 
     return F_none;
   }
-#endif // _di_f_string_ranges_append_
+#endif // _di_f_string_ranges_append_all_
 
 #ifndef _di_f_string_ranges_decimate_by_
   f_status_t f_string_ranges_decimate_by(const f_array_length_t amount, f_string_ranges_t * const ranges) {
@@ -48,9 +63,7 @@ extern "C" {
       if (!ranges) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (ranges->size - amount > 0) {
       return private_f_string_ranges_adjust(ranges->size - amount, ranges);
@@ -66,9 +79,7 @@ extern "C" {
       if (!ranges) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (ranges->size - amount > 0) {
       return private_f_string_ranges_resize(ranges->size - amount, ranges);
@@ -108,9 +119,7 @@ extern "C" {
       if (!ranges) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (ranges->used + amount > ranges->size) {
       if (ranges->used + amount > F_array_length_t_size_d) {
@@ -144,15 +153,70 @@ extern "C" {
   }
 #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_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_string_rangess_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used].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;
+    }
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_string_rangess_append_
+
+#ifndef _di_f_string_rangess_append_all_
+  f_status_t f_string_rangess_append_all(const f_string_rangess_t source, f_string_rangess_t * const destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_string_rangess_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      destination->array[destination->used].used = 0;
+
+      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
+
+    return F_none;
+  }
+#endif // _di_f_string_rangess_append_all_
+
 #ifndef _di_f_string_rangess_decimate_by_
   f_status_t f_string_rangess_decimate_by(const f_array_length_t amount, f_string_rangess_t * const rangess) {
     #ifndef _di_level_0_parameter_checking_
       if (!rangess) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (rangess->size - amount > 0) {
       return private_f_string_rangess_adjust(rangess->size - amount, rangess);
@@ -168,9 +232,7 @@ extern "C" {
       if (!rangess) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (rangess->size - amount > 0) {
       return private_f_string_rangess_resize(rangess->size - amount, rangess);
@@ -210,9 +272,7 @@ extern "C" {
       if (!rangess) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (rangess->used + amount > rangess->size) {
       if (rangess->used + amount > F_array_length_t_size_d) {
index 44db0cebe6ca40da4d342ab6e7691e85ee7b866c..b241e812b548d0da7017d872ea94d7067f3dc17e 100644 (file)
@@ -34,8 +34,8 @@ extern "C" {
 
   #define f_string_range_t_initialize { 1, 0 }
 
-  #define macro_f_string_range_t_initialize(length) { length ? 0 : 1, length ? length - 1 : 0 }
-  #define macro_f_string_range_t_initialize2(start, stop) { start, stop }
+  #define macro_f_string_range_t_initialize(start, stop) { start, stop }
+  #define macro_f_string_range_t_initialize2(length) { length ? 0 : 1, length ? length - 1 : 0 }
 
   #define macro_f_string_range_t_clear(range) \
     range.start = 1; \
@@ -129,10 +129,10 @@ extern "C" {
 #endif // _di_f_string_ranges_adjust_
 
 /**
- * Append the source ranges onto the destination.
+ * Append the single source range onto the destination.
  *
  * @param source
- *   The source ranges to append.
+ *   The source range to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -145,10 +145,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_string_ranges_append_
-  extern f_status_t f_string_ranges_append(const f_string_ranges_t source, f_string_ranges_t * const destination);
+  extern f_status_t f_string_ranges_append(const f_string_range_t source, f_string_ranges_t * const destination);
 #endif // _di_f_string_ranges_append_
 
 /**
+ * Append the source ranges onto the destination.
+ *
+ * @param source
+ *   The source ranges to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_ranges_append_all_
+  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).
@@ -285,6 +305,46 @@ extern "C" {
 #endif // _di_f_string_rangess_adjust_
 
 /**
+ * Append the single source ranges onto the destination.
+ *
+ * @param source
+ *   The source ranges to append.
+ * @param destination
+ *   The destination rangess the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_rangess_append_
+  extern f_status_t f_string_rangess_append(const f_string_ranges_t source, f_string_rangess_t * const destination);
+#endif // _di_f_string_rangess_append_
+
+/**
+ * Append the source rangess onto the destination.
+ *
+ * @param source
+ *   The source rangess to append.
+ * @param destination
+ *   The destination rangess the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_rangess_append_all_
+  extern f_status_t f_string_rangess_append_all(const f_string_rangess_t source, f_string_rangess_t * const destination);
+#endif // _di_f_string_rangess_append_all_
+
+/**
  * Resize the string rangess array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
index d2ba928d0a907c1d9fc0d75bef20d98769a2345a..76aba190d618eae524c968777a9f2c811700bd23 100644 (file)
@@ -1,5 +1,6 @@
 #include "../string.h"
 #include "../private-string.h"
+#include "private-triple.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -16,15 +17,51 @@ extern "C" {
 #endif // _di_f_string_triples_adjust_
 
 #ifndef _di_f_string_triples_append_
-  f_status_t f_string_triples_append(const f_string_triples_t source, f_string_triples_t * const destination) {
+  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_
 
-    if (!source.used) {
-      return F_data_not;
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_string_triples_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      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;
+
+    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.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;
+
+    return F_none;
+  }
+#endif // _di_f_string_triples_append_
+
+#ifndef _di_f_string_triples_append_all_
+  f_status_t f_string_triples_append_all(const f_string_triples_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_
+
+    if (!source.used) return F_data_not;
+
     f_status_t status = F_none;
 
     if (destination->used + source.used > destination->size) {
@@ -56,12 +93,11 @@ extern "C" {
 
     return F_none;
   }
-#endif // _di_f_string_triples_append_
+#endif // _di_f_string_triples_append_all_
 
 #ifndef _di_f_string_triples_decimate_by_
   f_status_t f_string_triples_decimate_by(const f_array_length_t amount, f_string_triples_t * const triples) {
     #ifndef _di_level_0_parameter_checking_
-      if (!amount) return F_status_set_error(F_parameter);
       if (!triples) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
@@ -79,9 +115,7 @@ extern "C" {
       if (!triples) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (triples->size - amount > 0) {
       return private_f_string_triples_resize(triples->size - amount, triples);
@@ -121,9 +155,7 @@ extern "C" {
       if (!triples) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (triples->used + amount > triples->size) {
       if (triples->used + amount > F_array_length_t_size_d) {
@@ -147,6 +179,63 @@ extern "C" {
   }
 #endif // _di_f_string_triples_resize_
 
+#ifndef _di_f_string_tripless_append_
+  f_status_t f_string_tripless_append(const f_string_triples_t source, f_string_tripless_t * const destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_string_tripless_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used].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;
+    }
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_string_tripless_append_
+
+#ifndef _di_f_string_tripless_append_all_
+  f_status_t f_string_tripless_append_all(const f_string_tripless_t source, f_string_tripless_t * const destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_string_tripless_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      destination->array[destination->used].used = 0;
+
+      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
+
+    return F_none;
+  }
+#endif // _di_f_string_tripless_append_all_
+
 #ifndef _di_f_string_tripless_adjust_
   f_status_t f_string_tripless_adjust(const f_array_length_t length, f_string_tripless_t * const tripless) {
     #ifndef _di_level_0_parameter_checking_
@@ -163,9 +252,7 @@ extern "C" {
       if (!tripless) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (tripless->size - amount > 0) {
       return private_f_string_tripless_adjust(tripless->size - amount, tripless);
@@ -181,9 +268,7 @@ extern "C" {
       if (!tripless) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (tripless->size - amount > 0) {
       return private_f_string_tripless_resize(tripless->size - amount, tripless);
@@ -223,9 +308,7 @@ extern "C" {
       if (!tripless) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!amount) {
-      return F_data_not;
-    }
+    if (!amount) return F_data_not;
 
     if (tripless->used + amount > tripless->size) {
       if (tripless->used + amount > F_array_length_t_size_d) {
index dea8f042255e68b8f445b09cc5b31a56cc65bc81..442e05bc0701baff7de8a348d29c3cfe7d56a513 100644 (file)
@@ -143,10 +143,10 @@ extern "C" {
 #endif // _di_f_string_triples_adjust_
 
 /**
- * Append the source triples onto the destination.
+ * Append the single source triples onto the destination.
  *
  * @param source
- *   The source triples to append.
+ *   The source triple to append.
  * @param destination
  *   The destination triples the source is appended onto.
  *
@@ -160,10 +160,31 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_string_triples_append_
-  extern f_status_t f_string_triples_append(const f_string_triples_t source, f_string_triples_t * const destination);
+  extern f_status_t f_string_triples_append(const f_string_triple_t source, f_string_triples_t * const destination);
 #endif // _di_f_string_triples_append_
 
 /**
+ * Append the source triples onto the destination.
+ *
+ * @param source
+ *   The source triples to append.
+ * @param destination
+ *   The destination triples the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_triples_append_all_
+  extern f_status_t f_string_triples_append_all(const f_string_triples_t source, f_string_triples_t * const destination);
+#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).
@@ -299,10 +320,10 @@ extern "C" {
 #endif // _di_f_string_tripless_adjust_
 
 /**
- * Append the source tripless onto the destination.
+ * Append the single source triples onto the destination.
  *
  * @param source
- *   The source tripless to append.
+ *   The source triples to append.
  * @param destination
  *   The destination tripless the source is appended onto.
  *
@@ -316,10 +337,31 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_string_tripless_append_
-  extern f_status_t f_string_tripless_append(const f_string_tripless_t source, f_string_tripless_t * const destination);
+  extern f_status_t f_string_tripless_append(const f_string_triples_t source, f_string_tripless_t * const destination);
 #endif // _di_f_string_tripless_append_
 
 /**
+ * Append the source tripless onto the destination.
+ *
+ * @param source
+ *   The source tripless to append.
+ * @param destination
+ *   The destination tripless the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *   F_string_too_large (with error bit) if the combined string is too large.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_tripless_append_all_
+  extern f_status_t f_string_tripless_append_all(const f_string_tripless_t source, f_string_tripless_t * const destination);
+#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).
index 23297648bc463b2e1d8751bceac1545a680c8d2b..bb29b47a2113384808f35f5eddc3a236f7d39a67 100644 (file)
@@ -31,7 +31,7 @@ build_objects_library_static
 build_objects_program
 build_objects_program_shared
 build_objects_program_static
-build_sources_library string.c private-string.c string/common.c string/dynamic.c string/map.c string/quantity.c string/range.c string/static.c string/triple.c
+build_sources_library string.c private-string.c string/common.c string/private-dynamic.c string/private-map.c string/private-map_multi.c string/private-quantity.c string/private-range.c string/private-triple.c string/dynamic.c string/map.c string/map_multi.c string/quantity.c string/range.c string/static.c string/triple.c
 build_sources_library_shared
 build_sources_library_static
 build_sources_object
@@ -40,7 +40,7 @@ build_sources_object_static
 build_sources_program
 build_sources_program_shared
 build_sources_program_static
-build_sources_headers string.h string/common.h string/dynamic.h string/map.h string/quantity.h string/range.h string/static.h string/triple.h
+build_sources_headers string.h string/common.h string/dynamic.h string/map.h string/map_multi.h string/quantity.h string/range.h string/static.h string/triple.h
 build_sources_headers_shared
 build_sources_headers_static
 build_sources_script
diff --git a/level_0/f_string/data/build/settings-tests b/level_0/f_string/data/build/settings-tests
new file mode 100644 (file)
index 0000000..db3478f
--- /dev/null
@@ -0,0 +1,56 @@
+# fss-0001
+
+build_name test-f_string
+
+version_major 0
+version_minor 5
+version_micro 9
+version_file major
+version_target major
+
+modes individual level monolithic clang test
+modes_default individual
+
+build_compiler gcc
+build_compiler-clang clang
+build_indexer ar
+build_indexer_arguments rcs
+build_language c
+build_libraries -lc -lcmocka
+build_libraries-individual -lf_memory -lf_string
+build_libraries-level -lfll_0
+build_libraries-monolithic -lfll
+build_sources_program test-string-dynamics_adjust.c test-string-dynamics_append.c test-string-dynamics_append_all.c test-string-dynamics_decimate_by.c test-string-dynamics_decrease_by.c test-string-dynamics_increase.c test-string-dynamics_increase_by.c test-string-dynamics_resize.c test-string-dynamicss_adjust.c test-string-dynamicss_append.c test-string-dynamicss_append_all.c test-string-dynamicss_decimate_by.c test-string-dynamicss_decrease_by.c test-string-dynamicss_increase.c test-string-dynamicss_increase_by.c test-string-dynamicss_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-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-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-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.c
+build_script no
+build_shared yes
+build_static no
+
+path_headers tests/unit/c
+path_sources tests/unit/c
+
+has_path_standard no
+preserve_path_headers no
+
+search_exclusive yes
+search_shared yes
+search_static yes
+
+defines
+defines -Ibuild/includes
+defines_static -Lbuild/libraries/static
+defines_shared -Lbuild/libraries/shared
+
+flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
+flags-clang -Wno-logical-op-parentheses
+flags-test -fstack-protector
+flags_program -fPIE
+flags_program_shared
+flags_program_static
+flags_shared
+flags_static
diff --git a/level_0/f_string/data/build/testfile b/level_0/f_string/data/build/testfile
new file mode 100644 (file)
index 0000000..263cfb4
--- /dev/null
@@ -0,0 +1,45 @@
+# fss-0005 iki-0002
+
+settings:
+  load_build yes
+  fail exit
+
+  environment LD_LIBRARY_PATH
+
+main:
+  build settings
+  build settings-tests
+
+  operate ld_library_path
+
+  if exists build/programs/shared/test-f_string
+    shell build/programs/shared/test-f_string
+
+  if exists build/programs/static/test-f_string
+    shell build/programs/static/test-f_string
+
+  if not exists build/programs/shared/test-f_string
+  and not exists build/programs/static/test-f_string
+    operate not_created
+
+not_created:
+  print
+  print 'context:"error"Failed to test due to being unable to find either a shared or static test binary to perform tests. context:"reset"'
+
+  exit failure
+
+ld_library_path:
+  if defined environment LD_LIBRARY_PATH
+  and defined parameter work
+    define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared:define:"LD_LIBRARY_PATH"'
+
+  else
+  if defined environment LD_LIBRARY_PATH
+    define LD_LIBRARY_PATH 'build/libraries/shared:parameter:define:"LD_LIBRARY_PATH"'
+
+  else
+  if defined parameter work
+    define LD_LIBRARY_PATH 'build/libraries/shared:parameter:"work:value"libraries/shared'
+
+  else
+    define LD_LIBRARY_PATH build/libraries/shared
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_adjust.c b/level_0/f_string/tests/unit/c/test-string-dynamics_adjust.c
new file mode 100644 (file)
index 0000000..bababe1
--- /dev/null
@@ -0,0 +1,42 @@
+#include "test-string.h"
+#include "test-string-dynamics_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_adjust__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_adjust(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_string_dynamics_adjust__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_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-dynamics_adjust.h b/level_0/f_string/tests/unit/c/test-string-dynamics_adjust.h
new file mode 100644 (file)
index 0000000..0ec0a1b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string__string_dynamics_adjust
+#define _TEST__F_string__string_dynamics_adjust
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamics_adjust()
+ */
+extern void test__f_string_dynamics_adjust__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamics_adjust()
+ */
+extern void test__f_string_dynamics_adjust__parameter_checking(void **state);
+
+#endif // _TEST__F_string__string_dynamics_adjust
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_append.c b/level_0/f_string/tests/unit/c/test-string-dynamics_append.c
new file mode 100644 (file)
index 0000000..8f05603
--- /dev/null
@@ -0,0 +1,40 @@
+#include "test-string.h"
+#include "test-string-dynamics_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_append__works(void **state) {
+
+  const f_string_static_t source = macro_f_string_static_t_initialize("test", 0, 4);
+  f_string_dynamics_t destination = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+
+    assert_string_equal(destination.array[0].string, source.string);
+  }
+
+  free((void *) destination.array[0].string);
+  free((void *) destination.array);
+}
+
+void test__f_string_dynamics_append__parameter_checking(void **state) {
+
+  const f_string_dynamic_t data = f_string_dynamic_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_append.h b/level_0/f_string/tests/unit/c/test-string-dynamics_append.h
new file mode 100644 (file)
index 0000000..aa9476f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamics_append_h
+#define _TEST__F_string_dynamics_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamics_append()
+ */
+extern void test__f_string_dynamics_append__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamics_append()
+ */
+extern void test__f_string_dynamics_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamics_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.c b/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.c
new file mode 100644 (file)
index 0000000..6f75af5
--- /dev/null
@@ -0,0 +1,101 @@
+#include "test-string.h"
+#include "test-string-dynamics_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_append_all__works(void **state) {
+
+  const int length_inner = 2;
+  f_string_dynamics_t source = f_string_dynamics_t_initialize;
+  f_string_dynamics_t destination = f_string_dynamics_t_initialize;
+
+  const f_string_static_t test_sources[] = {
+    macro_f_string_static_t_initialize("test1", 0, 5),
+    macro_f_string_static_t_initialize("test2", 0, 5),
+  };
+
+  {
+    f_status_t status = f_string_dynamics_resize(length_inner, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.size, length_inner);
+
+    for (; source.used < length_inner; ++source.used) {
+
+      status = f_string_dynamic_append(test_sources[source.used], &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+      assert_string_equal(source.array[source.used].string, test_sources[source.used].string);
+      assert_int_equal(source.array[source.used].used, test_sources[source.used].used);
+    } // for
+  }
+
+  {
+    const f_status_t status = f_string_dynamics_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+      assert_int_equal(destination.array[i].used, source.array[i].used);
+
+      assert_string_equal(destination.array[i].string, source.array[i].string);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].string);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].string);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_string_dynamics_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t source = f_string_dynamics_t_initialize;
+  f_string_dynamics_t destination = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_dynamics_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_dynamics_append_all__parameter_checking(void **state) {
+
+  const f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.h b/level_0/f_string/tests/unit/c/test-string-dynamics_append_all.h
new file mode 100644 (file)
index 0000000..bdc6e26
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamics_append_all_h
+#define _TEST__F_string_dynamics_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamics_append_all()
+ */
+extern void test__f_string_dynamics_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_dynamics_append_all()
+ */
+extern void test__f_string_dynamics_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamics_append_all()
+ */
+extern void test__f_string_dynamics_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamics_append_all_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-dynamics_decimate_by.c
new file mode 100644 (file)
index 0000000..65f5200
--- /dev/null
@@ -0,0 +1,50 @@
+#include "test-string.h"
+#include "test-string-dynamics_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_decimate_by__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_dynamics_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, 0);
+  }
+
+  assert_null(data.array);
+}
+
+void test__f_string_dynamics_decimate_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_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-dynamics_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-dynamics_decimate_by.h
new file mode 100644 (file)
index 0000000..4bb4859
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_dynamics_decimate_by_h
+#define _TEST__F_dynamics_decimate_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamics_decimate_by()
+ */
+extern void test__f_string_dynamics_decimate_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamics_decimate_by()
+ */
+extern void test__f_string_dynamics_decimate_by__parameter_checking(void **state);
+
+#endif // _TEST__F_dynamics_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-dynamics_decrease_by.c
new file mode 100644 (file)
index 0000000..3103997
--- /dev/null
@@ -0,0 +1,50 @@
+#include "test-string.h"
+#include "test-string-dynamics_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_decrease_by__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_dynamics_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, 0);
+  }
+
+  assert_null(data.array);
+}
+
+void test__f_string_dynamics_decrease_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_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-dynamics_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-dynamics_decrease_by.h
new file mode 100644 (file)
index 0000000..ac932c5
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamics_decrease_by_h
+#define _TEST__F_string_dynamics_decrease_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamics_decrease_by()
+ */
+extern void test__f_string_dynamics_decrease_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamics_decrease_by()
+ */
+extern void test__f_string_dynamics_decrease_by__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamics_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_increase.c b/level_0/f_string/tests/unit/c/test-string-dynamics_increase.c
new file mode 100644 (file)
index 0000000..90ab94e
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-string.h"
+#include "test-string-dynamics_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_increase__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_string_dynamics_increase(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_string_dynamics_increase__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_dynamics_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_dynamics_increase__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_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-dynamics_increase.h b/level_0/f_string/tests/unit/c/test-string-dynamics_increase.h
new file mode 100644 (file)
index 0000000..ef937df
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamics_increase_h
+#define _TEST__F_string_dynamics_increase_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamics_increase()
+ */
+extern void test__f_string_dynamics_increase__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_dynamics_increase()
+ */
+extern void test__f_string_dynamics_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamics_increase()
+ */
+extern void test__f_string_dynamics_increase__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamics_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_increase_by.c b/level_0/f_string/tests/unit/c/test-string-dynamics_increase_by.c
new file mode 100644 (file)
index 0000000..e781c22
--- /dev/null
@@ -0,0 +1,52 @@
+#include "test-string.h"
+#include "test-string-dynamics_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_increase_by__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_string_dynamics_increase_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, length);
+    assert_int_equal(data.size, length * 2);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_string_dynamics_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_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-dynamics_increase_by.h b/level_0/f_string/tests/unit/c/test-string-dynamics_increase_by.h
new file mode 100644 (file)
index 0000000..2d4caed
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamics_increase_by_h
+#define _TEST__F_string_dynamics_increase_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamics_increase_by()
+ */
+extern void test__f_string_dynamics_increase_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamics_increase_by()
+ */
+extern void test__f_string_dynamics_increase_by__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamics_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamics_resize.c b/level_0/f_string/tests/unit/c/test-string-dynamics_resize.c
new file mode 100644 (file)
index 0000000..8f0cb8d
--- /dev/null
@@ -0,0 +1,42 @@
+#include "test-string.h"
+#include "test-string-dynamics_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamics_resize__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_string_dynamics_resize__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_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-dynamics_resize.h b/level_0/f_string/tests/unit/c/test-string-dynamics_resize.h
new file mode 100644 (file)
index 0000000..89a0897
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamics_resize_h
+#define _TEST__F_string_dynamics_resize_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamics_resize()
+ */
+extern void test__f_string_dynamics_resize__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamics_resize()
+ */
+extern void test__f_string_dynamics_resize__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamics_resize_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_adjust.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_adjust.c
new file mode 100644 (file)
index 0000000..6c316ef
--- /dev/null
@@ -0,0 +1,42 @@
+#include "test-string.h"
+#include "test-string-dynamicss_adjust.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_adjust__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamicss_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_adjust(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_string_dynamicss_adjust__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamicss_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_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-dynamicss_adjust.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_adjust.h
new file mode 100644 (file)
index 0000000..a3f62a1
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamicss_adjust_h
+#define _TEST__F_string_dynamicss_adjust_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_adjust()
+ */
+extern void test__f_string_dynamicss_adjust__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamicss_adjust()
+ */
+extern void test__f_string_dynamicss_adjust__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamicss_adjust_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_append.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_append.c
new file mode 100644 (file)
index 0000000..47e47df
--- /dev/null
@@ -0,0 +1,102 @@
+#include "test-string.h"
+#include "test-string-dynamicss_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_append__works(void **state) {
+
+  const int length_inner = 2;
+  f_string_dynamics_t source = f_string_dynamics_t_initialize;
+  f_string_dynamicss_t destination = f_string_dynamicss_t_initialize;
+
+  const f_string_static_t test_names[] = {
+    macro_f_string_static_t_initialize("test1", 0, 5),
+    macro_f_string_static_t_initialize("test2", 0, 5),
+  };
+
+  {
+    f_status_t status = f_string_dynamics_resize(length_inner, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.size, length_inner);
+
+    for (; source.used < length_inner; ++source.used) {
+
+      status = f_string_dynamic_append(test_names[source.used], &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+      assert_string_equal(source.array[source.used].string, test_names[source.used].string);
+      assert_int_equal(source.array[source.used].used, test_names[source.used].used);
+    } // for
+  }
+
+  {
+    const f_status_t status = f_string_dynamicss_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.array[0].used, length_inner);
+
+    for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+      assert_int_equal(destination.array[0].array[i].used, test_names[i].used);
+      assert_string_equal(destination.array[0].array[i].string, test_names[i].string);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].string);
+  } // for
+
+
+  for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+    free((void *) destination.array[0].array[i].string);
+  } // for
+
+  free((void *) destination.array[0].array);
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_string_dynamicss_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_dynamics_t source = f_string_dynamicss_t_initialize;
+  f_string_dynamicss_t destination = f_string_dynamicss_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamics_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_dynamicss_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_dynamicss_append__parameter_checking(void **state) {
+
+  f_string_dynamics_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_append.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_append.h
new file mode 100644 (file)
index 0000000..7bbd5d9
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamicss_append_h
+#define _TEST__F_string_dynamicss_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_append()
+ */
+extern void test__f_string_dynamicss_append__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_dynamicss_append()
+ */
+extern void test__f_string_dynamicss_append__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamicss_append()
+ */
+extern void test__f_string_dynamicss_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamicss_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.c
new file mode 100644 (file)
index 0000000..6b55e46
--- /dev/null
@@ -0,0 +1,130 @@
+#include "test-string.h"
+#include "test-string-dynamicss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  const int length_outer = 2;
+  f_string_dynamicss_t source = f_string_dynamicss_t_initialize;
+  f_string_dynamicss_t destination = f_string_dynamicss_t_initialize;
+
+  const f_string_static_t test_names[] = {
+    macro_f_string_static_t_initialize("test1", 0, 5),
+    macro_f_string_static_t_initialize("test2", 0, 5),
+  };
+
+  {
+    f_status_t status = f_string_dynamicss_resize(length_outer, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length_outer);
+
+    f_array_length_t i = 0;
+    f_array_length_t j = 0;
+
+    for (; source.used < length_outer; ++source.used) {
+
+      status = f_string_dynamics_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[source.used].used, 0);
+      assert_int_equal(source.array[source.used].size, length_inner);
+
+      for (i = 0; i < length_inner; ++i) {
+
+        status = f_string_dynamic_append(test_names[i], &source.array[source.used].array[i]);
+
+        assert_int_equal(status, F_none);
+        assert_string_equal(source.array[source.used].array[i].string, test_names[i].string);
+        assert_int_equal(source.array[source.used].array[i].used, test_names[i].used);
+      } // for
+
+      source.array[source.used].used = length_inner;
+    } // for
+  }
+
+  {
+    const f_status_t status = f_string_dynamicss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+
+    for (f_array_length_t j = 0; j < length_outer; ++j) {
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+        assert_int_equal(destination.array[j].array[i].used, test_names[i].used);
+
+        assert_string_equal(destination.array[j].array[i].string, test_names[i].string);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t j = 0; j < source.used; ++j) {
+
+    for (f_array_length_t i = 0; i < source.array[j].used; ++i) {
+      free((void *) source.array[j].array[i].string);
+    } // for
+
+    free((void *) source.array[j].array);
+  } // for
+
+  for (f_array_length_t j = 0; j < destination.used; ++j) {
+
+    for (f_array_length_t i = 0; i < destination.array[j].used; ++i) {
+      free((void *) destination.array[j].array[i].string);
+    } // for
+
+    free((void *) destination.array[j].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_string_dynamicss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t source = f_string_dynamicss_t_initialize;
+  f_string_dynamicss_t destination = f_string_dynamicss_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_dynamicss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_dynamicss_append_all__parameter_checking(void **state) {
+
+  const f_string_dynamicss_t data = f_string_dynamicss_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_append_all.h
new file mode 100644 (file)
index 0000000..d578deb
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamicss_append_all_h
+#define _TEST__F_string_dynamicss_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_append_all()
+ */
+extern void test__f_string_dynamicss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_dynamicss_append_all()
+ */
+extern void test__f_string_dynamicss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamicss_append_all()
+ */
+extern void test__f_string_dynamicss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamicss_append_all_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_decimate_by.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_decimate_by.c
new file mode 100644 (file)
index 0000000..e4b27bd
--- /dev/null
@@ -0,0 +1,50 @@
+#include "test-string.h"
+#include "test-string-dynamicss_decimate_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_decimate_by__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_dynamicss_decimate_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, 0);
+  }
+
+  assert_null(data.array);
+}
+
+void test__f_string_dynamicss_decimate_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_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-dynamicss_decimate_by.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_decimate_by.h
new file mode 100644 (file)
index 0000000..21c20ab
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamicss_decimate_by_h
+#define _TEST__F_string_dynamicss_decimate_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_decimate_by()
+ */
+extern void test__f_string_dynamicss_decimate_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamicss_decimate_by()
+ */
+extern void test__f_string_dynamicss_decimate_by__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamicss_decimate_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_decrease_by.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_decrease_by.c
new file mode 100644 (file)
index 0000000..f824afb
--- /dev/null
@@ -0,0 +1,50 @@
+#include "test-string.h"
+#include "test-string-dynamicss_decrease_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_decrease_by__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_dynamicss_decrease_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, 0);
+  }
+
+  assert_null(data.array);
+}
+
+void test__f_string_dynamicss_decrease_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_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-dynamicss_decrease_by.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_decrease_by.h
new file mode 100644 (file)
index 0000000..d733800
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamicss_decrease_by_h
+#define _TEST__F_string_dynamicss_decrease_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_decrease_by()
+ */
+extern void test__f_string_dynamicss_decrease_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamicss_decrease_by()
+ */
+extern void test__f_string_dynamicss_decrease_by__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamicss_decrease_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_increase.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_increase.c
new file mode 100644 (file)
index 0000000..251c021
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-string.h"
+#include "test-string-dynamicss_increase.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_increase__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_string_dynamicss_increase(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_string_dynamicss_increase__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_dynamicss_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_dynamicss_increase__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_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-dynamicss_increase.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_increase.h
new file mode 100644 (file)
index 0000000..e75f05c
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamicss_increase_h
+#define _TEST__F_string_dynamicss_increase_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_increase()
+ */
+extern void test__f_string_dynamicss_increase__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_dynamicss_increase()
+ */
+extern void test__f_string_dynamicss_increase__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamicss_increase()
+ */
+extern void test__f_string_dynamicss_increase__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamicss_increase_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_increase_by.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_increase_by.c
new file mode 100644 (file)
index 0000000..dec5bba
--- /dev/null
@@ -0,0 +1,52 @@
+#include "test-string.h"
+#include "test-string-dynamicss_increase_by.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_increase_by__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  {
+    data.used = length;
+
+    const f_status_t status = f_string_dynamicss_increase_by(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, length);
+    assert_int_equal(data.size, length * 2);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_string_dynamicss_increase_by__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamics_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_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-dynamicss_increase_by.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_increase_by.h
new file mode 100644 (file)
index 0000000..a9f0804
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamicss_increase_by_h
+#define _TEST__F_string_dynamicss_increase_by_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_increase_by()
+ */
+extern void test__f_string_dynamicss_increase_by__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamicss_increase_by()
+ */
+extern void test__f_string_dynamicss_increase_by__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamicss_increase_by_h
diff --git a/level_0/f_string/tests/unit/c/test-string-dynamicss_resize.c b/level_0/f_string/tests/unit/c/test-string-dynamicss_resize.c
new file mode 100644 (file)
index 0000000..f80e04d
--- /dev/null
@@ -0,0 +1,42 @@
+#include "test-string.h"
+#include "test-string-dynamicss_resize.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_dynamicss_resize__works(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamicss_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_resize(length, &data);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(data.used, 0);
+    assert_int_equal(data.size, length);
+  }
+
+  free((void *) data.array);
+}
+
+void test__f_string_dynamicss_resize__parameter_checking(void **state) {
+
+  const int length = 5;
+  f_string_dynamicss_t data = f_string_dynamicss_t_initialize;
+
+  {
+    const f_status_t status = f_string_dynamicss_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-dynamicss_resize.h b/level_0/f_string/tests/unit/c/test-string-dynamicss_resize.h
new file mode 100644 (file)
index 0000000..d9b0ed5
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_dynamicss_resize_h
+#define _TEST__F_string_dynamicss_resize_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_dynamicss_resize()
+ */
+extern void test__f_string_dynamicss_resize__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_dynamicss_resize()
+ */
+extern void test__f_string_dynamicss_resize__parameter_checking(void **state);
+
+#endif // _TEST__F_string_dynamicss_resize_h
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
new file mode 100644 (file)
index 0000000..54f12b4
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..423ce7a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_append.c b/level_0/f_string/tests/unit/c/test-string-map_multis_append.c
new file mode 100644 (file)
index 0000000..e736359
--- /dev/null
@@ -0,0 +1,81 @@
+#include "test-string.h"
+#include "test-string-map_multis_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_map_multis_append__works(void **state) {
+
+  const int length_values = 2;
+  f_string_map_multi_t source = f_string_map_multi_t_initialize;
+  f_string_map_multis_t destination = f_string_map_multis_t_initialize;
+
+  f_string_static_t test_value_array[] = {
+    macro_f_string_static_t_initialize("test_value1", 0, 11),
+    macro_f_string_static_t_initialize("test_value2", 0, 11),
+  };
+
+  const f_string_static_t test_name = macro_f_string_static_t_initialize("test_name", 0, 9);
+  const f_string_statics_t test_value = macro_f_string_statics_t_initialize(test_value_array, 0, length_values);
+
+  {
+    f_status_t status = f_string_dynamic_append(test_name, &source.name);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.name.used, test_name.used);
+    assert_string_equal(source.name.string, test_name.string);
+
+    status = f_string_dynamics_append_all(test_value, &source.value);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.value.used, test_value.used);
+    assert_int_equal(source.value.array[0].used, test_value.array[0].used);
+    assert_int_equal(source.value.array[1].used, test_value.array[1].used);
+
+    assert_string_equal(source.value.array[0].string, test_value.array[0].string);
+    assert_string_equal(source.value.array[1].string, test_value.array[1].string);
+  }
+
+  {
+    const f_status_t status = f_string_map_multis_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].name.used, source.name.used);
+    assert_int_equal(destination.array[0].value.used, source.value.used);
+    assert_int_equal(destination.array[0].value.array[0].used, source.value.array[0].used);
+    assert_int_equal(destination.array[0].value.array[1].used, source.value.array[1].used);
+
+    assert_string_equal(destination.array[0].name.string, source.name.string);
+    assert_string_equal(destination.array[0].value.array[0].string, source.value.array[0].string);
+    assert_string_equal(destination.array[0].value.array[1].string, source.value.array[1].string);
+  }
+
+  free((void *) source.name.string);
+  free((void *) source.value.array[0].string);
+  free((void *) source.value.array[1].string);
+  free((void *) source.value.array);
+
+  free((void *) destination.array[0].name.string);
+  free((void *) destination.array[0].value.array[0].string);
+  free((void *) destination.array[0].value.array[1].string);
+  free((void *) destination.array[0].value.array);
+
+  free((void *) destination.array);
+}
+
+void test__f_string_map_multis_append__parameter_checking(void **state) {
+
+  const f_string_map_multi_t data = f_string_map_multi_t_initialize;
+
+  {
+    const f_status_t status = f_string_map_multis_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_append.h b/level_0/f_string/tests/unit/c/test-string-map_multis_append.h
new file mode 100644 (file)
index 0000000..80b548f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_map_multis_append_h
+#define _TEST__F_string_map_multis_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_map_multis_append()
+ */
+extern void test__f_string_map_multis_append__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_map_multis_append()
+ */
+extern void test__f_string_map_multis_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_map_multis_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.c b/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.c
new file mode 100644 (file)
index 0000000..573203e
--- /dev/null
@@ -0,0 +1,126 @@
+#include "test-string.h"
+#include "test-string-map_multis_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_map_multis_append_all__works(void **state) {
+
+  const int length_values = 2;
+  const int length_inner = 2;
+  f_string_map_multis_t source = f_string_map_multis_t_initialize;
+  f_string_map_multis_t destination = f_string_map_multis_t_initialize;
+
+  f_string_static_t test_value_array[] = {
+    macro_f_string_static_t_initialize("test_value1", 0, 11),
+    macro_f_string_static_t_initialize("test_value2", 0, 11),
+  };
+
+  const f_string_static_t test_name = macro_f_string_static_t_initialize("test_name", 0, 9);
+  const f_string_statics_t test_value = macro_f_string_statics_t_initialize(test_value_array, 0, length_values);
+
+  {
+    f_status_t status = f_string_map_multis_resize(length_inner, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.size, length_inner);
+
+    for (; source.used < length_inner; ++source.used) {
+
+      status = f_string_dynamic_append(test_name, &source.array[source.used].name);
+
+      assert_int_equal(status, F_none);
+      assert_string_equal(source.array[source.used].name.string, test_name.string);
+      assert_int_equal(source.array[source.used].name.used, test_name.used);
+
+      status = f_string_dynamics_append_all(test_value, &source.array[source.used].value);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[source.used].value.array[0].used, test_value.array[0].used);
+      assert_int_equal(source.array[source.used].value.array[1].used, test_value.array[1].used);
+      assert_string_equal(source.array[source.used].value.array[0].string, test_value.array[0].string);
+      assert_string_equal(source.array[source.used].value.array[1].string, test_value.array[1].string);
+    } // for
+  }
+
+  {
+    const f_status_t status = f_string_map_multis_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+      assert_int_equal(destination.array[i].name.used, source.array[i].name.used);
+      assert_int_equal(destination.array[i].value.used, source.array[i].value.used);
+      assert_int_equal(destination.array[i].value.array[0].used, source.array[i].value.array[0].used);
+      assert_int_equal(destination.array[i].value.array[1].used, source.array[i].value.array[1].used);
+
+      assert_string_equal(destination.array[i].name.string, source.array[i].name.string);
+      assert_string_equal(destination.array[i].value.array[0].string, source.array[i].value.array[0].string);
+      assert_string_equal(destination.array[i].value.array[1].string, source.array[i].value.array[1].string);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+
+    free((void *) source.array[i].name.string);
+    free((void *) source.array[i].value.array[0].string);
+    free((void *) source.array[i].value.array[1].string);
+    free((void *) source.array[i].value.array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+    free((void *) destination.array[i].name.string);
+    free((void *) destination.array[i].value.array[0].string);
+    free((void *) destination.array[i].value.array[1].string);
+    free((void *) destination.array[i].value.array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_string_map_multis_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_map_multis_t source = f_string_map_multis_t_initialize;
+  f_string_map_multis_t destination = f_string_map_multis_t_initialize;
+
+  {
+    const f_status_t status = f_string_map_multis_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_map_multis_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_map_multis_append_all__parameter_checking(void **state) {
+
+  const f_string_map_multis_t data = f_string_map_multis_t_initialize;
+
+  {
+    const f_status_t status = f_string_map_multis_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.h b/level_0/f_string/tests/unit/c/test-string-map_multis_append_all.h
new file mode 100644 (file)
index 0000000..35b98d6
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_map_multis_append_all_h
+#define _TEST__F_string_map_multis_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_map_multis_append_all()
+ */
+extern void test__f_string_map_multis_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_map_multis_append_all()
+ */
+extern void test__f_string_map_multis_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_map_multis_append_all()
+ */
+extern void test__f_string_map_multis_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_map_multis_append_all_h
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
new file mode 100644 (file)
index 0000000..2af9695
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..c34a755
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..faf283c
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..f747957
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_increase.c b/level_0/f_string/tests/unit/c/test-string-map_multis_increase.c
new file mode 100644 (file)
index 0000000..ad9c765
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..ee42b96
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..875ab3b
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..2996ae8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..e246488
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..ba2a4ac
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..ee7956f
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..65d2820
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_append.c
new file mode 100644 (file)
index 0000000..8fb8580
--- /dev/null
@@ -0,0 +1,142 @@
+#include "test-string.h"
+#include "test-string-map_multiss_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_map_multiss_append__works(void **state) {
+
+  const int length_values = 2;
+  const int length_values_set = 2;
+  const int length_inner = 2;
+  f_string_map_multis_t source = f_string_map_multis_t_initialize;
+  f_string_map_multiss_t destination = f_string_map_multiss_t_initialize;
+
+  f_string_static_t test_value_array1[] = {
+    macro_f_string_static_t_initialize("test_value1", 0, 11),
+    macro_f_string_static_t_initialize("test_value2", 0, 11),
+  };
+
+  f_string_static_t test_value_array2[] = {
+    macro_f_string_static_t_initialize("test_value3", 0, 11),
+    macro_f_string_static_t_initialize("test_value4", 0, 11),
+  };
+
+  const f_string_static_t test_names[] = {
+    macro_f_string_static_t_initialize("test_name1", 0, 10),
+    macro_f_string_static_t_initialize("test_name2", 0, 10),
+  };
+
+  const f_string_statics_t test_values[] = {
+    macro_f_string_statics_t_initialize(test_value_array1, 0, length_values),
+    macro_f_string_statics_t_initialize(test_value_array2, 0, length_values),
+  };
+
+  {
+    f_status_t status = f_string_map_multis_resize(length_inner, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.size, length_inner);
+
+    for (; source.used < length_inner; ++source.used) {
+
+      status = f_string_dynamic_append(test_names[source.used], &source.array[source.used].name);
+
+      assert_int_equal(status, F_none);
+      assert_string_equal(source.array[source.used].name.string, test_names[source.used].string);
+      assert_int_equal(source.array[source.used].name.used, test_names[source.used].used);
+
+      status = f_string_dynamics_append_all(test_values[source.used], &source.array[source.used].value);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[source.used].value.used, test_values[source.used].used);
+      assert_int_equal(source.array[source.used].value.array[0].used, test_values[source.used].array[0].used);
+      assert_int_equal(source.array[source.used].value.array[1].used, test_values[source.used].array[1].used);
+
+      assert_string_equal(source.array[source.used].value.array[0].string, test_values[source.used].array[0].string);
+      assert_string_equal(source.array[source.used].value.array[1].string, test_values[source.used].array[1].string);
+    } // for
+  }
+
+  {
+    const f_status_t status = f_string_map_multiss_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.array[0].used, length_inner);
+
+    for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+      assert_int_equal(destination.array[0].array[i].name.used, test_names[i].used);
+      assert_int_equal(destination.array[0].array[i].value.used, test_values[i].used);
+      assert_int_equal(destination.array[0].array[i].value.array[0].used, test_values[i].array[0].used);
+      assert_int_equal(destination.array[0].array[i].value.array[1].used, test_values[i].array[1].used);
+
+      assert_string_equal(destination.array[0].array[i].name.string, test_names[i].string);
+      assert_string_equal(destination.array[0].array[i].value.array[0].string, test_values[i].array[0].string);
+      assert_string_equal(destination.array[0].array[i].value.array[1].string, test_values[i].array[1].string);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+
+    free((void *) source.array[i].name.string);
+    free((void *) source.array[i].value.array[0].string);
+    free((void *) source.array[i].value.array[1].string);
+    free((void *) source.array[i].value.array);
+  } // for
+
+
+  for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+
+    free((void *) destination.array[0].array[i].name.string);
+    free((void *) destination.array[0].array[i].value.array[0].string);
+    free((void *) destination.array[0].array[i].value.array[1].string);
+    free((void *) destination.array[0].array[i].value.array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array[0].array);
+  free((void *) destination.array);
+}
+
+void test__f_string_map_multiss_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_map_multis_t source = f_string_map_multiss_t_initialize;
+  f_string_map_multiss_t destination = f_string_map_multiss_t_initialize;
+
+  {
+    const f_status_t status = f_string_map_multis_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_map_multiss_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_map_multiss_append__parameter_checking(void **state) {
+
+  f_string_map_multis_t data = f_string_map_multis_t_initialize;
+
+  {
+    const f_status_t status = f_string_map_multiss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_append.h
new file mode 100644 (file)
index 0000000..84505b8
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_map_multiss_append_h
+#define _TEST__F_string_map_multiss_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_map_multiss_append()
+ */
+extern void test__f_string_map_multiss_append__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_map_multiss_append()
+ */
+extern void test__f_string_map_multiss_append__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_map_multiss_append()
+ */
+extern void test__f_string_map_multiss_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_map_multiss_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.c
new file mode 100644 (file)
index 0000000..cdec36b
--- /dev/null
@@ -0,0 +1,169 @@
+#include "test-string.h"
+#include "test-string-map_multiss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_map_multiss_append_all__works(void **state) {
+
+  const int length_values = 2;
+  const int length_values_set = 2;
+  const int length_inner = 2;
+  const int length_outer = 2;
+  f_string_map_multiss_t source = f_string_map_multiss_t_initialize;
+  f_string_map_multiss_t destination = f_string_map_multiss_t_initialize;
+
+  f_string_static_t test_value_array1[] = {
+    macro_f_string_static_t_initialize("test_value1", 0, 11),
+    macro_f_string_static_t_initialize("test_value2", 0, 11),
+  };
+
+  f_string_static_t test_value_array2[] = {
+    macro_f_string_static_t_initialize("test_value3", 0, 11),
+    macro_f_string_static_t_initialize("test_value4", 0, 11),
+  };
+
+  const f_string_static_t test_names[] = {
+    macro_f_string_static_t_initialize("test_name1", 0, 10),
+    macro_f_string_static_t_initialize("test_name2", 0, 10),
+  };
+
+  const f_string_statics_t test_values[] = {
+    macro_f_string_statics_t_initialize(test_value_array1, 0, length_values),
+    macro_f_string_statics_t_initialize(test_value_array2, 0, length_values),
+  };
+
+  {
+    f_status_t status = f_string_map_multiss_resize(length_outer, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length_outer);
+
+    f_array_length_t i = 0;
+    f_array_length_t j = 0;
+
+    for (; source.used < length_outer; ++source.used) {
+
+      status = f_string_map_multis_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[source.used].used, 0);
+      assert_int_equal(source.array[source.used].size, length_inner);
+
+      for (i = 0; i < length_inner; ++i) {
+
+        status = f_string_dynamic_append(test_names[i], &source.array[source.used].array[i].name);
+
+        assert_int_equal(status, F_none);
+        assert_int_equal(source.array[source.used].array[i].name.used, test_names[i].used);
+        assert_string_equal(source.array[source.used].array[i].name.string, test_names[i].string);
+
+        status = f_string_dynamics_append_all(test_values[i], &source.array[source.used].array[i].value);
+
+        assert_int_equal(status, F_none);
+        assert_int_equal(source.array[source.used].array[i].value.used, test_values[i].used);
+        assert_int_equal(source.array[source.used].array[i].value.array[0].used, test_values[i].array[0].used);
+        assert_int_equal(source.array[source.used].array[i].value.array[1].used, test_values[i].array[1].used);
+
+        assert_string_equal(source.array[source.used].array[i].value.array[0].string, test_values[i].array[0].string);
+        assert_string_equal(source.array[source.used].array[i].value.array[1].string, test_values[i].array[1].string);
+      } // for
+
+      source.array[source.used].used = length_inner;
+    } // for
+  }
+
+  {
+    const f_status_t status = f_string_map_multiss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+
+    for (f_array_length_t j = 0; j < length_outer; ++j) {
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+        assert_int_equal(destination.array[j].array[i].name.used, test_names[i].used);
+        assert_int_equal(destination.array[j].array[i].value.used, test_values[i].used);
+        assert_int_equal(destination.array[j].array[i].value.array[0].used, test_values[i].array[0].used);
+        assert_int_equal(destination.array[j].array[i].value.array[1].used, test_values[i].array[1].used);
+
+        assert_string_equal(destination.array[j].array[i].name.string, test_names[i].string);
+        assert_string_equal(destination.array[j].array[i].value.array[0].string, test_values[i].array[0].string);
+        assert_string_equal(destination.array[j].array[i].value.array[1].string, test_values[i].array[1].string);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t j = 0; j < source.used; ++j) {
+
+    for (f_array_length_t i = 0; i < source.array[j].used; ++i) {
+
+      free((void *) source.array[j].array[i].name.string);
+      free((void *) source.array[j].array[i].value.array[0].string);
+      free((void *) source.array[j].array[i].value.array[1].string);
+      free((void *) source.array[j].array[i].value.array);
+    } // for
+
+    free((void *) source.array[j].array);
+  } // for
+
+  for (f_array_length_t j = 0; j < destination.used; ++j) {
+
+    for (f_array_length_t i = 0; i < destination.array[j].used; ++i) {
+
+      free((void *) destination.array[j].array[i].name.string);
+      free((void *) destination.array[j].array[i].value.array[0].string);
+      free((void *) destination.array[j].array[i].value.array[1].string);
+      free((void *) destination.array[j].array[i].value.array);
+    } // for
+
+    free((void *) destination.array[j].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_string_map_multiss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_map_multiss_t source = f_string_map_multiss_t_initialize;
+  f_string_map_multiss_t destination = f_string_map_multiss_t_initialize;
+
+  {
+    const f_status_t status = f_string_map_multiss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_map_multiss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_map_multiss_append_all__parameter_checking(void **state) {
+
+  const f_string_map_multiss_t data = f_string_map_multiss_t_initialize;
+
+  {
+    const f_status_t status = f_string_map_multiss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.h b/level_0/f_string/tests/unit/c/test-string-map_multiss_append_all.h
new file mode 100644 (file)
index 0000000..b33f80e
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_map_multiss_append_all_h
+#define _TEST__F_string_map_multiss_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_map_multiss_append_all()
+ */
+extern void test__f_string_map_multiss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_map_multiss_append_all()
+ */
+extern void test__f_string_map_multiss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_map_multiss_append_all()
+ */
+extern void test__f_string_map_multiss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_map_multiss_append_all_h
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
new file mode 100644 (file)
index 0000000..53746a0
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..3409869
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..1c018c2
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..336e944
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_increase.c b/level_0/f_string/tests/unit/c/test-string-map_multiss_increase.c
new file mode 100644 (file)
index 0000000..f87c902
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..3a658b8
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..14b0e87
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..ec3489c
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..31f6b1a
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..a6420ec
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..700a7e3
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..ae45a65
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_append.c b/level_0/f_string/tests/unit/c/test-string-maps_append.c
new file mode 100644 (file)
index 0000000..226ce34
--- /dev/null
@@ -0,0 +1,63 @@
+#include "test-string.h"
+#include "test-string-maps_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_maps_append__works(void **state) {
+
+  f_string_map_t source = f_string_map_t_initialize;
+  f_string_maps_t destination = f_string_maps_t_initialize;
+
+  const f_string_static_t test_name = macro_f_string_static_t_initialize("test_name", 0, 9);
+  const f_string_static_t test_value = macro_f_string_static_t_initialize("test_value", 0, 10);
+
+  {
+    f_status_t status = f_string_dynamic_append(test_name, &source.name);
+
+    assert_int_equal(status, F_none);
+    assert_string_equal(source.name.string, test_name.string);
+    assert_int_equal(source.name.used, test_name.used);
+
+    status = f_string_dynamic_append(test_value, &source.value);
+
+    assert_int_equal(status, F_none);
+    assert_string_equal(source.value.string, test_value.string);
+    assert_int_equal(source.value.used, test_value.used);
+  }
+
+  {
+    const f_status_t status = f_string_maps_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].name.used, source.name.used);
+    assert_int_equal(destination.array[0].value.used, source.value.used);
+    assert_string_equal(destination.array[0].name.string, source.name.string);
+    assert_string_equal(destination.array[0].value.string, source.value.string);
+  }
+
+  free((void *) source.name.string);
+  free((void *) source.value.string);
+
+  free((void *) destination.array[0].name.string);
+  free((void *) destination.array[0].value.string);
+
+  free((void *) destination.array);
+}
+
+void test__f_string_maps_append__parameter_checking(void **state) {
+
+  const f_string_map_t data = f_string_map_t_initialize;
+
+  {
+    const f_status_t status = f_string_maps_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_append.h b/level_0/f_string/tests/unit/c/test-string-maps_append.h
new file mode 100644 (file)
index 0000000..8cac92f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_maps_append_h
+#define _TEST__F_string_maps_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_maps_append()
+ */
+extern void test__f_string_maps_append__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_maps_append()
+ */
+extern void test__f_string_maps_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_maps_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_append_all.c b/level_0/f_string/tests/unit/c/test-string-maps_append_all.c
new file mode 100644 (file)
index 0000000..d985f05
--- /dev/null
@@ -0,0 +1,112 @@
+#include "test-string.h"
+#include "test-string-maps_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_maps_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_string_maps_t source = f_string_maps_t_initialize;
+  f_string_maps_t destination = f_string_maps_t_initialize;
+
+  const f_string_static_t test_name = macro_f_string_static_t_initialize("test_name", 0, 9);
+  const f_string_static_t test_value = macro_f_string_static_t_initialize("test_value", 0, 10);
+
+  {
+    f_status_t status = f_string_maps_resize(length_inner, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.size, length_inner);
+
+    for (; source.used < length_inner; ++source.used) {
+
+      status = f_string_dynamic_append(test_name, &source.array[source.used].name);
+
+      assert_int_equal(status, F_none);
+      assert_string_equal(source.array[source.used].name.string, test_name.string);
+      assert_int_equal(source.array[source.used].name.used, test_name.used);
+
+      status = f_string_dynamic_append(test_value, &source.array[source.used].value);
+
+      assert_int_equal(status, F_none);
+      assert_string_equal(source.array[source.used].value.string, test_value.string);
+      assert_int_equal(source.array[source.used].value.used, test_value.used);
+    } // for
+  }
+
+  {
+    const f_status_t status = f_string_maps_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+      assert_int_equal(destination.array[i].name.used, source.array[i].name.used);
+      assert_int_equal(destination.array[i].value.used, source.array[i].value.used);
+
+      assert_string_equal(destination.array[i].name.string, source.array[i].name.string);
+      assert_string_equal(destination.array[i].value.string, source.array[i].value.string);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+
+    free((void *) source.array[i].name.string);
+    free((void *) source.array[i].value.string);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+    free((void *) destination.array[i].name.string);
+    free((void *) destination.array[i].value.string);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_string_maps_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_maps_t source = f_string_maps_t_initialize;
+  f_string_maps_t destination = f_string_maps_t_initialize;
+
+  {
+    const f_status_t status = f_string_maps_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_maps_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_maps_append_all__parameter_checking(void **state) {
+
+  const f_string_maps_t data = f_string_maps_t_initialize;
+
+  {
+    const f_status_t status = f_string_maps_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-maps_append_all.h b/level_0/f_string/tests/unit/c/test-string-maps_append_all.h
new file mode 100644 (file)
index 0000000..aa6ae70
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_maps_append_all_h
+#define _TEST__F_string_maps_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_maps_append_all()
+ */
+extern void test__f_string_maps_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_maps_append_all()
+ */
+extern void test__f_string_maps_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_maps_append_all()
+ */
+extern void test__f_string_maps_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_maps_append_all_h
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
new file mode 100644 (file)
index 0000000..ee9cd18
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..bfe898b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..cd6f88e
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..669c782
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_increase.c b/level_0/f_string/tests/unit/c/test-string-maps_increase.c
new file mode 100644 (file)
index 0000000..fa1e369
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..459fbdf
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..0d0cd23
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..70f17dd
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..38f41e7
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..347deef
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..5bf50cb
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..3799104
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_append.c b/level_0/f_string/tests/unit/c/test-string-mapss_append.c
new file mode 100644 (file)
index 0000000..1c5f2fe
--- /dev/null
@@ -0,0 +1,120 @@
+#include "test-string.h"
+#include "test-string-mapss_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_mapss_append__works(void **state) {
+
+  const int length_inner = 2;
+  f_string_maps_t source = f_string_maps_t_initialize;
+  f_string_mapss_t destination = f_string_mapss_t_initialize;
+
+  const f_string_static_t test_names[] = {
+    macro_f_string_static_t_initialize("test_name1", 0, 10),
+    macro_f_string_static_t_initialize("test_name2", 0, 10),
+  };
+
+  const f_string_static_t test_values[] = {
+    macro_f_string_static_t_initialize("test_value1", 0, 11),
+    macro_f_string_static_t_initialize("test_value2", 0, 11),
+  };
+
+  {
+    f_status_t status = f_string_maps_resize(length_inner, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.size, length_inner);
+
+    for (; source.used < length_inner; ++source.used) {
+
+      status = f_string_dynamic_append(test_names[source.used], &source.array[source.used].name);
+
+      assert_int_equal(status, F_none);
+      assert_string_equal(source.array[source.used].name.string, test_names[source.used].string);
+      assert_int_equal(source.array[source.used].name.used, test_names[source.used].used);
+
+      status = f_string_dynamic_append(test_values[source.used], &source.array[source.used].value);
+
+      assert_int_equal(status, F_none);
+      assert_string_equal(source.array[source.used].value.string, test_values[source.used].string);
+      assert_int_equal(source.array[source.used].value.used, test_values[source.used].used);
+    } // for
+  }
+
+  {
+    const f_status_t status = f_string_mapss_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.array[0].used, length_inner);
+
+    for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+      assert_int_equal(destination.array[0].array[i].name.used, test_names[i].used);
+      assert_int_equal(destination.array[0].array[i].value.used, test_values[i].used);
+
+      assert_string_equal(destination.array[0].array[i].name.string, test_names[i].string);
+      assert_string_equal(destination.array[0].array[i].value.string, test_values[i].string);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+
+    free((void *) source.array[i].name.string);
+    free((void *) source.array[i].value.string);
+  } // for
+
+
+  for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+
+    free((void *) destination.array[0].array[i].name.string);
+    free((void *) destination.array[0].array[i].value.string);
+  } // for
+
+  free((void *) destination.array[0].array);
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_string_mapss_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_maps_t source = f_string_mapss_t_initialize;
+  f_string_mapss_t destination = f_string_mapss_t_initialize;
+
+  {
+    const f_status_t status = f_string_maps_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_mapss_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_mapss_append__parameter_checking(void **state) {
+
+  f_string_maps_t data = f_string_maps_t_initialize;
+
+  {
+    const f_status_t status = f_string_mapss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_append.h b/level_0/f_string/tests/unit/c/test-string-mapss_append.h
new file mode 100644 (file)
index 0000000..b2f64cd
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_mapss_append_h
+#define _TEST__F_string_mapss_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_mapss_append()
+ */
+extern void test__f_string_mapss_append__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_mapss_append()
+ */
+extern void test__f_string_mapss_append__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_mapss_append()
+ */
+extern void test__f_string_mapss_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_mapss_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c b/level_0/f_string/tests/unit/c/test-string-mapss_append_all.c
new file mode 100644 (file)
index 0000000..d1639cc
--- /dev/null
@@ -0,0 +1,147 @@
+#include "test-string.h"
+#include "test-string-mapss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_mapss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  const int length_outer = 2;
+  f_string_mapss_t source = f_string_mapss_t_initialize;
+  f_string_mapss_t destination = f_string_mapss_t_initialize;
+
+  const f_string_static_t test_names[] = {
+    macro_f_string_static_t_initialize("test_name1", 0, 10),
+    macro_f_string_static_t_initialize("test_name2", 0, 10),
+  };
+
+  const f_string_static_t test_values[] = {
+    macro_f_string_static_t_initialize("test_value1", 0, 11),
+    macro_f_string_static_t_initialize("test_value2", 0, 11),
+  };
+
+  {
+    f_status_t status = f_string_mapss_resize(length_outer, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length_outer);
+
+    f_array_length_t i = 0;
+    f_array_length_t j = 0;
+
+    for (; source.used < length_outer; ++source.used) {
+
+      status = f_string_maps_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+      assert_int_equal(source.array[source.used].used, 0);
+      assert_int_equal(source.array[source.used].size, length_inner);
+
+      for (i = 0; i < length_inner; ++i) {
+
+        status = f_string_dynamic_append(test_names[i], &source.array[source.used].array[i].name);
+
+        assert_int_equal(status, F_none);
+        assert_string_equal(source.array[source.used].array[i].name.string, test_names[i].string);
+        assert_int_equal(source.array[source.used].array[i].name.used, test_names[i].used);
+
+        status = f_string_dynamic_append(test_values[i], &source.array[source.used].array[i].value);
+
+        assert_int_equal(status, F_none);
+        assert_string_equal(source.array[source.used].array[i].value.string, test_values[i].string);
+        assert_int_equal(source.array[source.used].array[i].value.used, test_values[i].used);
+      } // for
+
+      source.array[source.used].used = length_inner;
+    } // for
+  }
+
+  {
+    const f_status_t status = f_string_mapss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+
+    for (f_array_length_t j = 0; j < length_outer; ++j) {
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+
+        assert_int_equal(destination.array[j].array[i].name.used, test_names[i].used);
+        assert_int_equal(destination.array[j].array[i].value.used, test_values[i].used);
+
+        assert_string_equal(destination.array[j].array[i].name.string, test_names[i].string);
+        assert_string_equal(destination.array[j].array[i].value.string, test_values[i].string);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t j = 0; j < source.used; ++j) {
+
+    for (f_array_length_t i = 0; i < source.array[j].used; ++i) {
+
+      free((void *) source.array[j].array[i].name.string);
+      free((void *) source.array[j].array[i].value.string);
+    } // for
+
+    free((void *) source.array[j].array);
+  } // for
+
+  for (f_array_length_t j = 0; j < destination.used; ++j) {
+
+    for (f_array_length_t i = 0; i < destination.array[j].used; ++i) {
+
+      free((void *) destination.array[j].array[i].name.string);
+      free((void *) destination.array[j].array[i].value.string);
+    } // for
+
+    free((void *) destination.array[j].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_string_mapss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_mapss_t source = f_string_mapss_t_initialize;
+  f_string_mapss_t destination = f_string_mapss_t_initialize;
+
+  {
+    const f_status_t status = f_string_mapss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_mapss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_mapss_append_all__parameter_checking(void **state) {
+
+  const f_string_mapss_t data = f_string_mapss_t_initialize;
+
+  {
+    const f_status_t status = f_string_mapss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-mapss_append_all.h b/level_0/f_string/tests/unit/c/test-string-mapss_append_all.h
new file mode 100644 (file)
index 0000000..9ef0fb9
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_mapss_append_all_h
+#define _TEST__F_string_mapss_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_mapss_append_all()
+ */
+extern void test__f_string_mapss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_mapss_append_all()
+ */
+extern void test__f_string_mapss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_mapss_append_all()
+ */
+extern void test__f_string_mapss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_mapss_append_all_h
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
new file mode 100644 (file)
index 0000000..7058683
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..41796e6
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..1af9f57
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..05900c4
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_increase.c b/level_0/f_string/tests/unit/c/test-string-mapss_increase.c
new file mode 100644 (file)
index 0000000..60cfccc
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..37f3aa8
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..b208f85
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..697e5e2
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..bf99ffe
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..b12feda
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
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
new file mode 100644 (file)
index 0000000..cb9562f
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..ef22e01
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_append.c b/level_0/f_string/tests/unit/c/test-string-quantitys_append.c
new file mode 100644 (file)
index 0000000..61101fb
--- /dev/null
@@ -0,0 +1,38 @@
+#include "test-string.h"
+#include "test-string-quantitys_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_quantitys_append__works(void **state) {
+
+  const f_string_quantity_t source = macro_f_string_quantity_t_initialize(1, 2);
+  f_string_quantitys_t destination = f_string_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantitys_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].start, source.start);
+    assert_int_equal(destination.array[0].total, source.total);
+  }
+
+  free((void *) destination.array);
+}
+
+void test__f_string_quantitys_append__parameter_checking(void **state) {
+
+  const f_string_quantity_t data = f_string_quantity_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantitys_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_append.h b/level_0/f_string/tests/unit/c/test-string-quantitys_append.h
new file mode 100644 (file)
index 0000000..34bf1f8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_quantitys_append_h
+#define _TEST__F_string_quantitys_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_quantitys_append()
+ */
+extern void test__f_string_quantitys_append__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_quantitys_append()
+ */
+extern void test__f_string_quantitys_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_quantitys_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c b/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c
new file mode 100644 (file)
index 0000000..5d761c5
--- /dev/null
@@ -0,0 +1,77 @@
+#include "test-string.h"
+#include "test-string-quantitys_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_quantitys_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_sources = 2;
+
+  f_string_quantity_t sources_array[] = {
+    macro_f_string_quantity_t_initialize(1, 2),
+    macro_f_string_quantity_t_initialize(3, 4),
+  };
+
+  const f_string_quantitys_t source = macro_f_string_quantitys_t_initialize(sources_array, 0, length_sources);
+  f_string_quantitys_t destination = f_string_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantitys_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < length_sources; ++i) {
+
+      assert_int_equal(destination.array[i].start, source.array[i].start);
+      assert_int_equal(destination.array[i].total, source.array[i].total);
+    } // for
+  }
+
+  free((void *) destination.array);
+}
+
+void test__f_string_quantitys_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_quantitys_t source = f_string_quantitys_t_initialize;
+  f_string_quantitys_t destination = f_string_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantitys_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_quantitys_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_quantitys_append_all__parameter_checking(void **state) {
+
+  const f_string_quantitys_t data = f_string_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantitys_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.h b/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.h
new file mode 100644 (file)
index 0000000..d79e2e2
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_quantitys_append_all_h
+#define _TEST__F_string_quantitys_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_quantitys_append_all()
+ */
+extern void test__f_string_quantitys_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_quantitys_append_all()
+ */
+extern void test__f_string_quantitys_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_quantitys_append_all()
+ */
+extern void test__f_string_quantitys_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_quantitys_append_all_h
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
new file mode 100644 (file)
index 0000000..f83ab49
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..c691a9f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..fe517a0
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..f867bee
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..c319869
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..7631810
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..6e77fc4
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..02e9da1
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..76bd355
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..bc764bd
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..cbaa424
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..7a1f6b8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_append.c b/level_0/f_string/tests/unit/c/test-string-quantityss_append.c
new file mode 100644 (file)
index 0000000..ff8ee23
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-string.h"
+#include "test-string-quantityss_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_quantityss_append__works(void **state) {
+
+  const int length_sources = 2;
+
+  f_string_quantity_t sources_array[] = {
+    macro_f_string_quantity_t_initialize(1, 2),
+    macro_f_string_quantity_t_initialize(3, 4),
+  };
+
+  const f_string_quantitys_t source = macro_f_string_quantitys_t_initialize(sources_array, 0, length_sources);
+  f_string_quantityss_t destination = f_string_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantityss_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.array[0].used, length_sources);
+
+    for (f_array_length_t i = 0; i < length_sources; ++i) {
+
+      assert_int_equal(destination.array[0].array[i].start, sources_array[i].start);
+      assert_int_equal(destination.array[0].array[i].total, sources_array[i].total);
+    } // for
+  }
+
+  free((void *) destination.array[0].array);
+  free((void *) destination.array);
+}
+
+void test__f_string_quantityss_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_quantitys_t source = f_string_quantityss_t_initialize;
+  f_string_quantityss_t destination = f_string_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantitys_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_quantityss_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_quantityss_append__parameter_checking(void **state) {
+
+  f_string_quantitys_t data = f_string_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantityss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_append.h b/level_0/f_string/tests/unit/c/test-string-quantityss_append.h
new file mode 100644 (file)
index 0000000..72a7f25
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_quantityss_append_h
+#define _TEST__F_string_quantityss_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_quantityss_append()
+ */
+extern void test__f_string_quantityss_append__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_quantityss_append()
+ */
+extern void test__f_string_quantityss_append__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_quantityss_append()
+ */
+extern void test__f_string_quantityss_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_quantityss_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_append_all.c b/level_0/f_string/tests/unit/c/test-string-quantityss_append_all.c
new file mode 100644 (file)
index 0000000..17c0174
--- /dev/null
@@ -0,0 +1,93 @@
+#include "test-string.h"
+#include "test-string-quantityss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_quantityss_append_all__works(void **state) {
+
+  const int length_sources = 2;
+  const int length_sources_set = 2;
+
+  f_string_quantity_t sources_array1[] = {
+    macro_f_string_quantity_t_initialize(1, 2),
+    macro_f_string_quantity_t_initialize(3, 4),
+  };
+
+  f_string_quantity_t sources_array2[] = {
+    macro_f_string_quantity_t_initialize(5, 6),
+    macro_f_string_quantity_t_initialize(7, 8),
+  };
+
+  f_string_quantitys_t sources_set_array[] = {
+    macro_f_string_quantitys_t_initialize(sources_array1, 0, length_sources),
+    macro_f_string_quantitys_t_initialize(sources_array2, 0, length_sources),
+  };
+
+  const f_string_quantityss_t source = macro_f_string_quantityss_t_initialize(sources_set_array, 0, length_sources_set);
+  f_string_quantityss_t destination = f_string_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantityss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+
+    for (f_array_length_t j = 0; j < length_sources_set; ++j) {
+
+      for (f_array_length_t i = 0; i < length_sources; ++i) {
+
+        assert_int_equal(destination.array[j].array[i].start, sources_set_array[j].array[i].start);
+        assert_int_equal(destination.array[j].array[i].total, sources_set_array[j].array[i].total);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) destination.array);
+}
+
+void test__f_string_quantityss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_quantityss_t source = f_string_quantityss_t_initialize;
+  f_string_quantityss_t destination = f_string_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantityss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_quantityss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_quantityss_append_all__parameter_checking(void **state) {
+
+  const f_string_quantityss_t data = f_string_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_string_quantityss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_append_all.h b/level_0/f_string/tests/unit/c/test-string-quantityss_append_all.h
new file mode 100644 (file)
index 0000000..edd12ee
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_quantityss_append_all_h
+#define _TEST__F_string_quantityss_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_quantityss_append_all()
+ */
+extern void test__f_string_quantityss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_quantityss_append_all()
+ */
+extern void test__f_string_quantityss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_quantityss_append_all()
+ */
+extern void test__f_string_quantityss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_quantityss_append_all_h
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
new file mode 100644 (file)
index 0000000..cf1d197
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..2ea5057
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..99e87b6
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..cbce24f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_increase.c b/level_0/f_string/tests/unit/c/test-string-quantityss_increase.c
new file mode 100644 (file)
index 0000000..bf108ad
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..505a80b
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..7ef6cfc
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..0dc61ad
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..e4cb92a
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..202dfd9
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..3c8b05d
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..66ed77f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_append.c b/level_0/f_string/tests/unit/c/test-string-ranges_append.c
new file mode 100644 (file)
index 0000000..b126fb0
--- /dev/null
@@ -0,0 +1,39 @@
+#include "test-string.h"
+#include "test-string-ranges_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_ranges_append__works(void **state) {
+
+  const f_array_length_t length = 5;
+  const f_string_range_t source = macro_f_string_range_t_initialize(1, 2);
+  f_string_ranges_t destination = f_string_ranges_t_initialize;
+
+  {
+    const f_status_t status = f_string_ranges_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].start, source.start);
+    assert_int_equal(destination.array[0].stop, source.stop);
+  }
+
+  free((void *) destination.array);
+}
+
+void test__f_string_ranges_append__parameter_checking(void **state) {
+
+  const f_string_range_t data = f_string_range_t_initialize;
+
+  {
+    const f_status_t status = f_string_ranges_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_append.h b/level_0/f_string/tests/unit/c/test-string-ranges_append.h
new file mode 100644 (file)
index 0000000..13217c8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_ranges_append_h
+#define _TEST__F_string_ranges_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_ranges_append()
+ */
+extern void test__f_string_ranges_append__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_ranges_append()
+ */
+extern void test__f_string_ranges_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_ranges_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_append_all.c b/level_0/f_string/tests/unit/c/test-string-ranges_append_all.c
new file mode 100644 (file)
index 0000000..733848f
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-string.h"
+#include "test-string-ranges_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_ranges_append_all__works(void **state) {
+
+  const int length_sources = 2;
+
+  f_string_range_t sources_array[] = {
+    macro_f_string_range_t_initialize(1, 2),
+    macro_f_string_range_t_initialize(3, 4),
+  };
+
+  const f_string_ranges_t source = macro_f_string_ranges_t_initialize(sources_array, 0, length_sources);
+  f_string_ranges_t destination = f_string_ranges_t_initialize;
+
+  {
+    const f_status_t status = f_string_ranges_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < length_sources; ++i) {
+
+      assert_int_equal(destination.array[i].start, source.array[i].start);
+      assert_int_equal(destination.array[i].stop, source.array[i].stop);
+    } // for
+  }
+
+  free((void *) destination.array);
+}
+
+void test__f_string_ranges_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_ranges_t source = f_string_ranges_t_initialize;
+  f_string_ranges_t destination = f_string_ranges_t_initialize;
+
+  {
+    const f_status_t status = f_string_ranges_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_ranges_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_ranges_append_all__parameter_checking(void **state) {
+
+  const f_string_ranges_t data = f_string_ranges_t_initialize;
+
+  {
+    const f_status_t status = f_string_ranges_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-ranges_append_all.h b/level_0/f_string/tests/unit/c/test-string-ranges_append_all.h
new file mode 100644 (file)
index 0000000..7fb7310
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_ranges_append_all_h
+#define _TEST__F_string_ranges_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_ranges_append_all()
+ */
+extern void test__f_string_ranges_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_ranges_append_all()
+ */
+extern void test__f_string_ranges_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_ranges_append_all()
+ */
+extern void test__f_string_ranges_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_ranges_append_all_h
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
new file mode 100644 (file)
index 0000000..624857b
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..064bdb4
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..7ff01c5
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..8c45530
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..220e7c7
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..1746e7c
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..4034fcb
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..8c3a5de
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..1bc2660
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..7b68c77
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..e1bd333
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..186b872
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_append.c b/level_0/f_string/tests/unit/c/test-string-rangess_append.c
new file mode 100644 (file)
index 0000000..0af7459
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-string.h"
+#include "test-string-rangess_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_rangess_append__works(void **state) {
+
+  const int length_sources = 2;
+
+  f_string_range_t sources_array[] = {
+    macro_f_string_range_t_initialize(1, 2),
+    macro_f_string_range_t_initialize(3, 4),
+  };
+
+  const f_string_ranges_t source = macro_f_string_ranges_t_initialize(sources_array, 0, length_sources);
+  f_string_rangess_t destination = f_string_rangess_t_initialize;
+
+  {
+    const f_status_t status = f_string_rangess_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.array[0].used, length_sources);
+
+    for (f_array_length_t i = 0; i < length_sources; ++i) {
+
+      assert_int_equal(destination.array[0].array[i].start, sources_array[i].start);
+      assert_int_equal(destination.array[0].array[i].stop, sources_array[i].stop);
+    } // for
+  }
+
+  free((void *) destination.array[0].array);
+  free((void *) destination.array);
+}
+
+void test__f_string_rangess_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_ranges_t source = f_string_rangess_t_initialize;
+  f_string_rangess_t destination = f_string_rangess_t_initialize;
+
+  {
+    const f_status_t status = f_string_ranges_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_rangess_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_rangess_append__parameter_checking(void **state) {
+
+  f_string_ranges_t data = f_string_ranges_t_initialize;
+
+  {
+    const f_status_t status = f_string_rangess_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_append.h b/level_0/f_string/tests/unit/c/test-string-rangess_append.h
new file mode 100644 (file)
index 0000000..b6c910f
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_rangess_append_h
+#define _TEST__F_string_rangess_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_rangess_append()
+ */
+extern void test__f_string_rangess_append__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_rangess_append()
+ */
+extern void test__f_string_rangess_append__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_rangess_append()
+ */
+extern void test__f_string_rangess_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_rangess_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_append_all.c b/level_0/f_string/tests/unit/c/test-string-rangess_append_all.c
new file mode 100644 (file)
index 0000000..25a4f8e
--- /dev/null
@@ -0,0 +1,93 @@
+#include "test-string.h"
+#include "test-string-rangess_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_rangess_append_all__works(void **state) {
+
+  const int length_sources = 2;
+  const int length_sources_set = 2;
+
+  f_string_range_t sources_array1[] = {
+    macro_f_string_range_t_initialize(1, 2),
+    macro_f_string_range_t_initialize(3, 4),
+  };
+
+  f_string_range_t sources_array2[] = {
+    macro_f_string_range_t_initialize(5, 6),
+    macro_f_string_range_t_initialize(7, 8),
+  };
+
+  f_string_ranges_t sources_set_array[] = {
+    macro_f_string_ranges_t_initialize(sources_array1, 0, length_sources),
+    macro_f_string_ranges_t_initialize(sources_array2, 0, length_sources),
+  };
+
+  const f_string_rangess_t source = macro_f_string_rangess_t_initialize(sources_set_array, 0, length_sources_set);
+  f_string_rangess_t destination = f_string_rangess_t_initialize;
+
+  {
+    const f_status_t status = f_string_rangess_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+
+    for (f_array_length_t j = 0; j < length_sources_set; ++j) {
+
+      for (f_array_length_t i = 0; i < length_sources; ++i) {
+
+        assert_int_equal(destination.array[j].array[i].start, sources_set_array[j].array[i].start);
+        assert_int_equal(destination.array[j].array[i].stop, sources_set_array[j].array[i].stop);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) destination.array);
+}
+
+void test__f_string_rangess_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_rangess_t source = f_string_rangess_t_initialize;
+  f_string_rangess_t destination = f_string_rangess_t_initialize;
+
+  {
+    const f_status_t status = f_string_rangess_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_rangess_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_rangess_append_all__parameter_checking(void **state) {
+
+  const f_string_rangess_t data = f_string_rangess_t_initialize;
+
+  {
+    const f_status_t status = f_string_rangess_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-rangess_append_all.h b/level_0/f_string/tests/unit/c/test-string-rangess_append_all.h
new file mode 100644 (file)
index 0000000..62f0abc
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_rangess_append_all_h
+#define _TEST__F_string_rangess_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_rangess_append_all()
+ */
+extern void test__f_string_rangess_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_rangess_append_all()
+ */
+extern void test__f_string_rangess_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_rangess_append_all()
+ */
+extern void test__f_string_rangess_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_rangess_append_all_h
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
new file mode 100644 (file)
index 0000000..5b5fd75
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..1d84604
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..1562f87
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..6eda626
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_increase.c b/level_0/f_string/tests/unit/c/test-string-rangess_increase.c
new file mode 100644 (file)
index 0000000..5b7c054
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..292798d
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..4ca9b58
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..f97a74e
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..a199759
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..dd3c4e0
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
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
new file mode 100644 (file)
index 0000000..dc0a159
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..03e6031
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_append.c b/level_0/f_string/tests/unit/c/test-string-triples_append.c
new file mode 100644 (file)
index 0000000..a593ff6
--- /dev/null
@@ -0,0 +1,50 @@
+#include "test-string.h"
+#include "test-string-triples_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_triples_append__works(void **state) {
+
+  const f_string_static_t test_a = macro_f_string_static_t_initialize("a", 0, 1);
+  const f_string_static_t test_b = macro_f_string_static_t_initialize("b", 0, 1);
+  const f_string_static_t test_c = macro_f_string_static_t_initialize("c", 0, 1);
+
+  const f_string_triple_t source = macro_f_string_triple_t_initialize(test_a, test_b, test_c);
+  f_string_triples_t destination = f_string_triples_t_initialize;
+
+  {
+    const f_status_t status = f_string_triples_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].a.used, source.a.used);
+    assert_int_equal(destination.array[0].b.used, source.b.used);
+    assert_int_equal(destination.array[0].c.used, source.c.used);
+
+    assert_string_equal(destination.array[0].a.string, source.a.string);
+    assert_string_equal(destination.array[0].b.string, source.b.string);
+    assert_string_equal(destination.array[0].c.string, source.c.string);
+  }
+
+  free((void *) destination.array[0].a.string);
+  free((void *) destination.array[0].b.string);
+  free((void *) destination.array[0].c.string);
+  free((void *) destination.array);
+}
+
+void test__f_string_triples_append__parameter_checking(void **state) {
+
+  const f_string_triple_t data = f_string_triple_t_initialize;
+
+  {
+    const f_status_t status = f_string_triples_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_append.h b/level_0/f_string/tests/unit/c/test-string-triples_append.h
new file mode 100644 (file)
index 0000000..166be5b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_triples_append_h
+#define _TEST__F_string_triples_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_triples_append()
+ */
+extern void test__f_string_triples_append__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_triples_append()
+ */
+extern void test__f_string_triples_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_triples_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_append_all.c b/level_0/f_string/tests/unit/c/test-string-triples_append_all.c
new file mode 100644 (file)
index 0000000..f62e0e3
--- /dev/null
@@ -0,0 +1,96 @@
+#include "test-string.h"
+#include "test-string-triples_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_triples_append_all__works(void **state) {
+
+  const int length_sources = 2;
+
+  const f_string_static_t test_a = macro_f_string_static_t_initialize("a", 0, 1);
+  const f_string_static_t test_b = macro_f_string_static_t_initialize("b", 0, 1);
+  const f_string_static_t test_c = macro_f_string_static_t_initialize("c", 0, 1);
+
+  const f_string_static_t test_d = macro_f_string_static_t_initialize("d", 0, 1);
+  const f_string_static_t test_e = macro_f_string_static_t_initialize("e", 0, 1);
+  const f_string_static_t test_f = macro_f_string_static_t_initialize("f", 0, 1);
+
+  f_string_triple_t sources_array[] = {
+    macro_f_string_triple_t_initialize(test_a, test_b, test_c),
+    macro_f_string_triple_t_initialize(test_d, test_e, test_f),
+  };
+
+  const f_string_triples_t source = macro_f_string_triples_t_initialize(sources_array, 0, length_sources);
+  f_string_triples_t destination = f_string_triples_t_initialize;
+
+  {
+    const f_status_t status = f_string_triples_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < length_sources; ++i) {
+
+      assert_int_equal(destination.array[i].a.used, source.array[i].a.used);
+      assert_int_equal(destination.array[i].b.used, source.array[i].b.used);
+      assert_int_equal(destination.array[i].c.used, source.array[i].c.used);
+
+      assert_string_equal(destination.array[i].a.string, source.array[i].a.string);
+      assert_string_equal(destination.array[i].b.string, source.array[i].b.string);
+      assert_string_equal(destination.array[i].c.string, source.array[i].c.string);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+    free((void *) destination.array[i].a.string);
+    free((void *) destination.array[i].b.string);
+    free((void *) destination.array[i].c.string);
+  } // for
+
+  free((void *) destination.array);
+}
+
+void test__f_string_triples_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_triples_t source = f_string_triples_t_initialize;
+  f_string_triples_t destination = f_string_triples_t_initialize;
+
+  {
+    const f_status_t status = f_string_triples_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_triples_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_triples_append_all__parameter_checking(void **state) {
+
+  const f_string_triples_t data = f_string_triples_t_initialize;
+
+  {
+    const f_status_t status = f_string_triples_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-triples_append_all.h b/level_0/f_string/tests/unit/c/test-string-triples_append_all.h
new file mode 100644 (file)
index 0000000..a8b2317
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_triples_append_all_h
+#define _TEST__F_string_triples_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_triples_append_all()
+ */
+extern void test__f_string_triples_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_triples_append_all()
+ */
+extern void test__f_string_triples_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_triples_append_all()
+ */
+extern void test__f_string_triples_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_triples_append_all_h
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
new file mode 100644 (file)
index 0000000..252970f
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..ac4f00a
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..a40a6fd
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..5d105a4
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_increase.c b/level_0/f_string/tests/unit/c/test-string-triples_increase.c
new file mode 100644 (file)
index 0000000..850ef10
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..c33997c
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..ba44462
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..473ba1d
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..b249fe1
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..d4d59f5
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..ed99162
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..c1df06e
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_append.c b/level_0/f_string/tests/unit/c/test-string-tripless_append.c
new file mode 100644 (file)
index 0000000..4bca45e
--- /dev/null
@@ -0,0 +1,96 @@
+#include "test-string.h"
+#include "test-string-tripless_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_tripless_append__works(void **state) {
+
+  const int length_sources = 2;
+
+  const f_string_static_t test_a = macro_f_string_static_t_initialize("a", 0, 1);
+  const f_string_static_t test_b = macro_f_string_static_t_initialize("b", 0, 1);
+  const f_string_static_t test_c = macro_f_string_static_t_initialize("c", 0, 1);
+
+  const f_string_static_t test_d = macro_f_string_static_t_initialize("d", 0, 1);
+  const f_string_static_t test_e = macro_f_string_static_t_initialize("e", 0, 1);
+  const f_string_static_t test_f = macro_f_string_static_t_initialize("f", 0, 1);
+
+  f_string_triple_t sources_array[] = {
+    macro_f_string_triple_t_initialize(test_a, test_b, test_c),
+    macro_f_string_triple_t_initialize(test_d, test_e, test_f),
+  };
+
+  const f_string_triples_t source = macro_f_string_triples_t_initialize(sources_array, 0, length_sources);
+  f_string_tripless_t destination = f_string_tripless_t_initialize;
+
+  {
+    const f_status_t status = f_string_tripless_append(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.array[0].used, length_sources);
+
+    for (f_array_length_t i = 0; i < length_sources; ++i) {
+
+      assert_int_equal(destination.array[0].array[i].a.used, sources_array[i].a.used);
+      assert_int_equal(destination.array[0].array[i].b.used, sources_array[i].b.used);
+      assert_int_equal(destination.array[0].array[i].c.used, sources_array[i].c.used);
+
+      assert_string_equal(destination.array[0].array[i].a.string, sources_array[i].a.string);
+      assert_string_equal(destination.array[0].array[i].b.string, sources_array[i].b.string);
+      assert_string_equal(destination.array[0].array[i].c.string, sources_array[i].c.string);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+
+    free((void *) destination.array[0].array[i].a.string);
+    free((void *) destination.array[0].array[i].b.string);
+    free((void *) destination.array[0].array[i].c.string);
+  } // for
+
+  free((void *) destination.array[0].array);
+  free((void *) destination.array);
+}
+
+void test__f_string_tripless_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_triples_t source = f_string_tripless_t_initialize;
+  f_string_tripless_t destination = f_string_tripless_t_initialize;
+
+  {
+    const f_status_t status = f_string_triples_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_tripless_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_tripless_append__parameter_checking(void **state) {
+
+  f_string_triples_t data = f_string_triples_t_initialize;
+
+  {
+    const f_status_t status = f_string_tripless_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_append.h b/level_0/f_string/tests/unit/c/test-string-tripless_append.h
new file mode 100644 (file)
index 0000000..bf0eae5
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_tripless_append_h
+#define _TEST__F_string_tripless_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_tripless_append()
+ */
+extern void test__f_string_tripless_append__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_tripless_append()
+ */
+extern void test__f_string_tripless_append__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_tripless_append()
+ */
+extern void test__f_string_tripless_append__parameter_checking(void **state);
+
+#endif // _TEST__F_string_tripless_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_append_all.c b/level_0/f_string/tests/unit/c/test-string-tripless_append_all.c
new file mode 100644 (file)
index 0000000..e657a4c
--- /dev/null
@@ -0,0 +1,122 @@
+#include "test-string.h"
+#include "test-string-tripless_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_string_tripless_append_all__works(void **state) {
+
+  const int length_sources = 2;
+  const int length_sources_set = 2;
+
+  const f_string_static_t test_a = macro_f_string_static_t_initialize("a", 0, 1);
+  const f_string_static_t test_b = macro_f_string_static_t_initialize("b", 0, 1);
+  const f_string_static_t test_c = macro_f_string_static_t_initialize("c", 0, 1);
+
+  const f_string_static_t test_d = macro_f_string_static_t_initialize("d", 0, 1);
+  const f_string_static_t test_e = macro_f_string_static_t_initialize("e", 0, 1);
+  const f_string_static_t test_f = macro_f_string_static_t_initialize("f", 0, 1);
+
+  const f_string_static_t test_g = macro_f_string_static_t_initialize("g", 0, 1);
+  const f_string_static_t test_h = macro_f_string_static_t_initialize("h", 0, 1);
+  const f_string_static_t test_i = macro_f_string_static_t_initialize("i", 0, 1);
+
+  const f_string_static_t test_j = macro_f_string_static_t_initialize("j", 0, 1);
+  const f_string_static_t test_k = macro_f_string_static_t_initialize("k", 0, 1);
+  const f_string_static_t test_l = macro_f_string_static_t_initialize("l", 0, 1);
+
+  f_string_triple_t sources_array1[] = {
+    macro_f_string_triple_t_initialize(test_a, test_b, test_c),
+    macro_f_string_triple_t_initialize(test_d, test_e, test_f),
+  };
+
+  f_string_triple_t sources_array2[] = {
+    macro_f_string_triple_t_initialize(test_g, test_h, test_i),
+    macro_f_string_triple_t_initialize(test_j, test_k, test_l),
+  };
+
+  f_string_triples_t sources_set_array[] = {
+    macro_f_string_triples_t_initialize(sources_array1, 0, length_sources),
+    macro_f_string_triples_t_initialize(sources_array2, 0, length_sources),
+  };
+
+  const f_string_tripless_t source = macro_f_string_tripless_t_initialize(sources_set_array, 0, length_sources_set);
+  f_string_tripless_t destination = f_string_tripless_t_initialize;
+
+  {
+    const f_status_t status = f_string_tripless_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+
+    for (f_array_length_t j = 0; j < length_sources_set; ++j) {
+
+      for (f_array_length_t i = 0; i < length_sources; ++i) {
+
+        assert_int_equal(destination.array[j].array[i].a.used, sources_set_array[j].array[i].a.used);
+        assert_int_equal(destination.array[j].array[i].b.used, sources_set_array[j].array[i].b.used);
+        assert_int_equal(destination.array[j].array[i].c.used, sources_set_array[j].array[i].c.used);
+
+        assert_string_equal(destination.array[j].array[i].a.string, sources_set_array[j].array[i].a.string);
+        assert_string_equal(destination.array[j].array[i].b.string, sources_set_array[j].array[i].b.string);
+        assert_string_equal(destination.array[j].array[i].c.string, sources_set_array[j].array[i].c.string);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t j = 0; j < destination.used; ++j) {
+
+    for (f_array_length_t i = 0; i < destination.array[j].used; ++i) {
+
+      free((void *) destination.array[j].array[i].a.string);
+      free((void *) destination.array[j].array[i].b.string);
+      free((void *) destination.array[j].array[i].c.string);
+    } // for
+
+    free((void *) destination.array[j].array);
+  } // for
+
+  free((void *) destination.array);
+}
+
+void test__f_string_tripless_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_string_tripless_t source = f_string_tripless_t_initialize;
+  f_string_tripless_t destination = f_string_tripless_t_initialize;
+
+  {
+    const f_status_t status = f_string_tripless_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_string_tripless_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_string_tripless_append_all__parameter_checking(void **state) {
+
+  const f_string_tripless_t data = f_string_tripless_t_initialize;
+
+  {
+    const f_status_t status = f_string_tripless_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-tripless_append_all.h b/level_0/f_string/tests/unit/c/test-string-tripless_append_all.h
new file mode 100644 (file)
index 0000000..300ab8a
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_string_tripless_append_all_h
+#define _TEST__F_string_tripless_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_string_tripless_append_all()
+ */
+extern void test__f_string_tripless_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_string_tripless_append_all()
+ */
+extern void test__f_string_tripless_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_string_tripless_append_all()
+ */
+extern void test__f_string_tripless_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_string_tripless_append_all_h
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
new file mode 100644 (file)
index 0000000..cb7fe80
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..bd71647
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..0e47248
--- /dev/null
@@ -0,0 +1,50 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..7a03b8b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_increase.c b/level_0/f_string/tests/unit/c/test-string-tripless_increase.c
new file mode 100644 (file)
index 0000000..9d65e02
--- /dev/null
@@ -0,0 +1,76 @@
+#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_none);
+    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_none);
+    assert_int_equal(data.used, length);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
+  }
+
+  free((void *) data.array);
+}
+
+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_none);
+    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
new file mode 100644 (file)
index 0000000..43283e5
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..fc8d3e6
--- /dev/null
@@ -0,0 +1,52 @@
+#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_none);
+    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_none);
+    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
new file mode 100644 (file)
index 0000000..1f7983b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
new file mode 100644 (file)
index 0000000..142d886
--- /dev/null
@@ -0,0 +1,42 @@
+#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_none);
+    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
new file mode 100644 (file)
index 0000000..166d681
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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
diff --git a/level_0/f_string/tests/unit/c/test-string.c b/level_0/f_string/tests/unit/c/test-string.c
new file mode 100644 (file)
index 0000000..1508cd3
--- /dev/null
@@ -0,0 +1,276 @@
+#include "test-string.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int setup(void **state) {
+
+  return 0;
+}
+
+int setdown(void **state) {
+
+  errno = 0;
+
+  return 0;
+}
+
+int main(void) {
+
+  const struct CMUnitTest tests[] = {
+    cmocka_unit_test(test__f_string_dynamics_adjust__works),
+    cmocka_unit_test(test__f_string_dynamics_append__works),
+    cmocka_unit_test(test__f_string_dynamics_append_all__works),
+    cmocka_unit_test(test__f_string_dynamics_append_all__returns_data_not),
+    cmocka_unit_test(test__f_string_dynamics_decimate_by__works),
+    cmocka_unit_test(test__f_string_dynamics_decrease_by__works),
+    cmocka_unit_test(test__f_string_dynamics_increase__works),
+    cmocka_unit_test(test__f_string_dynamics_increase__returns_data_not),
+    cmocka_unit_test(test__f_string_dynamics_increase_by__works),
+    cmocka_unit_test(test__f_string_dynamics_resize__works),
+
+    cmocka_unit_test(test__f_string_dynamicss_adjust__works),
+    cmocka_unit_test(test__f_string_dynamicss_append__works),
+    cmocka_unit_test(test__f_string_dynamicss_append__returns_data_not),
+    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_dynamicss_decimate_by__works),
+    cmocka_unit_test(test__f_string_dynamicss_decrease_by__works),
+    cmocka_unit_test(test__f_string_dynamicss_increase__works),
+    cmocka_unit_test(test__f_string_dynamicss_increase__returns_data_not),
+    cmocka_unit_test(test__f_string_dynamicss_increase_by__works),
+    cmocka_unit_test(test__f_string_dynamicss_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_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_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),
+
+    #ifndef _di_level_0_parameter_checking_
+      cmocka_unit_test(test__f_string_dynamics_adjust__parameter_checking),
+      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_dynamics_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_string_dynamics_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_string_dynamics_increase__parameter_checking),
+      cmocka_unit_test(test__f_string_dynamics_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_string_dynamics_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_string_dynamicss_adjust__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_dynamicss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_string_dynamicss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_string_dynamicss_increase__parameter_checking),
+      cmocka_unit_test(test__f_string_dynamicss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_string_dynamicss_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_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_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),
+    #endif // _di_level_0_parameter_checking_
+  };
+
+  return cmocka_run_group_tests(tests, setup, setdown);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_string/tests/unit/c/test-string.h b/level_0/f_string/tests/unit/c/test-string.h
new file mode 100644 (file)
index 0000000..ac58762
--- /dev/null
@@ -0,0 +1,167 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: String
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the string project.
+ */
+#ifndef _TEST__F_string_h
+#define _TEST__F_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>
+
+// Mock includes.
+//#include "mock-string.h"
+
+// Test includes.
+#include "test-string-dynamics_adjust.h"
+#include "test-string-dynamics_append.h"
+#include "test-string-dynamics_append_all.h"
+#include "test-string-dynamics_decimate_by.h"
+#include "test-string-dynamics_decrease_by.h"
+#include "test-string-dynamics_increase.h"
+#include "test-string-dynamics_increase_by.h"
+#include "test-string-dynamics_resize.h"
+#include "test-string-dynamicss_adjust.h"
+#include "test-string-dynamicss_append.h"
+#include "test-string-dynamicss_append_all.h"
+#include "test-string-dynamicss_decimate_by.h"
+#include "test-string-dynamicss_decrease_by.h"
+#include "test-string-dynamicss_increase.h"
+#include "test-string-dynamicss_increase_by.h"
+#include "test-string-dynamicss_resize.h"
+#include "test-string-maps_adjust.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-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-map_multis_adjust.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_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-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-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-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-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"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Perform any setup operations.
+ *
+ * @param state
+ *   The test state.
+ *
+ * @return
+ *   The status of this function, where 0 means success.
+ */
+extern int setup(void **state);
+
+/**
+ * Peform any setdown operations.
+ *
+ * @param state
+ *   The test state.
+ *
+ * @return
+ *   The status of this function, where 0 means success.
+ */
+extern int setdown(void **state);
+
+/**
+ * Run all tests.
+ *
+ * @return
+ *   The final result of the tests.
+ *
+ * @see cmocka_run_group_tests()
+ * @see cmocka_unit_test()
+ */
+extern int main(void);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _TEST__F_string_h
index 8336058ab0c0e47a9ce34d3785f9cb5ce0b21869..98d163cfe12169ad2e4e09036d5b62e1ac80b70a 100644 (file)
@@ -29,16 +29,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(attributes->size, length, sizeof(f_thread_attribute_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_attributes_adjust_) || !defined(_di_f_thread_attributes_decimate_by_)
 
@@ -53,16 +52,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(attributes->size, length, sizeof(f_thread_attribute_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_attributes_decrease_) || !defined(_di_f_thread_attributes_decrease_by_) || !defined(_di_f_thread_attributes_increase_) || !defined(_di_f_thread_attributes_increase_by_)
 
@@ -90,16 +88,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(barriers->size, length, sizeof(f_thread_barrier_t), (void **) & barriers->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      barriers->size = length;
+    barriers->size = length;
 
-      if (barriers->used > barriers->size) {
-        barriers->used = length;
-      }
+    if (barriers->used > barriers->size) {
+      barriers->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_)
 
@@ -114,16 +111,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(barriers->size, length, sizeof(f_thread_barrier_t), (void **) & barriers->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      barriers->size = length;
+    barriers->size = length;
 
-      if (barriers->used > barriers->size) {
-        barriers->used = length;
-      }
+    if (barriers->used > barriers->size) {
+      barriers->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_barriers_decrease_) || !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_)
 
@@ -151,16 +147,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(attributes->size, length, sizeof(f_thread_barrier_attribute_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_)
 
@@ -175,16 +170,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(attributes->size, length, sizeof(f_thread_barrier_attribute_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_barrier_attributes_decrease_) || !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_)
 
@@ -215,16 +209,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(attributes->size, length, sizeof(f_thread_condition_attribute_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_)
 
@@ -239,16 +232,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(attributes->size, length, sizeof(f_thread_condition_attribute_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_condition_attributes_decrease_) || !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_)
 
@@ -279,16 +271,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(conditions->size, length, sizeof(f_thread_condition_t), (void **) & conditions->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      conditions->size = length;
+    conditions->size = length;
 
-      if (conditions->used > conditions->size) {
-        conditions->used = length;
-      }
+    if (conditions->used > conditions->size) {
+      conditions->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_)
 
@@ -303,16 +294,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(conditions->size, length, sizeof(f_thread_condition_t), (void **) & conditions->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      conditions->size = length;
+    conditions->size = length;
 
-      if (conditions->used > conditions->size) {
-        conditions->used = length;
-      }
+    if (conditions->used > conditions->size) {
+      conditions->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_conditions_decrease_) || !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_)
 
@@ -340,16 +330,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(keys->size, length, sizeof(f_thread_key_t), (void **) & keys->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      keys->size = length;
+    keys->size = length;
 
-      if (keys->used > keys->size) {
-        keys->used = length;
-      }
+    if (keys->used > keys->size) {
+      keys->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_keys_adjust_) || !defined(_di_f_thread_keys_decimate_by_)
 
@@ -364,16 +353,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(keys->size, length, sizeof(f_thread_key_t), (void **) & keys->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      keys->size = length;
+    keys->size = length;
 
-      if (keys->used > keys->size) {
-        keys->used = length;
-      }
+    if (keys->used > keys->size) {
+      keys->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_keys_decrease_) || !defined(_di_f_thread_keys_decrease_by_) || !defined(_di_f_thread_keys_increase_) || !defined(_di_f_thread_keys_increase_by_)
 
@@ -404,16 +392,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(locks->size, length, sizeof(f_thread_lock_t), (void **) & locks->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      locks->size = length;
+    locks->size = length;
 
-      if (locks->used > locks->size) {
-        locks->used = length;
-      }
+    if (locks->used > locks->size) {
+      locks->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_locks_adjust_) || !defined(_di_f_thread_locks_decimate_by_)
 
@@ -428,16 +415,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(locks->size, length, sizeof(f_thread_lock_t), (void **) & locks->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      locks->size = length;
+    locks->size = length;
 
-      if (locks->used > locks->size) {
-        locks->used = length;
-      }
+    if (locks->used > locks->size) {
+      locks->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_locks_decrease_) || !defined(_di_f_thread_locks_decrease_by_) || !defined(_di_f_thread_locks_increase_) || !defined(_di_f_thread_locks_increase_by_)
 
@@ -468,16 +454,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(attributes->size, length, sizeof(f_thread_lock_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_lock_attributes_adjust_) || !defined(_di_f_thread_lock_attributes_decimate_by_)
 
@@ -492,16 +477,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(attributes->size, length, sizeof(f_thread_lock_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_lock_attributes_decrease_) || !defined(_di_f_thread_lock_attributes_decrease_by_) || !defined(_di_f_thread_lock_attributes_increase_) || !defined(_di_f_thread_lock_attributes_increase_by_)
 
@@ -532,16 +516,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(attributes->size, length, sizeof(f_thread_mutex_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_mutex_attributes_adjust_) || !defined(_di_f_thread_mutex_attributes_decimate_by_)
 
@@ -556,16 +539,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(attributes->size, length, sizeof(f_thread_mutex_t), (void **) & attributes->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      attributes->size = length;
+    attributes->size = length;
 
-      if (attributes->used > attributes->size) {
-        attributes->used = length;
-      }
+    if (attributes->used > attributes->size) {
+      attributes->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_mutex_attributes_decrease_) || !defined(_di_f_thread_mutex_attributes_decrease_by_) || !defined(_di_f_thread_mutex_attributes_increase_) || !defined(_di_f_thread_mutex_attributes_increase_by_)
 
@@ -596,16 +578,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(mutexs->size, length, sizeof(f_thread_mutex_t), (void **) & mutexs->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      mutexs->size = length;
+    mutexs->size = length;
 
-      if (mutexs->used > mutexs->size) {
-        mutexs->used = length;
-      }
+    if (mutexs->used > mutexs->size) {
+      mutexs->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_mutexs_adjust_) || !defined(_di_f_thread_mutexs_decimate_by_)
 
@@ -620,16 +601,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(mutexs->size, length, sizeof(f_thread_mutex_t), (void **) & mutexs->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      mutexs->size = length;
+    mutexs->size = length;
 
-      if (mutexs->used > mutexs->size) {
-        mutexs->used = length;
-      }
+    if (mutexs->used > mutexs->size) {
+      mutexs->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_mutexs_decrease_) || !defined(_di_f_thread_mutexs_decrease_by_) || !defined(_di_f_thread_mutexs_increase_) || !defined(_di_f_thread_mutexs_increase_by_)
 
@@ -683,16 +663,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(semaphores->size, length, sizeof(f_thread_semaphore_t), (void **) & semaphores->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      semaphores->size = length;
+    semaphores->size = length;
 
-      if (semaphores->used > semaphores->size) {
-        semaphores->used = length;
-      }
+    if (semaphores->used > semaphores->size) {
+      semaphores->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_semaphores_decrease_) || !defined(_di_f_thread_semaphores_decrease_by_) || !defined(_di_f_thread_semaphores_increase_) || !defined(_di_f_thread_semaphores_increase_by_)
 
@@ -707,16 +686,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(sets->size, length, sizeof(f_thread_set_t), (void **) & sets->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      sets->size = length;
+    sets->size = length;
 
-      if (sets->used > sets->size) {
-        sets->used = length;
-      }
+    if (sets->used > sets->size) {
+      sets->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_sets_adjust_) || !defined(_di_f_thread_sets_decimate_by_)
 
@@ -731,16 +709,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(sets->size, length, sizeof(f_thread_set_t), (void **) & sets->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      sets->size = length;
+    sets->size = length;
 
-      if (sets->used > sets->size) {
-        sets->used = length;
-      }
+    if (sets->used > sets->size) {
+      sets->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_sets_decrease_) || !defined(_di_f_thread_sets_decrease_by_) || !defined(_di_f_thread_sets_increase_) || !defined(_di_f_thread_sets_increase_by_)
 
@@ -771,16 +748,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(spins->size, length, sizeof(f_thread_spin_t), (void **) & spins->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      spins->size = length;
+    spins->size = length;
 
-      if (spins->used > spins->size) {
-        spins->used = length;
-      }
+    if (spins->used > spins->size) {
+      spins->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_spins_adjust_) || !defined(_di_f_thread_spins_decimate_by_)
 
@@ -796,16 +772,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(spins->size, length, sizeof(f_thread_spin_t), (void **) & spins->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      spins->size = length;
+    spins->size = length;
 
-      if (spins->used > spins->size) {
-        spins->used = length;
-      }
+    if (spins->used > spins->size) {
+      spins->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_thread_spins_decrease_) || !defined(_di_f_thread_spins_decrease_by_) || !defined(_di_f_thread_spins_increase_) || !defined(_di_f_thread_spins_increase_by_)
 
index 4db4cec1bb9b71b35299921e5dcc6581b920346c..b3a8d5ab4df6234c45dec218fd936fa139350762 100644 (file)
@@ -51,6 +51,8 @@ extern "C" {
  */
 #ifndef _di_f_status_t_
   typedef uint16_t f_status_t;
+
+  #define f_status_t_initialize F_none
 #endif // _di_f_status_t_
 
 /**
@@ -937,41 +939,43 @@ extern "C" {
  * Provide a 128-bit type wrapper, which could be either 64-bit or 128-bit depending on support.
  *
  * This is __int128_t when 128-bit is supported and int64_t when not supported.
+ *
+ * This provides the types without the normal "f_" leading prefixes to be more in line with the core types like int64_t.
  */
 #ifndef __SIZEOF_INT128__
 
   #ifndef _di_int128_t_
-    typedef __int128_t f_int128_t;
+    typedef __int128_t int128_t;
   #endif // _di_int128_t_
 
   #ifndef _di_uint128_t_
-    typedef __uint128_t f_uint128_t;
+    typedef __uint128_t uint128_t;
   #endif // _di_uint128_t_
 
 #else // __SIZEOF_INT128__
 
   #ifndef _di_int128_t_
-    typedef int64_t f_int128_t;
+    typedef int64_t int128_t;
   #endif // _di_int128_t_
 
   #ifndef _di_uint128_t_
-    typedef uint64_t f_uint128_t;
+    typedef uint64_t uint128_t;
   #endif // _di_uint128_t_
 
 #endif // __SIZEOF_INT128__
 
 /**
- * An array of f_int128_t.
+ * An array of int128_t.
  *
  * The macros are defined in type_array.h or type_array-common.h.
  *
- * array: The array of f_int128_t.
+ * array: The array of int128_t.
  * size:  Total amount of allocated space.
  * used:  Total number of allocated spaces used.
  */
 #ifndef _di_int128s_t_
   typedef struct {
-    f_int128_t *array;
+    int128_t *array;
 
     f_array_length_t size;
     f_array_length_t used;
@@ -984,11 +988,11 @@ extern "C" {
 #endif // _di_int128s_t_
 
 /**
- * An array of and array of f_int128_t.
+ * An array of and array of int128_t.
  *
  * The macros are defined in type_array.h or type_array-common.h.
  *
- * array: The array of and array of f_int128_t.
+ * array: The array of and array of int128_t.
  * size:  Total amount of allocated space.
  * used:  Total number of allocated spaces used.
  */
@@ -1007,17 +1011,17 @@ extern "C" {
 #endif // _di_int128ss_t_
 
 /**
- * An array of f_uint128_t.
+ * An array of uint128_t.
  *
  * The macros are defined in type_array.h or type_array-common.h.
  *
- * array: The array of f_uint128_t.
+ * array: The array of uint128_t.
  * size:  Total amount of allocated space.
  * used:  Total number of allocated spaces used.
  */
 #ifndef _di_uint128s_t_
   typedef struct {
-    f_uint128_t *array;
+    uint128_t *array;
 
     f_array_length_t size;
     f_array_length_t used;
@@ -1030,11 +1034,11 @@ extern "C" {
 #endif // _di_uint128s_t_
 
 /**
- * An array of and array of f_uint128_t.
+ * An array of and array of uint128_t.
  *
  * The macros are defined in type_array.h or type_array-common.h.
  *
- * array: The array of and array of f_uint128_t.
+ * array: The array of and array of uint128_t.
  * size:  Total amount of allocated space.
  * used:  Total number of allocated spaces used.
  */
@@ -1173,8 +1177,10 @@ extern "C" {
  * used: A representation of how many bytes in name are in used (if 0, then there is no name, thus this can be seen as not a valid identifier).
  */
 #ifndef _di_f_fll_id_t_
+  #define f_fll_id_name_length_d 64
+
   typedef struct {
-    char name[64];
+    char name[f_fll_id_name_length_d];
 
     uint16_t type;
     uint8_t used;
index 401bb7dc6a3ca7c372f88d7ceefd550034ac63da..fdb4769d82fcb50e58df939b01c14db4002503fd 100644 (file)
 #include <fll/level_0/type_array/int128.h>
 #include <fll/level_0/type_array/state.h>
 #include <fll/level_0/type_array/status.h>
+#include <fll/level_0/type_array/uint8.h>
+#include <fll/level_0/type_array/uint16.h>
+#include <fll/level_0/type_array/uint32.h>
+#include <fll/level_0/type_array/uint64.h>
+#include <fll/level_0/type_array/uint128.h>
 
 #ifdef __cplusplus
 extern "C" {
index 3479ab46321a4854b64a5ba21a1a8b8e01bd2bba..47929eca61a0dd9609ef6ab64012a6d29ace7c5c 100644 (file)
@@ -17,17 +17,34 @@ extern "C" {
 #endif // _di_f_array_lengths_adjust_
 
 #ifndef _di_f_array_lengths_append_
-  f_status_t f_array_lengths_append(const f_array_lengths_t source, f_array_lengths_t *destination) {
+  f_status_t f_array_lengths_append(const f_array_length_t source, f_array_lengths_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_array_lengths_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
 
-    return private_f_array_lengths_append(source, destination);
+    destination->array[destination->used++] = source;
+
+    return F_none;
   }
 #endif // _di_f_array_lengths_append_
 
+#ifndef _di_f_array_lengths_append_all_
+  f_status_t f_array_lengths_append_all(const f_array_lengths_t source, f_array_lengths_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_array_lengths_append_all(source, destination);
+  }
+#endif // _di_f_array_lengths_append_all_
+
 #ifndef _di_f_array_lengths_decimate_by_
   f_status_t f_array_lengths_decimate_by(const f_array_length_t amount, f_array_lengths_t *lengths) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +148,31 @@ extern "C" {
 #endif // _di_f_array_lengthss_adjust_
 
 #ifndef _di_f_array_lengthss_append_
-  f_status_t f_array_lengthss_append(const f_array_lengthss_t source, f_array_lengthss_t *destination) {
+  f_status_t f_array_lengthss_append(const f_array_lengths_t source, f_array_lengthss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_array_lengthss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_array_lengths_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_array_lengthss_append_
+
+#ifndef _di_f_array_lengthss_append_all_
+  f_status_t f_array_lengthss_append_all(const f_array_lengthss_t source, f_array_lengthss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +187,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_array_lengths_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_array_lengths_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_array_lengthss_append_
+#endif // _di_f_array_lengthss_append_all_
 
 #ifndef _di_f_array_lengthss_decimate_by_
   f_status_t f_array_lengthss_decimate_by(const f_array_length_t amount, f_array_lengthss_t *lengthss) {
index 34c88736b5923de8186efedde0cc5a5657af1ef3..cbd3360ef7e68dc1b7a98175447c0ae072d91efd 100644 (file)
@@ -36,10 +36,10 @@ extern "C" {
 #endif // _di_f_array_lengths_adjust_
 
 /**
- * Append the source lengths onto the destination.
+ * Append the single source length onto the destination.
  *
  * @param source
- *   The source lengths to append.
+ *   The source length to append.
  * @param destination
  *   The destination lengths the source is appended onto.
  *
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_array_lengths_append_
-  extern f_status_t f_array_lengths_append(const f_array_lengths_t source, f_array_lengths_t *destination);
+  extern f_status_t f_array_lengths_append(const f_array_length_t source, f_array_lengths_t *destination);
 #endif // _di_f_array_lengths_append_
 
 /**
+ * Append the source lengths onto the destination.
+ *
+ * @param source
+ *   The source lengths to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_array_lengths_append_all_
+  extern f_status_t f_array_lengths_append_all(const f_array_lengths_t source, f_array_lengths_t *destination);
+#endif // _di_f_array_lengths_append_all_
+
+/**
  * Resize the string lengths array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -191,10 +211,10 @@ extern "C" {
 #endif // _di_f_array_lengthss_adjust_
 
 /**
- * Append the source lengthss onto the destination.
+ * Append the single source lengths onto the destination.
  *
  * @param source
- *   The source lengthss to append.
+ *   The source lengths to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -207,28 +227,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_array_lengthss_append_
-  extern f_status_t f_array_lengthss_append(const f_array_lengthss_t source, f_array_lengthss_t *destination);
+  extern f_status_t f_array_lengthss_append(const f_array_lengths_t source, f_array_lengthss_t *destination);
 #endif // _di_f_array_lengthss_append_
 
 /**
- * Resize the string lengthss array.
+ * Append the source lengthss onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param lengthss
- *   The string lengthss array to resize.
+ * @param source
+ *   The source lengthss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_array_lengthss_adjust_
-  extern f_status_t f_array_lengthss_adjust(const f_array_length_t length, f_array_lengthss_t *lengthss);
-#endif // _di_f_array_lengthss_adjust_
+#ifndef _di_f_array_lengthss_append_all_
+  extern f_status_t f_array_lengthss_append_all(const f_array_lengthss_t source, f_array_lengthss_t *destination);
+#endif // _di_f_array_lengthss_append_all_
 
 /**
  * Resize the string lengthss array to a smaller size.
index d18372d2684684135c46ab0c9aba6d75aa0d4343..90221be284ca83fcbb9317a1fe3039a6440c13d6 100644 (file)
@@ -17,17 +17,27 @@ extern "C" {
 #endif // _di_f_cells_adjust_
 
 #ifndef _di_f_cells_append_
-  f_status_t f_cells_append(const f_cells_t source, f_cells_t *destination) {
+  f_status_t f_cells_append(const f_cell_t source, f_cells_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
-
     return private_f_cells_append(source, destination);
   }
 #endif // _di_f_cells_append_
 
+#ifndef _di_f_cells_append_all_
+  f_status_t f_cells_append_all(const f_cells_t source, f_cells_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_cells_append_all(source, destination);
+  }
+#endif // _di_f_cells_append_all_
+
 #ifndef _di_f_cells_decimate_by_
   f_status_t f_cells_decimate_by(const f_array_length_t amount, f_cells_t *cells) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +141,31 @@ extern "C" {
 #endif // _di_f_cellss_adjust_
 
 #ifndef _di_f_cellss_append_
-  f_status_t f_cellss_append(const f_cellss_t source, f_cellss_t *destination) {
+  f_status_t f_cellss_append(const f_cells_t source, f_cellss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_cellss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_cells_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_cellss_append_
+
+#ifndef _di_f_cellss_append_all_
+  f_status_t f_cellss_append_all(const f_cellss_t source, f_cellss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +180,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_cells_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_cells_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_cellss_append_
+#endif // _di_f_cellss_append_all_
 
 #ifndef _di_f_cellss_decimate_by_
   f_status_t f_cellss_decimate_by(const f_array_length_t amount, f_cellss_t *cellss) {
index 034b617aaecd86e8972b2984e9bbadcd84fd7f2c..ad111f3c85b78674ea6b4f68b7c2e97d38b62b60 100644 (file)
@@ -36,10 +36,10 @@ extern "C" {
 #endif // _di_f_cells_adjust_
 
 /**
- * Append the source cells onto the destination.
+ * Append the single source cell onto the destination.
  *
  * @param source
- *   The source cells to append.
+ *   The source cell to append.
  * @param destination
  *   The destination cells the source is appended onto.
  *
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_cells_append_
-  extern f_status_t f_cells_append(const f_cells_t source, f_cells_t *destination);
+  extern f_status_t f_cells_append(const f_cell_t source, f_cells_t *destination);
 #endif // _di_f_cells_append_
 
 /**
+ * Append the source cells onto the destination.
+ *
+ * @param source
+ *   The source cells to append.
+ * @param destination
+ *   The destination cells the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_cells_append_all_
+  extern f_status_t f_cells_append_all(const f_cells_t source, f_cells_t *destination);
+#endif // _di_f_cells_append_all_
+
+/**
  * Resize the string cells array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -193,10 +213,10 @@ extern "C" {
 #endif // _di_f_cellss_adjust_
 
 /**
- * Append the source cellss onto the destination.
+ * Append the single source cells onto the destination.
  *
  * @param source
- *   The source cellss to append.
+ *   The source cells to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -209,28 +229,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_cellss_append_
-  extern f_status_t f_cellss_append(const f_cellss_t source, f_cellss_t *destination);
+  extern f_status_t f_cellss_append(const f_cells_t source, f_cellss_t *destination);
 #endif // _di_f_cellss_append_
 
 /**
- * Resize the string cellss array.
+ * Append the source cellss onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param cellss
- *   The string cellss array to resize.
+ * @param source
+ *   The source cellss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_cellss_adjust_
-  extern f_status_t f_cellss_adjust(const f_array_length_t length, f_cellss_t *cellss);
-#endif // _di_f_cellss_adjust_
+#ifndef _di_f_cellss_append_all_
+  extern f_status_t f_cellss_append_all(const f_cellss_t source, f_cellss_t *destination);
+#endif // _di_f_cellss_append_all_
 
 /**
  * Resize the string cellss array to a smaller size.
index ddd25be29be4b01da844665c096586a0f4a178c4..b64be650329090937b6b710084ed0daa2cae834b 100644 (file)
@@ -17,17 +17,27 @@ extern "C" {
 #endif // _di_f_fll_ids_adjust_
 
 #ifndef _di_f_fll_ids_append_
-  f_status_t f_fll_ids_append(const f_fll_ids_t source, f_fll_ids_t *destination) {
+  f_status_t f_fll_ids_append(const f_fll_id_t source, f_fll_ids_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
-
     return private_f_fll_ids_append(source, destination);
   }
 #endif // _di_f_fll_ids_append_
 
+#ifndef _di_f_fll_ids_append_all_
+  f_status_t f_fll_ids_append_all(const f_fll_ids_t source, f_fll_ids_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_fll_ids_append_all(source, destination);
+  }
+#endif // _di_f_fll_ids_append_all_
+
 #ifndef _di_f_fll_ids_decimate_by_
   f_status_t f_fll_ids_decimate_by(const f_array_length_t amount, f_fll_ids_t *ids) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +141,31 @@ extern "C" {
 #endif // _di_f_fll_idss_adjust_
 
 #ifndef _di_f_fll_idss_append_
-  f_status_t f_fll_idss_append(const f_fll_idss_t source, f_fll_idss_t *destination) {
+  f_status_t f_fll_idss_append(const f_fll_ids_t source, f_fll_idss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_fll_idss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_fll_ids_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_fll_idss_append_
+
+#ifndef _di_f_fll_idss_append_all_
+  f_status_t f_fll_idss_append_all(const f_fll_idss_t source, f_fll_idss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +180,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_fll_ids_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_fll_ids_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_fll_idss_append_
+#endif // _di_f_fll_idss_append_all_
 
 #ifndef _di_f_fll_idss_decimate_by_
   f_status_t f_fll_idss_decimate_by(const f_array_length_t amount, f_fll_idss_t *idss) {
index 6560a6ae12370cc138acaee50ee167d196d88369..03b627771437e47a711159fe8fba78eca3d0788f 100644 (file)
@@ -36,12 +36,12 @@ extern "C" {
 #endif // _di_f_fll_ids_adjust_
 
 /**
- * Append the source ids onto the destination.
+ * Append the single source fll_id onto the destination.
  *
  * @param source
- *   The source ids to append.
+ *   The source fll_id to append.
  * @param destination
- *   The destination ids the source is appended onto.
+ *   The destination fll_ids the source is appended onto.
  *
  * @return
  *   F_none on success.
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_fll_ids_append_
-  extern f_status_t f_fll_ids_append(const f_fll_ids_t source, f_fll_ids_t *destination);
+  extern f_status_t f_fll_ids_append(const f_fll_id_t source, f_fll_ids_t *destination);
 #endif // _di_f_fll_ids_append_
 
 /**
+ * Append the source fll_ids onto the destination.
+ *
+ * @param source
+ *   The source fll_ids to append.
+ * @param destination
+ *   The destination fll_ids the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_fll_ids_append_all_
+  extern f_status_t f_fll_ids_append_all(const f_fll_ids_t source, f_fll_ids_t *destination);
+#endif // _di_f_fll_ids_append_all_
+
+/**
  * Resize the string ids array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -193,10 +213,10 @@ extern "C" {
 #endif // _di_f_fll_idss_adjust_
 
 /**
- * Append the source idss onto the destination.
+ * Append the single source fll_ids onto the destination.
  *
  * @param source
- *   The source idss to append.
+ *   The source fll_ids to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -209,28 +229,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_fll_idss_append_
-  extern f_status_t f_fll_idss_append(const f_fll_idss_t source, f_fll_idss_t *destination);
+  extern f_status_t f_fll_idss_append(const f_fll_ids_t source, f_fll_idss_t *destination);
 #endif // _di_f_fll_idss_append_
 
 /**
- * Resize the string idss array.
+ * Append the source fll_idss onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param idss
- *   The string idss array to resize.
+ * @param source
+ *   The source fll_idss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_fll_idss_adjust_
-  extern f_status_t f_fll_idss_adjust(const f_array_length_t length, f_fll_idss_t *idss);
-#endif // _di_f_fll_idss_adjust_
+#ifndef _di_f_fll_idss_append_all_
+  extern f_status_t f_fll_idss_append_all(const f_fll_idss_t source, f_fll_idss_t *destination);
+#endif // _di_f_fll_idss_append_all_
 
 /**
  * Resize the string idss array to a smaller size.
index 59b1ee182688b4c4623a70f8f888863744f53339..983caeee74daac38e80dc1b3c0ada1afe8d2f622 100644 (file)
@@ -17,17 +17,27 @@ extern "C" {
 #endif // _di_f_int128s_adjust_
 
 #ifndef _di_f_int128s_append_
-  f_status_t f_int128s_append(const f_int128s_t source, f_int128s_t *destination) {
+  f_status_t f_int128s_append(const int128_t source, f_int128s_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
-
     return private_f_int128s_append(source, destination);
   }
 #endif // _di_f_int128s_append_
 
+#ifndef _di_f_int128s_append_all_
+  f_status_t f_int128s_append_all(const f_int128s_t source, f_int128s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_int128s_append_all(source, destination);
+  }
+#endif // _di_f_int128s_append_all_
+
 #ifndef _di_f_int128s_decimate_by_
   f_status_t f_int128s_decimate_by(const f_array_length_t amount, f_int128s_t *int128s) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +141,31 @@ extern "C" {
 #endif // _di_f_int128ss_adjust_
 
 #ifndef _di_f_int128ss_append_
-  f_status_t f_int128ss_append(const f_int128ss_t source, f_int128ss_t *destination) {
+  f_status_t f_int128ss_append(const f_int128s_t source, f_int128ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_int128ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_int128s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_int128ss_append_
+
+#ifndef _di_f_int128ss_append_all_
+  f_status_t f_int128ss_append_all(const f_int128ss_t source, f_int128ss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +180,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_int128s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_int128s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_int128ss_append_
+#endif // _di_f_int128ss_append_all_
 
 #ifndef _di_f_int128ss_decimate_by_
   f_status_t f_int128ss_decimate_by(const f_array_length_t amount, f_int128ss_t *int128ss) {
@@ -246,246 +285,6 @@ extern "C" {
   }
 #endif // _di_f_int128ss_resize_
 
-#ifndef _di_f_uint128s_adjust_
-  f_status_t f_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint128s_adjust(length, uint128s);
-  }
-#endif // _di_f_uint128s_adjust_
-
-#ifndef _di_f_uint128s_append_
-  f_status_t f_uint128s_append(const f_uint128s_t source, f_uint128s_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    return private_f_uint128s_append(source, destination);
-  }
-#endif // _di_f_uint128s_append_
-
-#ifndef _di_f_uint128s_decimate_by_
-  f_status_t f_uint128s_decimate_by(const f_array_length_t amount, f_uint128s_t *uint128s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint128s->size - amount > 0) {
-      return private_f_uint128s_adjust(uint128s->size - amount, uint128s);
-    }
-
-    return private_f_uint128s_adjust(0, uint128s);
-  }
-#endif // _di_f_uint128s_decimate_by_
-
-#ifndef _di_f_uint128s_decrease_by_
-  f_status_t f_uint128s_decrease_by(const f_array_length_t amount, f_uint128s_t *uint128s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint128s->size - amount > 0) {
-      return private_f_uint128s_resize(uint128s->size - amount, uint128s);
-    }
-
-    return private_f_uint128s_resize(0, uint128s);
-  }
-#endif // _di_f_uint128s_decrease_by_
-
-#ifndef _di_f_uint128s_increase_
-  f_status_t f_uint128s_increase(const f_array_length_t step, f_uint128s_t *uint128s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint128s->used + 1 > uint128s->size) {
-      f_array_length_t size = uint128s->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint128s->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint128s_resize(size, uint128s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint128s_increase_
-
-#ifndef _di_f_uint128s_increase_by_
-  f_status_t f_uint128s_increase_by(const f_array_length_t amount, f_uint128s_t *uint128s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint128s->used + amount > uint128s->size) {
-      if (uint128s->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint128s_resize(uint128s->used + amount, uint128s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint128s_increase_by_
-
-#ifndef _di_f_uint128s_resize_
-  f_status_t f_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint128s_resize(length, uint128s);
-  }
-#endif // _di_f_uint128s_resize_
-
-#ifndef _di_f_uint128ss_adjust_
-  f_status_t f_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint128ss_adjust(length, uint128ss);
-  }
-#endif // _di_f_uint128ss_adjust_
-
-#ifndef _di_f_uint128ss_append_
-  f_status_t f_uint128ss_append(const f_uint128ss_t source, f_uint128ss_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint128ss_resize(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_uint128s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return F_none;
-  }
-#endif // _di_f_uint128ss_append_
-
-#ifndef _di_f_uint128ss_decimate_by_
-  f_status_t f_uint128ss_decimate_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint128ss->size - amount > 0) {
-      return private_f_uint128ss_adjust(uint128ss->size - amount, uint128ss);
-    }
-
-    return private_f_uint128ss_adjust(0, uint128ss);
-  }
-#endif // _di_f_uint128ss_decimate_by_
-
-#ifndef _di_f_uint128ss_decrease_by_
-  f_status_t f_uint128ss_decrease_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint128ss->size - amount > 0) {
-      return private_f_uint128ss_resize(uint128ss->size - amount, uint128ss);
-    }
-
-    return private_f_uint128ss_resize(0, uint128ss);
-  }
-#endif // _di_f_uint128ss_decrease_by_
-
-#ifndef _di_f_uint128ss_increase_
-  f_status_t f_uint128ss_increase(const f_array_length_t step, f_uint128ss_t *uint128ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint128ss->used + 1 > uint128ss->size) {
-      f_array_length_t size = uint128ss->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint128ss->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint128ss_resize(size, uint128ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint128ss_increase_
-
-#ifndef _di_f_uint128ss_increase_by_
-  f_status_t f_uint128ss_increase_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint128ss->used + amount > uint128ss->size) {
-      if (uint128ss->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint128ss_resize(uint128ss->used + amount, uint128ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint128ss_increase_by_
-
-#ifndef _di_f_uint128ss_resize_
-  f_status_t f_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint128ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint128ss_resize(length, uint128ss);
-  }
-#endif // _di_f_uint128ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 232ad7ae0295d8c9aea11264d8fa7fd42e007c38..df505a1656699ba6a7b3831d4efec7ad7bfaaa19 100644 (file)
@@ -36,10 +36,10 @@ extern "C" {
 #endif // _di_f_int128s_adjust_
 
 /**
- * Append the source int128s onto the destination.
+ * Append the single source int128 onto the destination.
  *
  * @param source
- *   The source int128s to append.
+ *   The source int128 to append.
  * @param destination
  *   The destination int128s the source is appended onto.
  *
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int128s_append_
-  extern f_status_t f_int128s_append(const f_int128s_t source, f_int128s_t *destination);
+  extern f_status_t f_int128s_append(const int128_t source, f_int128s_t *destination);
 #endif // _di_f_int128s_append_
 
 /**
+ * Append the source int128s onto the destination.
+ *
+ * @param source
+ *   The source int128s to append.
+ * @param destination
+ *   The destination int128s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_int128s_append_all_
+  extern f_status_t f_int128s_append_all(const f_int128s_t source, f_int128s_t *destination);
+#endif // _di_f_int128s_append_all_
+
+/**
  * Resize the int128s array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -193,10 +213,10 @@ extern "C" {
 #endif // _di_f_int128ss_adjust_
 
 /**
- * Append the source int128ss onto the destination.
+ * Append the single source int128 onto the destination.
  *
  * @param source
- *   The source int128ss to append.
+ *   The source int128s to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -209,28 +229,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int128ss_append_
-  extern f_status_t f_int128ss_append(const f_int128ss_t source, f_int128ss_t *destination);
+  extern f_status_t f_int128ss_append(const f_int128s_t source, f_int128ss_t *destination);
 #endif // _di_f_int128ss_append_
 
 /**
- * Resize the int128ss array.
+ * Append the source int128ss onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param int128ss
- *   The int128ss array to resize.
+ * @param source
+ *   The source int128ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_int128ss_adjust_
-  extern f_status_t f_int128ss_adjust(const f_array_length_t length, f_int128ss_t *int128ss);
-#endif // _di_f_int128ss_adjust_
+#ifndef _di_f_int128ss_append_all_
+  extern f_status_t f_int128ss_append_all(const f_int128ss_t source, f_int128ss_t *destination);
+#endif // _di_f_int128ss_append_all_
 
 /**
  * Resize the int128ss array to a smaller size.
@@ -350,340 +370,6 @@ extern "C" {
   extern f_status_t f_int128ss_resize(const f_array_length_t length, f_int128ss_t *int128ss);
 #endif // _di_f_int128ss_resize_
 
-/**
- * Resize the string uint128s array.
- *
- * @param length
- *   The new size to use.
- * @param uint128s
- *   The string uint128s array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint128s_adjust_
-  extern f_status_t f_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s);
-#endif // _di_f_uint128s_adjust_
-
-/**
- * Append the source uint128s onto the destination.
- *
- * @param source
- *   The source uint128s to append.
- * @param destination
- *   The destination uint128s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint128s_append_
-  extern f_status_t f_uint128s_append(const f_uint128s_t source, f_uint128s_t *destination);
-#endif // _di_f_uint128s_append_
-
-/**
- * Resize the string uint128s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decimate the size by.
- * @param uint128s
- *   The string uint128s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint128s_decimate_by_
-  extern f_status_t f_uint128s_decimate_by(const f_array_length_t amount, f_uint128s_t *uint128s);
-#endif // _di_f_uint128s_decimate_by_
-
-/**
- * Resize the string uint128s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decrease the size by.
- * @param uint128s
- *   The string uint128s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint128s_decrease_by_
-  extern f_status_t f_uint128s_decrease_by(const f_array_length_t amount, f_uint128s_t *uint128s);
-#endif // _di_f_uint128s_decrease_by_
-
-/**
- * Increase the size of the string uint128s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint128s
- *   The string uint128s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint128s_increase_
-  extern f_status_t f_uint128s_increase(const f_array_length_t step, f_uint128s_t *uint128s);
-#endif // _di_f_uint128s_increase_
-
-/**
- * Resize the string uint128s array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint128s
- *   The string uint128s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint128s_increase_by_
-  extern f_status_t f_uint128s_increase_by(const f_array_length_t amount, f_uint128s_t *uint128s);
-#endif // _di_f_uint128s_increase_by_
-
-/**
- * Resize the string uint128s array.
- *
- * @param length
- *   The new size to use.
- * @param uint128s
- *   The string uint128s array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint128s_resize_
-  extern f_status_t f_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s);
-#endif // _di_f_uint128s_resize_
-
-/**
- * Resize the string uint128ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint128ss
- *   The string uint128ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint128ss_adjust_
-  extern f_status_t f_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss);
-#endif // _di_f_uint128ss_adjust_
-
-/**
- * Append the source uint128ss onto the destination.
- *
- * @param source
- *   The source uint128ss to append.
- * @param destination
- *   The destination ranges the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint128ss_append_
-  extern f_status_t f_uint128ss_append(const f_uint128ss_t source, f_uint128ss_t *destination);
-#endif // _di_f_uint128ss_append_
-
-/**
- * Resize the string uint128ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint128ss
- *   The string uint128ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint128ss_adjust_
-  extern f_status_t f_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss);
-#endif // _di_f_uint128ss_adjust_
-
-/**
- * Resize the string uint128ss 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 uint128ss
- *   The string uint128ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint128ss_decimate_by_
-  extern f_status_t f_uint128ss_decimate_by(const f_array_length_t amount, f_uint128ss_t *uint128ss);
-#endif // _di_f_uint128ss_decimate_by_
-
-/**
- * Resize the string uint128ss 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 uint128ss
- *   The string uint128ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint128ss_decrease_by_
-  extern f_status_t f_uint128ss_decrease_by(const f_array_length_t amount, f_uint128ss_t *uint128ss);
-#endif // _di_f_uint128ss_decrease_by_
-
-/**
- * Increase the size of the string uint128ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint128ss
- *   The string uint128ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint128ss_increase_
-  extern f_status_t f_uint128ss_increase(const f_array_length_t step, f_uint128ss_t *uint128ss);
-#endif // _di_f_uint128ss_increase_
-
-/**
- * Resize the string uint128ss array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint128ss
- *   The string uint128ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint128ss_increase_by_
-  extern f_status_t f_uint128ss_increase_by(const f_array_length_t amount, f_uint128ss_t *uint128ss);
-#endif // _di_f_uint128ss_increase_by_
-
-/**
- * Resize the string uint128ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint128ss
- *   The string uint128ss array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint128ss_resize_
-  extern f_status_t f_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss);
-#endif // _di_f_uint128ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 48773a5c96f26e07ae07670fe0c79e83c02a5540..9221c9318a7ee99b94c37edd27de0f1c338c1ee5 100644 (file)
@@ -17,17 +17,27 @@ extern "C" {
 #endif // _di_f_int16s_adjust_
 
 #ifndef _di_f_int16s_append_
-  f_status_t f_int16s_append(const f_int16s_t source, f_int16s_t *destination) {
+  f_status_t f_int16s_append(const int16_t source, f_int16s_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
-
     return private_f_int16s_append(source, destination);
   }
 #endif // _di_f_int16s_append_
 
+#ifndef _di_f_int16s_append_all_
+  f_status_t f_int16s_append_all(const f_int16s_t source, f_int16s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_int16s_append_all(source, destination);
+  }
+#endif // _di_f_int16s_append_all_
+
 #ifndef _di_f_int16s_decimate_by_
   f_status_t f_int16s_decimate_by(const f_array_length_t amount, f_int16s_t *int16s) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +141,31 @@ extern "C" {
 #endif // _di_f_int16ss_adjust_
 
 #ifndef _di_f_int16ss_append_
-  f_status_t f_int16ss_append(const f_int16ss_t source, f_int16ss_t *destination) {
+  f_status_t f_int16ss_append(const f_int16s_t source, f_int16ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_int16ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_int16s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_int16ss_append_
+
+#ifndef _di_f_int16ss_append_all_
+  f_status_t f_int16ss_append_all(const f_int16ss_t source, f_int16ss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +180,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_int16s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_int16s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_int16ss_append_
+#endif // _di_f_int16ss_append_all_
 
 #ifndef _di_f_int16ss_decimate_by_
   f_status_t f_int16ss_decimate_by(const f_array_length_t amount, f_int16ss_t *int16ss) {
@@ -246,246 +285,6 @@ extern "C" {
   }
 #endif // _di_f_int16ss_resize_
 
-#ifndef _di_f_uint16s_adjust_
-  f_status_t f_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint16s_adjust(length, uint16s);
-  }
-#endif // _di_f_uint16s_adjust_
-
-#ifndef _di_f_uint16s_append_
-  f_status_t f_uint16s_append(const f_uint16s_t source, f_uint16s_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    return private_f_uint16s_append(source, destination);
-  }
-#endif // _di_f_uint16s_append_
-
-#ifndef _di_f_uint16s_decimate_by_
-  f_status_t f_uint16s_decimate_by(const f_array_length_t amount, f_uint16s_t *uint16s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint16s->size - amount > 0) {
-      return private_f_uint16s_adjust(uint16s->size - amount, uint16s);
-    }
-
-    return private_f_uint16s_adjust(0, uint16s);
-  }
-#endif // _di_f_uint16s_decimate_by_
-
-#ifndef _di_f_uint16s_decrease_by_
-  f_status_t f_uint16s_decrease_by(const f_array_length_t amount, f_uint16s_t *uint16s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint16s->size - amount > 0) {
-      return private_f_uint16s_resize(uint16s->size - amount, uint16s);
-    }
-
-    return private_f_uint16s_resize(0, uint16s);
-  }
-#endif // _di_f_uint16s_decrease_by_
-
-#ifndef _di_f_uint16s_increase_
-  f_status_t f_uint16s_increase(const f_array_length_t step, f_uint16s_t *uint16s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint16s->used + 1 > uint16s->size) {
-      f_array_length_t size = uint16s->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint16s->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint16s_resize(size, uint16s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint16s_increase_
-
-#ifndef _di_f_uint16s_increase_by_
-  f_status_t f_uint16s_increase_by(const f_array_length_t amount, f_uint16s_t *uint16s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint16s->used + amount > uint16s->size) {
-      if (uint16s->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint16s_resize(uint16s->used + amount, uint16s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint16s_increase_by_
-
-#ifndef _di_f_uint16s_resize_
-  f_status_t f_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint16s_resize(length, uint16s);
-  }
-#endif // _di_f_uint16s_resize_
-
-#ifndef _di_f_uint16ss_adjust_
-  f_status_t f_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint16ss_adjust(length, uint16ss);
-  }
-#endif // _di_f_uint16ss_adjust_
-
-#ifndef _di_f_uint16ss_append_
-  f_status_t f_uint16ss_append(const f_uint16ss_t source, f_uint16ss_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint16ss_resize(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_uint16s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return F_none;
-  }
-#endif // _di_f_uint16ss_append_
-
-#ifndef _di_f_uint16ss_decimate_by_
-  f_status_t f_uint16ss_decimate_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint16ss->size - amount > 0) {
-      return private_f_uint16ss_adjust(uint16ss->size - amount, uint16ss);
-    }
-
-    return private_f_uint16ss_adjust(0, uint16ss);
-  }
-#endif // _di_f_uint16ss_decimate_by_
-
-#ifndef _di_f_uint16ss_decrease_by_
-  f_status_t f_uint16ss_decrease_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint16ss->size - amount > 0) {
-      return private_f_uint16ss_resize(uint16ss->size - amount, uint16ss);
-    }
-
-    return private_f_uint16ss_resize(0, uint16ss);
-  }
-#endif // _di_f_uint16ss_decrease_by_
-
-#ifndef _di_f_uint16ss_increase_
-  f_status_t f_uint16ss_increase(const f_array_length_t step, f_uint16ss_t *uint16ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint16ss->used + 1 > uint16ss->size) {
-      f_array_length_t size = uint16ss->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint16ss->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint16ss_resize(size, uint16ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint16ss_increase_
-
-#ifndef _di_f_uint16ss_increase_by_
-  f_status_t f_uint16ss_increase_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint16ss->used + amount > uint16ss->size) {
-      if (uint16ss->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint16ss_resize(uint16ss->used + amount, uint16ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint16ss_increase_by_
-
-#ifndef _di_f_uint16ss_resize_
-  f_status_t f_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint16ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint16ss_resize(length, uint16ss);
-  }
-#endif // _di_f_uint16ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 22b28f53f67b17942652079212c8586686b8c0f2..8fc0c2a52569dfca75cad4e06d9babfd33915121 100644 (file)
@@ -36,10 +36,10 @@ extern "C" {
 #endif // _di_f_int16s_adjust_
 
 /**
- * Append the source int16s onto the destination.
+ * Append the single source int16 onto the destination.
  *
  * @param source
- *   The source int16s to append.
+ *   The source int16 to append.
  * @param destination
  *   The destination int16s the source is appended onto.
  *
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int16s_append_
-  extern f_status_t f_int16s_append(const f_int16s_t source, f_int16s_t *destination);
+  extern f_status_t f_int16s_append(const int16_t source, f_int16s_t *destination);
 #endif // _di_f_int16s_append_
 
 /**
+ * Append the source int16s onto the destination.
+ *
+ * @param source
+ *   The source int16s to append.
+ * @param destination
+ *   The destination int16s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_int16s_append_all_
+  extern f_status_t f_int16s_append_all(const f_int16s_t source, f_int16s_t *destination);
+#endif // _di_f_int16s_append_all_
+
+/**
  * Resize the int16s array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -193,10 +213,10 @@ extern "C" {
 #endif // _di_f_int16ss_adjust_
 
 /**
- * Append the source int16ss onto the destination.
+ * Append the single source int16s onto the destination.
  *
  * @param source
- *   The source int16ss to append.
+ *   The source int16s to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -209,28 +229,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int16ss_append_
-  extern f_status_t f_int16ss_append(const f_int16ss_t source, f_int16ss_t *destination);
+  extern f_status_t f_int16ss_append(const f_int16s_t source, f_int16ss_t *destination);
 #endif // _di_f_int16ss_append_
 
 /**
- * Resize the int16ss array.
+ * Append the source int16ss onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param int16ss
- *   The int16ss array to resize.
+ * @param source
+ *   The source int16ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_int16ss_adjust_
-  extern f_status_t f_int16ss_adjust(const f_array_length_t length, f_int16ss_t *int16ss);
-#endif // _di_f_int16ss_adjust_
+#ifndef _di_f_int16ss_append_all_
+  extern f_status_t f_int16ss_append_all(const f_int16ss_t source, f_int16ss_t *destination);
+#endif // _di_f_int16ss_append_all_
 
 /**
  * Resize the int16ss array to a smaller size.
@@ -352,340 +372,6 @@ extern "C" {
   extern f_status_t f_int16ss_resize(const f_array_length_t length, f_int16ss_t *int16ss);
 #endif // _di_f_int16ss_resize_
 
-/**
- * Resize the string uint16s array.
- *
- * @param length
- *   The new size to use.
- * @param uint16s
- *   The string uint16s array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint16s_adjust_
-  extern f_status_t f_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s);
-#endif // _di_f_uint16s_adjust_
-
-/**
- * Append the source uint16s onto the destination.
- *
- * @param source
- *   The source uint16s to append.
- * @param destination
- *   The destination uint16s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint16s_append_
-  extern f_status_t f_uint16s_append(const f_uint16s_t source, f_uint16s_t *destination);
-#endif // _di_f_uint16s_append_
-
-/**
- * Resize the string uint16s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decimate the size by.
- * @param uint16s
- *   The string uint16s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint16s_decimate_by_
-  extern f_status_t f_uint16s_decimate_by(const f_array_length_t amount, f_uint16s_t *uint16s);
-#endif // _di_f_uint16s_decimate_by_
-
-/**
- * Resize the string uint16s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decrease the size by.
- * @param uint16s
- *   The string uint16s array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint16s_decrease_by_
-  extern f_status_t f_uint16s_decrease_by(const f_array_length_t amount, f_uint16s_t *uint16s);
-#endif // _di_f_uint16s_decrease_by_
-
-/**
- * Increase the size of the string uint16s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint16s
- *   The string uint16s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint16s_increase_
-  extern f_status_t f_uint16s_increase(const f_array_length_t step, f_uint16s_t *uint16s);
-#endif // _di_f_uint16s_increase_
-
-/**
- * Resize the string uint16s array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint16s
- *   The string uint16s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint16s_increase_by_
-  extern f_status_t f_uint16s_increase_by(const f_array_length_t amount, f_uint16s_t *uint16s);
-#endif // _di_f_uint16s_increase_by_
-
-/**
- * Resize the string uint16s array.
- *
- * @param length
- *   The new size to use.
- * @param uint16s
- *   The string uint16s array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint16s_resize_
-  extern f_status_t f_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s);
-#endif // _di_f_uint16s_resize_
-
-/**
- * Resize the string uint16ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint16ss
- *   The string uint16ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint16ss_adjust_
-  extern f_status_t f_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss);
-#endif // _di_f_uint16ss_adjust_
-
-/**
- * Append the source uint16ss onto the destination.
- *
- * @param source
- *   The source uint16ss to append.
- * @param destination
- *   The destination ranges the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint16ss_append_
-  extern f_status_t f_uint16ss_append(const f_uint16ss_t source, f_uint16ss_t *destination);
-#endif // _di_f_uint16ss_append_
-
-/**
- * Resize the string uint16ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint16ss
- *   The string uint16ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint16ss_adjust_
-  extern f_status_t f_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss);
-#endif // _di_f_uint16ss_adjust_
-
-/**
- * Resize the string uint16ss 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 uint16ss
- *   The string uint16ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint16ss_decimate_by_
-  extern f_status_t f_uint16ss_decimate_by(const f_array_length_t amount, f_uint16ss_t *uint16ss);
-#endif // _di_f_uint16ss_decimate_by_
-
-/**
- * Resize the string uint16ss 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 uint16ss
- *   The string uint16ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint16ss_decrease_by_
-  extern f_status_t f_uint16ss_decrease_by(const f_array_length_t amount, f_uint16ss_t *uint16ss);
-#endif // _di_f_uint16ss_decrease_by_
-
-/**
- * Increase the size of the string uint16ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint16ss
- *   The string uint16ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint16ss_increase_
-  extern f_status_t f_uint16ss_increase(const f_array_length_t step, f_uint16ss_t *uint16ss);
-#endif // _di_f_uint16ss_increase_
-
-/**
- * Resize the string uint16ss array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint16ss
- *   The string uint16ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint16ss_increase_by_
-  extern f_status_t f_uint16ss_increase_by(const f_array_length_t amount, f_uint16ss_t *uint16ss);
-#endif // _di_f_uint16ss_increase_by_
-
-/**
- * Resize the string uint16ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint16ss
- *   The string uint16ss array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint16ss_resize_
-  extern f_status_t f_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss);
-#endif // _di_f_uint16ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 701349eb594424a90457b46ad10afde3ea52d9a8..5425634e44cabd4de70349488f8f87ac5a8dfb28 100644 (file)
@@ -17,17 +17,27 @@ extern "C" {
 #endif // _di_f_int32s_adjust_
 
 #ifndef _di_f_int32s_append_
-  f_status_t f_int32s_append(const f_int32s_t source, f_int32s_t *destination) {
+  f_status_t f_int32s_append(const int32_t source, f_int32s_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
-
     return private_f_int32s_append(source, destination);
   }
 #endif // _di_f_int32s_append_
 
+#ifndef _di_f_int32s_append_all_
+  f_status_t f_int32s_append_all(const f_int32s_t source, f_int32s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_int32s_append_all(source, destination);
+  }
+#endif // _di_f_int32s_append_all_
+
 #ifndef _di_f_int32s_decimate_by_
   f_status_t f_int32s_decimate_by(const f_array_length_t amount, f_int32s_t *int32s) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +141,31 @@ extern "C" {
 #endif // _di_f_int32ss_adjust_
 
 #ifndef _di_f_int32ss_append_
-  f_status_t f_int32ss_append(const f_int32ss_t source, f_int32ss_t *destination) {
+  f_status_t f_int32ss_append(const f_int32s_t source, f_int32ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_int32ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_int32s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_int32ss_append_
+
+#ifndef _di_f_int32ss_append_all_
+  f_status_t f_int32ss_append_all(const f_int32ss_t source, f_int32ss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +180,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_int32s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_int32s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_int32ss_append_
+#endif // _di_f_int32ss_append_all_
 
 #ifndef _di_f_int32ss_decimate_by_
   f_status_t f_int32ss_decimate_by(const f_array_length_t amount, f_int32ss_t *int32ss) {
@@ -246,246 +285,6 @@ extern "C" {
   }
 #endif // _di_f_int32ss_resize_
 
-#ifndef _di_f_uint32s_adjust_
-  f_status_t f_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint32s_adjust(length, uint32s);
-  }
-#endif // _di_f_uint32s_adjust_
-
-#ifndef _di_f_uint32s_append_
-  f_status_t f_uint32s_append(const f_uint32s_t source, f_uint32s_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    return private_f_uint32s_append(source, destination);
-  }
-#endif // _di_f_uint32s_append_
-
-#ifndef _di_f_uint32s_decimate_by_
-  f_status_t f_uint32s_decimate_by(const f_array_length_t amount, f_uint32s_t *uint32s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint32s->size - amount > 0) {
-      return private_f_uint32s_adjust(uint32s->size - amount, uint32s);
-    }
-
-    return private_f_uint32s_adjust(0, uint32s);
-  }
-#endif // _di_f_uint32s_decimate_by_
-
-#ifndef _di_f_uint32s_decrease_by_
-  f_status_t f_uint32s_decrease_by(const f_array_length_t amount, f_uint32s_t *uint32s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint32s->size - amount > 0) {
-      return private_f_uint32s_resize(uint32s->size - amount, uint32s);
-    }
-
-    return private_f_uint32s_resize(0, uint32s);
-  }
-#endif // _di_f_uint32s_decrease_by_
-
-#ifndef _di_f_uint32s_increase_
-  f_status_t f_uint32s_increase(const f_array_length_t step, f_uint32s_t *uint32s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint32s->used + 1 > uint32s->size) {
-      f_array_length_t size = uint32s->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint32s->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint32s_resize(size, uint32s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint32s_increase_
-
-#ifndef _di_f_uint32s_increase_by_
-  f_status_t f_uint32s_increase_by(const f_array_length_t amount, f_uint32s_t *uint32s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint32s->used + amount > uint32s->size) {
-      if (uint32s->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint32s_resize(uint32s->used + amount, uint32s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint32s_increase_by_
-
-#ifndef _di_f_uint32s_resize_
-  f_status_t f_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint32s_resize(length, uint32s);
-  }
-#endif // _di_f_uint32s_resize_
-
-#ifndef _di_f_uint32ss_adjust_
-  f_status_t f_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint32ss_adjust(length, uint32ss);
-  }
-#endif // _di_f_uint32ss_adjust_
-
-#ifndef _di_f_uint32ss_append_
-  f_status_t f_uint32ss_append(const f_uint32ss_t source, f_uint32ss_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint32ss_resize(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_uint32s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return F_none;
-  }
-#endif // _di_f_uint32ss_append_
-
-#ifndef _di_f_uint32ss_decimate_by_
-  f_status_t f_uint32ss_decimate_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint32ss->size - amount > 0) {
-      return private_f_uint32ss_adjust(uint32ss->size - amount, uint32ss);
-    }
-
-    return private_f_uint32ss_adjust(0, uint32ss);
-  }
-#endif // _di_f_uint32ss_decimate_by_
-
-#ifndef _di_f_uint32ss_decrease_by_
-  f_status_t f_uint32ss_decrease_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint32ss->size - amount > 0) {
-      return private_f_uint32ss_resize(uint32ss->size - amount, uint32ss);
-    }
-
-    return private_f_uint32ss_resize(0, uint32ss);
-  }
-#endif // _di_f_uint32ss_decrease_by_
-
-#ifndef _di_f_uint32ss_increase_
-  f_status_t f_uint32ss_increase(const f_array_length_t step, f_uint32ss_t *uint32ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint32ss->used + 1 > uint32ss->size) {
-      f_array_length_t size = uint32ss->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint32ss->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint32ss_resize(size, uint32ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint32ss_increase_
-
-#ifndef _di_f_uint32ss_increase_by_
-  f_status_t f_uint32ss_increase_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint32ss->used + amount > uint32ss->size) {
-      if (uint32ss->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint32ss_resize(uint32ss->used + amount, uint32ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint32ss_increase_by_
-
-#ifndef _di_f_uint32ss_resize_
-  f_status_t f_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint32ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint32ss_resize(length, uint32ss);
-  }
-#endif // _di_f_uint32ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 7ec1864bd5aae1034ad07c11938baebb0968cdd1..9d3f4cfe29992f972b070a99a30bdf532b20e757 100644 (file)
@@ -36,10 +36,10 @@ extern "C" {
 #endif // _di_f_int32s_adjust_
 
 /**
- * Append the source int32s onto the destination.
+ * Append the single source int32 onto the destination.
  *
  * @param source
- *   The source int32s to append.
+ *   The source int32 to append.
  * @param destination
  *   The destination int32s the source is appended onto.
  *
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int32s_append_
-  extern f_status_t f_int32s_append(const f_int32s_t source, f_int32s_t *destination);
+  extern f_status_t f_int32s_append(const int32_t source, f_int32s_t *destination);
 #endif // _di_f_int32s_append_
 
 /**
+ * Append the source int32s onto the destination.
+ *
+ * @param source
+ *   The source int32s to append.
+ * @param destination
+ *   The destination int32s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_int32s_append_all_
+  extern f_status_t f_int32s_append_all(const f_int32s_t source, f_int32s_t *destination);
+#endif // _di_f_int32s_append_all_
+
+/**
  * Resize the int32s array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -192,10 +212,10 @@ extern "C" {
 #endif // _di_f_int32ss_adjust_
 
 /**
- * Append the source int32ss onto the destination.
+ * Append the single source int32s onto the destination.
  *
  * @param source
- *   The source int32ss to append.
+ *   The source int32s to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -208,28 +228,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int32ss_append_
-  extern f_status_t f_int32ss_append(const f_int32ss_t source, f_int32ss_t *destination);
+  extern f_status_t f_int32ss_append(const f_int32s_t source, f_int32ss_t *destination);
 #endif // _di_f_int32ss_append_
 
 /**
- * Resize the int32ss array.
+ * Append the source int32ss onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param int32ss
- *   The int32ss array to resize.
+ * @param source
+ *   The source int32ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_int32ss_adjust_
-  extern f_status_t f_int32ss_adjust(const f_array_length_t length, f_int32ss_t *int32ss);
-#endif // _di_f_int32ss_adjust_
+#ifndef _di_f_int32ss_append_all_
+  extern f_status_t f_int32ss_append_all(const f_int32ss_t source, f_int32ss_t *destination);
+#endif // _di_f_int32ss_append_all_
 
 /**
  * Resize the int32ss array to a smaller size.
@@ -350,340 +370,6 @@ extern "C" {
   extern f_status_t f_int32ss_resize(const f_array_length_t length, f_int32ss_t *int32ss);
 #endif // _di_f_int32ss_resize_
 
-/**
- * Resize the string uint32s array.
- *
- * @param length
- *   The new size to use.
- * @param uint32s
- *   The string uint32s array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint32s_adjust_
-  extern f_status_t f_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s);
-#endif // _di_f_uint32s_adjust_
-
-/**
- * Append the source uint32s onto the destination.
- *
- * @param source
- *   The source uint32s to append.
- * @param destination
- *   The destination uint32s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint32s_append_
-  extern f_status_t f_uint32s_append(const f_uint32s_t source, f_uint32s_t *destination);
-#endif // _di_f_uint32s_append_
-
-/**
- * Resize the string uint32s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decimate the size by.
- * @param uint32s
- *   The string uint32s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint32s_decimate_by_
-  extern f_status_t f_uint32s_decimate_by(const f_array_length_t amount, f_uint32s_t *uint32s);
-#endif // _di_f_uint32s_decimate_by_
-
-/**
- * Resize the string uint32s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decrease the size by.
- * @param uint32s
- *   The string uint32s array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint32s_decrease_by_
-  extern f_status_t f_uint32s_decrease_by(const f_array_length_t amount, f_uint32s_t *uint32s);
-#endif // _di_f_uint32s_decrease_by_
-
-/**
- * Increase the size of the string uint32s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint32s
- *   The string uint32s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint32s_increase_
-  extern f_status_t f_uint32s_increase(const f_array_length_t step, f_uint32s_t *uint32s);
-#endif // _di_f_uint32s_increase_
-
-/**
- * Resize the string uint32s array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint32s
- *   The string uint32s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint32s_increase_by_
-  extern f_status_t f_uint32s_increase_by(const f_array_length_t amount, f_uint32s_t *uint32s);
-#endif // _di_f_uint32s_increase_by_
-
-/**
- * Resize the string uint32s array.
- *
- * @param length
- *   The new size to use.
- * @param uint32s
- *   The string uint32s array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint32s_resize_
-  extern f_status_t f_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s);
-#endif // _di_f_uint32s_resize_
-
-/**
- * Resize the string uint32ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint32ss
- *   The string uint32ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint32ss_adjust_
-  extern f_status_t f_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss);
-#endif // _di_f_uint32ss_adjust_
-
-/**
- * Append the source uint32ss onto the destination.
- *
- * @param source
- *   The source uint32ss to append.
- * @param destination
- *   The destination ranges the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint32ss_append_
-  extern f_status_t f_uint32ss_append(const f_uint32ss_t source, f_uint32ss_t *destination);
-#endif // _di_f_uint32ss_append_
-
-/**
- * Resize the string uint32ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint32ss
- *   The string uint32ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint32ss_adjust_
-  extern f_status_t f_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss);
-#endif // _di_f_uint32ss_adjust_
-
-/**
- * Resize the string uint32ss 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 uint32ss
- *   The string uint32ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint32ss_decimate_by_
-  extern f_status_t f_uint32ss_decimate_by(const f_array_length_t amount, f_uint32ss_t *uint32ss);
-#endif // _di_f_uint32ss_decimate_by_
-
-/**
- * Resize the string uint32ss 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 uint32ss
- *   The string uint32ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint32ss_decrease_by_
-  extern f_status_t f_uint32ss_decrease_by(const f_array_length_t amount, f_uint32ss_t *uint32ss);
-#endif // _di_f_uint32ss_decrease_by_
-
-/**
- * Increase the size of the string uint32ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint32ss
- *   The string uint32ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint32ss_increase_
-  extern f_status_t f_uint32ss_increase(const f_array_length_t step, f_uint32ss_t *uint32ss);
-#endif // _di_f_uint32ss_increase_
-
-/**
- * Resize the string uint32ss array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint32ss
- *   The string uint32ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint32ss_increase_by_
-  extern f_status_t f_uint32ss_increase_by(const f_array_length_t amount, f_uint32ss_t *uint32ss);
-#endif // _di_f_uint32ss_increase_by_
-
-/**
- * Resize the string uint32ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint32ss
- *   The string uint32ss array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint32ss_resize_
-  extern f_status_t f_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss);
-#endif // _di_f_uint32ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 687ad22188cfbfa9ef0a3302aa463e1deca4c701..128f61f283ccb56d85b6fd73cce51b424525398e 100644 (file)
@@ -17,17 +17,27 @@ extern "C" {
 #endif // _di_f_int64s_adjust_
 
 #ifndef _di_f_int64s_append_
-  f_status_t f_int64s_append(const f_int64s_t source, f_int64s_t *destination) {
+  f_status_t f_int64s_append(const int64_t source, f_int64s_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
-
     return private_f_int64s_append(source, destination);
   }
 #endif // _di_f_int64s_append_
 
+#ifndef _di_f_int64s_append_all_
+  f_status_t f_int64s_append_all(const f_int64s_t source, f_int64s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_int64s_append_all(source, destination);
+  }
+#endif // _di_f_int64s_append_all_
+
 #ifndef _di_f_int64s_decimate_by_
   f_status_t f_int64s_decimate_by(const f_array_length_t amount, f_int64s_t *int64s) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +141,31 @@ extern "C" {
 #endif // _di_f_int64ss_adjust_
 
 #ifndef _di_f_int64ss_append_
-  f_status_t f_int64ss_append(const f_int64ss_t source, f_int64ss_t *destination) {
+  f_status_t f_int64ss_append(const f_int64s_t source, f_int64ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_int64ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_int64s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_int64ss_append_
+
+#ifndef _di_f_int64ss_append_all_
+  f_status_t f_int64ss_append_all(const f_int64ss_t source, f_int64ss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +180,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_int64s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_int64s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_int64ss_append_
+#endif // _di_f_int64ss_append_all_
 
 #ifndef _di_f_int64ss_decimate_by_
   f_status_t f_int64ss_decimate_by(const f_array_length_t amount, f_int64ss_t *int64ss) {
@@ -246,246 +285,6 @@ extern "C" {
   }
 #endif // _di_f_int64ss_resize_
 
-#ifndef _di_f_uint64s_adjust_
-  f_status_t f_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint64s_adjust(length, uint64s);
-  }
-#endif // _di_f_uint64s_adjust_
-
-#ifndef _di_f_uint64s_append_
-  f_status_t f_uint64s_append(const f_uint64s_t source, f_uint64s_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    return private_f_uint64s_append(source, destination);
-  }
-#endif // _di_f_uint64s_append_
-
-#ifndef _di_f_uint64s_decimate_by_
-  f_status_t f_uint64s_decimate_by(const f_array_length_t amount, f_uint64s_t *uint64s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint64s->size - amount > 0) {
-      return private_f_uint64s_adjust(uint64s->size - amount, uint64s);
-    }
-
-    return private_f_uint64s_adjust(0, uint64s);
-  }
-#endif // _di_f_uint64s_decimate_by_
-
-#ifndef _di_f_uint64s_decrease_by_
-  f_status_t f_uint64s_decrease_by(const f_array_length_t amount, f_uint64s_t *uint64s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint64s->size - amount > 0) {
-      return private_f_uint64s_resize(uint64s->size - amount, uint64s);
-    }
-
-    return private_f_uint64s_resize(0, uint64s);
-  }
-#endif // _di_f_uint64s_decrease_by_
-
-#ifndef _di_f_uint64s_increase_
-  f_status_t f_uint64s_increase(const f_array_length_t step, f_uint64s_t *uint64s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint64s->used + 1 > uint64s->size) {
-      f_array_length_t size = uint64s->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint64s->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint64s_resize(size, uint64s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint64s_increase_
-
-#ifndef _di_f_uint64s_increase_by_
-  f_status_t f_uint64s_increase_by(const f_array_length_t amount, f_uint64s_t *uint64s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint64s->used + amount > uint64s->size) {
-      if (uint64s->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint64s_resize(uint64s->used + amount, uint64s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint64s_increase_by_
-
-#ifndef _di_f_uint64s_resize_
-  f_status_t f_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint64s_resize(length, uint64s);
-  }
-#endif // _di_f_uint64s_resize_
-
-#ifndef _di_f_uint64ss_adjust_
-  f_status_t f_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint64ss_adjust(length, uint64ss);
-  }
-#endif // _di_f_uint64ss_adjust_
-
-#ifndef _di_f_uint64ss_append_
-  f_status_t f_uint64ss_append(const f_uint64ss_t source, f_uint64ss_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint64ss_resize(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_uint64s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return F_none;
-  }
-#endif // _di_f_uint64ss_append_
-
-#ifndef _di_f_uint64ss_decimate_by_
-  f_status_t f_uint64ss_decimate_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint64ss->size - amount > 0) {
-      return private_f_uint64ss_adjust(uint64ss->size - amount, uint64ss);
-    }
-
-    return private_f_uint64ss_adjust(0, uint64ss);
-  }
-#endif // _di_f_uint64ss_decimate_by_
-
-#ifndef _di_f_uint64ss_decrease_by_
-  f_status_t f_uint64ss_decrease_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint64ss->size - amount > 0) {
-      return private_f_uint64ss_resize(uint64ss->size - amount, uint64ss);
-    }
-
-    return private_f_uint64ss_resize(0, uint64ss);
-  }
-#endif // _di_f_uint64ss_decrease_by_
-
-#ifndef _di_f_uint64ss_increase_
-  f_status_t f_uint64ss_increase(const f_array_length_t step, f_uint64ss_t *uint64ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint64ss->used + 1 > uint64ss->size) {
-      f_array_length_t size = uint64ss->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint64ss->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint64ss_resize(size, uint64ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint64ss_increase_
-
-#ifndef _di_f_uint64ss_increase_by_
-  f_status_t f_uint64ss_increase_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint64ss->used + amount > uint64ss->size) {
-      if (uint64ss->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint64ss_resize(uint64ss->used + amount, uint64ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint64ss_increase_by_
-
-#ifndef _di_f_uint64ss_resize_
-  f_status_t f_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint64ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint64ss_resize(length, uint64ss);
-  }
-#endif // _di_f_uint64ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 21df2426f20b824e128512b56b200238b2f4893b..8ec4a6ce9d5493476a2e53e1989217f25908ef16 100644 (file)
@@ -36,10 +36,10 @@ extern "C" {
 #endif // _di_f_int64s_adjust_
 
 /**
- * Append the source int64s onto the destination.
+ * Append the single source int64 onto the destination.
  *
  * @param source
- *   The source int64s to append.
+ *   The source int64 to append.
  * @param destination
  *   The destination int64s the source is appended onto.
  *
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int64s_append_
-  extern f_status_t f_int64s_append(const f_int64s_t source, f_int64s_t *destination);
+  extern f_status_t f_int64s_append(const int64_t source, f_int64s_t *destination);
 #endif // _di_f_int64s_append_
 
 /**
+ * Append the source int64s onto the destination.
+ *
+ * @param source
+ *   The source int64s to append.
+ * @param destination
+ *   The destination int64s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_int64s_append_all_
+  extern f_status_t f_int64s_append_all(const f_int64s_t source, f_int64s_t *destination);
+#endif // _di_f_int64s_append_all_
+
+/**
  * Resize the int64s array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -193,10 +213,10 @@ extern "C" {
 #endif // _di_f_int64ss_adjust_
 
 /**
- * Append the source int64ss onto the destination.
+ * Append the single source int64s onto the destination.
  *
  * @param source
- *   The source int64ss to append.
+ *   The source int64s to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -209,28 +229,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int64ss_append_
-  extern f_status_t f_int64ss_append(const f_int64ss_t source, f_int64ss_t *destination);
+  extern f_status_t f_int64ss_append(const f_int64s_t source, f_int64ss_t *destination);
 #endif // _di_f_int64ss_append_
 
 /**
- * Resize the int64ss array.
+ * Append the source int64ss onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param int64ss
- *   The int64ss array to resize.
+ * @param source
+ *   The source int64ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_int64ss_adjust_
-  extern f_status_t f_int64ss_adjust(const f_array_length_t length, f_int64ss_t *int64ss);
-#endif // _di_f_int64ss_adjust_
+#ifndef _di_f_int64ss_append_all_
+  extern f_status_t f_int64ss_append_all(const f_int64ss_t source, f_int64ss_t *destination);
+#endif // _di_f_int64ss_append_all_
 
 /**
  * Resize the int64ss array to a smaller size.
@@ -352,342 +372,6 @@ extern "C" {
   extern f_status_t f_int64ss_resize(const f_array_length_t length, f_int64ss_t *int64ss);
 #endif // _di_f_int64ss_resize_
 
-/**
- * Resize the string uint64s array.
- *
- * @param length
- *   The new size to use.
- * @param uint64s
- *   The string uint64s array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint64s_adjust_
-  extern f_status_t f_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s);
-#endif // _di_f_uint64s_adjust_
-
-/**
- * Append the source uint64s onto the destination.
- *
- * @param source
- *   The source uint64s to append.
- * @param destination
- *   The destination uint64s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint64s_append_
-  extern f_status_t f_uint64s_append(const f_uint64s_t source, f_uint64s_t *destination);
-#endif // _di_f_uint64s_append_
-
-/**
- * Resize the string uint64s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decimate the size by.
- * @param uint64s
- *   The string uint64s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint64s_decimate_by_
-  extern f_status_t f_uint64s_decimate_by(const f_array_length_t amount, f_uint64s_t *uint64s);
-#endif // _di_f_uint64s_decimate_by_
-
-/**
- * Resize the string uint64s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decrease the size by.
- * @param uint64s
- *   The string uint64s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint64s_decrease_by_
-  extern f_status_t f_uint64s_decrease_by(const f_array_length_t amount, f_uint64s_t *uint64s);
-#endif // _di_f_uint64s_decrease_by_
-
-/**
- * Increase the size of the string uint64s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint64s
- *   The string uint64s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint64s_increase_
-  extern f_status_t f_uint64s_increase(const f_array_length_t step, f_uint64s_t *uint64s);
-#endif // _di_f_uint64s_increase_
-
-/**
- * Resize the string uint64s array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint64s
- *   The string uint64s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint64s_increase_by_
-  extern f_status_t f_uint64s_increase_by(const f_array_length_t amount, f_uint64s_t *uint64s);
-#endif // _di_f_uint64s_increase_by_
-
-/**
- * Resize the string uint64s array.
- *
- * @param length
- *   The new size to use.
- * @param uint64s
- *   The string uint64s array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint64s_resize_
-  extern f_status_t f_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s);
-#endif // _di_f_uint64s_resize_
-
-/**
- * Resize the string uint64ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint64ss
- *   The string uint64ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint64ss_adjust_
-  extern f_status_t f_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss);
-#endif // _di_f_uint64ss_adjust_
-
-/**
- * Append the source uint64ss onto the destination.
- *
- * @param source
- *   The source uint64ss to append.
- * @param destination
- *   The destination ranges the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint64ss_append_
-  extern f_status_t f_uint64ss_append(const f_uint64ss_t source, f_uint64ss_t *destination);
-#endif // _di_f_uint64ss_append_
-
-/**
- * Resize the string uint64ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint64ss
- *   The string uint64ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint64ss_adjust_
-  extern f_status_t f_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss);
-#endif // _di_f_uint64ss_adjust_
-
-/**
- * Resize the string uint64ss 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 uint64ss
- *   The string uint64ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint64ss_decimate_by_
-  extern f_status_t f_uint64ss_decimate_by(const f_array_length_t amount, f_uint64ss_t *uint64ss);
-#endif // _di_f_uint64ss_decimate_by_
-
-/**
- * Resize the string uint64ss 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 uint64ss
- *   The string uint64ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint64ss_decrease_by_
-  extern f_status_t f_uint64ss_decrease_by(const f_array_length_t amount, f_uint64ss_t *uint64ss);
-#endif // _di_f_uint64ss_decrease_by_
-
-/**
- * Increase the size of the string uint64ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint64ss
- *   The string uint64ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint64ss_increase_
-  extern f_status_t f_uint64ss_increase(const f_array_length_t step, f_uint64ss_t *uint64ss);
-#endif // _di_f_uint64ss_increase_
-
-/**
- * Resize the string uint64ss array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint64ss
- *   The string uint64ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint64ss_increase_by_
-  extern f_status_t f_uint64ss_increase_by(const f_array_length_t amount, f_uint64ss_t *uint64ss);
-#endif // _di_f_uint64ss_increase_by_
-
-/**
- * Resize the string uint64ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint64ss
- *   The string uint64ss array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint64ss_resize_
-  extern f_status_t f_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss);
-#endif // _di_f_uint64ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index c23258fb74f52c9be42d70da27d037f1564434d3..055d252716db1241a7cbbc6fbe0299708108d1cb 100644 (file)
@@ -17,17 +17,27 @@ extern "C" {
 #endif // _di_f_int8s_adjust_
 
 #ifndef _di_f_int8s_append_
-  f_status_t f_int8s_append(const f_int8s_t source, f_int8s_t *destination) {
+  f_status_t f_int8s_append(const int8_t source, f_int8s_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
-
     return private_f_int8s_append(source, destination);
   }
 #endif // _di_f_int8s_append_
 
+#ifndef _di_f_int8s_append_all_
+  f_status_t f_int8s_append_all(const f_int8s_t source, f_int8s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_int8s_append_all(source, destination);
+  }
+#endif // _di_f_int8s_append_all_
+
 #ifndef _di_f_int8s_decimate_by_
   f_status_t f_int8s_decimate_by(const f_array_length_t amount, f_int8s_t *int8s) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +141,31 @@ extern "C" {
 #endif // _di_f_int8ss_adjust_
 
 #ifndef _di_f_int8ss_append_
-  f_status_t f_int8ss_append(const f_int8ss_t source, f_int8ss_t *destination) {
+  f_status_t f_int8ss_append(const f_int8s_t source, f_int8ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_int8ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_int8s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_int8ss_append_
+
+#ifndef _di_f_int8ss_append_all_
+  f_status_t f_int8ss_append_all(const f_int8ss_t source, f_int8ss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +180,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_int8s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_int8s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_int8ss_append_
+#endif // _di_f_int8ss_append_all_
 
 #ifndef _di_f_int8ss_decimate_by_
   f_status_t f_int8ss_decimate_by(const f_array_length_t amount, f_int8ss_t *int8ss) {
@@ -246,246 +285,6 @@ extern "C" {
   }
 #endif // _di_f_int8ss_resize_
 
-#ifndef _di_f_uint8s_adjust_
-  f_status_t f_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint8s_adjust(length, uint8s);
-  }
-#endif // _di_f_uint8s_adjust_
-
-#ifndef _di_f_uint8s_append_
-  f_status_t f_uint8s_append(const f_uint8s_t source, f_uint8s_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    return private_f_uint8s_append(source, destination);
-  }
-#endif // _di_f_uint8s_append_
-
-#ifndef _di_f_uint8s_decimate_by_
-  f_status_t f_uint8s_decimate_by(const f_array_length_t amount, f_uint8s_t *uint8s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint8s->size - amount > 0) {
-      return private_f_uint8s_adjust(uint8s->size - amount, uint8s);
-    }
-
-    return private_f_uint8s_adjust(0, uint8s);
-  }
-#endif // _di_f_uint8s_decimate_by_
-
-#ifndef _di_f_uint8s_decrease_by_
-  f_status_t f_uint8s_decrease_by(const f_array_length_t amount, f_uint8s_t *uint8s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint8s->size - amount > 0) {
-      return private_f_uint8s_resize(uint8s->size - amount, uint8s);
-    }
-
-    return private_f_uint8s_resize(0, uint8s);
-  }
-#endif // _di_f_uint8s_decrease_by_
-
-#ifndef _di_f_uint8s_increase_
-  f_status_t f_uint8s_increase(const f_array_length_t step, f_uint8s_t *uint8s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint8s->used + 1 > uint8s->size) {
-      f_array_length_t size = uint8s->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint8s->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint8s_resize(size, uint8s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint8s_increase_
-
-#ifndef _di_f_uint8s_increase_by_
-  f_status_t f_uint8s_increase_by(const f_array_length_t amount, f_uint8s_t *uint8s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint8s->used + amount > uint8s->size) {
-      if (uint8s->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint8s_resize(uint8s->used + amount, uint8s);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint8s_increase_by_
-
-#ifndef _di_f_uint8s_resize_
-  f_status_t f_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8s) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint8s_resize(length, uint8s);
-  }
-#endif // _di_f_uint8s_resize_
-
-#ifndef _di_f_uint8ss_adjust_
-  f_status_t f_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint8ss_adjust(length, uint8ss);
-  }
-#endif // _di_f_uint8ss_adjust_
-
-#ifndef _di_f_uint8ss_append_
-  f_status_t f_uint8ss_append(const f_uint8ss_t source, f_uint8ss_t *destination) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!destination) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!source.used) return F_data_not;
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint8ss_resize(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_uint8s_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return F_none;
-  }
-#endif // _di_f_uint8ss_append_
-
-#ifndef _di_f_uint8ss_decimate_by_
-  f_status_t f_uint8ss_decimate_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint8ss->size - amount > 0) {
-      return private_f_uint8ss_adjust(uint8ss->size - amount, uint8ss);
-    }
-
-    return private_f_uint8ss_adjust(0, uint8ss);
-  }
-#endif // _di_f_uint8ss_decimate_by_
-
-#ifndef _di_f_uint8ss_decrease_by_
-  f_status_t f_uint8ss_decrease_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint8ss->size - amount > 0) {
-      return private_f_uint8ss_resize(uint8ss->size - amount, uint8ss);
-    }
-
-    return private_f_uint8ss_resize(0, uint8ss);
-  }
-#endif // _di_f_uint8ss_decrease_by_
-
-#ifndef _di_f_uint8ss_increase_
-  f_status_t f_uint8ss_increase(const f_array_length_t step, f_uint8ss_t *uint8ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (step && uint8ss->used + 1 > uint8ss->size) {
-      f_array_length_t size = uint8ss->used + step;
-
-      if (size > F_array_length_t_size_d) {
-        if (uint8ss->used + 1 > F_array_length_t_size_d) {
-          return F_status_set_error(F_array_too_large);
-        }
-
-        size = F_array_length_t_size_d;
-      }
-
-      return private_f_uint8ss_resize(size, uint8ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint8ss_increase_
-
-#ifndef _di_f_uint8ss_increase_by_
-  f_status_t f_uint8ss_increase_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    if (!amount) {
-      return F_data_not;
-    }
-
-    if (uint8ss->used + amount > uint8ss->size) {
-      if (uint8ss->used + amount > F_array_length_t_size_d) {
-        return F_status_set_error(F_array_too_large);
-      }
-
-      return private_f_uint8ss_resize(uint8ss->used + amount, uint8ss);
-    }
-
-    return F_data_not;
-  }
-#endif // _di_f_uint8ss_increase_by_
-
-#ifndef _di_f_uint8ss_resize_
-  f_status_t f_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss) {
-    #ifndef _di_level_0_parameter_checking_
-      if (!uint8ss) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
-
-    return private_f_uint8ss_resize(length, uint8ss);
-  }
-#endif // _di_f_uint8ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index c88e49e71c5ae3c818ccb360a257f0592caefb50..65f2bd0a5798820a19ba81e4b4c191285a199baa 100644 (file)
@@ -36,10 +36,10 @@ extern "C" {
 #endif // _di_f_int8s_adjust_
 
 /**
- * Append the source int8s onto the destination.
+ * Append the single source int8 onto the destination.
  *
  * @param source
- *   The source int8s to append.
+ *   The source int8 to append.
  * @param destination
  *   The destination int8s the source is appended onto.
  *
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int8s_append_
-  extern f_status_t f_int8s_append(const f_int8s_t source, f_int8s_t *destination);
+  extern f_status_t f_int8s_append(const int8_t source, f_int8s_t *destination);
 #endif // _di_f_int8s_append_
 
 /**
+ * Append the source int8s onto the destination.
+ *
+ * @param source
+ *   The source int8s to append.
+ * @param destination
+ *   The destination int8s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_int8s_append_all_
+  extern f_status_t f_int8s_append_all(const f_int8s_t source, f_int8s_t *destination);
+#endif // _di_f_int8s_append_all_
+
+/**
  * Resize the int8s array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -193,10 +213,10 @@ extern "C" {
 #endif // _di_f_int8ss_adjust_
 
 /**
- * Append the source int8ss onto the destination.
+ * Append the single source int8s onto the destination.
  *
  * @param source
- *   The source int8ss to append.
+ *   The source int8s to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -209,28 +229,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_int8ss_append_
-  extern f_status_t f_int8ss_append(const f_int8ss_t source, f_int8ss_t *destination);
+  extern f_status_t f_int8ss_append(const f_int8s_t source, f_int8ss_t *destination);
 #endif // _di_f_int8ss_append_
 
 /**
- * Resize the int8ss array.
+ * Append the source int8ss onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param int8ss
- *   The int8ss array to resize.
+ * @param source
+ *   The source int8ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_int8ss_adjust_
-  extern f_status_t f_int8ss_adjust(const f_array_length_t length, f_int8ss_t *int8ss);
-#endif // _di_f_int8ss_adjust_
+#ifndef _di_f_int8ss_append_all_
+  extern f_status_t f_int8ss_append_all(const f_int8ss_t source, f_int8ss_t *destination);
+#endif // _di_f_int8ss_append_all_
 
 /**
  * Resize the int8ss array to a smaller size.
@@ -352,342 +372,6 @@ extern "C" {
   extern f_status_t f_int8ss_resize(const f_array_length_t length, f_int8ss_t *int8ss);
 #endif // _di_f_int8ss_resize_
 
-/**
- * Resize the string uint8s array.
- *
- * @param length
- *   The new size to use.
- * @param uint8s
- *   The string uint8s array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint8s_adjust_
-  extern f_status_t f_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s);
-#endif // _di_f_uint8s_adjust_
-
-/**
- * Append the source uint8s onto the destination.
- *
- * @param source
- *   The source uint8s to append.
- * @param destination
- *   The destination uint8s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint8s_append_
-  extern f_status_t f_uint8s_append(const f_uint8s_t source, f_uint8s_t *destination);
-#endif // _di_f_uint8s_append_
-
-/**
- * Resize the string uint8s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decimate the size by.
- * @param uint8s
- *   The string uint8s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- */
-#ifndef _di_f_uint8s_decimate_by_
-  extern f_status_t f_uint8s_decimate_by(const f_array_length_t amount, f_uint8s_t *uint8s);
-#endif // _di_f_uint8s_decimate_by_
-
-/**
- * Resize the string uint8s array to a smaller size.
- *
- * This will resize making the array smaller based on (size - given length).
- * If the given length is too small, then the resize will fail.
- * This will not shrink the size to les than 0.
- *
- * @param amount
- *   A positive number representing how much to decrease the size by.
- * @param uint8s
- *   The string uint8s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint8s_decrease_by_
-  extern f_status_t f_uint8s_decrease_by(const f_array_length_t amount, f_uint8s_t *uint8s);
-#endif // _di_f_uint8s_decrease_by_
-
-/**
- * Increase the size of the string uint8s array, but only if necesary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint8s
- *   The string uint8s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint8s_increase_
-  extern f_status_t f_uint8s_increase(const f_array_length_t step, f_uint8s_t *uint8s);
-#endif // _di_f_uint8s_increase_
-
-/**
- * Resize the string uint8s array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint8s
- *   The string uint8s array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint8s_increase_by_
-  extern f_status_t f_uint8s_increase_by(const f_array_length_t amount, f_uint8s_t *uint8s);
-#endif // _di_f_uint8s_increase_by_
-
-/**
- * Resize the string uint8s array.
- *
- * @param length
- *   The new size to use.
- * @param uint8s
- *   The string uint8s array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint8s_resize_
-  extern f_status_t f_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s);
-#endif // _di_f_uint8s_resize_
-
-/**
- * Resize the string uint8ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint8ss
- *   The string uint8ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint8ss_adjust_
-  extern f_status_t f_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss);
-#endif // _di_f_uint8ss_adjust_
-
-/**
- * Append the source uint8ss onto the destination.
- *
- * @param source
- *   The source uint8ss to append.
- * @param destination
- *   The destination ranges the source is appended onto.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint8ss_append_
-  extern f_status_t f_uint8ss_append(const f_uint8ss_t source, f_uint8ss_t *destination);
-#endif // _di_f_uint8ss_append_
-
-/**
- * Resize the string uint8ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint8ss
- *   The string uint8ss array to resize.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint8ss_adjust_
-  extern f_status_t f_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss);
-#endif // _di_f_uint8ss_adjust_
-
-/**
- * Resize the string uint8ss 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 uint8ss
- *   The string uint8ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- */
-#ifndef _di_f_uint8ss_decimate_by_
-  extern f_status_t f_uint8ss_decimate_by(const f_array_length_t amount, f_uint8ss_t *uint8ss);
-#endif // _di_f_uint8ss_decimate_by_
-
-/**
- * Resize the string uint8ss 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 uint8ss
- *   The string uint8ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not if amount is 0.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint8ss_decrease_by_
-  extern f_status_t f_uint8ss_decrease_by(const f_array_length_t amount, f_uint8ss_t *uint8ss);
-#endif // _di_f_uint8ss_decrease_by_
-
-/**
- * Increase the size of the string uint8ss array, but only if necessary.
- *
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint8ss
- *   The string uint8ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if the new array length is too large.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint8ss_increase_
-  extern f_status_t f_uint8ss_increase(const f_array_length_t step, f_uint8ss_t *uint8ss);
-#endif // _di_f_uint8ss_increase_
-
-/**
- * Resize the string uint8ss array to a larger size.
- *
- * This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint8ss
- *   The string uint8ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
- *
- *   F_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_uint8ss_increase_by_
-  extern f_status_t f_uint8ss_increase_by(const f_array_length_t amount, f_uint8ss_t *uint8ss);
-#endif // _di_f_uint8ss_increase_by_
-
-/**
- * Resize the string uint8ss array.
- *
- * @param length
- *   The new size to use.
- * @param uint8ss
- *   The string uint8ss array to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_uint8ss_resize_
-  extern f_status_t f_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss);
-#endif // _di_f_uint8ss_resize_
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index f83dc8ead27bd963a6977b61d01a605ed044f66d..a5569eaf67021cfe53ca110275014992f0f636c0 100644 (file)
@@ -9,51 +9,61 @@ extern "C" {
   f_status_t private_f_array_lengths_adjust(const f_array_length_t length, f_array_lengths_t *array_lengths) {
 
     const f_status_t status = f_memory_adjust(array_lengths->size, length, sizeof(f_array_length_t), (void **) & array_lengths->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      array_lengths->size = length;
+    array_lengths->size = length;
 
-      if (array_lengths->used > array_lengths->size) {
-        array_lengths->used = length;
-      }
+    if (array_lengths->used > array_lengths->size) {
+      array_lengths->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_array_lengths_adjust_) || !defined(_di_f_array_lengths_decimate_by_)
 
 #if !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengthss_append_)
-  extern f_status_t private_f_array_lengths_append(const f_array_lengths_t source, f_array_lengths_t *destination) {
+  extern f_status_t private_f_array_lengths_append(const f_array_length_t source, f_array_lengths_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_array_lengths_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengthss_append_)
+
+#if !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengths_append_all_) || !defined(_di_f_array_lengthss_append_all_)
+  extern f_status_t private_f_array_lengths_append_all(const f_array_lengths_t source, f_array_lengths_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_array_lengths_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_array_lengths_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengthss_append_)
+#endif // !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengths_append_all_) || !defined(_di_f_array_lengthss_append_all_)
 
 #if !defined(_di_f_array_lengths_resize_) || !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengths_decimate_by_) || !defined(_di_f_array_lengthss_append_)
   f_status_t private_f_array_lengths_resize(const f_array_length_t length, f_array_lengths_t *lengths) {
 
     const f_status_t status = f_memory_resize(lengths->size, length, sizeof(f_array_length_t), (void **) & lengths->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      lengths->size = length;
+    lengths->size = length;
 
-      if (lengths->used > lengths->size) {
-        lengths->used = length;
-      }
+    if (lengths->used > lengths->size) {
+      lengths->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_array_lengths_resize_) || !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengths_decimate_by_) || !defined(_di_f_array_lengthss_append_)
 
@@ -72,16 +82,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(lengthss->size, length, sizeof(f_array_lengths_t), (void **) & lengthss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      lengthss->size = length;
+    lengthss->size = length;
 
-      if (lengthss->used > lengthss->size) {
-        lengthss->used = length;
-      }
+    if (lengthss->used > lengthss->size) {
+      lengthss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_array_lengthss_adjust_) || !defined(_di_f_array_lengthss_decimate_by_)
 
@@ -100,16 +109,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(lengthss->size, length, sizeof(f_array_lengths_t), (void **) & lengthss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      lengthss->size = length;
+    lengthss->size = length;
 
-      if (lengthss->used > lengthss->size) {
-        lengthss->used = length;
-      }
+    if (lengthss->used > lengthss->size) {
+      lengthss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_array_lengthss_decrease_by_) || !defined(_di_f_array_lengthss_increase_) || !defined(_di_f_array_lengthss_increase_by_) || !defined(_di_f_array_lengthss_resize_)
 
index d65214e1a77c6b57cb135a256dcf25247c746dad..3fdf52877bbadda59fb63c5c62cc50838ebf56a3 100644 (file)
@@ -44,7 +44,7 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source array_lengths to append.
+ *   The source array_length to append.
  * @param destination
  *   The destination lengths the source is appended onto.
  *
@@ -53,14 +53,39 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_array_lengths_append()
  * @see f_array_lengthss_append()
  */
 #if !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengthss_append_)
-  extern f_status_t private_f_array_lengths_append(const f_array_lengths_t source, f_array_lengths_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_array_lengths_append(const f_array_length_t source, f_array_lengths_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengthss_append_)
 
 /**
+ * Private implementation for appending the array_length array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source array_lengths to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_array_lengths_append_all()
+ * @see f_array_lengthss_append()
+ * @see f_array_lengthss_append_all()
+ */
+#if !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengths_append_all_) || !defined(_di_f_array_lengthss_append_all_)
+  extern f_status_t private_f_array_lengths_append_all(const f_array_lengths_t source, f_array_lengths_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_array_lengths_append_) || !defined(_di_f_array_lengths_append_all_) || !defined(_di_f_array_lengthss_append_all_)
+
+/**
  * Private implementation for resizing the array_lengths array.
  *
  * Intended to be shared to each of the different implementation variations.
index 61237d9b7b77dc91109b6bd5d734c52a1118bb02..77582303e4a487e66b96a2e7a769806fce1f44d1 100644 (file)
@@ -9,51 +9,64 @@ extern "C" {
   f_status_t private_f_cells_adjust(const f_array_length_t length, f_cells_t *cells) {
 
     const f_status_t status = f_memory_adjust(cells->size, length, sizeof(f_cell_t), (void **) & cells->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      cells->size = length;
+    cells->size = length;
 
-      if (cells->used > cells->size) {
-        cells->used = length;
-      }
+    if (cells->used > cells->size) {
+      cells->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_cells_adjust_) || !defined(_di_f_cells_decimate_by_)
 
 #if !defined(_di_f_cells_append_) || !defined(_di_f_cellss_append_)
-  extern f_status_t private_f_cells_append(const f_cells_t source, f_cells_t *destination) {
+  extern f_status_t private_f_cells_append(const f_cell_t source, f_cells_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_cells_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used].row = source.row;
+    destination->array[destination->used++].column = source.column;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_cells_append_) || !defined(_di_f_cellss_append_)
+
+#if !defined(_di_f_cells_append_) || !defined(_di_f_cells_append_all_) || !defined(_di_f_cellss_append_all_)
+  extern f_status_t private_f_cells_append_all(const f_cells_t source, f_cells_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_cells_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_cells_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+
+      destination->array[destination->used].row = source.array[i].row;
+      destination->array[destination->used++].column = source.array[i].column;
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_cells_append_) || !defined(_di_f_cellss_append_)
+#endif // !defined(_di_f_cells_append_) || !defined(_di_f_cells_append_all_) || !defined(_di_f_cellss_append_all_)
 
 #if !defined(_di_f_cells_resize_) || !defined(_di_f_cells_append_) || !defined(_di_f_cells_decimate_by_) || !defined(_di_f_cellss_append_)
   f_status_t private_f_cells_resize(const f_array_length_t length, f_cells_t *cells) {
 
     const f_status_t status = f_memory_resize(cells->size, length, sizeof(f_cell_t), (void **) & cells->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      cells->size = length;
+    cells->size = length;
 
-      if (cells->used > cells->size) {
-        cells->used = length;
-      }
+    if (cells->used > cells->size) {
+      cells->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_cells_resize_) || !defined(_di_f_cells_append_) || !defined(_di_f_cells_decimate_by_) || !defined(_di_f_cellss_append_)
 
@@ -72,16 +85,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(cellss->size, length, sizeof(f_cells_t), (void **) & cellss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      cellss->size = length;
+    cellss->size = length;
 
-      if (cellss->used > cellss->size) {
-        cellss->used = length;
-      }
+    if (cellss->used > cellss->size) {
+      cellss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_cellss_adjust_) || !defined(_di_f_cellss_decimate_by_)
 
@@ -100,16 +112,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(cellss->size, length, sizeof(f_cells_t), (void **) & cellss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      cellss->size = length;
+    cellss->size = length;
 
-      if (cellss->used > cellss->size) {
-        cellss->used = length;
-      }
+    if (cellss->used > cellss->size) {
+      cellss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_cellss_decrease_by_) || !defined(_di_f_cellss_increase_) || !defined(_di_f_cellss_increase_by_) || !defined(_di_f_cellss_resize_)
 
index e665dcbb6a53b018baa113cae0d3a626cb25dc50..32b5a074f563e1d78c2a4c4fd060c8ee28d2cf85 100644 (file)
@@ -44,23 +44,48 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source cells to append.
+ *   The source cell to append.
  * @param destination
- *   The destination cells the source is appended onto.
+ *   The destination lengths the source is appended onto.
  *
  * @return
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_cells_append()
  * @see f_cellss_append()
  */
 #if !defined(_di_f_cells_append_) || !defined(_di_f_cellss_append_)
-  extern f_status_t private_f_cells_append(const f_cells_t source, f_cells_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_cells_append(const f_cell_t source, f_cells_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_cells_append_) || !defined(_di_f_cellss_append_)
 
 /**
+ * Private implementation for appending the cell array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source cells to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_cells_append_all()
+ * @see f_cellss_append()
+ * @see f_cellss_append_all()
+ */
+#if !defined(_di_f_cells_append_) || !defined(_di_f_cells_append_all_) || !defined(_di_f_cellss_append_all_)
+  extern f_status_t private_f_cells_append_all(const f_cells_t source, f_cells_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_cells_append_) || !defined(_di_f_cells_append_all_) || !defined(_di_f_cellss_append_all_)
+
+/**
  * Private implementation for resizing the cells array.
  *
  * Intended to be shared to each of the different implementation variations.
index 42deb316ba60fde2838f823fb52e32cd7944a5af..ddf172a19de2a8b5243ef9d6ae11eeb17988209a 100644 (file)
@@ -9,51 +9,68 @@ extern "C" {
   f_status_t private_f_fll_ids_adjust(const f_array_length_t length, f_fll_ids_t *ids) {
 
     const f_status_t status = f_memory_adjust(ids->size, length, sizeof(f_fll_id_t), (void **) & ids->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      ids->size = length;
+    ids->size = length;
 
-      if (ids->used > ids->size) {
-        ids->used = length;
-      }
+    if (ids->used > ids->size) {
+      ids->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_fll_ids_adjust_) || !defined(_di_f_fll_ids_decimate_by_)
 
 #if !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_idss_append_)
-  extern f_status_t private_f_fll_ids_append(const f_fll_ids_t source, f_fll_ids_t *destination) {
+  extern f_status_t private_f_fll_ids_append(const f_fll_id_t source, f_fll_ids_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_fll_ids_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    memcpy(destination->array[destination->used].name, source.name, sizeof(char) * f_fll_id_name_length_d);
+
+    destination->array[destination->used].type = source.type;
+    destination->array[destination->used++].used = source.used;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_idss_append_)
+
+#if !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_append_all_) || !defined(_di_f_fll_idss_append_all_)
+  extern f_status_t private_f_fll_ids_append_all(const f_fll_ids_t source, f_fll_ids_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_fll_ids_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_fll_ids_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+
+      memcpy(destination->array[destination->used].name, source.array[i].name, sizeof(char) * f_fll_id_name_length_d);
+
+      destination->array[destination->used].type = source.array[i].type;
+      destination->array[destination->used++].used = source.array[i].used;
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_idss_append_)
+#endif // !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_append_all_) || !defined(_di_f_fll_idss_append_all_)
 
 #if !defined(_di_f_fll_ids_resize_) || !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_decimate_by_) || !defined(_di_f_fll_idss_append_)
   f_status_t private_f_fll_ids_resize(const f_array_length_t length, f_fll_ids_t *ids) {
 
     const f_status_t status = f_memory_resize(ids->size, length, sizeof(f_fll_id_t), (void **) & ids->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      ids->size = length;
+    ids->size = length;
 
-      if (ids->used > ids->size) {
-        ids->used = length;
-      }
+    if (ids->used > ids->size) {
+      ids->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_fll_ids_resize_) || !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_decimate_by_) || !defined(_di_f_fll_idss_append_)
 
@@ -72,16 +89,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(idss->size, length, sizeof(f_fll_ids_t), (void **) & idss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      idss->size = length;
+    idss->size = length;
 
-      if (idss->used > idss->size) {
-        idss->used = length;
-      }
+    if (idss->used > idss->size) {
+      idss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_fll_idss_adjust_) || !defined(_di_f_fll_idss_decimate_by_)
 
@@ -100,16 +116,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(idss->size, length, sizeof(f_fll_ids_t), (void **) & idss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      idss->size = length;
+    idss->size = length;
 
-      if (idss->used > idss->size) {
-        idss->used = length;
-      }
+    if (idss->used > idss->size) {
+      idss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_fll_idss_decrease_by_) || !defined(_di_f_fll_idss_increase_) || !defined(_di_f_fll_idss_increase_by_) || !defined(_di_f_fll_idss_resize_)
 
index c6db12e3e87e83892afde8976209bbf0f9a1925f..b7d14d356fd1ba29b3ad44e4a381fc292636c0db 100644 (file)
@@ -44,23 +44,48 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source fll_ids to append.
+ *   The source fll_id to append.
  * @param destination
- *   The destination fll_ids the source is appended onto.
+ *   The destination lengths the source is appended onto.
  *
  * @return
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_fll_ids_append()
  * @see f_fll_idss_append()
  */
 #if !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_idss_append_)
-  extern f_status_t private_f_fll_ids_append(const f_fll_ids_t source, f_fll_ids_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_fll_ids_append(const f_fll_id_t source, f_fll_ids_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_idss_append_)
 
 /**
+ * Private implementation for appending the fll_id array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source fll_ids to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_fll_ids_append_all()
+ * @see f_fll_idss_append()
+ * @see f_fll_idss_append_all()
+ */
+#if !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_append_all_) || !defined(_di_f_fll_idss_append_all_)
+  extern f_status_t private_f_fll_ids_append_all(const f_fll_ids_t source, f_fll_ids_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_fll_ids_append_) || !defined(_di_f_fll_ids_append_all_) || !defined(_di_f_fll_idss_append_all_)
+
+/**
  * Private implementation for resizing the fll_ids array.
  *
  * Intended to be shared to each of the different implementation variations.
index 0ce66e8a49389865fc992517ee15edb103e7f52d..d241cd4a598ab081c8dd290a3b179fcc4d2c805e 100644 (file)
@@ -8,52 +8,62 @@ extern "C" {
 #if !defined(_di_f_int128s_adjust_) || !defined(_di_f_int128s_decimate_by_)
   f_status_t private_f_int128s_adjust(const f_array_length_t length, f_int128s_t *int128s) {
 
-    const f_status_t status = f_memory_adjust(int128s->size, length, sizeof(f_int128_t), (void **) & int128s->array);
+    const f_status_t status = f_memory_adjust(int128s->size, length, sizeof(f_int128s_t), (void **) & int128s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int128s->size = length;
+    int128s->size = length;
 
-      if (int128s->used > int128s->size) {
-        int128s->used = length;
-      }
+    if (int128s->used > int128s->size) {
+      int128s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int128s_adjust_) || !defined(_di_f_int128s_decimate_by_)
 
 #if !defined(_di_f_int128s_append_) || !defined(_di_f_int128ss_append_)
-  extern f_status_t private_f_int128s_append(const f_int128s_t source, f_int128s_t *destination) {
+  extern f_status_t private_f_int128s_append(const int128_t source, f_int128s_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_int128s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_int128s_append_) || !defined(_di_f_int128ss_append_)
+
+#if !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_append_all_) || !defined(_di_f_int128ss_append_all_)
+  extern f_status_t private_f_int128s_append_all(const f_int128s_t source, f_int128s_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_int128s_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_int128s_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_int128s_append_) || !defined(_di_f_int128ss_append_)
+#endif // !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_append_all_) || !defined(_di_f_int128ss_append_all_)
 
 #if !defined(_di_f_int128s_resize_) || !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_decimate_by_) || !defined(_di_f_int128ss_append_)
   f_status_t private_f_int128s_resize(const f_array_length_t length, f_int128s_t *int128s) {
 
-    const f_status_t status = f_memory_resize(int128s->size, length, sizeof(f_int128_t), (void **) & int128s->array);
+    const f_status_t status = f_memory_resize(int128s->size, length, sizeof(f_int128s_t), (void **) & int128s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int128s->size = length;
+    int128s->size = length;
 
-      if (int128s->used > int128s->size) {
-        int128s->used = length;
-      }
+    if (int128s->used > int128s->size) {
+      int128s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int128s_resize_) || !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_decimate_by_) || !defined(_di_f_int128ss_append_)
 
@@ -72,16 +82,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(int128ss->size, length, sizeof(f_int128s_t), (void **) & int128ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int128ss->size = length;
+    int128ss->size = length;
 
-      if (int128ss->used > int128ss->size) {
-        int128ss->used = length;
-      }
+    if (int128ss->used > int128ss->size) {
+      int128ss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int128ss_adjust_) || !defined(_di_f_int128ss_decimate_by_)
 
@@ -100,126 +109,17 @@ extern "C" {
     } // for
 
     status = f_memory_resize(int128ss->size, length, sizeof(f_int128s_t), (void **) & int128ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int128ss->size = length;
-
-      if (int128ss->used > int128ss->size) {
-        int128ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_int128ss_decrease_by_) || !defined(_di_f_int128ss_increase_) || !defined(_di_f_int128ss_increase_by_) || !defined(_di_f_int128ss_resize_)
-
-#if !defined(_di_f_uint128s_adjust_) || !defined(_di_f_uint128s_decimate_by_)
-  f_status_t private_f_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s) {
-
-    const f_status_t status = f_memory_adjust(uint128s->size, length, sizeof(f_uint128_t), (void **) & uint128s->array);
+    int128ss->size = length;
 
-    if (F_status_is_error_not(status)) {
-      uint128s->size = length;
-
-      if (uint128s->used > uint128s->size) {
-        uint128s->used = length;
-      }
+    if (int128ss->used > int128ss->size) {
+      int128ss->used = length;
     }
 
-    return status;
-  }
-#endif // !defined(_di_f_uint128s_adjust_) || !defined(_di_f_uint128s_decimate_by_)
-
-#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
-  extern f_status_t private_f_uint128s_append(const f_uint128s_t source, f_uint128s_t *destination) {
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint128s_adjust(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
-    } // for
-
     return F_none;
   }
-#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
-
-#if !defined(_di_f_uint128s_resize_) || !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_decimate_by_) || !defined(_di_f_uint128ss_append_)
-  f_status_t private_f_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s) {
-
-    const f_status_t status = f_memory_resize(uint128s->size, length, sizeof(f_uint128_t), (void **) & uint128s->array);
-
-    if (F_status_is_error_not(status)) {
-      uint128s->size = length;
-
-      if (uint128s->used > uint128s->size) {
-        uint128s->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint128s_resize_) || !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_decimate_by_) || !defined(_di_f_uint128ss_append_)
-
-#if !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
-  f_status_t private_f_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint128ss->size; ++i) {
-
-      status = f_memory_destroy(uint128ss->array[i].size, sizeof(f_uint128s_t), (void **) & uint128ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint128ss->array[i].size = 0;
-      uint128ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_adjust(uint128ss->size, length, sizeof(f_uint128s_t), (void **) & uint128ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint128ss->size = length;
-
-      if (uint128ss->used > uint128ss->size) {
-        uint128ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
-
-#if !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
-  f_status_t private_f_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint128ss->size; ++i) {
-
-      status = f_memory_delete(uint128ss->array[i].size, sizeof(f_uint128s_t), (void **) & uint128ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint128ss->array[i].size = 0;
-      uint128ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_resize(uint128ss->size, length, sizeof(f_uint128s_t), (void **) & uint128ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint128ss->size = length;
-
-      if (uint128ss->used > uint128ss->size) {
-        uint128ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
+#endif // !defined(_di_f_int128ss_decrease_by_) || !defined(_di_f_int128ss_increase_) || !defined(_di_f_int128ss_increase_by_) || !defined(_di_f_int128ss_resize_)
 
 #ifdef __cplusplus
 } // extern "C"
index 919b47c8a604ff94782e83096ec6660947d30833..f410fea34b3672ae3e0859e203ceab562ac19e06 100644 (file)
@@ -44,23 +44,48 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source int128s to append.
+ *   The source int128 to append.
  * @param destination
- *   The destination int128s the source is appended onto.
+ *   The destination lengths the source is appended onto.
  *
  * @return
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_int128s_append()
  * @see f_int128ss_append()
  */
 #if !defined(_di_f_int128s_append_) || !defined(_di_f_int128ss_append_)
-  extern f_status_t private_f_int128s_append(const f_int128s_t source, f_int128s_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_int128s_append(const int128_t source, f_int128s_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int128s_append_) || !defined(_di_f_int128ss_append_)
 
 /**
+ * Private implementation for appending the int128 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source int128s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_int128s_append_all()
+ * @see f_int128ss_append()
+ * @see f_int128ss_append_all()
+ */
+#if !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_append_all_) || !defined(_di_f_int128ss_append_all_)
+  extern f_status_t private_f_int128s_append_all(const f_int128s_t source, f_int128s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_int128s_append_) || !defined(_di_f_int128s_append_all_) || !defined(_di_f_int128ss_append_all_)
+
+/**
  * Private implementation for resizing the int128s array.
  *
  * Intended to be shared to each of the different implementation variations.
@@ -143,134 +168,6 @@ extern "C" {
   extern f_status_t private_f_int128ss_resize(const f_array_length_t length, f_int128ss_t *int128ss) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int128ss_decrease_by_) || !defined(_di_f_int128ss_increase_) || !defined(_di_f_int128ss_increase_by_) || !defined(_di_f_int128ss_resize_)
 
-/**
- * Private implementation for resizing the uint128s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint128s
- *   The uint128s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_uint128s_adjust()
- * @see f_uint128s_decimate_by()
- */
-#if !defined(_di_f_uint128s_adjust_) || !defined(_di_f_uint128s_decimate_by_)
-  extern f_status_t private_f_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint128s_adjust_) || !defined(_di_f_uint128s_decimate_by_)
-
-/**
- * Private implementation for appending the uint128 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source uint128s to append.
- * @param destination
- *   The destination uint128s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint128s_append()
- * @see f_uint128ss_append()
- */
-#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
-  extern f_status_t private_f_uint128s_append(const f_uint128s_t source, f_uint128s_t *destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
-
-/**
- * Private implementation for resizing the uint128s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint128s
- *   The uint128s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint128s_resize()
- * @see f_uint128s_append()
- * @see f_uint128s_decimate_by()
- * @see f_uint128ss_append()
- */
-#if !defined(_di_f_uint128s_resize_) || !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_decimate_by_) || !defined(_di_f_uint128ss_append_)
-  extern f_status_t private_f_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint128s_resize_) || !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_decimate_by_) || !defined(_di_f_uint128ss_append_)
-
-/**
- * Private implementation for resizing the uint128ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint128ss
- *   The uint128ss array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- *
- * @see f_uint128ss_adjust()
- * @see f_uint128ss_decimate_by()
- */
-#if !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
-  extern f_status_t private_f_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint128ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to resize to.
- * @param uint128ss
- *   The uint128ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint128ss_decrease_by()
- * @see f_uint128ss_increase()
- * @see f_uint128ss_increase_by()
- * @see f_uint128ss_resize()
- */
-#if !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
-  extern f_status_t private_f_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 76a0f22dbb6330ecb26fd9e05447ca102d182e9a..2cd16d8a5727ea8eaae8c589ef3d390c61f3abd3 100644 (file)
@@ -9,51 +9,61 @@ extern "C" {
   f_status_t private_f_int16s_adjust(const f_array_length_t length, f_int16s_t *int16s) {
 
     const f_status_t status = f_memory_adjust(int16s->size, length, sizeof(int16_t), (void **) & int16s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int16s->size = length;
+    int16s->size = length;
 
-      if (int16s->used > int16s->size) {
-        int16s->used = length;
-      }
+    if (int16s->used > int16s->size) {
+      int16s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int16s_adjust_) || !defined(_di_f_int16s_decimate_by_)
 
 #if !defined(_di_f_int16s_append_) || !defined(_di_f_int16ss_append_)
-  extern f_status_t private_f_int16s_append(const f_int16s_t source, f_int16s_t *destination) {
+  extern f_status_t private_f_int16s_append(const int16_t source, f_int16s_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_int16s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_int16s_append_) || !defined(_di_f_int16ss_append_)
+
+#if !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_append_all_) || !defined(_di_f_int16ss_append_all_)
+  extern f_status_t private_f_int16s_append_all(const f_int16s_t source, f_int16s_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_int16s_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_int16s_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_int16s_append_) || !defined(_di_f_int16ss_append_)
+#endif // !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_append_all_) || !defined(_di_f_int16ss_append_all_)
 
 #if !defined(_di_f_int16s_resize_) || !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_decimate_by_) || !defined(_di_f_int16ss_append_)
   f_status_t private_f_int16s_resize(const f_array_length_t length, f_int16s_t *int16s) {
 
     const f_status_t status = f_memory_resize(int16s->size, length, sizeof(int16_t), (void **) & int16s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int16s->size = length;
+    int16s->size = length;
 
-      if (int16s->used > int16s->size) {
-        int16s->used = length;
-      }
+    if (int16s->used > int16s->size) {
+      int16s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int16s_resize_) || !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_decimate_by_) || !defined(_di_f_int16ss_append_)
 
@@ -72,16 +82,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(int16ss->size, length, sizeof(f_int16s_t), (void **) & int16ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int16ss->size = length;
+    int16ss->size = length;
 
-      if (int16ss->used > int16ss->size) {
-        int16ss->used = length;
-      }
+    if (int16ss->used > int16ss->size) {
+      int16ss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int16ss_adjust_) || !defined(_di_f_int16ss_decimate_by_)
 
@@ -100,126 +109,17 @@ extern "C" {
     } // for
 
     status = f_memory_resize(int16ss->size, length, sizeof(f_int16s_t), (void **) & int16ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int16ss->size = length;
-
-      if (int16ss->used > int16ss->size) {
-        int16ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_int16ss_decrease_by_) || !defined(_di_f_int16ss_increase_) || !defined(_di_f_int16ss_increase_by_) || !defined(_di_f_int16ss_resize_)
-
-#if !defined(_di_f_uint16s_adjust_) || !defined(_di_f_uint16s_decimate_by_)
-  f_status_t private_f_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s) {
-
-    const f_status_t status = f_memory_adjust(uint16s->size, length, sizeof(uint16_t), (void **) & uint16s->array);
+    int16ss->size = length;
 
-    if (F_status_is_error_not(status)) {
-      uint16s->size = length;
-
-      if (uint16s->used > uint16s->size) {
-        uint16s->used = length;
-      }
+    if (int16ss->used > int16ss->size) {
+      int16ss->used = length;
     }
 
-    return status;
-  }
-#endif // !defined(_di_f_uint16s_adjust_) || !defined(_di_f_uint16s_decimate_by_)
-
-#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
-  extern f_status_t private_f_uint16s_append(const f_uint16s_t source, f_uint16s_t *destination) {
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint16s_adjust(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
-    } // for
-
     return F_none;
   }
-#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
-
-#if !defined(_di_f_uint16s_resize_) || !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_decimate_by_) || !defined(_di_f_uint16ss_append_)
-  f_status_t private_f_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s) {
-
-    const f_status_t status = f_memory_resize(uint16s->size, length, sizeof(uint16_t), (void **) & uint16s->array);
-
-    if (F_status_is_error_not(status)) {
-      uint16s->size = length;
-
-      if (uint16s->used > uint16s->size) {
-        uint16s->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint16s_resize_) || !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_decimate_by_) || !defined(_di_f_uint16ss_append_)
-
-#if !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
-  f_status_t private_f_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint16ss->size; ++i) {
-
-      status = f_memory_destroy(uint16ss->array[i].size, sizeof(f_uint16s_t), (void **) & uint16ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint16ss->array[i].size = 0;
-      uint16ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_adjust(uint16ss->size, length, sizeof(f_uint16s_t), (void **) & uint16ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint16ss->size = length;
-
-      if (uint16ss->used > uint16ss->size) {
-        uint16ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
-
-#if !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
-  f_status_t private_f_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint16ss->size; ++i) {
-
-      status = f_memory_delete(uint16ss->array[i].size, sizeof(f_uint16s_t), (void **) & uint16ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint16ss->array[i].size = 0;
-      uint16ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_resize(uint16ss->size, length, sizeof(f_uint16s_t), (void **) & uint16ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint16ss->size = length;
-
-      if (uint16ss->used > uint16ss->size) {
-        uint16ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
+#endif // !defined(_di_f_int16ss_decrease_by_) || !defined(_di_f_int16ss_increase_) || !defined(_di_f_int16ss_increase_by_) || !defined(_di_f_int16ss_resize_)
 
 #ifdef __cplusplus
 } // extern "C"
index ade08c4e029d31a31616d4ac3b0eaa77fc6903c4..f5b972db75b5788aa391827dfd95941960f879a0 100644 (file)
@@ -44,23 +44,48 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source int16s to append.
+ *   The source int16 to append.
  * @param destination
- *   The destination int16s the source is appended onto.
+ *   The destination lengths the source is appended onto.
  *
  * @return
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_int16s_append()
  * @see f_int16ss_append()
  */
 #if !defined(_di_f_int16s_append_) || !defined(_di_f_int16ss_append_)
-  extern f_status_t private_f_int16s_append(const f_int16s_t source, f_int16s_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_int16s_append(const int16_t source, f_int16s_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int16s_append_) || !defined(_di_f_int16ss_append_)
 
 /**
+ * Private implementation for appending the int16 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source int16s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_int16s_append_all()
+ * @see f_int16ss_append()
+ * @see f_int16ss_append_all()
+ */
+#if !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_append_all_) || !defined(_di_f_int16ss_append_all_)
+  extern f_status_t private_f_int16s_append_all(const f_int16s_t source, f_int16s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_int16s_append_) || !defined(_di_f_int16s_append_all_) || !defined(_di_f_int16ss_append_all_)
+
+/**
  * Private implementation for resizing the int16s array.
  *
  * Intended to be shared to each of the different implementation variations.
@@ -143,134 +168,6 @@ extern "C" {
   extern f_status_t private_f_int16ss_resize(const f_array_length_t length, f_int16ss_t *int16ss) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int16ss_decrease_by_) || !defined(_di_f_int16ss_increase_) || !defined(_di_f_int16ss_increase_by_) || !defined(_di_f_int16ss_resize_)
 
-/**
- * Private implementation for resizing the uint16s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint16s
- *   The uint16s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_uint16s_adjust()
- * @see f_uint16s_decimate_by()
- */
-#if !defined(_di_f_uint16s_adjust_) || !defined(_di_f_uint16s_decimate_by_)
-  extern f_status_t private_f_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint16s_adjust_) || !defined(_di_f_uint16s_decimate_by_)
-
-/**
- * Private implementation for appending the uint16 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source uint16s to append.
- * @param destination
- *   The destination uint16s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint16s_append()
- * @see f_uint16ss_append()
- */
-#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
-  extern f_status_t private_f_uint16s_append(const f_uint16s_t source, f_uint16s_t *destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
-
-/**
- * Private implementation for resizing the uint16s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint16s
- *   The uint16s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint16s_resize()
- * @see f_uint16s_append()
- * @see f_uint16s_decimate_by()
- * @see f_uint16ss_append()
- */
-#if !defined(_di_f_uint16s_resize_) || !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_decimate_by_) || !defined(_di_f_uint16ss_append_)
-  extern f_status_t private_f_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint16s_resize_) || !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_decimate_by_) || !defined(_di_f_uint16ss_append_)
-
-/**
- * Private implementation for resizing the uint16ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint16ss
- *   The uint16ss array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- *
- * @see f_uint16ss_adjust()
- * @see f_uint16ss_decimate_by()
- */
-#if !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
-  extern f_status_t private_f_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint16ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to resize to.
- * @param uint16ss
- *   The uint16ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint16ss_decrease_by()
- * @see f_uint16ss_increase()
- * @see f_uint16ss_increase_by()
- * @see f_uint16ss_resize()
- */
-#if !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
-  extern f_status_t private_f_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 10f910d4e1efd35b3132f5b1b2a6c5506447369c..5ced25065c9a70f273c00157112200df76917516 100644 (file)
@@ -9,51 +9,61 @@ extern "C" {
   f_status_t private_f_int32s_adjust(const f_array_length_t length, f_int32s_t *int32s) {
 
     const f_status_t status = f_memory_adjust(int32s->size, length, sizeof(int32_t), (void **) & int32s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int32s->size = length;
+    int32s->size = length;
 
-      if (int32s->used > int32s->size) {
-        int32s->used = length;
-      }
+    if (int32s->used > int32s->size) {
+      int32s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int32s_adjust_) || !defined(_di_f_int32s_decimate_by_)
 
 #if !defined(_di_f_int32s_append_) || !defined(_di_f_int32ss_append_)
-  extern f_status_t private_f_int32s_append(const f_int32s_t source, f_int32s_t *destination) {
+  extern f_status_t private_f_int32s_append(const int32_t source, f_int32s_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_int32s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_int32s_append_) || !defined(_di_f_int32ss_append_)
+
+#if !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_append_all_) || !defined(_di_f_int32ss_append_all_)
+  extern f_status_t private_f_int32s_append_all(const f_int32s_t source, f_int32s_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_int32s_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_int32s_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_int32s_append_) || !defined(_di_f_int32ss_append_)
+#endif // !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_append_all_) || !defined(_di_f_int32ss_append_all_)
 
 #if !defined(_di_f_int32s_resize_) || !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_decimate_by_) || !defined(_di_f_int32ss_append_)
   f_status_t private_f_int32s_resize(const f_array_length_t length, f_int32s_t *int32s) {
 
     const f_status_t status = f_memory_resize(int32s->size, length, sizeof(int32_t), (void **) & int32s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int32s->size = length;
+    int32s->size = length;
 
-      if (int32s->used > int32s->size) {
-        int32s->used = length;
-      }
+    if (int32s->used > int32s->size) {
+      int32s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int32s_resize_) || !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_decimate_by_) || !defined(_di_f_int32ss_append_)
 
@@ -72,16 +82,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(int32ss->size, length, sizeof(f_int32s_t), (void **) & int32ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int32ss->size = length;
+    int32ss->size = length;
 
-      if (int32ss->used > int32ss->size) {
-        int32ss->used = length;
-      }
+    if (int32ss->used > int32ss->size) {
+      int32ss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int32ss_adjust_) || !defined(_di_f_int32ss_decimate_by_)
 
@@ -100,126 +109,17 @@ extern "C" {
     } // for
 
     status = f_memory_resize(int32ss->size, length, sizeof(f_int32s_t), (void **) & int32ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int32ss->size = length;
-
-      if (int32ss->used > int32ss->size) {
-        int32ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_int32ss_decrease_by_) || !defined(_di_f_int32ss_increase_) || !defined(_di_f_int32ss_increase_by_) || !defined(_di_f_int32ss_resize_)
-
-#if !defined(_di_f_uint32s_adjust_) || !defined(_di_f_uint32s_decimate_by_)
-  f_status_t private_f_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s) {
-
-    const f_status_t status = f_memory_adjust(uint32s->size, length, sizeof(uint32_t), (void **) & uint32s->array);
+    int32ss->size = length;
 
-    if (F_status_is_error_not(status)) {
-      uint32s->size = length;
-
-      if (uint32s->used > uint32s->size) {
-        uint32s->used = length;
-      }
+    if (int32ss->used > int32ss->size) {
+      int32ss->used = length;
     }
 
-    return status;
-  }
-#endif // !defined(_di_f_uint32s_adjust_) || !defined(_di_f_uint32s_decimate_by_)
-
-#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
-  extern f_status_t private_f_uint32s_append(const f_uint32s_t source, f_uint32s_t *destination) {
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint32s_adjust(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
-    } // for
-
     return F_none;
   }
-#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
-
-#if !defined(_di_f_uint32s_resize_) || !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_decimate_by_) || !defined(_di_f_uint32ss_append_)
-  f_status_t private_f_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s) {
-
-    const f_status_t status = f_memory_resize(uint32s->size, length, sizeof(uint32_t), (void **) & uint32s->array);
-
-    if (F_status_is_error_not(status)) {
-      uint32s->size = length;
-
-      if (uint32s->used > uint32s->size) {
-        uint32s->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint32s_resize_) || !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_decimate_by_) || !defined(_di_f_uint32ss_append_)
-
-#if !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
-  f_status_t private_f_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint32ss->size; ++i) {
-
-      status = f_memory_destroy(uint32ss->array[i].size, sizeof(f_uint32s_t), (void **) & uint32ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint32ss->array[i].size = 0;
-      uint32ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_adjust(uint32ss->size, length, sizeof(f_uint32s_t), (void **) & uint32ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint32ss->size = length;
-
-      if (uint32ss->used > uint32ss->size) {
-        uint32ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
-
-#if !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
-  f_status_t private_f_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint32ss->size; ++i) {
-
-      status = f_memory_delete(uint32ss->array[i].size, sizeof(f_uint32s_t), (void **) & uint32ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint32ss->array[i].size = 0;
-      uint32ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_resize(uint32ss->size, length, sizeof(f_uint32s_t), (void **) & uint32ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint32ss->size = length;
-
-      if (uint32ss->used > uint32ss->size) {
-        uint32ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
+#endif // !defined(_di_f_int32ss_decrease_by_) || !defined(_di_f_int32ss_increase_) || !defined(_di_f_int32ss_increase_by_) || !defined(_di_f_int32ss_resize_)
 
 #ifdef __cplusplus
 } // extern "C"
index 920021fdcda2a7dc6dec220f685a83f14924437c..1898bb8b832024b2dfd183cf51de9f207b9b9037 100644 (file)
@@ -44,23 +44,48 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source int32s to append.
+ *   The source int32 to append.
  * @param destination
- *   The destination int32s the source is appended onto.
+ *   The destination lengths the source is appended onto.
  *
  * @return
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_int32s_append()
  * @see f_int32ss_append()
  */
 #if !defined(_di_f_int32s_append_) || !defined(_di_f_int32ss_append_)
-  extern f_status_t private_f_int32s_append(const f_int32s_t source, f_int32s_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_int32s_append(const int32_t source, f_int32s_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int32s_append_) || !defined(_di_f_int32ss_append_)
 
 /**
+ * Private implementation for appending the int32 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source int32s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_int32s_append_all()
+ * @see f_int32ss_append()
+ * @see f_int32ss_append_all()
+ */
+#if !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_append_all_) || !defined(_di_f_int32ss_append_all_)
+  extern f_status_t private_f_int32s_append_all(const f_int32s_t source, f_int32s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_int32s_append_) || !defined(_di_f_int32s_append_all_) || !defined(_di_f_int32ss_append_all_)
+
+/**
  * Private implementation for resizing the int32s array.
  *
  * Intended to be shared to each of the different implementation variations.
@@ -143,134 +168,6 @@ extern "C" {
   extern f_status_t private_f_int32ss_resize(const f_array_length_t length, f_int32ss_t *int32ss) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int32ss_decrease_by_) || !defined(_di_f_int32ss_increase_) || !defined(_di_f_int32ss_increase_by_) || !defined(_di_f_int32ss_resize_)
 
-/**
- * Private implementation for resizing the uint32s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint32s
- *   The uint32s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_uint32s_adjust()
- * @see f_uint32s_decimate_by()
- */
-#if !defined(_di_f_uint32s_adjust_) || !defined(_di_f_uint32s_decimate_by_)
-  extern f_status_t private_f_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint32s_adjust_) || !defined(_di_f_uint32s_decimate_by_)
-
-/**
- * Private implementation for appending the uint32 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source uint32s to append.
- * @param destination
- *   The destination uint32s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint32s_append()
- * @see f_uint32ss_append()
- */
-#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
-  extern f_status_t private_f_uint32s_append(const f_uint32s_t source, f_uint32s_t *destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
-
-/**
- * Private implementation for resizing the uint32s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint32s
- *   The uint32s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint32s_resize()
- * @see f_uint32s_append()
- * @see f_uint32s_decimate_by()
- * @see f_uint32ss_append()
- */
-#if !defined(_di_f_uint32s_resize_) || !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_decimate_by_) || !defined(_di_f_uint32ss_append_)
-  extern f_status_t private_f_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint32s_resize_) || !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_decimate_by_) || !defined(_di_f_uint32ss_append_)
-
-/**
- * Private implementation for resizing the uint32ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint32ss
- *   The uint32ss array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- *
- * @see f_uint32ss_adjust()
- * @see f_uint32ss_decimate_by()
- */
-#if !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
-  extern f_status_t private_f_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint32ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to resize to.
- * @param uint32ss
- *   The uint32ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint32ss_decrease_by()
- * @see f_uint32ss_increase()
- * @see f_uint32ss_increase_by()
- * @see f_uint32ss_resize()
- */
-#if !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
-  extern f_status_t private_f_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index e3c12d8fe682c676a742bf3be3df1002506f17c9..1063d7f8821be847c5c615f5c7205edd64637fb2 100644 (file)
@@ -9,51 +9,61 @@ extern "C" {
   f_status_t private_f_int64s_adjust(const f_array_length_t length, f_int64s_t *int64s) {
 
     const f_status_t status = f_memory_adjust(int64s->size, length, sizeof(int64_t), (void **) & int64s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int64s->size = length;
+    int64s->size = length;
 
-      if (int64s->used > int64s->size) {
-        int64s->used = length;
-      }
+    if (int64s->used > int64s->size) {
+      int64s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int64s_adjust_) || !defined(_di_f_int64s_decimate_by_)
 
 #if !defined(_di_f_int64s_append_) || !defined(_di_f_int64ss_append_)
-  extern f_status_t private_f_int64s_append(const f_int64s_t source, f_int64s_t *destination) {
+  extern f_status_t private_f_int64s_append(const int64_t source, f_int64s_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_int64s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_int64s_append_) || !defined(_di_f_int64ss_append_)
+
+#if !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_append_all_) || !defined(_di_f_int64ss_append_all_)
+  extern f_status_t private_f_int64s_append_all(const f_int64s_t source, f_int64s_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_int64s_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_int64s_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_int64s_append_) || !defined(_di_f_int64ss_append_)
+#endif // !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_append_all_) || !defined(_di_f_int64ss_append_all_)
 
 #if !defined(_di_f_int64s_resize_) || !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_decimate_by_) || !defined(_di_f_int64ss_append_)
   f_status_t private_f_int64s_resize(const f_array_length_t length, f_int64s_t *int64s) {
 
     const f_status_t status = f_memory_resize(int64s->size, length, sizeof(int64_t), (void **) & int64s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int64s->size = length;
+    int64s->size = length;
 
-      if (int64s->used > int64s->size) {
-        int64s->used = length;
-      }
+    if (int64s->used > int64s->size) {
+      int64s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int64s_resize_) || !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_decimate_by_) || !defined(_di_f_int64ss_append_)
 
@@ -72,16 +82,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(int64ss->size, length, sizeof(f_int64s_t), (void **) & int64ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int64ss->size = length;
+    int64ss->size = length;
 
-      if (int64ss->used > int64ss->size) {
-        int64ss->used = length;
-      }
+    if (int64ss->used > int64ss->size) {
+      int64ss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int64ss_adjust_) || !defined(_di_f_int64ss_decimate_by_)
 
@@ -100,126 +109,17 @@ extern "C" {
     } // for
 
     status = f_memory_resize(int64ss->size, length, sizeof(f_int64s_t), (void **) & int64ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int64ss->size = length;
-
-      if (int64ss->used > int64ss->size) {
-        int64ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_int64ss_decrease_by_) || !defined(_di_f_int64ss_increase_) || !defined(_di_f_int64ss_increase_by_) || !defined(_di_f_int64ss_resize_)
-
-#if !defined(_di_f_uint64s_adjust_) || !defined(_di_f_uint64s_decimate_by_)
-  f_status_t private_f_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s) {
-
-    const f_status_t status = f_memory_adjust(uint64s->size, length, sizeof(uint64_t), (void **) & uint64s->array);
+    int64ss->size = length;
 
-    if (F_status_is_error_not(status)) {
-      uint64s->size = length;
-
-      if (uint64s->used > uint64s->size) {
-        uint64s->used = length;
-      }
+    if (int64ss->used > int64ss->size) {
+      int64ss->used = length;
     }
 
-    return status;
-  }
-#endif // !defined(_di_f_uint64s_adjust_) || !defined(_di_f_uint64s_decimate_by_)
-
-#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
-  extern f_status_t private_f_uint64s_append(const f_uint64s_t source, f_uint64s_t *destination) {
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint64s_adjust(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
-    } // for
-
     return F_none;
   }
-#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
-
-#if !defined(_di_f_uint64s_resize_) || !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_decimate_by_) || !defined(_di_f_uint64ss_append_)
-  f_status_t private_f_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s) {
-
-    const f_status_t status = f_memory_resize(uint64s->size, length, sizeof(uint64_t), (void **) & uint64s->array);
-
-    if (F_status_is_error_not(status)) {
-      uint64s->size = length;
-
-      if (uint64s->used > uint64s->size) {
-        uint64s->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint64s_resize_) || !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_decimate_by_) || !defined(_di_f_uint64ss_append_)
-
-#if !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
-  f_status_t private_f_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint64ss->size; ++i) {
-
-      status = f_memory_destroy(uint64ss->array[i].size, sizeof(f_uint64s_t), (void **) & uint64ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint64ss->array[i].size = 0;
-      uint64ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_adjust(uint64ss->size, length, sizeof(f_uint64s_t), (void **) & uint64ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint64ss->size = length;
-
-      if (uint64ss->used > uint64ss->size) {
-        uint64ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
-
-#if !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
-  f_status_t private_f_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint64ss->size; ++i) {
-
-      status = f_memory_delete(uint64ss->array[i].size, sizeof(f_uint64s_t), (void **) & uint64ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint64ss->array[i].size = 0;
-      uint64ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_resize(uint64ss->size, length, sizeof(f_uint64s_t), (void **) & uint64ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint64ss->size = length;
-
-      if (uint64ss->used > uint64ss->size) {
-        uint64ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
+#endif // !defined(_di_f_int64ss_decrease_by_) || !defined(_di_f_int64ss_increase_) || !defined(_di_f_int64ss_increase_by_) || !defined(_di_f_int64ss_resize_)
 
 #ifdef __cplusplus
 } // extern "C"
index 741065d54b800cf75b081352552e5259d3700dd3..7bdde5e992f0c8f4c30a26cbd8e955bd5d3f5dad 100644 (file)
@@ -44,23 +44,48 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source int64s to append.
+ *   The source int64 to append.
  * @param destination
- *   The destination int64s the source is appended onto.
+ *   The destination lengths the source is appended onto.
  *
  * @return
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_int64s_append()
  * @see f_int64ss_append()
  */
 #if !defined(_di_f_int64s_append_) || !defined(_di_f_int64ss_append_)
-  extern f_status_t private_f_int64s_append(const f_int64s_t source, f_int64s_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_int64s_append(const int64_t source, f_int64s_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int64s_append_) || !defined(_di_f_int64ss_append_)
 
 /**
+ * Private implementation for appending the int64 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source int64s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_int64s_append_all()
+ * @see f_int64ss_append()
+ * @see f_int64ss_append_all()
+ */
+#if !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_append_all_) || !defined(_di_f_int64ss_append_all_)
+  extern f_status_t private_f_int64s_append_all(const f_int64s_t source, f_int64s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_int64s_append_) || !defined(_di_f_int64s_append_all_) || !defined(_di_f_int64ss_append_all_)
+
+/**
  * Private implementation for resizing the int64s array.
  *
  * Intended to be shared to each of the different implementation variations.
@@ -143,134 +168,6 @@ extern "C" {
   extern f_status_t private_f_int64ss_resize(const f_array_length_t length, f_int64ss_t *int64ss) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int64ss_decrease_by_) || !defined(_di_f_int64ss_increase_) || !defined(_di_f_int64ss_increase_by_) || !defined(_di_f_int64ss_resize_)
 
-/**
- * Private implementation for resizing the uint64s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint64s
- *   The uint64s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_uint64s_adjust()
- * @see f_uint64s_decimate_by()
- */
-#if !defined(_di_f_uint64s_adjust_) || !defined(_di_f_uint64s_decimate_by_)
-  extern f_status_t private_f_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint64s_adjust_) || !defined(_di_f_uint64s_decimate_by_)
-
-/**
- * Private implementation for appending the uint64 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source uint64s to append.
- * @param destination
- *   The destination uint64s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint64s_append()
- * @see f_uint64ss_append()
- */
-#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
-  extern f_status_t private_f_uint64s_append(const f_uint64s_t source, f_uint64s_t *destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
-
-/**
- * Private implementation for resizing the uint64s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint64s
- *   The uint64s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint64s_resize()
- * @see f_uint64s_append()
- * @see f_uint64s_decimate_by()
- * @see f_uint64ss_append()
- */
-#if !defined(_di_f_uint64s_resize_) || !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_decimate_by_) || !defined(_di_f_uint64ss_append_)
-  extern f_status_t private_f_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint64s_resize_) || !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_decimate_by_) || !defined(_di_f_uint64ss_append_)
-
-/**
- * Private implementation for resizing the uint64ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint64ss
- *   The uint64ss array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- *
- * @see f_uint64ss_adjust()
- * @see f_uint64ss_decimate_by()
- */
-#if !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
-  extern f_status_t private_f_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint64ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to resize to.
- * @param uint64ss
- *   The uint64ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint64ss_decrease_by()
- * @see f_uint64ss_increase()
- * @see f_uint64ss_increase_by()
- * @see f_uint64ss_resize()
- */
-#if !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
-  extern f_status_t private_f_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 7b5cb2d8fdd0a3d525ce20f2bd8cfca6c64bc8ce..32e98351db327fbdade4bda06d09c4efb7fa1225 100644 (file)
@@ -9,51 +9,61 @@ extern "C" {
   f_status_t private_f_int8s_adjust(const f_array_length_t length, f_int8s_t *int8s) {
 
     const f_status_t status = f_memory_adjust(int8s->size, length, sizeof(int8_t), (void **) & int8s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int8s->size = length;
+    int8s->size = length;
 
-      if (int8s->used > int8s->size) {
-        int8s->used = length;
-      }
+    if (int8s->used > int8s->size) {
+      int8s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int8s_adjust_) || !defined(_di_f_int8s_decimate_by_)
 
 #if !defined(_di_f_int8s_append_) || !defined(_di_f_int8ss_append_)
-  extern f_status_t private_f_int8s_append(const f_int8s_t source, f_int8s_t *destination) {
+  extern f_status_t private_f_int8s_append(const int8_t source, f_int8s_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_int8s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_int8s_append_) || !defined(_di_f_int8ss_append_)
+
+#if !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_append_all_) || !defined(_di_f_int8ss_append_all_)
+  extern f_status_t private_f_int8s_append_all(const f_int8s_t source, f_int8s_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_int8s_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_int8s_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_int8s_append_) || !defined(_di_f_int8ss_append_)
+#endif // !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_append_all_) || !defined(_di_f_int8ss_append_all_)
 
 #if !defined(_di_f_int8s_resize_) || !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_decimate_by_) || !defined(_di_f_int8ss_append_)
   f_status_t private_f_int8s_resize(const f_array_length_t length, f_int8s_t *int8s) {
 
     const f_status_t status = f_memory_resize(int8s->size, length, sizeof(int8_t), (void **) & int8s->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int8s->size = length;
+    int8s->size = length;
 
-      if (int8s->used > int8s->size) {
-        int8s->used = length;
-      }
+    if (int8s->used > int8s->size) {
+      int8s->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int8s_resize_) || !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_decimate_by_) || !defined(_di_f_int8ss_append_)
 
@@ -72,16 +82,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(int8ss->size, length, sizeof(f_int8s_t), (void **) & int8ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int8ss->size = length;
+    int8ss->size = length;
 
-      if (int8ss->used > int8ss->size) {
-        int8ss->used = length;
-      }
+    if (int8ss->used > int8ss->size) {
+      int8ss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_int8ss_adjust_) || !defined(_di_f_int8ss_decimate_by_)
 
@@ -100,126 +109,17 @@ extern "C" {
     } // for
 
     status = f_memory_resize(int8ss->size, length, sizeof(f_int8s_t), (void **) & int8ss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      int8ss->size = length;
-
-      if (int8ss->used > int8ss->size) {
-        int8ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_int8ss_decrease_by_) || !defined(_di_f_int8ss_increase_) || !defined(_di_f_int8ss_increase_by_) || !defined(_di_f_int8ss_resize_)
-
-#if !defined(_di_f_uint8s_adjust_) || !defined(_di_f_uint8s_decimate_by_)
-  f_status_t private_f_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s) {
-
-    const f_status_t status = f_memory_adjust(uint8s->size, length, sizeof(uint8_t), (void **) & uint8s->array);
+    int8ss->size = length;
 
-    if (F_status_is_error_not(status)) {
-      uint8s->size = length;
-
-      if (uint8s->used > uint8s->size) {
-        uint8s->used = length;
-      }
+    if (int8ss->used > int8ss->size) {
+      int8ss->used = length;
     }
 
-    return status;
-  }
-#endif // !defined(_di_f_uint8s_adjust_) || !defined(_di_f_uint8s_decimate_by_)
-
-#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
-  extern f_status_t private_f_uint8s_append(const f_uint8s_t source, f_uint8s_t *destination) {
-
-    f_status_t status = F_none;
-
-    if (destination->used + source.used > destination->size) {
-      status = private_f_uint8s_adjust(destination->used + source.used, destination);
-      if (F_status_is_error(status)) return status;
-    }
-
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
-    } // for
-
     return F_none;
   }
-#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
-
-#if !defined(_di_f_uint8s_resize_) || !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_decimate_by_) || !defined(_di_f_uint8ss_append_)
-  f_status_t private_f_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s) {
-
-    const f_status_t status = f_memory_resize(uint8s->size, length, sizeof(uint8_t), (void **) & uint8s->array);
-
-    if (F_status_is_error_not(status)) {
-      uint8s->size = length;
-
-      if (uint8s->used > uint8s->size) {
-        uint8s->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint8s_resize_) || !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_decimate_by_) || !defined(_di_f_uint8ss_append_)
-
-#if !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
-  f_status_t private_f_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint8ss->size; ++i) {
-
-      status = f_memory_destroy(uint8ss->array[i].size, sizeof(f_uint8s_t), (void **) & uint8ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint8ss->array[i].size = 0;
-      uint8ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_adjust(uint8ss->size, length, sizeof(f_uint8s_t), (void **) & uint8ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint8ss->size = length;
-
-      if (uint8ss->used > uint8ss->size) {
-        uint8ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
-
-#if !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
-  f_status_t private_f_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss) {
-
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = length; i < uint8ss->size; ++i) {
-
-      status = f_memory_delete(uint8ss->array[i].size, sizeof(f_uint8s_t), (void **) & uint8ss->array[i].array);
-      if (F_status_is_error(status)) return status;
-
-      uint8ss->array[i].size = 0;
-      uint8ss->array[i].used = 0;
-    } // for
-
-    status = f_memory_resize(uint8ss->size, length, sizeof(f_uint8s_t), (void **) & uint8ss->array);
-
-    if (F_status_is_error_not(status)) {
-      uint8ss->size = length;
-
-      if (uint8ss->used > uint8ss->size) {
-        uint8ss->used = length;
-      }
-    }
-
-    return status;
-  }
-#endif // !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
+#endif // !defined(_di_f_int8ss_decrease_by_) || !defined(_di_f_int8ss_increase_) || !defined(_di_f_int8ss_increase_by_) || !defined(_di_f_int8ss_resize_)
 
 #ifdef __cplusplus
 } // extern "C"
index 101e111d0277235f452f994c9c2889d0b6a34f13..4a31370ac9e4a5b50020cdc1d5119febad6b634c 100644 (file)
@@ -44,23 +44,48 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source int8s to append.
+ *   The source int8 to append.
  * @param destination
- *   The destination int8s the source is appended onto.
+ *   The destination lengths the source is appended onto.
  *
  * @return
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_int8s_append()
  * @see f_int8ss_append()
  */
 #if !defined(_di_f_int8s_append_) || !defined(_di_f_int8ss_append_)
-  extern f_status_t private_f_int8s_append(const f_int8s_t source, f_int8s_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_int8s_append(const int8_t source, f_int8s_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int8s_append_) || !defined(_di_f_int8ss_append_)
 
 /**
+ * Private implementation for appending the int8 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source int8s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_int8s_append_all()
+ * @see f_int8ss_append()
+ * @see f_int8ss_append_all()
+ */
+#if !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_append_all_) || !defined(_di_f_int8ss_append_all_)
+  extern f_status_t private_f_int8s_append_all(const f_int8s_t source, f_int8s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_int8s_append_) || !defined(_di_f_int8s_append_all_) || !defined(_di_f_int8ss_append_all_)
+
+/**
  * Private implementation for resizing the int8s array.
  *
  * Intended to be shared to each of the different implementation variations.
@@ -143,134 +168,6 @@ extern "C" {
   extern f_status_t private_f_int8ss_resize(const f_array_length_t length, f_int8ss_t *int8ss) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_int8ss_decrease_by_) || !defined(_di_f_int8ss_increase_) || !defined(_di_f_int8ss_increase_by_) || !defined(_di_f_int8ss_resize_)
 
-/**
- * Private implementation for resizing the uint8s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint8s
- *   The uint8s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *
- * @see f_uint8s_adjust()
- * @see f_uint8s_decimate_by()
- */
-#if !defined(_di_f_uint8s_adjust_) || !defined(_di_f_uint8s_decimate_by_)
-  extern f_status_t private_f_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint8s_adjust_) || !defined(_di_f_uint8s_decimate_by_)
-
-/**
- * Private implementation for appending the uint8 array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param source
- *   The source uint8s to append.
- * @param destination
- *   The destination uint8s the source is appended onto.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint8s_append()
- * @see f_uint8ss_append()
- */
-#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
-  extern f_status_t private_f_uint8s_append(const f_uint8s_t source, f_uint8s_t *destination) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
-
-/**
- * Private implementation for resizing the uint8s array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint8s
- *   The uint8s array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint8s_resize()
- * @see f_uint8s_append()
- * @see f_uint8s_decimate_by()
- * @see f_uint8ss_append()
- */
-#if !defined(_di_f_uint8s_resize_) || !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_decimate_by_) || !defined(_di_f_uint8ss_append_)
-  extern f_status_t private_f_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint8s_resize_) || !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_decimate_by_) || !defined(_di_f_uint8ss_append_)
-
-/**
- * Private implementation for resizing the uint8ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to adjust to.
- * @param uint8ss
- *   The uint8ss array to adjust.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
- *
- * @see f_uint8ss_adjust()
- * @see f_uint8ss_decimate_by()
- */
-#if !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
-  extern f_status_t private_f_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
-
-/**
- * Private implementation for resizing the uint8ss array.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The length to resize to.
- * @param uint8ss
- *   The uint8ss array to resize.
- *
- * @return
- *   F_none on success.
- *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
- *
- *   F_array_too_large (with error bit) if new length is larger than max array length.
- *   F_memory_not (with error bit) on out of memory.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_delete().
- *   Errors (with error bit) from: f_memory_resize().
- *
- * @see f_uint8ss_decrease_by()
- * @see f_uint8ss_increase()
- * @see f_uint8ss_increase_by()
- * @see f_uint8ss_resize()
- */
-#if !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
-  extern f_status_t private_f_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
-
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 4990b518d4a4f98b96ba0136c96ff9d67d63bc05..0ac6f9213a6ea2208a4ac4523b570153909e2876 100644 (file)
@@ -9,51 +9,78 @@ extern "C" {
   f_status_t private_f_states_adjust(const f_array_length_t length, f_states_t *states) {
 
     const f_status_t status = f_memory_adjust(states->size, length, sizeof(f_state_t), (void **) & states->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      states->size = length;
+    states->size = length;
 
-      if (states->used > states->size) {
-        states->used = length;
-      }
+    if (states->used > states->size) {
+      states->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_states_adjust_) || !defined(_di_f_states_decimate_by_)
 
 #if !defined(_di_f_states_append_) || !defined(_di_f_statess_append_)
-  extern f_status_t private_f_states_append(const f_states_t source, f_states_t *destination) {
+  extern f_status_t private_f_states_append(const f_state_t source, f_states_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_states_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used].step_large = source.step_large;
+    destination->array[destination->used].step_small = source.step_small;
+
+    destination->array[destination->used].handle = source.handle;
+    destination->array[destination->used].interrupt = source.interrupt;
+
+    destination->array[destination->used].callbacks = source.callbacks;
+    destination->array[destination->used].custom = source.custom;
+    destination->array[destination->used++].data = source.data;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_states_append_) || !defined(_di_f_statess_append_)
+
+#if !defined(_di_f_states_append_) || !defined(_di_f_states_append_all_) || !defined(_di_f_statess_append_all_)
+  extern f_status_t private_f_states_append_all(const f_states_t source, f_states_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_states_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_states_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+
+      destination->array[destination->used].step_large = source.array[i].step_large;
+      destination->array[destination->used].step_small = source.array[i].step_small;
+
+      destination->array[destination->used].handle = source.array[i].handle;
+      destination->array[destination->used].interrupt = source.array[i].interrupt;
+
+      destination->array[destination->used].callbacks = source.array[i].callbacks;
+      destination->array[destination->used].custom = source.array[i].custom;
+      destination->array[destination->used++].data = source.array[i].data;
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_states_append_) || !defined(_di_f_statess_append_)
+#endif // !defined(_di_f_states_append_) || !defined(_di_f_states_append_all_) || !defined(_di_f_statess_append_all_)
 
 #if !defined(_di_f_states_resize_) || !defined(_di_f_states_append_) || !defined(_di_f_states_decimate_by_) || !defined(_di_f_statess_append_)
   f_status_t private_f_states_resize(const f_array_length_t length, f_states_t *states) {
 
     const f_status_t status = f_memory_resize(states->size, length, sizeof(f_state_t), (void **) & states->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      states->size = length;
+    states->size = length;
 
-      if (states->used > states->size) {
-        states->used = length;
-      }
+    if (states->used > states->size) {
+      states->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_states_resize_) || !defined(_di_f_states_append_) || !defined(_di_f_states_decimate_by_) || !defined(_di_f_statess_append_)
 
@@ -72,16 +99,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(statess->size, length, sizeof(f_states_t), (void **) & statess->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      statess->size = length;
+    statess->size = length;
 
-      if (statess->used > statess->size) {
-        statess->used = length;
-      }
+    if (statess->used > statess->size) {
+      statess->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_statess_adjust_) || !defined(_di_f_statess_decimate_by_)
 
@@ -100,16 +126,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(statess->size, length, sizeof(f_states_t), (void **) & statess->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      statess->size = length;
+    statess->size = length;
 
-      if (statess->used > statess->size) {
-        statess->used = length;
-      }
+    if (statess->used > statess->size) {
+      statess->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_statess_decrease_by_) || !defined(_di_f_statess_increase_) || !defined(_di_f_statess_increase_by_) || !defined(_di_f_statess_resize_)
 
index d6616883740efb5cf1917487355e32cbf71062cd..b999c3b3d8c9cf0d0b600e6af61b99c609c8f448 100644 (file)
@@ -44,23 +44,48 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source states to append.
+ *   The source state to append.
  * @param destination
- *   The destination states the source is appended onto.
+ *   The destination lengths the source is appended onto.
  *
  * @return
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_states_append()
  * @see f_statess_append()
  */
 #if !defined(_di_f_states_append_) || !defined(_di_f_statess_append_)
-  extern f_status_t private_f_states_append(const f_states_t source, f_states_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_states_append(const f_state_t source, f_states_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_states_append_) || !defined(_di_f_statess_append_)
 
 /**
+ * Private implementation for appending the state array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source states to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_states_append_all()
+ * @see f_statess_append()
+ * @see f_statess_append_all()
+ */
+#if !defined(_di_f_states_append_) || !defined(_di_f_states_append_all_) || !defined(_di_f_statess_append_all_)
+  extern f_status_t private_f_states_append_all(const f_states_t source, f_states_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_states_append_) || !defined(_di_f_states_append_all_) || !defined(_di_f_statess_append_all_)
+
+/**
  * Private implementation for resizing the states array.
  *
  * Intended to be shared to each of the different implementation variations.
index 024372b189ea3de75706498d3baf98a0fd0111e3..8e68dd5651fd5c2cd96e0103b5a8ee4dff69af40 100644 (file)
@@ -9,51 +9,61 @@ extern "C" {
   f_status_t private_f_statuss_adjust(const f_array_length_t length, f_statuss_t *statuss) {
 
     const f_status_t status = f_memory_adjust(statuss->size, length, sizeof(f_status_t), (void **) & statuss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      statuss->size = length;
+    statuss->size = length;
 
-      if (statuss->used > statuss->size) {
-        statuss->used = length;
-      }
+    if (statuss->used > statuss->size) {
+      statuss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_statuss_adjust_) || !defined(_di_f_statuss_decimate_by_)
 
 #if !defined(_di_f_statuss_append_) || !defined(_di_f_statusss_append_)
-  extern f_status_t private_f_statuss_append(const f_statuss_t source, f_statuss_t *destination) {
+  extern f_status_t private_f_statuss_append(const f_status_t source, f_statuss_t *destination) {
 
-    f_status_t status = F_none;
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_statuss_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_statuss_append_) || !defined(_di_f_statusss_append_)
+
+#if !defined(_di_f_statuss_append_) || !defined(_di_f_statuss_append_all_) || !defined(_di_f_statusss_append_all_)
+  extern f_status_t private_f_statuss_append_all(const f_statuss_t source, f_statuss_t *destination) {
 
     if (destination->used + source.used > destination->size) {
-      status = private_f_statuss_adjust(destination->used + source.used, destination);
+      const f_status_t status = private_f_statuss_adjust(destination->used + source.used, destination);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      destination->array[destination->used] = source.array[i];
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
     } // for
 
     return F_none;
   }
-#endif // !defined(_di_f_statuss_append_) || !defined(_di_f_statusss_append_)
+#endif // !defined(_di_f_statuss_append_) || !defined(_di_f_statuss_append_all_) || !defined(_di_f_statusss_append_all_)
 
 #if !defined(_di_f_statuss_resize_) || !defined(_di_f_statuss_append_) || !defined(_di_f_statuss_decimate_by_) || !defined(_di_f_statusss_append_)
   f_status_t private_f_statuss_resize(const f_array_length_t length, f_statuss_t *statuss) {
 
     const f_status_t status = f_memory_resize(statuss->size, length, sizeof(f_status_t), (void **) & statuss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      statuss->size = length;
+    statuss->size = length;
 
-      if (statuss->used > statuss->size) {
-        statuss->used = length;
-      }
+    if (statuss->used > statuss->size) {
+      statuss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_statuss_resize_) || !defined(_di_f_statuss_append_) || !defined(_di_f_statuss_decimate_by_) || !defined(_di_f_statusss_append_)
 
@@ -72,16 +82,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(statusss->size, length, sizeof(f_statuss_t), (void **) & statusss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      statusss->size = length;
+    statusss->size = length;
 
-      if (statusss->used > statusss->size) {
-        statusss->used = length;
-      }
+    if (statusss->used > statusss->size) {
+      statusss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_statusss_adjust_) || !defined(_di_f_statusss_decimate_by_)
 
@@ -100,16 +109,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(statusss->size, length, sizeof(f_statuss_t), (void **) & statusss->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      statusss->size = length;
+    statusss->size = length;
 
-      if (statusss->used > statusss->size) {
-        statusss->used = length;
-      }
+    if (statusss->used > statusss->size) {
+      statusss->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_statusss_decrease_by_) || !defined(_di_f_statusss_increase_) || !defined(_di_f_statusss_increase_by_) || !defined(_di_f_statusss_resize_)
 
index 5e328f2de336686530f895927936397f2842f44f..4bce1fb9266cfed03ca92af8702271e01c235dbc 100644 (file)
@@ -44,23 +44,48 @@ extern "C" {
  * Intended to be shared to each of the different implementation variations.
  *
  * @param source
- *   The source statuss to append.
+ *   The source status to append.
  * @param destination
- *   The destination statuss the source is appended onto.
+ *   The destination lengths the source is appended onto.
  *
  * @return
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_memory_resize().
  *
+ * @see f_memory_resize()
  * @see f_statuss_append()
  * @see f_statusss_append()
  */
 #if !defined(_di_f_statuss_append_) || !defined(_di_f_statusss_append_)
-  extern f_status_t private_f_statuss_append(const f_statuss_t source, f_statuss_t *destination) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_statuss_append(const f_status_t source, f_statuss_t *destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_statuss_append_) || !defined(_di_f_statusss_append_)
 
 /**
+ * Private implementation for appending the status array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source statuss to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_statuss_append_all()
+ * @see f_statusss_append()
+ * @see f_statusss_append_all()
+ */
+#if !defined(_di_f_statuss_append_) || !defined(_di_f_statuss_append_all_) || !defined(_di_f_statusss_append_all_)
+  extern f_status_t private_f_statuss_append_all(const f_statuss_t source, f_statuss_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_statuss_append_) || !defined(_di_f_statuss_append_all_) || !defined(_di_f_statusss_append_all_)
+
+/**
  * Private implementation for resizing the statuss array.
  *
  * Intended to be shared to each of the different implementation variations.
diff --git a/level_0/f_type_array/c/type_array/private-uint128.c b/level_0/f_type_array/c/type_array/private-uint128.c
new file mode 100644 (file)
index 0000000..7a14d27
--- /dev/null
@@ -0,0 +1,126 @@
+#include "../type_array.h"
+#include "private-uint128.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_uint128s_adjust_) || !defined(_di_f_uint128s_decimate_by_)
+  f_status_t private_f_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s) {
+
+    const f_status_t status = f_memory_adjust(uint128s->size, length, sizeof(f_uint128s_t), (void **) & uint128s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint128s->size = length;
+
+    if (uint128s->used > uint128s->size) {
+      uint128s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint128s_adjust_) || !defined(_di_f_uint128s_decimate_by_)
+
+#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
+  extern f_status_t private_f_uint128s_append(const uint128_t source, f_uint128s_t *destination) {
+
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_uint128s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
+
+#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_append_all_) || !defined(_di_f_uint128ss_append_all_)
+  extern f_status_t private_f_uint128s_append_all(const f_uint128s_t source, f_uint128s_t *destination) {
+
+    if (destination->used + source.used > destination->size) {
+      const f_status_t status = private_f_uint128s_adjust(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
+    } // for
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_append_all_) || !defined(_di_f_uint128ss_append_all_)
+
+#if !defined(_di_f_uint128s_resize_) || !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_decimate_by_) || !defined(_di_f_uint128ss_append_)
+  f_status_t private_f_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s) {
+
+    const f_status_t status = f_memory_resize(uint128s->size, length, sizeof(f_uint128s_t), (void **) & uint128s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint128s->size = length;
+
+    if (uint128s->used > uint128s->size) {
+      uint128s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint128s_resize_) || !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_decimate_by_) || !defined(_di_f_uint128ss_append_)
+
+#if !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
+  f_status_t private_f_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint128ss->size; ++i) {
+
+      status = f_memory_destroy(uint128ss->array[i].size, sizeof(f_uint128s_t), (void **) & uint128ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint128ss->array[i].size = 0;
+      uint128ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_adjust(uint128ss->size, length, sizeof(f_uint128s_t), (void **) & uint128ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint128ss->size = length;
+
+    if (uint128ss->used > uint128ss->size) {
+      uint128ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
+
+#if !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
+  f_status_t private_f_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint128ss->size; ++i) {
+
+      status = f_memory_delete(uint128ss->array[i].size, sizeof(f_uint128s_t), (void **) & uint128ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint128ss->array[i].size = 0;
+      uint128ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_resize(uint128ss->size, length, sizeof(f_uint128s_t), (void **) & uint128ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint128ss->size = length;
+
+    if (uint128ss->used > uint128ss->size) {
+      uint128ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/private-uint128.h b/level_0/f_type_array/c/type_array/private-uint128.h
new file mode 100644 (file)
index 0000000..b0678eb
--- /dev/null
@@ -0,0 +1,175 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_type_array_uint128_h
+#define _PRIVATE_F_type_array_uint128_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing the uint128s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint128s
+ *   The uint128s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see f_uint128s_adjust()
+ * @see f_uint128s_decimate_by()
+ */
+#if !defined(_di_f_uint128s_adjust_) || !defined(_di_f_uint128s_decimate_by_)
+  extern f_status_t private_f_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint128s_adjust_) || !defined(_di_f_uint128s_decimate_by_)
+
+/**
+ * Private implementation for appending the uint128 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint128 to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint128s_append()
+ * @see f_uint128ss_append()
+ */
+#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
+  extern f_status_t private_f_uint128s_append(const uint128_t source, f_uint128s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128ss_append_)
+
+/**
+ * Private implementation for appending the uint128 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint128s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint128s_append_all()
+ * @see f_uint128ss_append()
+ * @see f_uint128ss_append_all()
+ */
+#if !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_append_all_) || !defined(_di_f_uint128ss_append_all_)
+  extern f_status_t private_f_uint128s_append_all(const f_uint128s_t source, f_uint128s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_append_all_) || !defined(_di_f_uint128ss_append_all_)
+
+/**
+ * Private implementation for resizing the uint128s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint128s
+ *   The uint128s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint128s_resize()
+ * @see f_uint128s_append()
+ * @see f_uint128s_decimate_by()
+ * @see f_uint128ss_append()
+ */
+#if !defined(_di_f_uint128s_resize_) || !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_decimate_by_) || !defined(_di_f_uint128ss_append_)
+  extern f_status_t private_f_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint128s_resize_) || !defined(_di_f_uint128s_append_) || !defined(_di_f_uint128s_decimate_by_) || !defined(_di_f_uint128ss_append_)
+
+/**
+ * Private implementation for resizing the uint128ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint128ss
+ *   The uint128ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ *
+ * @see f_uint128ss_adjust()
+ * @see f_uint128ss_decimate_by()
+ */
+#if !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
+  extern f_status_t private_f_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint128ss_adjust_) || !defined(_di_f_uint128ss_decimate_by_)
+
+/**
+ * Private implementation for resizing the uint128ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to resize to.
+ * @param uint128ss
+ *   The uint128ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint128ss_decrease_by()
+ * @see f_uint128ss_increase()
+ * @see f_uint128ss_increase_by()
+ * @see f_uint128ss_resize()
+ */
+#if !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
+  extern f_status_t private_f_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint128ss_decrease_by_) || !defined(_di_f_uint128ss_increase_) || !defined(_di_f_uint128ss_increase_by_) || !defined(_di_f_uint128ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_type_array_uint128_h
diff --git a/level_0/f_type_array/c/type_array/private-uint16.c b/level_0/f_type_array/c/type_array/private-uint16.c
new file mode 100644 (file)
index 0000000..bb49cf1
--- /dev/null
@@ -0,0 +1,126 @@
+#include "../type_array.h"
+#include "private-uint16.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_uint16s_adjust_) || !defined(_di_f_uint16s_decimate_by_)
+  f_status_t private_f_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s) {
+
+    const f_status_t status = f_memory_adjust(uint16s->size, length, sizeof(uint16_t), (void **) & uint16s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint16s->size = length;
+
+    if (uint16s->used > uint16s->size) {
+      uint16s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint16s_adjust_) || !defined(_di_f_uint16s_decimate_by_)
+
+#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
+  extern f_status_t private_f_uint16s_append(const uint16_t source, f_uint16s_t *destination) {
+
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_uint16s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
+
+#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_append_all_) || !defined(_di_f_uint16ss_append_all_)
+  extern f_status_t private_f_uint16s_append_all(const f_uint16s_t source, f_uint16s_t *destination) {
+
+    if (destination->used + source.used > destination->size) {
+      const f_status_t status = private_f_uint16s_adjust(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
+    } // for
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_append_all_) || !defined(_di_f_uint16ss_append_all_)
+
+#if !defined(_di_f_uint16s_resize_) || !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_decimate_by_) || !defined(_di_f_uint16ss_append_)
+  f_status_t private_f_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s) {
+
+    const f_status_t status = f_memory_resize(uint16s->size, length, sizeof(uint16_t), (void **) & uint16s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint16s->size = length;
+
+    if (uint16s->used > uint16s->size) {
+      uint16s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint16s_resize_) || !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_decimate_by_) || !defined(_di_f_uint16ss_append_)
+
+#if !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
+  f_status_t private_f_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint16ss->size; ++i) {
+
+      status = f_memory_destroy(uint16ss->array[i].size, sizeof(f_uint16s_t), (void **) & uint16ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint16ss->array[i].size = 0;
+      uint16ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_adjust(uint16ss->size, length, sizeof(f_uint16s_t), (void **) & uint16ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint16ss->size = length;
+
+    if (uint16ss->used > uint16ss->size) {
+      uint16ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
+
+#if !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
+  f_status_t private_f_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint16ss->size; ++i) {
+
+      status = f_memory_delete(uint16ss->array[i].size, sizeof(f_uint16s_t), (void **) & uint16ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint16ss->array[i].size = 0;
+      uint16ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_resize(uint16ss->size, length, sizeof(f_uint16s_t), (void **) & uint16ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint16ss->size = length;
+
+    if (uint16ss->used > uint16ss->size) {
+      uint16ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/private-uint16.h b/level_0/f_type_array/c/type_array/private-uint16.h
new file mode 100644 (file)
index 0000000..d52a3b7
--- /dev/null
@@ -0,0 +1,175 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_type_array_uint16_h
+#define _PRIVATE_F_type_array_uint16_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing the uint16s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint16s
+ *   The uint16s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see f_uint16s_adjust()
+ * @see f_uint16s_decimate_by()
+ */
+#if !defined(_di_f_uint16s_adjust_) || !defined(_di_f_uint16s_decimate_by_)
+  extern f_status_t private_f_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint16s_adjust_) || !defined(_di_f_uint16s_decimate_by_)
+
+/**
+ * Private implementation for appending the uint16 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint16 to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint16s_append()
+ * @see f_uint16ss_append()
+ */
+#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
+  extern f_status_t private_f_uint16s_append(const uint16_t source, f_uint16s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16ss_append_)
+
+/**
+ * Private implementation for appending the uint16 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint16s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint16s_append_all()
+ * @see f_uint16ss_append()
+ * @see f_uint16ss_append_all()
+ */
+#if !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_append_all_) || !defined(_di_f_uint16ss_append_all_)
+  extern f_status_t private_f_uint16s_append_all(const f_uint16s_t source, f_uint16s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_append_all_) || !defined(_di_f_uint16ss_append_all_)
+
+/**
+ * Private implementation for resizing the uint16s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint16s
+ *   The uint16s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint16s_resize()
+ * @see f_uint16s_append()
+ * @see f_uint16s_decimate_by()
+ * @see f_uint16ss_append()
+ */
+#if !defined(_di_f_uint16s_resize_) || !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_decimate_by_) || !defined(_di_f_uint16ss_append_)
+  extern f_status_t private_f_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint16s_resize_) || !defined(_di_f_uint16s_append_) || !defined(_di_f_uint16s_decimate_by_) || !defined(_di_f_uint16ss_append_)
+
+/**
+ * Private implementation for resizing the uint16ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint16ss
+ *   The uint16ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ *
+ * @see f_uint16ss_adjust()
+ * @see f_uint16ss_decimate_by()
+ */
+#if !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
+  extern f_status_t private_f_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint16ss_adjust_) || !defined(_di_f_uint16ss_decimate_by_)
+
+/**
+ * Private implementation for resizing the uint16ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to resize to.
+ * @param uint16ss
+ *   The uint16ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint16ss_decrease_by()
+ * @see f_uint16ss_increase()
+ * @see f_uint16ss_increase_by()
+ * @see f_uint16ss_resize()
+ */
+#if !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
+  extern f_status_t private_f_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint16ss_decrease_by_) || !defined(_di_f_uint16ss_increase_) || !defined(_di_f_uint16ss_increase_by_) || !defined(_di_f_uint16ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_type_array_uint16_h
diff --git a/level_0/f_type_array/c/type_array/private-uint32.c b/level_0/f_type_array/c/type_array/private-uint32.c
new file mode 100644 (file)
index 0000000..5f9105a
--- /dev/null
@@ -0,0 +1,126 @@
+#include "../type_array.h"
+#include "private-uint32.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_uint32s_adjust_) || !defined(_di_f_uint32s_decimate_by_)
+  f_status_t private_f_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s) {
+
+    const f_status_t status = f_memory_adjust(uint32s->size, length, sizeof(uint32_t), (void **) & uint32s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint32s->size = length;
+
+    if (uint32s->used > uint32s->size) {
+      uint32s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint32s_adjust_) || !defined(_di_f_uint32s_decimate_by_)
+
+#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
+  extern f_status_t private_f_uint32s_append(const uint32_t source, f_uint32s_t *destination) {
+
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_uint32s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
+
+#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_append_all_) || !defined(_di_f_uint32ss_append_all_)
+  extern f_status_t private_f_uint32s_append_all(const f_uint32s_t source, f_uint32s_t *destination) {
+
+    if (destination->used + source.used > destination->size) {
+      const f_status_t status = private_f_uint32s_adjust(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
+    } // for
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_append_all_) || !defined(_di_f_uint32ss_append_all_)
+
+#if !defined(_di_f_uint32s_resize_) || !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_decimate_by_) || !defined(_di_f_uint32ss_append_)
+  f_status_t private_f_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s) {
+
+    const f_status_t status = f_memory_resize(uint32s->size, length, sizeof(uint32_t), (void **) & uint32s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint32s->size = length;
+
+    if (uint32s->used > uint32s->size) {
+      uint32s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint32s_resize_) || !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_decimate_by_) || !defined(_di_f_uint32ss_append_)
+
+#if !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
+  f_status_t private_f_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint32ss->size; ++i) {
+
+      status = f_memory_destroy(uint32ss->array[i].size, sizeof(f_uint32s_t), (void **) & uint32ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint32ss->array[i].size = 0;
+      uint32ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_adjust(uint32ss->size, length, sizeof(f_uint32s_t), (void **) & uint32ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint32ss->size = length;
+
+    if (uint32ss->used > uint32ss->size) {
+      uint32ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
+
+#if !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
+  f_status_t private_f_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint32ss->size; ++i) {
+
+      status = f_memory_delete(uint32ss->array[i].size, sizeof(f_uint32s_t), (void **) & uint32ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint32ss->array[i].size = 0;
+      uint32ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_resize(uint32ss->size, length, sizeof(f_uint32s_t), (void **) & uint32ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint32ss->size = length;
+
+    if (uint32ss->used > uint32ss->size) {
+      uint32ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/private-uint32.h b/level_0/f_type_array/c/type_array/private-uint32.h
new file mode 100644 (file)
index 0000000..fd97ca4
--- /dev/null
@@ -0,0 +1,175 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_type_array_uint32_h
+#define _PRIVATE_F_type_array_uint32_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing the uint32s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint32s
+ *   The uint32s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see f_uint32s_adjust()
+ * @see f_uint32s_decimate_by()
+ */
+#if !defined(_di_f_uint32s_adjust_) || !defined(_di_f_uint32s_decimate_by_)
+  extern f_status_t private_f_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint32s_adjust_) || !defined(_di_f_uint32s_decimate_by_)
+
+/**
+ * Private implementation for appending the uint32 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint32 to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint32s_append()
+ * @see f_uint32ss_append()
+ */
+#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
+  extern f_status_t private_f_uint32s_append(const uint32_t source, f_uint32s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32ss_append_)
+
+/**
+ * Private implementation for appending the uint32 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint32s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint32s_append_all()
+ * @see f_uint32ss_append()
+ * @see f_uint32ss_append_all()
+ */
+#if !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_append_all_) || !defined(_di_f_uint32ss_append_all_)
+  extern f_status_t private_f_uint32s_append_all(const f_uint32s_t source, f_uint32s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_append_all_) || !defined(_di_f_uint32ss_append_all_)
+
+/**
+ * Private implementation for resizing the uint32s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint32s
+ *   The uint32s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint32s_resize()
+ * @see f_uint32s_append()
+ * @see f_uint32s_decimate_by()
+ * @see f_uint32ss_append()
+ */
+#if !defined(_di_f_uint32s_resize_) || !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_decimate_by_) || !defined(_di_f_uint32ss_append_)
+  extern f_status_t private_f_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint32s_resize_) || !defined(_di_f_uint32s_append_) || !defined(_di_f_uint32s_decimate_by_) || !defined(_di_f_uint32ss_append_)
+
+/**
+ * Private implementation for resizing the uint32ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint32ss
+ *   The uint32ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ *
+ * @see f_uint32ss_adjust()
+ * @see f_uint32ss_decimate_by()
+ */
+#if !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
+  extern f_status_t private_f_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint32ss_adjust_) || !defined(_di_f_uint32ss_decimate_by_)
+
+/**
+ * Private implementation for resizing the uint32ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to resize to.
+ * @param uint32ss
+ *   The uint32ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint32ss_decrease_by()
+ * @see f_uint32ss_increase()
+ * @see f_uint32ss_increase_by()
+ * @see f_uint32ss_resize()
+ */
+#if !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
+  extern f_status_t private_f_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint32ss_decrease_by_) || !defined(_di_f_uint32ss_increase_) || !defined(_di_f_uint32ss_increase_by_) || !defined(_di_f_uint32ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_type_array_uint32_h
diff --git a/level_0/f_type_array/c/type_array/private-uint64.c b/level_0/f_type_array/c/type_array/private-uint64.c
new file mode 100644 (file)
index 0000000..b2d99b3
--- /dev/null
@@ -0,0 +1,126 @@
+#include "../type_array.h"
+#include "private-uint64.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_uint64s_adjust_) || !defined(_di_f_uint64s_decimate_by_)
+  f_status_t private_f_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s) {
+
+    const f_status_t status = f_memory_adjust(uint64s->size, length, sizeof(uint64_t), (void **) & uint64s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint64s->size = length;
+
+    if (uint64s->used > uint64s->size) {
+      uint64s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint64s_adjust_) || !defined(_di_f_uint64s_decimate_by_)
+
+#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
+  extern f_status_t private_f_uint64s_append(const uint64_t source, f_uint64s_t *destination) {
+
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_uint64s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
+
+#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_append_all_) || !defined(_di_f_uint64ss_append_all_)
+  extern f_status_t private_f_uint64s_append_all(const f_uint64s_t source, f_uint64s_t *destination) {
+
+    if (destination->used + source.used > destination->size) {
+      const f_status_t status = private_f_uint64s_adjust(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
+    } // for
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_append_all_) || !defined(_di_f_uint64ss_append_all_)
+
+#if !defined(_di_f_uint64s_resize_) || !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_decimate_by_) || !defined(_di_f_uint64ss_append_)
+  f_status_t private_f_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s) {
+
+    const f_status_t status = f_memory_resize(uint64s->size, length, sizeof(uint64_t), (void **) & uint64s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint64s->size = length;
+
+    if (uint64s->used > uint64s->size) {
+      uint64s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint64s_resize_) || !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_decimate_by_) || !defined(_di_f_uint64ss_append_)
+
+#if !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
+  f_status_t private_f_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint64ss->size; ++i) {
+
+      status = f_memory_destroy(uint64ss->array[i].size, sizeof(f_uint64s_t), (void **) & uint64ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint64ss->array[i].size = 0;
+      uint64ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_adjust(uint64ss->size, length, sizeof(f_uint64s_t), (void **) & uint64ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint64ss->size = length;
+
+    if (uint64ss->used > uint64ss->size) {
+      uint64ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
+
+#if !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
+  f_status_t private_f_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint64ss->size; ++i) {
+
+      status = f_memory_delete(uint64ss->array[i].size, sizeof(f_uint64s_t), (void **) & uint64ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint64ss->array[i].size = 0;
+      uint64ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_resize(uint64ss->size, length, sizeof(f_uint64s_t), (void **) & uint64ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint64ss->size = length;
+
+    if (uint64ss->used > uint64ss->size) {
+      uint64ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/private-uint64.h b/level_0/f_type_array/c/type_array/private-uint64.h
new file mode 100644 (file)
index 0000000..912f940
--- /dev/null
@@ -0,0 +1,175 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_type_array_uint64_h
+#define _PRIVATE_F_type_array_uint64_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing the uint64s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint64s
+ *   The uint64s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see f_uint64s_adjust()
+ * @see f_uint64s_decimate_by()
+ */
+#if !defined(_di_f_uint64s_adjust_) || !defined(_di_f_uint64s_decimate_by_)
+  extern f_status_t private_f_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint64s_adjust_) || !defined(_di_f_uint64s_decimate_by_)
+
+/**
+ * Private implementation for appending the uint64 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint64 to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint64s_append()
+ * @see f_uint64ss_append()
+ */
+#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
+  extern f_status_t private_f_uint64s_append(const uint64_t source, f_uint64s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64ss_append_)
+
+/**
+ * Private implementation for appending the uint64 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint64s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint64s_append_all()
+ * @see f_uint64ss_append()
+ * @see f_uint64ss_append_all()
+ */
+#if !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_append_all_) || !defined(_di_f_uint64ss_append_all_)
+  extern f_status_t private_f_uint64s_append_all(const f_uint64s_t source, f_uint64s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_append_all_) || !defined(_di_f_uint64ss_append_all_)
+
+/**
+ * Private implementation for resizing the uint64s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint64s
+ *   The uint64s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint64s_resize()
+ * @see f_uint64s_append()
+ * @see f_uint64s_decimate_by()
+ * @see f_uint64ss_append()
+ */
+#if !defined(_di_f_uint64s_resize_) || !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_decimate_by_) || !defined(_di_f_uint64ss_append_)
+  extern f_status_t private_f_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint64s_resize_) || !defined(_di_f_uint64s_append_) || !defined(_di_f_uint64s_decimate_by_) || !defined(_di_f_uint64ss_append_)
+
+/**
+ * Private implementation for resizing the uint64ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint64ss
+ *   The uint64ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ *
+ * @see f_uint64ss_adjust()
+ * @see f_uint64ss_decimate_by()
+ */
+#if !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
+  extern f_status_t private_f_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint64ss_adjust_) || !defined(_di_f_uint64ss_decimate_by_)
+
+/**
+ * Private implementation for resizing the uint64ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to resize to.
+ * @param uint64ss
+ *   The uint64ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint64ss_decrease_by()
+ * @see f_uint64ss_increase()
+ * @see f_uint64ss_increase_by()
+ * @see f_uint64ss_resize()
+ */
+#if !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
+  extern f_status_t private_f_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint64ss_decrease_by_) || !defined(_di_f_uint64ss_increase_) || !defined(_di_f_uint64ss_increase_by_) || !defined(_di_f_uint64ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_type_array_uint64_h
diff --git a/level_0/f_type_array/c/type_array/private-uint8.c b/level_0/f_type_array/c/type_array/private-uint8.c
new file mode 100644 (file)
index 0000000..3956357
--- /dev/null
@@ -0,0 +1,126 @@
+#include "../type_array.h"
+#include "private-uint8.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(_di_f_uint8s_adjust_) || !defined(_di_f_uint8s_decimate_by_)
+  f_status_t private_f_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s) {
+
+    const f_status_t status = f_memory_adjust(uint8s->size, length, sizeof(uint8_t), (void **) & uint8s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint8s->size = length;
+
+    if (uint8s->used > uint8s->size) {
+      uint8s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint8s_adjust_) || !defined(_di_f_uint8s_decimate_by_)
+
+#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
+  extern f_status_t private_f_uint8s_append(const uint8_t source, f_uint8s_t *destination) {
+
+    if (destination->used + 1 > destination->size) {
+      const f_status_t status = private_f_uint8s_adjust(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    destination->array[destination->used++] = source;
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
+
+#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_append_all_) || !defined(_di_f_uint8ss_append_all_)
+  extern f_status_t private_f_uint8s_append_all(const f_uint8s_t source, f_uint8s_t *destination) {
+
+    if (destination->used + source.used > destination->size) {
+      const f_status_t status = private_f_uint8s_adjust(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      destination->array[destination->used++] = source.array[i];
+    } // for
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_append_all_) || !defined(_di_f_uint8ss_append_all_)
+
+#if !defined(_di_f_uint8s_resize_) || !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_decimate_by_) || !defined(_di_f_uint8ss_append_)
+  f_status_t private_f_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s) {
+
+    const f_status_t status = f_memory_resize(uint8s->size, length, sizeof(uint8_t), (void **) & uint8s->array);
+    if (F_status_is_error(status)) return status;
+
+    uint8s->size = length;
+
+    if (uint8s->used > uint8s->size) {
+      uint8s->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint8s_resize_) || !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_decimate_by_) || !defined(_di_f_uint8ss_append_)
+
+#if !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
+  f_status_t private_f_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint8ss->size; ++i) {
+
+      status = f_memory_destroy(uint8ss->array[i].size, sizeof(f_uint8s_t), (void **) & uint8ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint8ss->array[i].size = 0;
+      uint8ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_adjust(uint8ss->size, length, sizeof(f_uint8s_t), (void **) & uint8ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint8ss->size = length;
+
+    if (uint8ss->used > uint8ss->size) {
+      uint8ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
+
+#if !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
+  f_status_t private_f_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss) {
+
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = length; i < uint8ss->size; ++i) {
+
+      status = f_memory_delete(uint8ss->array[i].size, sizeof(f_uint8s_t), (void **) & uint8ss->array[i].array);
+      if (F_status_is_error(status)) return status;
+
+      uint8ss->array[i].size = 0;
+      uint8ss->array[i].used = 0;
+    } // for
+
+    status = f_memory_resize(uint8ss->size, length, sizeof(f_uint8s_t), (void **) & uint8ss->array);
+    if (F_status_is_error(status)) return status;
+
+    uint8ss->size = length;
+
+    if (uint8ss->used > uint8ss->size) {
+      uint8ss->used = length;
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/private-uint8.h b/level_0/f_type_array/c/type_array/private-uint8.h
new file mode 100644 (file)
index 0000000..8f7704e
--- /dev/null
@@ -0,0 +1,175 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * 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_type_array_uint8_h
+#define _PRIVATE_F_type_array_uint8_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation for resizing the uint8s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint8s
+ *   The uint8s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see f_uint8s_adjust()
+ * @see f_uint8s_decimate_by()
+ */
+#if !defined(_di_f_uint8s_adjust_) || !defined(_di_f_uint8s_decimate_by_)
+  extern f_status_t private_f_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint8s_adjust_) || !defined(_di_f_uint8s_decimate_by_)
+
+/**
+ * Private implementation for appending the uint8 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint8 to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint8s_append()
+ * @see f_uint8ss_append()
+ */
+#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
+  extern f_status_t private_f_uint8s_append(const uint8_t source, f_uint8s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8ss_append_)
+
+/**
+ * Private implementation for appending the uint8 array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ *   The source uint8s to append.
+ * @param destination
+ *   The destination lengths the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_memory_resize()
+ * @see f_uint8s_append_all()
+ * @see f_uint8ss_append()
+ * @see f_uint8ss_append_all()
+ */
+#if !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_append_all_) || !defined(_di_f_uint8ss_append_all_)
+  extern f_status_t private_f_uint8s_append_all(const f_uint8s_t source, f_uint8s_t *destination) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_append_all_) || !defined(_di_f_uint8ss_append_all_)
+
+/**
+ * Private implementation for resizing the uint8s array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint8s
+ *   The uint8s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint8s_resize()
+ * @see f_uint8s_append()
+ * @see f_uint8s_decimate_by()
+ * @see f_uint8ss_append()
+ */
+#if !defined(_di_f_uint8s_resize_) || !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_decimate_by_) || !defined(_di_f_uint8ss_append_)
+  extern f_status_t private_f_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint8s_resize_) || !defined(_di_f_uint8s_append_) || !defined(_di_f_uint8s_decimate_by_) || !defined(_di_f_uint8ss_append_)
+
+/**
+ * Private implementation for resizing the uint8ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to adjust to.
+ * @param uint8ss
+ *   The uint8ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ *
+ * @see f_uint8ss_adjust()
+ * @see f_uint8ss_decimate_by()
+ */
+#if !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
+  extern f_status_t private_f_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint8ss_adjust_) || !defined(_di_f_uint8ss_decimate_by_)
+
+/**
+ * Private implementation for resizing the uint8ss array.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ *   The length to resize to.
+ * @param uint8ss
+ *   The uint8ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if new length is larger than max array length.
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ *
+ * @see f_uint8ss_decrease_by()
+ * @see f_uint8ss_increase()
+ * @see f_uint8ss_increase_by()
+ * @see f_uint8ss_resize()
+ */
+#if !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
+  extern f_status_t private_f_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_uint8ss_decrease_by_) || !defined(_di_f_uint8ss_increase_) || !defined(_di_f_uint8ss_increase_by_) || !defined(_di_f_uint8ss_resize_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_type_array_uint8_h
index d416b9b0e4a1ae16da8a0432f5a538a596d413f0..d9efd282345008fe3ac8c6b7f472b0302d284dae 100644 (file)
@@ -17,17 +17,27 @@ extern "C" {
 #endif // _di_f_states_adjust_
 
 #ifndef _di_f_states_append_
-  f_status_t f_states_append(const f_states_t source, f_states_t *destination) {
+  f_status_t f_states_append(const f_state_t source, f_states_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
-
     return private_f_states_append(source, destination);
   }
 #endif // _di_f_states_append_
 
+#ifndef _di_f_states_append_all_
+  f_status_t f_states_append_all(const f_states_t source, f_states_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_states_append_all(source, destination);
+  }
+#endif // _di_f_states_append_all_
+
 #ifndef _di_f_states_decimate_by_
   f_status_t f_states_decimate_by(const f_array_length_t amount, f_states_t *states) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +141,31 @@ extern "C" {
 #endif // _di_f_statess_adjust_
 
 #ifndef _di_f_statess_append_
-  f_status_t f_statess_append(const f_statess_t source, f_statess_t *destination) {
+  f_status_t f_statess_append(const f_states_t source, f_statess_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_statess_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_states_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_statess_append_
+
+#ifndef _di_f_statess_append_all_
+  f_status_t f_statess_append_all(const f_statess_t source, f_statess_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +180,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_states_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_states_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_statess_append_
+#endif // _di_f_statess_append_all_
 
 #ifndef _di_f_statess_decimate_by_
   f_status_t f_statess_decimate_by(const f_array_length_t amount, f_statess_t *statess) {
index cf63b29f87c399df48a9af4b063b59cc9434d57d..8a58724daee63707f0da5c99223f58bbd28d290e 100644 (file)
@@ -36,10 +36,10 @@ extern "C" {
 #endif // _di_f_states_adjust_
 
 /**
- * Append the source states onto the destination.
+ * Append the single source state onto the destination.
  *
  * @param source
- *   The source states to append.
+ *   The source state to append.
  * @param destination
  *   The destination states the source is appended onto.
  *
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_states_append_
-  extern f_status_t f_states_append(const f_states_t source, f_states_t *destination);
+  extern f_status_t f_states_append(const f_state_t source, f_states_t *destination);
 #endif // _di_f_states_append_
 
 /**
+ * Append the source states onto the destination.
+ *
+ * @param source
+ *   The source states to append.
+ * @param destination
+ *   The destination states the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_states_append_all_
+  extern f_status_t f_states_append_all(const f_states_t source, f_states_t *destination);
+#endif // _di_f_states_append_all_
+
+/**
  * Resize the string states array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -193,10 +213,10 @@ extern "C" {
 #endif // _di_f_statess_adjust_
 
 /**
- * Append the source statess onto the destination.
+ * Append the single source states onto the destination.
  *
  * @param source
- *   The source statess to append.
+ *   The source states to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -209,28 +229,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_statess_append_
-  extern f_status_t f_statess_append(const f_statess_t source, f_statess_t *destination);
+  extern f_status_t f_statess_append(const f_states_t source, f_statess_t *destination);
 #endif // _di_f_statess_append_
 
 /**
- * Resize the string statess array.
+ * Append the source statess onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param statess
- *   The string statess array to resize.
+ * @param source
+ *   The source statess to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_statess_adjust_
-  extern f_status_t f_statess_adjust(const f_array_length_t length, f_statess_t *statess);
-#endif // _di_f_statess_adjust_
+#ifndef _di_f_statess_append_all_
+  extern f_status_t f_statess_append_all(const f_statess_t source, f_statess_t *destination);
+#endif // _di_f_statess_append_all_
 
 /**
  * Resize the string statess array to a smaller size.
index 2eb4a370657abe1f0701db7bcb74558e6524abf5..b602cbdf1f38a7c958846171f9a73d2e5bab9540 100644 (file)
@@ -17,17 +17,27 @@ extern "C" {
 #endif // _di_f_statuss_adjust_
 
 #ifndef _di_f_statuss_append_
-  f_status_t f_statuss_append(const f_statuss_t source, f_statuss_t *destination) {
+  f_status_t f_statuss_append(const f_status_t source, f_statuss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!source.used) return F_data_not;
-
     return private_f_statuss_append(source, destination);
   }
 #endif // _di_f_statuss_append_
 
+#ifndef _di_f_statuss_append_all_
+  f_status_t f_statuss_append_all(const f_statuss_t source, f_statuss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_statuss_append_all(source, destination);
+  }
+#endif // _di_f_statuss_append_all_
+
 #ifndef _di_f_statuss_decimate_by_
   f_status_t f_statuss_decimate_by(const f_array_length_t amount, f_statuss_t *statuss) {
     #ifndef _di_level_0_parameter_checking_
@@ -131,7 +141,31 @@ extern "C" {
 #endif // _di_f_statusss_adjust_
 
 #ifndef _di_f_statusss_append_
-  f_status_t f_statusss_append(const f_statusss_t source, f_statusss_t *destination) {
+  f_status_t f_statusss_append(const f_statuss_t source, f_statusss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_statusss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_statuss_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_statusss_append_
+
+#ifndef _di_f_statusss_append_all_
+  f_status_t f_statusss_append_all(const f_statusss_t source, f_statusss_t *destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -146,13 +180,18 @@ extern "C" {
     }
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
-      status = private_f_statuss_append(source.array[i], &destination->array[destination->used]);
-      if (F_status_is_error(status)) return status;
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_statuss_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
     } // for
 
     return F_none;
   }
-#endif // _di_f_statusss_append_
+#endif // _di_f_statusss_append_all_
 
 #ifndef _di_f_statusss_decimate_by_
   f_status_t f_statusss_decimate_by(const f_array_length_t amount, f_statusss_t *statusss) {
index 196cabb2bd99e8bbb7b662bcb3984bffdbef174c..6d6214886abdda18b5493defc374f3379c7d8e77 100644 (file)
@@ -36,10 +36,10 @@ extern "C" {
 #endif // _di_f_statuss_adjust_
 
 /**
- * Append the source statuss onto the destination.
+ * Append the single source status onto the destination.
  *
  * @param source
- *   The source statuss to append.
+ *   The source status to append.
  * @param destination
  *   The destination statuss the source is appended onto.
  *
@@ -52,10 +52,30 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_statuss_append_
-  extern f_status_t f_statuss_append(const f_statuss_t source, f_statuss_t *destination);
+  extern f_status_t f_statuss_append(const f_status_t source, f_statuss_t *destination);
 #endif // _di_f_statuss_append_
 
 /**
+ * Append the source statuss onto the destination.
+ *
+ * @param source
+ *   The source statuss to append.
+ * @param destination
+ *   The destination statuss the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_statuss_append_all_
+  extern f_status_t f_statuss_append_all(const f_statuss_t source, f_statuss_t *destination);
+#endif // _di_f_statuss_append_all_
+
+/**
  * Resize the string statuss array to a smaller size.
  *
  * This will resize making the array smaller based on (size - given length).
@@ -193,10 +213,10 @@ extern "C" {
 #endif // _di_f_statusss_adjust_
 
 /**
- * Append the source statusss onto the destination.
+ * Append the single source statuss onto the destination.
  *
  * @param source
- *   The source statusss to append.
+ *   The source statuss to append.
  * @param destination
  *   The destination ranges the source is appended onto.
  *
@@ -209,28 +229,28 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_statusss_append_
-  extern f_status_t f_statusss_append(const f_statusss_t source, f_statusss_t *destination);
+  extern f_status_t f_statusss_append(const f_statuss_t source, f_statusss_t *destination);
 #endif // _di_f_statusss_append_
 
 /**
- * Resize the string statusss array.
+ * Append the source statusss onto the destination.
  *
- * @param length
- *   The new size to use.
- * @param statusss
- *   The string statusss array to resize.
+ * @param source
+ *   The source statusss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
  *
  * @return
  *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
  *
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_memory_adjust().
- *   Errors (with error bit) from: f_memory_destroy().
+ *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_statusss_adjust_
-  extern f_status_t f_statusss_adjust(const f_array_length_t length, f_statusss_t *statusss);
-#endif // _di_f_statusss_adjust_
+#ifndef _di_f_statusss_append_all_
+  extern f_status_t f_statusss_append_all(const f_statusss_t source, f_statusss_t *destination);
+#endif // _di_f_statusss_append_all_
 
 /**
  * Resize the string statusss array to a smaller size.
diff --git a/level_0/f_type_array/c/type_array/uint128.c b/level_0/f_type_array/c/type_array/uint128.c
new file mode 100644 (file)
index 0000000..9afaf3c
--- /dev/null
@@ -0,0 +1,290 @@
+#include "../type_array.h"
+#include "uint128.h"
+#include "private-uint128.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_uint128s_adjust_
+  f_status_t f_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint128s_adjust(length, uint128s);
+  }
+#endif // _di_f_uint128s_adjust_
+
+#ifndef _di_f_uint128s_append_
+  f_status_t f_uint128s_append(const uint128_t source, f_uint128s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint128s_append(source, destination);
+  }
+#endif // _di_f_uint128s_append_
+
+#ifndef _di_f_uint128s_append_all_
+  f_status_t f_uint128s_append_all(const f_uint128s_t source, f_uint128s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_uint128s_append_all(source, destination);
+  }
+#endif // _di_f_uint128s_append_all_
+
+#ifndef _di_f_uint128s_decimate_by_
+  f_status_t f_uint128s_decimate_by(const f_array_length_t amount, f_uint128s_t *uint128s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint128s->size - amount > 0) {
+      return private_f_uint128s_adjust(uint128s->size - amount, uint128s);
+    }
+
+    return private_f_uint128s_adjust(0, uint128s);
+  }
+#endif // _di_f_uint128s_decimate_by_
+
+#ifndef _di_f_uint128s_decrease_by_
+  f_status_t f_uint128s_decrease_by(const f_array_length_t amount, f_uint128s_t *uint128s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint128s->size - amount > 0) {
+      return private_f_uint128s_resize(uint128s->size - amount, uint128s);
+    }
+
+    return private_f_uint128s_resize(0, uint128s);
+  }
+#endif // _di_f_uint128s_decrease_by_
+
+#ifndef _di_f_uint128s_increase_
+  f_status_t f_uint128s_increase(const f_array_length_t step, f_uint128s_t *uint128s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint128s->used + 1 > uint128s->size) {
+      f_array_length_t size = uint128s->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint128s->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint128s_resize(size, uint128s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint128s_increase_
+
+#ifndef _di_f_uint128s_increase_by_
+  f_status_t f_uint128s_increase_by(const f_array_length_t amount, f_uint128s_t *uint128s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint128s->used + amount > uint128s->size) {
+      if (uint128s->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint128s_resize(uint128s->used + amount, uint128s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint128s_increase_by_
+
+#ifndef _di_f_uint128s_resize_
+  f_status_t f_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint128s_resize(length, uint128s);
+  }
+#endif // _di_f_uint128s_resize_
+
+#ifndef _di_f_uint128ss_adjust_
+  f_status_t f_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint128ss_adjust(length, uint128ss);
+  }
+#endif // _di_f_uint128ss_adjust_
+
+#ifndef _di_f_uint128ss_append_
+  f_status_t f_uint128ss_append(const f_uint128s_t source, f_uint128ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_uint128ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_uint128s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_uint128ss_append_
+
+#ifndef _di_f_uint128ss_append_all_
+  f_status_t f_uint128ss_append_all(const f_uint128ss_t source, f_uint128ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_uint128ss_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_uint128s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
+    } // for
+
+    return F_none;
+  }
+#endif // _di_f_uint128ss_append_all_
+
+#ifndef _di_f_uint128ss_decimate_by_
+  f_status_t f_uint128ss_decimate_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint128ss->size - amount > 0) {
+      return private_f_uint128ss_adjust(uint128ss->size - amount, uint128ss);
+    }
+
+    return private_f_uint128ss_adjust(0, uint128ss);
+  }
+#endif // _di_f_uint128ss_decimate_by_
+
+#ifndef _di_f_uint128ss_decrease_by_
+  f_status_t f_uint128ss_decrease_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint128ss->size - amount > 0) {
+      return private_f_uint128ss_resize(uint128ss->size - amount, uint128ss);
+    }
+
+    return private_f_uint128ss_resize(0, uint128ss);
+  }
+#endif // _di_f_uint128ss_decrease_by_
+
+#ifndef _di_f_uint128ss_increase_
+  f_status_t f_uint128ss_increase(const f_array_length_t step, f_uint128ss_t *uint128ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint128ss->used + 1 > uint128ss->size) {
+      f_array_length_t size = uint128ss->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint128ss->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint128ss_resize(size, uint128ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint128ss_increase_
+
+#ifndef _di_f_uint128ss_increase_by_
+  f_status_t f_uint128ss_increase_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint128ss->used + amount > uint128ss->size) {
+      if (uint128ss->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint128ss_resize(uint128ss->used + amount, uint128ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint128ss_increase_by_
+
+#ifndef _di_f_uint128ss_resize_
+  f_status_t f_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint128ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint128ss_resize(length, uint128ss);
+  }
+#endif // _di_f_uint128ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/uint128.h b/level_0/f_type_array/c/type_array/uint128.h
new file mode 100644 (file)
index 0000000..4634384
--- /dev/null
@@ -0,0 +1,377 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines data to be used for/by type (array) related functionality.
+ *
+ * This is auto-included by type_array.h and should not need to be explicitly included.
+ */
+#ifndef _F_type_array_uint128_h
+#define _F_type_array_uint128_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Resize the string uint128s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint128s
+ *   The string uint128s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint128s_adjust_
+  extern f_status_t f_uint128s_adjust(const f_array_length_t length, f_uint128s_t *uint128s);
+#endif // _di_f_uint128s_adjust_
+
+/**
+ * Append the single source uint128 onto the destination.
+ *
+ * @param source
+ *   The source uint128 to append.
+ * @param destination
+ *   The destination uint128s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128s_append_
+  extern f_status_t f_uint128s_append(const uint128_t source, f_uint128s_t *destination);
+#endif // _di_f_uint128s_append_
+
+/**
+ * Append the source uint128s onto the destination.
+ *
+ * @param source
+ *   The source uint128s to append.
+ * @param destination
+ *   The destination uint128s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128s_append_all_
+  extern f_status_t f_uint128s_append_all(const f_uint128s_t source, f_uint128s_t *destination);
+#endif // _di_f_uint128s_append_all_
+
+/**
+ * Resize the string uint128s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decimate the size by.
+ * @param uint128s
+ *   The string uint128s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint128s_decimate_by_
+  extern f_status_t f_uint128s_decimate_by(const f_array_length_t amount, f_uint128s_t *uint128s);
+#endif // _di_f_uint128s_decimate_by_
+
+/**
+ * Resize the string uint128s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decrease the size by.
+ * @param uint128s
+ *   The string uint128s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128s_decrease_by_
+  extern f_status_t f_uint128s_decrease_by(const f_array_length_t amount, f_uint128s_t *uint128s);
+#endif // _di_f_uint128s_decrease_by_
+
+/**
+ * Increase the size of the string uint128s array, but only if necesary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint128s
+ *   The string uint128s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128s_increase_
+  extern f_status_t f_uint128s_increase(const f_array_length_t step, f_uint128s_t *uint128s);
+#endif // _di_f_uint128s_increase_
+
+/**
+ * Resize the string uint128s array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint128s
+ *   The string uint128s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint128s_increase_by_
+  extern f_status_t f_uint128s_increase_by(const f_array_length_t amount, f_uint128s_t *uint128s);
+#endif // _di_f_uint128s_increase_by_
+
+/**
+ * Resize the string uint128s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint128s
+ *   The string uint128s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128s_resize_
+  extern f_status_t f_uint128s_resize(const f_array_length_t length, f_uint128s_t *uint128s);
+#endif // _di_f_uint128s_resize_
+
+/**
+ * Resize the string uint128ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint128ss
+ *   The string uint128ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint128ss_adjust_
+  extern f_status_t f_uint128ss_adjust(const f_array_length_t length, f_uint128ss_t *uint128ss);
+#endif // _di_f_uint128ss_adjust_
+
+/**
+ * Append the single source uint128s onto the destination.
+ *
+ * @param source
+ *   The source uint128s to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128ss_append_
+  extern f_status_t f_uint128ss_append(const f_uint128s_t source, f_uint128ss_t *destination);
+#endif // _di_f_uint128ss_append_
+
+/**
+ * Append the source uint128ss onto the destination.
+ *
+ * @param source
+ *   The source uint128ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128ss_append_all_
+  extern f_status_t f_uint128ss_append_all(const f_uint128ss_t source, f_uint128ss_t *destination);
+#endif // _di_f_uint128ss_append_all_
+
+/**
+ * Resize the string uint128ss 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 uint128ss
+ *   The string uint128ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint128ss_decimate_by_
+  extern f_status_t f_uint128ss_decimate_by(const f_array_length_t amount, f_uint128ss_t *uint128ss);
+#endif // _di_f_uint128ss_decimate_by_
+
+/**
+ * Resize the string uint128ss 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 uint128ss
+ *   The string uint128ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128ss_decrease_by_
+  extern f_status_t f_uint128ss_decrease_by(const f_array_length_t amount, f_uint128ss_t *uint128ss);
+#endif // _di_f_uint128ss_decrease_by_
+
+/**
+ * Increase the size of the string uint128ss array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint128ss
+ *   The string uint128ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128ss_increase_
+  extern f_status_t f_uint128ss_increase(const f_array_length_t step, f_uint128ss_t *uint128ss);
+#endif // _di_f_uint128ss_increase_
+
+/**
+ * Resize the string uint128ss array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint128ss
+ *   The string uint128ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint128ss_increase_by_
+  extern f_status_t f_uint128ss_increase_by(const f_array_length_t amount, f_uint128ss_t *uint128ss);
+#endif // _di_f_uint128ss_increase_by_
+
+/**
+ * Resize the string uint128ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint128ss
+ *   The string uint128ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint128ss_resize_
+  extern f_status_t f_uint128ss_resize(const f_array_length_t length, f_uint128ss_t *uint128ss);
+#endif // _di_f_uint128ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_uint128_h
diff --git a/level_0/f_type_array/c/type_array/uint16.c b/level_0/f_type_array/c/type_array/uint16.c
new file mode 100644 (file)
index 0000000..c56edf4
--- /dev/null
@@ -0,0 +1,290 @@
+#include "../type_array.h"
+#include "uint16.h"
+#include "private-uint16.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_uint16s_adjust_
+  f_status_t f_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint16s_adjust(length, uint16s);
+  }
+#endif // _di_f_uint16s_adjust_
+
+#ifndef _di_f_uint16s_append_
+  f_status_t f_uint16s_append(const uint16_t source, f_uint16s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint16s_append(source, destination);
+  }
+#endif // _di_f_uint16s_append_
+
+#ifndef _di_f_uint16s_append_all_
+  f_status_t f_uint16s_append_all(const f_uint16s_t source, f_uint16s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_uint16s_append_all(source, destination);
+  }
+#endif // _di_f_uint16s_append_all_
+
+#ifndef _di_f_uint16s_decimate_by_
+  f_status_t f_uint16s_decimate_by(const f_array_length_t amount, f_uint16s_t *uint16s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint16s->size - amount > 0) {
+      return private_f_uint16s_adjust(uint16s->size - amount, uint16s);
+    }
+
+    return private_f_uint16s_adjust(0, uint16s);
+  }
+#endif // _di_f_uint16s_decimate_by_
+
+#ifndef _di_f_uint16s_decrease_by_
+  f_status_t f_uint16s_decrease_by(const f_array_length_t amount, f_uint16s_t *uint16s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint16s->size - amount > 0) {
+      return private_f_uint16s_resize(uint16s->size - amount, uint16s);
+    }
+
+    return private_f_uint16s_resize(0, uint16s);
+  }
+#endif // _di_f_uint16s_decrease_by_
+
+#ifndef _di_f_uint16s_increase_
+  f_status_t f_uint16s_increase(const f_array_length_t step, f_uint16s_t *uint16s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint16s->used + 1 > uint16s->size) {
+      f_array_length_t size = uint16s->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint16s->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint16s_resize(size, uint16s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint16s_increase_
+
+#ifndef _di_f_uint16s_increase_by_
+  f_status_t f_uint16s_increase_by(const f_array_length_t amount, f_uint16s_t *uint16s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint16s->used + amount > uint16s->size) {
+      if (uint16s->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint16s_resize(uint16s->used + amount, uint16s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint16s_increase_by_
+
+#ifndef _di_f_uint16s_resize_
+  f_status_t f_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint16s_resize(length, uint16s);
+  }
+#endif // _di_f_uint16s_resize_
+
+#ifndef _di_f_uint16ss_adjust_
+  f_status_t f_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint16ss_adjust(length, uint16ss);
+  }
+#endif // _di_f_uint16ss_adjust_
+
+#ifndef _di_f_uint16ss_append_
+  f_status_t f_uint16ss_append(const f_uint16s_t source, f_uint16ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_uint16ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_uint16s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_uint16ss_append_
+
+#ifndef _di_f_uint16ss_append_all_
+  f_status_t f_uint16ss_append_all(const f_uint16ss_t source, f_uint16ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_uint16ss_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_uint16s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
+    } // for
+
+    return F_none;
+  }
+#endif // _di_f_uint16ss_append_all_
+
+#ifndef _di_f_uint16ss_decimate_by_
+  f_status_t f_uint16ss_decimate_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint16ss->size - amount > 0) {
+      return private_f_uint16ss_adjust(uint16ss->size - amount, uint16ss);
+    }
+
+    return private_f_uint16ss_adjust(0, uint16ss);
+  }
+#endif // _di_f_uint16ss_decimate_by_
+
+#ifndef _di_f_uint16ss_decrease_by_
+  f_status_t f_uint16ss_decrease_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint16ss->size - amount > 0) {
+      return private_f_uint16ss_resize(uint16ss->size - amount, uint16ss);
+    }
+
+    return private_f_uint16ss_resize(0, uint16ss);
+  }
+#endif // _di_f_uint16ss_decrease_by_
+
+#ifndef _di_f_uint16ss_increase_
+  f_status_t f_uint16ss_increase(const f_array_length_t step, f_uint16ss_t *uint16ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint16ss->used + 1 > uint16ss->size) {
+      f_array_length_t size = uint16ss->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint16ss->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint16ss_resize(size, uint16ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint16ss_increase_
+
+#ifndef _di_f_uint16ss_increase_by_
+  f_status_t f_uint16ss_increase_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint16ss->used + amount > uint16ss->size) {
+      if (uint16ss->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint16ss_resize(uint16ss->used + amount, uint16ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint16ss_increase_by_
+
+#ifndef _di_f_uint16ss_resize_
+  f_status_t f_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint16ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint16ss_resize(length, uint16ss);
+  }
+#endif // _di_f_uint16ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/uint16.h b/level_0/f_type_array/c/type_array/uint16.h
new file mode 100644 (file)
index 0000000..31aa62f
--- /dev/null
@@ -0,0 +1,377 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines data to be used for/by type (array) related functionality.
+ *
+ * This is auto-included by type_array.h and should not need to be explicitly included.
+ */
+#ifndef _F_type_array_uint16_h
+#define _F_type_array_uint16_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Resize the string uint16s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint16s
+ *   The string uint16s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint16s_adjust_
+  extern f_status_t f_uint16s_adjust(const f_array_length_t length, f_uint16s_t *uint16s);
+#endif // _di_f_uint16s_adjust_
+
+/**
+ * Append the single source uint16 onto the destination.
+ *
+ * @param source
+ *   The source uint16 to append.
+ * @param destination
+ *   The destination uint16s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16s_append_
+  extern f_status_t f_uint16s_append(const uint16_t source, f_uint16s_t *destination);
+#endif // _di_f_uint16s_append_
+
+/**
+ * Append the source uint16s onto the destination.
+ *
+ * @param source
+ *   The source uint16s to append.
+ * @param destination
+ *   The destination uint16s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16s_append_all_
+  extern f_status_t f_uint16s_append_all(const f_uint16s_t source, f_uint16s_t *destination);
+#endif // _di_f_uint16s_append_all_
+
+/**
+ * Resize the string uint16s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decimate the size by.
+ * @param uint16s
+ *   The string uint16s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint16s_decimate_by_
+  extern f_status_t f_uint16s_decimate_by(const f_array_length_t amount, f_uint16s_t *uint16s);
+#endif // _di_f_uint16s_decimate_by_
+
+/**
+ * Resize the string uint16s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decrease the size by.
+ * @param uint16s
+ *   The string uint16s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16s_decrease_by_
+  extern f_status_t f_uint16s_decrease_by(const f_array_length_t amount, f_uint16s_t *uint16s);
+#endif // _di_f_uint16s_decrease_by_
+
+/**
+ * Increase the size of the string uint16s array, but only if necesary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint16s
+ *   The string uint16s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16s_increase_
+  extern f_status_t f_uint16s_increase(const f_array_length_t step, f_uint16s_t *uint16s);
+#endif // _di_f_uint16s_increase_
+
+/**
+ * Resize the string uint16s array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint16s
+ *   The string uint16s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint16s_increase_by_
+  extern f_status_t f_uint16s_increase_by(const f_array_length_t amount, f_uint16s_t *uint16s);
+#endif // _di_f_uint16s_increase_by_
+
+/**
+ * Resize the string uint16s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint16s
+ *   The string uint16s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16s_resize_
+  extern f_status_t f_uint16s_resize(const f_array_length_t length, f_uint16s_t *uint16s);
+#endif // _di_f_uint16s_resize_
+
+/**
+ * Resize the string uint16ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint16ss
+ *   The string uint16ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint16ss_adjust_
+  extern f_status_t f_uint16ss_adjust(const f_array_length_t length, f_uint16ss_t *uint16ss);
+#endif // _di_f_uint16ss_adjust_
+
+/**
+ * Append the single source uint16s onto the destination.
+ *
+ * @param source
+ *   The source uint16s to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16ss_append_
+  extern f_status_t f_uint16ss_append(const f_uint16s_t source, f_uint16ss_t *destination);
+#endif // _di_f_uint16ss_append_
+
+/**
+ * Append the source uint16ss onto the destination.
+ *
+ * @param source
+ *   The source uint16ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16ss_append_all_
+  extern f_status_t f_uint16ss_append_all(const f_uint16ss_t source, f_uint16ss_t *destination);
+#endif // _di_f_uint16ss_append_all_
+
+/**
+ * Resize the string uint16ss 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 uint16ss
+ *   The string uint16ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint16ss_decimate_by_
+  extern f_status_t f_uint16ss_decimate_by(const f_array_length_t amount, f_uint16ss_t *uint16ss);
+#endif // _di_f_uint16ss_decimate_by_
+
+/**
+ * Resize the string uint16ss 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 uint16ss
+ *   The string uint16ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16ss_decrease_by_
+  extern f_status_t f_uint16ss_decrease_by(const f_array_length_t amount, f_uint16ss_t *uint16ss);
+#endif // _di_f_uint16ss_decrease_by_
+
+/**
+ * Increase the size of the string uint16ss array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint16ss
+ *   The string uint16ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16ss_increase_
+  extern f_status_t f_uint16ss_increase(const f_array_length_t step, f_uint16ss_t *uint16ss);
+#endif // _di_f_uint16ss_increase_
+
+/**
+ * Resize the string uint16ss array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint16ss
+ *   The string uint16ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint16ss_increase_by_
+  extern f_status_t f_uint16ss_increase_by(const f_array_length_t amount, f_uint16ss_t *uint16ss);
+#endif // _di_f_uint16ss_increase_by_
+
+/**
+ * Resize the string uint16ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint16ss
+ *   The string uint16ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint16ss_resize_
+  extern f_status_t f_uint16ss_resize(const f_array_length_t length, f_uint16ss_t *uint16ss);
+#endif // _di_f_uint16ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_uint16_h
diff --git a/level_0/f_type_array/c/type_array/uint32.c b/level_0/f_type_array/c/type_array/uint32.c
new file mode 100644 (file)
index 0000000..4c4e5bf
--- /dev/null
@@ -0,0 +1,290 @@
+#include "../type_array.h"
+#include "uint32.h"
+#include "private-uint32.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_uint32s_adjust_
+  f_status_t f_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint32s_adjust(length, uint32s);
+  }
+#endif // _di_f_uint32s_adjust_
+
+#ifndef _di_f_uint32s_append_
+  f_status_t f_uint32s_append(const uint32_t source, f_uint32s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint32s_append(source, destination);
+  }
+#endif // _di_f_uint32s_append_
+
+#ifndef _di_f_uint32s_append_all_
+  f_status_t f_uint32s_append_all(const f_uint32s_t source, f_uint32s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_uint32s_append_all(source, destination);
+  }
+#endif // _di_f_uint32s_append_all_
+
+#ifndef _di_f_uint32s_decimate_by_
+  f_status_t f_uint32s_decimate_by(const f_array_length_t amount, f_uint32s_t *uint32s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint32s->size - amount > 0) {
+      return private_f_uint32s_adjust(uint32s->size - amount, uint32s);
+    }
+
+    return private_f_uint32s_adjust(0, uint32s);
+  }
+#endif // _di_f_uint32s_decimate_by_
+
+#ifndef _di_f_uint32s_decrease_by_
+  f_status_t f_uint32s_decrease_by(const f_array_length_t amount, f_uint32s_t *uint32s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint32s->size - amount > 0) {
+      return private_f_uint32s_resize(uint32s->size - amount, uint32s);
+    }
+
+    return private_f_uint32s_resize(0, uint32s);
+  }
+#endif // _di_f_uint32s_decrease_by_
+
+#ifndef _di_f_uint32s_increase_
+  f_status_t f_uint32s_increase(const f_array_length_t step, f_uint32s_t *uint32s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint32s->used + 1 > uint32s->size) {
+      f_array_length_t size = uint32s->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint32s->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint32s_resize(size, uint32s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint32s_increase_
+
+#ifndef _di_f_uint32s_increase_by_
+  f_status_t f_uint32s_increase_by(const f_array_length_t amount, f_uint32s_t *uint32s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint32s->used + amount > uint32s->size) {
+      if (uint32s->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint32s_resize(uint32s->used + amount, uint32s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint32s_increase_by_
+
+#ifndef _di_f_uint32s_resize_
+  f_status_t f_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint32s_resize(length, uint32s);
+  }
+#endif // _di_f_uint32s_resize_
+
+#ifndef _di_f_uint32ss_adjust_
+  f_status_t f_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint32ss_adjust(length, uint32ss);
+  }
+#endif // _di_f_uint32ss_adjust_
+
+#ifndef _di_f_uint32ss_append_
+  f_status_t f_uint32ss_append(const f_uint32s_t source, f_uint32ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_uint32ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_uint32s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_uint32ss_append_
+
+#ifndef _di_f_uint32ss_append_all_
+  f_status_t f_uint32ss_append_all(const f_uint32ss_t source, f_uint32ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_uint32ss_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_uint32s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
+    } // for
+
+    return F_none;
+  }
+#endif // _di_f_uint32ss_append_all_
+
+#ifndef _di_f_uint32ss_decimate_by_
+  f_status_t f_uint32ss_decimate_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint32ss->size - amount > 0) {
+      return private_f_uint32ss_adjust(uint32ss->size - amount, uint32ss);
+    }
+
+    return private_f_uint32ss_adjust(0, uint32ss);
+  }
+#endif // _di_f_uint32ss_decimate_by_
+
+#ifndef _di_f_uint32ss_decrease_by_
+  f_status_t f_uint32ss_decrease_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint32ss->size - amount > 0) {
+      return private_f_uint32ss_resize(uint32ss->size - amount, uint32ss);
+    }
+
+    return private_f_uint32ss_resize(0, uint32ss);
+  }
+#endif // _di_f_uint32ss_decrease_by_
+
+#ifndef _di_f_uint32ss_increase_
+  f_status_t f_uint32ss_increase(const f_array_length_t step, f_uint32ss_t *uint32ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint32ss->used + 1 > uint32ss->size) {
+      f_array_length_t size = uint32ss->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint32ss->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint32ss_resize(size, uint32ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint32ss_increase_
+
+#ifndef _di_f_uint32ss_increase_by_
+  f_status_t f_uint32ss_increase_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint32ss->used + amount > uint32ss->size) {
+      if (uint32ss->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint32ss_resize(uint32ss->used + amount, uint32ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint32ss_increase_by_
+
+#ifndef _di_f_uint32ss_resize_
+  f_status_t f_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint32ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint32ss_resize(length, uint32ss);
+  }
+#endif // _di_f_uint32ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/uint32.h b/level_0/f_type_array/c/type_array/uint32.h
new file mode 100644 (file)
index 0000000..a061778
--- /dev/null
@@ -0,0 +1,377 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines data to be used for/by type (array) related functionality.
+ *
+ * This is auto-included by type_array.h and should not need to be explicitly included.
+ */
+#ifndef _F_type_array_uint32_h
+#define _F_type_array_uint32_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Resize the string uint32s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint32s
+ *   The string uint32s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint32s_adjust_
+  extern f_status_t f_uint32s_adjust(const f_array_length_t length, f_uint32s_t *uint32s);
+#endif // _di_f_uint32s_adjust_
+
+/**
+ * Append the single source uint32 onto the destination.
+ *
+ * @param source
+ *   The source uint32 to append.
+ * @param destination
+ *   The destination uint32s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32s_append_
+  extern f_status_t f_uint32s_append(const uint32_t source, f_uint32s_t *destination);
+#endif // _di_f_uint32s_append_
+
+/**
+ * Append the source uint32s onto the destination.
+ *
+ * @param source
+ *   The source uint32s to append.
+ * @param destination
+ *   The destination uint32s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32s_append_all_
+  extern f_status_t f_uint32s_append_all(const f_uint32s_t source, f_uint32s_t *destination);
+#endif // _di_f_uint32s_append_all_
+
+/**
+ * Resize the string uint32s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decimate the size by.
+ * @param uint32s
+ *   The string uint32s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint32s_decimate_by_
+  extern f_status_t f_uint32s_decimate_by(const f_array_length_t amount, f_uint32s_t *uint32s);
+#endif // _di_f_uint32s_decimate_by_
+
+/**
+ * Resize the string uint32s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decrease the size by.
+ * @param uint32s
+ *   The string uint32s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32s_decrease_by_
+  extern f_status_t f_uint32s_decrease_by(const f_array_length_t amount, f_uint32s_t *uint32s);
+#endif // _di_f_uint32s_decrease_by_
+
+/**
+ * Increase the size of the string uint32s array, but only if necesary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint32s
+ *   The string uint32s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32s_increase_
+  extern f_status_t f_uint32s_increase(const f_array_length_t step, f_uint32s_t *uint32s);
+#endif // _di_f_uint32s_increase_
+
+/**
+ * Resize the string uint32s array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint32s
+ *   The string uint32s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint32s_increase_by_
+  extern f_status_t f_uint32s_increase_by(const f_array_length_t amount, f_uint32s_t *uint32s);
+#endif // _di_f_uint32s_increase_by_
+
+/**
+ * Resize the string uint32s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint32s
+ *   The string uint32s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32s_resize_
+  extern f_status_t f_uint32s_resize(const f_array_length_t length, f_uint32s_t *uint32s);
+#endif // _di_f_uint32s_resize_
+
+/**
+ * Resize the string uint32ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint32ss
+ *   The string uint32ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint32ss_adjust_
+  extern f_status_t f_uint32ss_adjust(const f_array_length_t length, f_uint32ss_t *uint32ss);
+#endif // _di_f_uint32ss_adjust_
+
+/**
+ * Append the single source uint32s onto the destination.
+ *
+ * @param source
+ *   The source uint32s to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32ss_append_
+  extern f_status_t f_uint32ss_append(const f_uint32s_t source, f_uint32ss_t *destination);
+#endif // _di_f_uint32ss_append_
+
+/**
+ * Append the source uint32ss onto the destination.
+ *
+ * @param source
+ *   The source uint32ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32ss_append_all_
+  extern f_status_t f_uint32ss_append_all(const f_uint32ss_t source, f_uint32ss_t *destination);
+#endif // _di_f_uint32ss_append_all_
+
+/**
+ * Resize the string uint32ss 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 uint32ss
+ *   The string uint32ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint32ss_decimate_by_
+  extern f_status_t f_uint32ss_decimate_by(const f_array_length_t amount, f_uint32ss_t *uint32ss);
+#endif // _di_f_uint32ss_decimate_by_
+
+/**
+ * Resize the string uint32ss 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 uint32ss
+ *   The string uint32ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32ss_decrease_by_
+  extern f_status_t f_uint32ss_decrease_by(const f_array_length_t amount, f_uint32ss_t *uint32ss);
+#endif // _di_f_uint32ss_decrease_by_
+
+/**
+ * Increase the size of the string uint32ss array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint32ss
+ *   The string uint32ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32ss_increase_
+  extern f_status_t f_uint32ss_increase(const f_array_length_t step, f_uint32ss_t *uint32ss);
+#endif // _di_f_uint32ss_increase_
+
+/**
+ * Resize the string uint32ss array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint32ss
+ *   The string uint32ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint32ss_increase_by_
+  extern f_status_t f_uint32ss_increase_by(const f_array_length_t amount, f_uint32ss_t *uint32ss);
+#endif // _di_f_uint32ss_increase_by_
+
+/**
+ * Resize the string uint32ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint32ss
+ *   The string uint32ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint32ss_resize_
+  extern f_status_t f_uint32ss_resize(const f_array_length_t length, f_uint32ss_t *uint32ss);
+#endif // _di_f_uint32ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_uint32_h
diff --git a/level_0/f_type_array/c/type_array/uint64.c b/level_0/f_type_array/c/type_array/uint64.c
new file mode 100644 (file)
index 0000000..ec8a048
--- /dev/null
@@ -0,0 +1,290 @@
+#include "../type_array.h"
+#include "uint64.h"
+#include "private-uint64.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_uint64s_adjust_
+  f_status_t f_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint64s_adjust(length, uint64s);
+  }
+#endif // _di_f_uint64s_adjust_
+
+#ifndef _di_f_uint64s_append_
+  f_status_t f_uint64s_append(const uint64_t source, f_uint64s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint64s_append(source, destination);
+  }
+#endif // _di_f_uint64s_append_
+
+#ifndef _di_f_uint64s_append_all_
+  f_status_t f_uint64s_append_all(const f_uint64s_t source, f_uint64s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_uint64s_append_all(source, destination);
+  }
+#endif // _di_f_uint64s_append_all_
+
+#ifndef _di_f_uint64s_decimate_by_
+  f_status_t f_uint64s_decimate_by(const f_array_length_t amount, f_uint64s_t *uint64s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint64s->size - amount > 0) {
+      return private_f_uint64s_adjust(uint64s->size - amount, uint64s);
+    }
+
+    return private_f_uint64s_adjust(0, uint64s);
+  }
+#endif // _di_f_uint64s_decimate_by_
+
+#ifndef _di_f_uint64s_decrease_by_
+  f_status_t f_uint64s_decrease_by(const f_array_length_t amount, f_uint64s_t *uint64s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint64s->size - amount > 0) {
+      return private_f_uint64s_resize(uint64s->size - amount, uint64s);
+    }
+
+    return private_f_uint64s_resize(0, uint64s);
+  }
+#endif // _di_f_uint64s_decrease_by_
+
+#ifndef _di_f_uint64s_increase_
+  f_status_t f_uint64s_increase(const f_array_length_t step, f_uint64s_t *uint64s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint64s->used + 1 > uint64s->size) {
+      f_array_length_t size = uint64s->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint64s->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint64s_resize(size, uint64s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint64s_increase_
+
+#ifndef _di_f_uint64s_increase_by_
+  f_status_t f_uint64s_increase_by(const f_array_length_t amount, f_uint64s_t *uint64s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint64s->used + amount > uint64s->size) {
+      if (uint64s->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint64s_resize(uint64s->used + amount, uint64s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint64s_increase_by_
+
+#ifndef _di_f_uint64s_resize_
+  f_status_t f_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint64s_resize(length, uint64s);
+  }
+#endif // _di_f_uint64s_resize_
+
+#ifndef _di_f_uint64ss_adjust_
+  f_status_t f_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint64ss_adjust(length, uint64ss);
+  }
+#endif // _di_f_uint64ss_adjust_
+
+#ifndef _di_f_uint64ss_append_
+  f_status_t f_uint64ss_append(const f_uint64s_t source, f_uint64ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_uint64ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_uint64s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_uint64ss_append_
+
+#ifndef _di_f_uint64ss_append_all_
+  f_status_t f_uint64ss_append_all(const f_uint64ss_t source, f_uint64ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_uint64ss_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_uint64s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
+    } // for
+
+    return F_none;
+  }
+#endif // _di_f_uint64ss_append_all_
+
+#ifndef _di_f_uint64ss_decimate_by_
+  f_status_t f_uint64ss_decimate_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint64ss->size - amount > 0) {
+      return private_f_uint64ss_adjust(uint64ss->size - amount, uint64ss);
+    }
+
+    return private_f_uint64ss_adjust(0, uint64ss);
+  }
+#endif // _di_f_uint64ss_decimate_by_
+
+#ifndef _di_f_uint64ss_decrease_by_
+  f_status_t f_uint64ss_decrease_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint64ss->size - amount > 0) {
+      return private_f_uint64ss_resize(uint64ss->size - amount, uint64ss);
+    }
+
+    return private_f_uint64ss_resize(0, uint64ss);
+  }
+#endif // _di_f_uint64ss_decrease_by_
+
+#ifndef _di_f_uint64ss_increase_
+  f_status_t f_uint64ss_increase(const f_array_length_t step, f_uint64ss_t *uint64ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint64ss->used + 1 > uint64ss->size) {
+      f_array_length_t size = uint64ss->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint64ss->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint64ss_resize(size, uint64ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint64ss_increase_
+
+#ifndef _di_f_uint64ss_increase_by_
+  f_status_t f_uint64ss_increase_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint64ss->used + amount > uint64ss->size) {
+      if (uint64ss->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint64ss_resize(uint64ss->used + amount, uint64ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint64ss_increase_by_
+
+#ifndef _di_f_uint64ss_resize_
+  f_status_t f_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint64ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint64ss_resize(length, uint64ss);
+  }
+#endif // _di_f_uint64ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/uint64.h b/level_0/f_type_array/c/type_array/uint64.h
new file mode 100644 (file)
index 0000000..0398898
--- /dev/null
@@ -0,0 +1,379 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines data to be used for/by type (array) related functionality.
+ *
+ * This is auto-included by type_array.h and should not need to be explicitly included.
+ */
+#ifndef _F_type_array_uint64_h
+#define _F_type_array_uint64_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Resize the string uint64s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint64s
+ *   The string uint64s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint64s_adjust_
+  extern f_status_t f_uint64s_adjust(const f_array_length_t length, f_uint64s_t *uint64s);
+#endif // _di_f_uint64s_adjust_
+
+/**
+ * Append the single source uint64 onto the destination.
+ *
+ * @param source
+ *   The source uint64 to append.
+ * @param destination
+ *   The destination uint64s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64s_append_
+  extern f_status_t f_uint64s_append(const uint64_t source, f_uint64s_t *destination);
+#endif // _di_f_uint64s_append_
+
+/**
+ * Append the source uint64s onto the destination.
+ *
+ * @param source
+ *   The source uint64s to append.
+ * @param destination
+ *   The destination uint64s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64s_append_all_
+  extern f_status_t f_uint64s_append_all(const f_uint64s_t source, f_uint64s_t *destination);
+#endif // _di_f_uint64s_append_all_
+
+/**
+ * Resize the string uint64s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decimate the size by.
+ * @param uint64s
+ *   The string uint64s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint64s_decimate_by_
+  extern f_status_t f_uint64s_decimate_by(const f_array_length_t amount, f_uint64s_t *uint64s);
+#endif // _di_f_uint64s_decimate_by_
+
+/**
+ * Resize the string uint64s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decrease the size by.
+ * @param uint64s
+ *   The string uint64s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64s_decrease_by_
+  extern f_status_t f_uint64s_decrease_by(const f_array_length_t amount, f_uint64s_t *uint64s);
+#endif // _di_f_uint64s_decrease_by_
+
+/**
+ * Increase the size of the string uint64s array, but only if necesary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint64s
+ *   The string uint64s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64s_increase_
+  extern f_status_t f_uint64s_increase(const f_array_length_t step, f_uint64s_t *uint64s);
+#endif // _di_f_uint64s_increase_
+
+/**
+ * Resize the string uint64s array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint64s
+ *   The string uint64s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint64s_increase_by_
+  extern f_status_t f_uint64s_increase_by(const f_array_length_t amount, f_uint64s_t *uint64s);
+#endif // _di_f_uint64s_increase_by_
+
+/**
+ * Resize the string uint64s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint64s
+ *   The string uint64s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64s_resize_
+  extern f_status_t f_uint64s_resize(const f_array_length_t length, f_uint64s_t *uint64s);
+#endif // _di_f_uint64s_resize_
+
+/**
+ * Resize the string uint64ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint64ss
+ *   The string uint64ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint64ss_adjust_
+  extern f_status_t f_uint64ss_adjust(const f_array_length_t length, f_uint64ss_t *uint64ss);
+#endif // _di_f_uint64ss_adjust_
+
+/**
+ * Append the single source uint64s onto the destination.
+ *
+ * @param source
+ *   The source uint64s to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64ss_append_
+  extern f_status_t f_uint64ss_append(const f_uint64s_t source, f_uint64ss_t *destination);
+#endif // _di_f_uint64ss_append_
+
+/**
+ * Append the source uint64ss onto the destination.
+ *
+ * @param source
+ *   The source uint64ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64ss_append_all_
+  extern f_status_t f_uint64ss_append_all(const f_uint64ss_t source, f_uint64ss_t *destination);
+#endif // _di_f_uint64ss_append_all_
+
+/**
+ * Resize the string uint64ss 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 uint64ss
+ *   The string uint64ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint64ss_decimate_by_
+  extern f_status_t f_uint64ss_decimate_by(const f_array_length_t amount, f_uint64ss_t *uint64ss);
+#endif // _di_f_uint64ss_decimate_by_
+
+/**
+ * Resize the string uint64ss 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 uint64ss
+ *   The string uint64ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64ss_decrease_by_
+  extern f_status_t f_uint64ss_decrease_by(const f_array_length_t amount, f_uint64ss_t *uint64ss);
+#endif // _di_f_uint64ss_decrease_by_
+
+/**
+ * Increase the size of the string uint64ss array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint64ss
+ *   The string uint64ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64ss_increase_
+  extern f_status_t f_uint64ss_increase(const f_array_length_t step, f_uint64ss_t *uint64ss);
+#endif // _di_f_uint64ss_increase_
+
+/**
+ * Resize the string uint64ss array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint64ss
+ *   The string uint64ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint64ss_increase_by_
+  extern f_status_t f_uint64ss_increase_by(const f_array_length_t amount, f_uint64ss_t *uint64ss);
+#endif // _di_f_uint64ss_increase_by_
+
+/**
+ * Resize the string uint64ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint64ss
+ *   The string uint64ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint64ss_resize_
+  extern f_status_t f_uint64ss_resize(const f_array_length_t length, f_uint64ss_t *uint64ss);
+#endif // _di_f_uint64ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_uint64_h
diff --git a/level_0/f_type_array/c/type_array/uint8.c b/level_0/f_type_array/c/type_array/uint8.c
new file mode 100644 (file)
index 0000000..eaa88d8
--- /dev/null
@@ -0,0 +1,290 @@
+#include "../type_array.h"
+#include "uint8.h"
+#include "private-uint8.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_uint8s_adjust_
+  f_status_t f_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint8s_adjust(length, uint8s);
+  }
+#endif // _di_f_uint8s_adjust_
+
+#ifndef _di_f_uint8s_append_
+  f_status_t f_uint8s_append(const uint8_t source, f_uint8s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint8s_append(source, destination);
+  }
+#endif // _di_f_uint8s_append_
+
+#ifndef _di_f_uint8s_append_all_
+  f_status_t f_uint8s_append_all(const f_uint8s_t source, f_uint8s_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    return private_f_uint8s_append_all(source, destination);
+  }
+#endif // _di_f_uint8s_append_all_
+
+#ifndef _di_f_uint8s_decimate_by_
+  f_status_t f_uint8s_decimate_by(const f_array_length_t amount, f_uint8s_t *uint8s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint8s->size - amount > 0) {
+      return private_f_uint8s_adjust(uint8s->size - amount, uint8s);
+    }
+
+    return private_f_uint8s_adjust(0, uint8s);
+  }
+#endif // _di_f_uint8s_decimate_by_
+
+#ifndef _di_f_uint8s_decrease_by_
+  f_status_t f_uint8s_decrease_by(const f_array_length_t amount, f_uint8s_t *uint8s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint8s->size - amount > 0) {
+      return private_f_uint8s_resize(uint8s->size - amount, uint8s);
+    }
+
+    return private_f_uint8s_resize(0, uint8s);
+  }
+#endif // _di_f_uint8s_decrease_by_
+
+#ifndef _di_f_uint8s_increase_
+  f_status_t f_uint8s_increase(const f_array_length_t step, f_uint8s_t *uint8s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint8s->used + 1 > uint8s->size) {
+      f_array_length_t size = uint8s->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint8s->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint8s_resize(size, uint8s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint8s_increase_
+
+#ifndef _di_f_uint8s_increase_by_
+  f_status_t f_uint8s_increase_by(const f_array_length_t amount, f_uint8s_t *uint8s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint8s->used + amount > uint8s->size) {
+      if (uint8s->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint8s_resize(uint8s->used + amount, uint8s);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint8s_increase_by_
+
+#ifndef _di_f_uint8s_resize_
+  f_status_t f_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8s) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint8s_resize(length, uint8s);
+  }
+#endif // _di_f_uint8s_resize_
+
+#ifndef _di_f_uint8ss_adjust_
+  f_status_t f_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint8ss_adjust(length, uint8ss);
+  }
+#endif // _di_f_uint8ss_adjust_
+
+#ifndef _di_f_uint8ss_append_
+  f_status_t f_uint8ss_append(const f_uint8s_t source, f_uint8ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + 1 > destination->size) {
+      status = private_f_uint8ss_resize(destination->used + F_memory_default_allocation_small_d, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    status = private_f_uint8s_append_all(source, &destination->array[destination->used]);
+    if (F_status_is_error(status)) return status;
+
+    ++destination->used;
+
+    return F_none;
+  }
+#endif // _di_f_uint8ss_append_
+
+#ifndef _di_f_uint8ss_append_all_
+  f_status_t f_uint8ss_append_all(const f_uint8ss_t source, f_uint8ss_t *destination) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!destination) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!source.used) return F_data_not;
+
+    f_status_t status = F_none;
+
+    if (destination->used + source.used > destination->size) {
+      status = private_f_uint8ss_resize(destination->used + source.used, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+      destination->array[destination->used].used = 0;
+
+      if (source.array[i].used) {
+        status = private_f_uint8s_append_all(source.array[i], &destination->array[destination->used]);
+        if (F_status_is_error(status)) return status;
+      }
+    } // for
+
+    return F_none;
+  }
+#endif // _di_f_uint8ss_append_all_
+
+#ifndef _di_f_uint8ss_decimate_by_
+  f_status_t f_uint8ss_decimate_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint8ss->size - amount > 0) {
+      return private_f_uint8ss_adjust(uint8ss->size - amount, uint8ss);
+    }
+
+    return private_f_uint8ss_adjust(0, uint8ss);
+  }
+#endif // _di_f_uint8ss_decimate_by_
+
+#ifndef _di_f_uint8ss_decrease_by_
+  f_status_t f_uint8ss_decrease_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint8ss->size - amount > 0) {
+      return private_f_uint8ss_resize(uint8ss->size - amount, uint8ss);
+    }
+
+    return private_f_uint8ss_resize(0, uint8ss);
+  }
+#endif // _di_f_uint8ss_decrease_by_
+
+#ifndef _di_f_uint8ss_increase_
+  f_status_t f_uint8ss_increase(const f_array_length_t step, f_uint8ss_t *uint8ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (step && uint8ss->used + 1 > uint8ss->size) {
+      f_array_length_t size = uint8ss->used + step;
+
+      if (size > F_array_length_t_size_d) {
+        if (uint8ss->used + 1 > F_array_length_t_size_d) {
+          return F_status_set_error(F_array_too_large);
+        }
+
+        size = F_array_length_t_size_d;
+      }
+
+      return private_f_uint8ss_resize(size, uint8ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint8ss_increase_
+
+#ifndef _di_f_uint8ss_increase_by_
+  f_status_t f_uint8ss_increase_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    if (!amount) {
+      return F_data_not;
+    }
+
+    if (uint8ss->used + amount > uint8ss->size) {
+      if (uint8ss->used + amount > F_array_length_t_size_d) {
+        return F_status_set_error(F_array_too_large);
+      }
+
+      return private_f_uint8ss_resize(uint8ss->used + amount, uint8ss);
+    }
+
+    return F_data_not;
+  }
+#endif // _di_f_uint8ss_increase_by_
+
+#ifndef _di_f_uint8ss_resize_
+  f_status_t f_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss) {
+    #ifndef _di_level_0_parameter_checking_
+      if (!uint8ss) return F_status_set_error(F_parameter);
+    #endif // _di_level_0_parameter_checking_
+
+    return private_f_uint8ss_resize(length, uint8ss);
+  }
+#endif // _di_f_uint8ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/uint8.h b/level_0/f_type_array/c/type_array/uint8.h
new file mode 100644 (file)
index 0000000..d9f7cf6
--- /dev/null
@@ -0,0 +1,379 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines data to be used for/by type (array) related functionality.
+ *
+ * This is auto-included by type_array.h and should not need to be explicitly included.
+ */
+#ifndef _F_type_array_uint8_h
+#define _F_type_array_uint8_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Resize the string uint8s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint8s
+ *   The string uint8s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint8s_adjust_
+  extern f_status_t f_uint8s_adjust(const f_array_length_t length, f_uint8s_t *uint8s);
+#endif // _di_f_uint8s_adjust_
+
+/**
+ * Append the single source uint8 onto the destination.
+ *
+ * @param source
+ *   The source uint8 to append.
+ * @param destination
+ *   The destination uint8s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8s_append_
+  extern f_status_t f_uint8s_append(const uint8_t source, f_uint8s_t *destination);
+#endif // _di_f_uint8s_append_
+
+/**
+ * Append the source uint8s onto the destination.
+ *
+ * @param source
+ *   The source uint8s to append.
+ * @param destination
+ *   The destination uint8s the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8s_append_all_
+  extern f_status_t f_uint8s_append_all(const f_uint8s_t source, f_uint8s_t *destination);
+#endif // _di_f_uint8s_append_all_
+
+/**
+ * Resize the string uint8s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decimate the size by.
+ * @param uint8s
+ *   The string uint8s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ */
+#ifndef _di_f_uint8s_decimate_by_
+  extern f_status_t f_uint8s_decimate_by(const f_array_length_t amount, f_uint8s_t *uint8s);
+#endif // _di_f_uint8s_decimate_by_
+
+/**
+ * Resize the string uint8s array to a smaller size.
+ *
+ * This will resize making the array smaller based on (size - given length).
+ * If the given length is too small, then the resize will fail.
+ * This will not shrink the size to les than 0.
+ *
+ * @param amount
+ *   A positive number representing how much to decrease the size by.
+ * @param uint8s
+ *   The string uint8s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8s_decrease_by_
+  extern f_status_t f_uint8s_decrease_by(const f_array_length_t amount, f_uint8s_t *uint8s);
+#endif // _di_f_uint8s_decrease_by_
+
+/**
+ * Increase the size of the string uint8s array, but only if necesary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint8s
+ *   The string uint8s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8s_increase_
+  extern f_status_t f_uint8s_increase(const f_array_length_t step, f_uint8s_t *uint8s);
+#endif // _di_f_uint8s_increase_
+
+/**
+ * Resize the string uint8s array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint8s
+ *   The string uint8s array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint8s_increase_by_
+  extern f_status_t f_uint8s_increase_by(const f_array_length_t amount, f_uint8s_t *uint8s);
+#endif // _di_f_uint8s_increase_by_
+
+/**
+ * Resize the string uint8s array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint8s
+ *   The string uint8s array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8s_resize_
+  extern f_status_t f_uint8s_resize(const f_array_length_t length, f_uint8s_t *uint8s);
+#endif // _di_f_uint8s_resize_
+
+/**
+ * Resize the string uint8ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint8ss
+ *   The string uint8ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint8ss_adjust_
+  extern f_status_t f_uint8ss_adjust(const f_array_length_t length, f_uint8ss_t *uint8ss);
+#endif // _di_f_uint8ss_adjust_
+
+/**
+ * Append the single source uint8s onto the destination.
+ *
+ * @param source
+ *   The source uint8s to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8ss_append_
+  extern f_status_t f_uint8ss_append(const f_uint8s_t source, f_uint8ss_t *destination);
+#endif // _di_f_uint8ss_append_
+
+/**
+ * Append the source uint8ss onto the destination.
+ *
+ * @param source
+ *   The source uint8ss to append.
+ * @param destination
+ *   The destination ranges the source is appended onto.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8ss_append_all_
+  extern f_status_t f_uint8ss_append_all(const f_uint8ss_t source, f_uint8ss_t *destination);
+#endif // _di_f_uint8ss_append_all_
+
+/**
+ * Resize the string uint8ss 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 uint8ss
+ *   The string uint8ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_adjust().
+ *   Errors (with error bit) from: f_memory_destroy().
+ */
+#ifndef _di_f_uint8ss_decimate_by_
+  extern f_status_t f_uint8ss_decimate_by(const f_array_length_t amount, f_uint8ss_t *uint8ss);
+#endif // _di_f_uint8ss_decimate_by_
+
+/**
+ * Resize the string uint8ss 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 uint8ss
+ *   The string uint8ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if amount is 0.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8ss_decrease_by_
+  extern f_status_t f_uint8ss_decrease_by(const f_array_length_t amount, f_uint8ss_t *uint8ss);
+#endif // _di_f_uint8ss_decrease_by_
+
+/**
+ * Increase the size of the string uint8ss array, but only if necessary.
+ *
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint8ss
+ *   The string uint8ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ *
+ *   F_array_too_large (with error bit) if the new array length is too large.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8ss_increase_
+  extern f_status_t f_uint8ss_increase(const f_array_length_t step, f_uint8ss_t *uint8ss);
+#endif // _di_f_uint8ss_increase_
+
+/**
+ * Resize the string uint8ss array to a larger size.
+ *
+ * This will resize making the string larger based on the given length.
+ * If the given length is too large for the buffer, then attempt to set max buffer size (F_array_length_t_size_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 uint8ss
+ *   The string uint8ss array to resize.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
+ *   F_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_uint8ss_increase_by_
+  extern f_status_t f_uint8ss_increase_by(const f_array_length_t amount, f_uint8ss_t *uint8ss);
+#endif // _di_f_uint8ss_increase_by_
+
+/**
+ * Resize the string uint8ss array.
+ *
+ * @param length
+ *   The new size to use.
+ * @param uint8ss
+ *   The string uint8ss array to adjust.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_delete().
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_uint8ss_resize_
+  extern f_status_t f_uint8ss_resize(const f_array_length_t length, f_uint8ss_t *uint8ss);
+#endif // _di_f_uint8ss_resize_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_uint8_h
index 8db52074171b1a84412b4dbf5d31012037110ce7..ac828fd7d22b132355fdc60eaa048945da37de88 100644 (file)
@@ -31,8 +31,8 @@ build_objects_library_static
 build_objects_program
 build_objects_program_shared
 build_objects_program_static
-build_sources_library type_array/array_length.c type_array/cell.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/state.c type_array/status.c
-build_sources_library type_array/private-array_length.c type_array/private-cell.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-state.c type_array/private-status.c
+build_sources_library type_array/array_length.c type_array/cell.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
+build_sources_library type_array/private-array_length.c type_array/private-cell.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c
 build_sources_library_shared
 build_sources_library_static
 build_sources_object
@@ -41,7 +41,7 @@ build_sources_object_static
 build_sources_program
 build_sources_program_shared
 build_sources_program_static
-build_sources_headers type_array.h type_array/common.h type_array/array_length.h type_array/cell.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/state.h type_array/status.h
+build_sources_headers type_array.h type_array/common.h type_array/array_length.h type_array/cell.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
 build_sources_headers_shared
 build_sources_headers_static
 build_sources_script
index 4fcb2bd06d8095a8ca1d00d66121fcd36c7f3a54..8873b420f95e8fc680dd35a0b624323413691da6 100644 (file)
@@ -19,36 +19,36 @@ build_libraries-individual -lf_memory -lf_type_array
 build_libraries-level -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_program test-type_array-array_lengths_adjust.c test-type_array-array_lengths_append.c test-type_array-array_lengths_decimate_by.c test-type_array-array_lengths_decrease_by.c test-type_array-array_lengths_increase.c test-type_array-array_lengths_increase_by.c test-type_array-array_lengths_resize.c
-build_sources_program test-type_array-array_lengthss_adjust.c test-type_array-array_lengthss_append.c test-type_array-array_lengthss_decimate_by.c test-type_array-array_lengthss_decrease_by.c test-type_array-array_lengthss_increase.c test-type_array-array_lengthss_increase_by.c test-type_array-array_lengthss_resize.c
-build_sources_program test-type_array-fll_ids_adjust.c test-type_array-fll_ids_append.c test-type_array-fll_ids_decimate_by.c test-type_array-fll_ids_decrease_by.c test-type_array-fll_ids_increase.c test-type_array-fll_ids_increase_by.c test-type_array-fll_ids_resize.c
-build_sources_program test-type_array-fll_idss_adjust.c test-type_array-fll_idss_append.c test-type_array-fll_idss_decimate_by.c test-type_array-fll_idss_decrease_by.c test-type_array-fll_idss_increase.c test-type_array-fll_idss_increase_by.c test-type_array-fll_idss_resize.c
-build_sources_program test-type_array-cells_adjust.c test-type_array-cells_append.c test-type_array-cells_decimate_by.c test-type_array-cells_decrease_by.c test-type_array-cells_increase.c test-type_array-cells_increase_by.c test-type_array-cells_resize.c
-build_sources_program test-type_array-cellss_adjust.c test-type_array-cellss_append.c test-type_array-cellss_decimate_by.c test-type_array-cellss_decrease_by.c test-type_array-cellss_increase.c test-type_array-cellss_increase_by.c test-type_array-cellss_resize.c
-build_sources_program test-type_array-int8s_adjust.c test-type_array-int8s_append.c test-type_array-int8s_decimate_by.c test-type_array-int8s_decrease_by.c test-type_array-int8s_increase.c test-type_array-int8s_increase_by.c test-type_array-int8s_resize.c
-build_sources_program test-type_array-int8ss_adjust.c test-type_array-int8ss_append.c test-type_array-int8ss_decimate_by.c test-type_array-int8ss_decrease_by.c test-type_array-int8ss_increase.c test-type_array-int8ss_increase_by.c test-type_array-int8ss_resize.c
-build_sources_program test-type_array-int16s_adjust.c test-type_array-int16s_append.c test-type_array-int16s_decimate_by.c test-type_array-int16s_decrease_by.c test-type_array-int16s_increase.c test-type_array-int16s_increase_by.c test-type_array-int16s_resize.c
-build_sources_program test-type_array-int16ss_adjust.c test-type_array-int16ss_append.c test-type_array-int16ss_decimate_by.c test-type_array-int16ss_decrease_by.c test-type_array-int16ss_increase.c test-type_array-int16ss_increase_by.c test-type_array-int16ss_resize.c
-build_sources_program test-type_array-int32s_adjust.c test-type_array-int32s_append.c test-type_array-int32s_decimate_by.c test-type_array-int32s_decrease_by.c test-type_array-int32s_increase.c test-type_array-int32s_increase_by.c test-type_array-int32s_resize.c
-build_sources_program test-type_array-int32ss_adjust.c test-type_array-int32ss_append.c test-type_array-int32ss_decimate_by.c test-type_array-int32ss_decrease_by.c test-type_array-int32ss_increase.c test-type_array-int32ss_increase_by.c test-type_array-int32ss_resize.c
-build_sources_program test-type_array-int64s_adjust.c test-type_array-int64s_append.c test-type_array-int64s_decimate_by.c test-type_array-int64s_decrease_by.c test-type_array-int64s_increase.c test-type_array-int64s_increase_by.c test-type_array-int64s_resize.c
-build_sources_program test-type_array-int64ss_adjust.c test-type_array-int64ss_append.c test-type_array-int64ss_decimate_by.c test-type_array-int64ss_decrease_by.c test-type_array-int64ss_increase.c test-type_array-int64ss_increase_by.c test-type_array-int64ss_resize.c
-build_sources_program test-type_array-int128s_adjust.c test-type_array-int128s_append.c test-type_array-int128s_decimate_by.c test-type_array-int128s_decrease_by.c test-type_array-int128s_increase.c test-type_array-int128s_increase_by.c test-type_array-int128s_resize.c
-build_sources_program test-type_array-int128ss_adjust.c test-type_array-int128ss_append.c test-type_array-int128ss_decimate_by.c test-type_array-int128ss_decrease_by.c test-type_array-int128ss_increase.c test-type_array-int128ss_increase_by.c test-type_array-int128ss_resize.c
-build_sources_program test-type_array-states_adjust.c test-type_array-states_append.c test-type_array-states_decimate_by.c test-type_array-states_decrease_by.c test-type_array-states_increase.c test-type_array-states_increase_by.c test-type_array-states_resize.c
-build_sources_program test-type_array-statess_adjust.c test-type_array-statess_append.c test-type_array-statess_decimate_by.c test-type_array-statess_decrease_by.c test-type_array-statess_increase.c test-type_array-statess_increase_by.c test-type_array-statess_resize.c
-build_sources_program test-type_array-statuss_adjust.c test-type_array-statuss_append.c test-type_array-statuss_decimate_by.c test-type_array-statuss_decrease_by.c test-type_array-statuss_increase.c test-type_array-statuss_increase_by.c test-type_array-statuss_resize.c
-build_sources_program test-type_array-statusss_adjust.c test-type_array-statusss_append.c test-type_array-statusss_decimate_by.c test-type_array-statusss_decrease_by.c test-type_array-statusss_increase.c test-type_array-statusss_increase_by.c test-type_array-statusss_resize.c
-build_sources_program test-type_array-uint8s_adjust.c test-type_array-uint8s_append.c test-type_array-uint8s_decimate_by.c test-type_array-uint8s_decrease_by.c test-type_array-uint8s_increase.c test-type_array-uint8s_increase_by.c test-type_array-uint8s_resize.c
-build_sources_program test-type_array-uint8ss_adjust.c test-type_array-uint8ss_append.c test-type_array-uint8ss_decimate_by.c test-type_array-uint8ss_decrease_by.c test-type_array-uint8ss_increase.c test-type_array-uint8ss_increase_by.c test-type_array-uint8ss_resize.c
-build_sources_program test-type_array-uint16s_adjust.c test-type_array-uint16s_append.c test-type_array-uint16s_decimate_by.c test-type_array-uint16s_decrease_by.c test-type_array-uint16s_increase.c test-type_array-uint16s_increase_by.c test-type_array-uint16s_resize.c
-build_sources_program test-type_array-uint16ss_adjust.c test-type_array-uint16ss_append.c test-type_array-uint16ss_decimate_by.c test-type_array-uint16ss_decrease_by.c test-type_array-uint16ss_increase.c test-type_array-uint16ss_increase_by.c test-type_array-uint16ss_resize.c
-build_sources_program test-type_array-uint32s_adjust.c test-type_array-uint32s_append.c test-type_array-uint32s_decimate_by.c test-type_array-uint32s_decrease_by.c test-type_array-uint32s_increase.c test-type_array-uint32s_increase_by.c test-type_array-uint32s_resize.c
-build_sources_program test-type_array-uint32ss_adjust.c test-type_array-uint32ss_append.c test-type_array-uint32ss_decimate_by.c test-type_array-uint32ss_decrease_by.c test-type_array-uint32ss_increase.c test-type_array-uint32ss_increase_by.c test-type_array-uint32ss_resize.c
-build_sources_program test-type_array-uint64s_adjust.c test-type_array-uint64s_append.c test-type_array-uint64s_decimate_by.c test-type_array-uint64s_decrease_by.c test-type_array-uint64s_increase.c test-type_array-uint64s_increase_by.c test-type_array-uint64s_resize.c
-build_sources_program test-type_array-uint64ss_adjust.c test-type_array-uint64ss_append.c test-type_array-uint64ss_decimate_by.c test-type_array-uint64ss_decrease_by.c test-type_array-uint64ss_increase.c test-type_array-uint64ss_increase_by.c test-type_array-uint64ss_resize.c
-build_sources_program test-type_array-uint128s_adjust.c test-type_array-uint128s_append.c test-type_array-uint128s_decimate_by.c test-type_array-uint128s_decrease_by.c test-type_array-uint128s_increase.c test-type_array-uint128s_increase_by.c test-type_array-uint128s_resize.c
-build_sources_program test-type_array-uint128ss_adjust.c test-type_array-uint128ss_append.c test-type_array-uint128ss_decimate_by.c test-type_array-uint128ss_decrease_by.c test-type_array-uint128ss_increase.c test-type_array-uint128ss_increase_by.c test-type_array-uint128ss_resize.c
+build_sources_program test-type_array-array_lengths_adjust.c test-type_array-array_lengths_append.c test-type_array-array_lengths_append_all.c test-type_array-array_lengths_decimate_by.c test-type_array-array_lengths_decrease_by.c test-type_array-array_lengths_increase.c test-type_array-array_lengths_increase_by.c test-type_array-array_lengths_resize.c
+build_sources_program test-type_array-array_lengthss_adjust.c test-type_array-array_lengthss_append.c test-type_array-array_lengthss_append_all.c test-type_array-array_lengthss_decimate_by.c test-type_array-array_lengthss_decrease_by.c test-type_array-array_lengthss_increase.c test-type_array-array_lengthss_increase_by.c test-type_array-array_lengthss_resize.c
+build_sources_program test-type_array-fll_ids_adjust.c test-type_array-fll_ids_append.c test-type_array-fll_ids_append_all.c test-type_array-fll_ids_decimate_by.c test-type_array-fll_ids_decrease_by.c test-type_array-fll_ids_increase.c test-type_array-fll_ids_increase_by.c test-type_array-fll_ids_resize.c
+build_sources_program test-type_array-fll_idss_adjust.c test-type_array-fll_idss_append.c test-type_array-fll_idss_append_all.c test-type_array-fll_idss_decimate_by.c test-type_array-fll_idss_decrease_by.c test-type_array-fll_idss_increase.c test-type_array-fll_idss_increase_by.c test-type_array-fll_idss_resize.c
+build_sources_program test-type_array-cells_adjust.c test-type_array-cells_append.c test-type_array-cells_append_all.c test-type_array-cells_decimate_by.c test-type_array-cells_decrease_by.c test-type_array-cells_increase.c test-type_array-cells_increase_by.c test-type_array-cells_resize.c
+build_sources_program test-type_array-cellss_adjust.c test-type_array-cellss_append.c test-type_array-cellss_append_all.c test-type_array-cellss_decimate_by.c test-type_array-cellss_decrease_by.c test-type_array-cellss_increase.c test-type_array-cellss_increase_by.c test-type_array-cellss_resize.c
+build_sources_program test-type_array-int8s_adjust.c test-type_array-int8s_append.c test-type_array-int8s_append_all.c test-type_array-int8s_decimate_by.c test-type_array-int8s_decrease_by.c test-type_array-int8s_increase.c test-type_array-int8s_increase_by.c test-type_array-int8s_resize.c
+build_sources_program test-type_array-int8ss_adjust.c test-type_array-int8ss_append.c test-type_array-int8ss_append_all.c test-type_array-int8ss_decimate_by.c test-type_array-int8ss_decrease_by.c test-type_array-int8ss_increase.c test-type_array-int8ss_increase_by.c test-type_array-int8ss_resize.c
+build_sources_program test-type_array-int16s_adjust.c test-type_array-int16s_append.c test-type_array-int16s_append_all.c test-type_array-int16s_decimate_by.c test-type_array-int16s_decrease_by.c test-type_array-int16s_increase.c test-type_array-int16s_increase_by.c test-type_array-int16s_resize.c
+build_sources_program test-type_array-int16ss_adjust.c test-type_array-int16ss_append.c test-type_array-int16ss_append_all.c test-type_array-int16ss_decimate_by.c test-type_array-int16ss_decrease_by.c test-type_array-int16ss_increase.c test-type_array-int16ss_increase_by.c test-type_array-int16ss_resize.c
+build_sources_program test-type_array-int32s_adjust.c test-type_array-int32s_append.c test-type_array-int32s_append_all.c test-type_array-int32s_decimate_by.c test-type_array-int32s_decrease_by.c test-type_array-int32s_increase.c test-type_array-int32s_increase_by.c test-type_array-int32s_resize.c
+build_sources_program test-type_array-int32ss_adjust.c test-type_array-int32ss_append.c test-type_array-int32ss_append_all.c test-type_array-int32ss_decimate_by.c test-type_array-int32ss_decrease_by.c test-type_array-int32ss_increase.c test-type_array-int32ss_increase_by.c test-type_array-int32ss_resize.c
+build_sources_program test-type_array-int64s_adjust.c test-type_array-int64s_append.c test-type_array-int64s_append_all.c test-type_array-int64s_decimate_by.c test-type_array-int64s_decrease_by.c test-type_array-int64s_increase.c test-type_array-int64s_increase_by.c test-type_array-int64s_resize.c
+build_sources_program test-type_array-int64ss_adjust.c test-type_array-int64ss_append.c test-type_array-int64ss_append_all.c test-type_array-int64ss_decimate_by.c test-type_array-int64ss_decrease_by.c test-type_array-int64ss_increase.c test-type_array-int64ss_increase_by.c test-type_array-int64ss_resize.c
+build_sources_program test-type_array-int128s_adjust.c test-type_array-int128s_append.c test-type_array-int128s_append_all.c test-type_array-int128s_decimate_by.c test-type_array-int128s_decrease_by.c test-type_array-int128s_increase.c test-type_array-int128s_increase_by.c test-type_array-int128s_resize.c
+build_sources_program test-type_array-int128ss_adjust.c test-type_array-int128ss_append.c test-type_array-int128ss_append_all.c test-type_array-int128ss_decimate_by.c test-type_array-int128ss_decrease_by.c test-type_array-int128ss_increase.c test-type_array-int128ss_increase_by.c test-type_array-int128ss_resize.c
+build_sources_program test-type_array-states_adjust.c test-type_array-states_append.c test-type_array-states_append_all.c test-type_array-states_decimate_by.c test-type_array-states_decrease_by.c test-type_array-states_increase.c test-type_array-states_increase_by.c test-type_array-states_resize.c
+build_sources_program test-type_array-statess_adjust.c test-type_array-statess_append.c test-type_array-statess_append_all.c test-type_array-statess_decimate_by.c test-type_array-statess_decrease_by.c test-type_array-statess_increase.c test-type_array-statess_increase_by.c test-type_array-statess_resize.c
+build_sources_program test-type_array-statuss_adjust.c test-type_array-statuss_append.c test-type_array-statuss_append_all.c test-type_array-statuss_decimate_by.c test-type_array-statuss_decrease_by.c test-type_array-statuss_increase.c test-type_array-statuss_increase_by.c test-type_array-statuss_resize.c
+build_sources_program test-type_array-statusss_adjust.c test-type_array-statusss_append.c test-type_array-statusss_append_all.c test-type_array-statusss_decimate_by.c test-type_array-statusss_decrease_by.c test-type_array-statusss_increase.c test-type_array-statusss_increase_by.c test-type_array-statusss_resize.c
+build_sources_program test-type_array-uint8s_adjust.c test-type_array-uint8s_append.c test-type_array-uint8s_append_all.c test-type_array-uint8s_decimate_by.c test-type_array-uint8s_decrease_by.c test-type_array-uint8s_increase.c test-type_array-uint8s_increase_by.c test-type_array-uint8s_resize.c
+build_sources_program test-type_array-uint8ss_adjust.c test-type_array-uint8ss_append.c test-type_array-uint8ss_append_all.c test-type_array-uint8ss_decimate_by.c test-type_array-uint8ss_decrease_by.c test-type_array-uint8ss_increase.c test-type_array-uint8ss_increase_by.c test-type_array-uint8ss_resize.c
+build_sources_program test-type_array-uint16s_adjust.c test-type_array-uint16s_append.c test-type_array-uint16s_append_all.c test-type_array-uint16s_decimate_by.c test-type_array-uint16s_decrease_by.c test-type_array-uint16s_increase.c test-type_array-uint16s_increase_by.c test-type_array-uint16s_resize.c
+build_sources_program test-type_array-uint16ss_adjust.c test-type_array-uint16ss_append.c test-type_array-uint16ss_append_all.c test-type_array-uint16ss_decimate_by.c test-type_array-uint16ss_decrease_by.c test-type_array-uint16ss_increase.c test-type_array-uint16ss_increase_by.c test-type_array-uint16ss_resize.c
+build_sources_program test-type_array-uint32s_adjust.c test-type_array-uint32s_append.c test-type_array-uint32s_append_all.c test-type_array-uint32s_decimate_by.c test-type_array-uint32s_decrease_by.c test-type_array-uint32s_increase.c test-type_array-uint32s_increase_by.c test-type_array-uint32s_resize.c
+build_sources_program test-type_array-uint32ss_adjust.c test-type_array-uint32ss_append.c test-type_array-uint32ss_append_all.c test-type_array-uint32ss_decimate_by.c test-type_array-uint32ss_decrease_by.c test-type_array-uint32ss_increase.c test-type_array-uint32ss_increase_by.c test-type_array-uint32ss_resize.c
+build_sources_program test-type_array-uint64s_adjust.c test-type_array-uint64s_append.c test-type_array-uint64s_append_all.c test-type_array-uint64s_decimate_by.c test-type_array-uint64s_decrease_by.c test-type_array-uint64s_increase.c test-type_array-uint64s_increase_by.c test-type_array-uint64s_resize.c
+build_sources_program test-type_array-uint64ss_adjust.c test-type_array-uint64ss_append.c test-type_array-uint64ss_append_all.c test-type_array-uint64ss_decimate_by.c test-type_array-uint64ss_decrease_by.c test-type_array-uint64ss_increase.c test-type_array-uint64ss_increase_by.c test-type_array-uint64ss_resize.c
+build_sources_program test-type_array-uint128s_adjust.c test-type_array-uint128s_append.c test-type_array-uint128s_append_all.c test-type_array-uint128s_decimate_by.c test-type_array-uint128s_decrease_by.c test-type_array-uint128s_increase.c test-type_array-uint128s_increase_by.c test-type_array-uint128s_resize.c
+build_sources_program test-type_array-uint128ss_adjust.c test-type_array-uint128ss_append.c test-type_array-uint128ss_append_all.c test-type_array-uint128ss_decimate_by.c test-type_array-uint128ss_decrease_by.c test-type_array-uint128ss_increase.c test-type_array-uint128ss_increase_by.c test-type_array-uint128ss_resize.c
 
 build_sources_program test-type_array.c
 build_script no
index 90c9a84a63202ebf6075cd40fe0a878157e026d1..d58020d47cd1816c78ef661f7bf4c59ad92adb0d 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_array_lengths_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengths_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengths_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
index 431fa8265627b3f9ba55126fb507267beb6a5412..f59c7d317d57f077add784056b1b3ea819dad8f9 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengths_adjust__works(void **state);
  *
  * @see f_type_array_array_lengths_adjust()
  */
-extern void test__f_type_array_array_lengths_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengths_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_adjust
index db56b669484bd1986ee765ddb0550a7336af5cde..8e63f947353ea7c14b23551216d9796b81836237 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_array_lengths_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_array_lengths_t source = f_array_lengths_t_initialize;
+  const f_array_length_t source = 3;
   f_array_lengths_t destination = f_array_lengths_t_initialize;
 
   {
-    const f_status_t status = f_array_lengths_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_array_lengths_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_array_lengths_append__returns_data_not(void **state) {
+void test__f_type_array_array_lengths_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_array_lengths_t source = f_array_lengths_t_initialize;
-  f_array_lengths_t destination = f_array_lengths_t_initialize;
-
-  {
-    const f_status_t status = f_array_lengths_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_array_lengths_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_array_lengths_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_array_lengths_t data = f_array_lengths_t_initialize;
+  const f_array_length_t data = f_array_length_t_initialize;
 
   {
     const f_status_t status = f_array_lengths_append(data, 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
index 366669ecaa917cae92d396cc23261d0517b26328..de1290cee4dc200c5d52b5d9b4fed00aaea1aa89 100644 (file)
 extern void test__f_type_array_array_lengths_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_array_lengths_append()
- */
-extern void test__f_type_array_array_lengths_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_array_lengths_append()
  */
-extern void test__f_type_array_array_lengths_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengths_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append_all.c
new file mode 100644 (file)
index 0000000..144a80d
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-array_lengths_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_array_lengths_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_array_lengths_t source = f_array_lengths_t_initialize;
+  f_array_lengths_t destination = f_array_lengths_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengths_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_array_lengths_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_array_lengths_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_array_lengths_t source = f_array_lengths_t_initialize;
+  f_array_lengths_t destination = f_array_lengths_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengths_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_array_lengths_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_array_lengths_append_all__parameter_checking(void **state) {
+
+  const f_array_lengths_t data = f_array_lengths_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengths_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengths_append_all.h
new file mode 100644 (file)
index 0000000..0cf641b
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__array_lengths_append_all
+#define _TEST__F_type_array__array_lengths_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_array_lengths_append_all()
+ */
+extern void test__f_type_array_array_lengths_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_array_lengths_append_all()
+ */
+extern void test__f_type_array_array_lengths_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_array_lengths_append_all()
+ */
+extern void test__f_type_array_array_lengths_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__array_lengths_append_all
index f248032348d515b1416cc7cf4aa32398134e94f0..5150b8f903566be7bdee0b8a17bafc027f8b8ea0 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_array_lengths_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_array_lengths_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
index ae9599783f2c77f1723041dd2e0b16f679c1ed01..84d569fc2892024925875ee93e029ace9c1c4ef2 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengths_decimate_by__works(void **state);
  *
  * @see f_type_array_array_lengths_decimate_by()
  */
-extern void test__f_type_array_array_lengths_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengths_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_decimate_by
index c6c9ba80f125211f40a29767836229864d3eb58e..92f43662b4b86ce4cef6eea4f1efd74736c47e1c 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_array_lengths_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_array_lengths_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
index 3197742b93a9eaa841161563630db5dbbc1b6117..131b6d9cc844d63ede36e5707a8c9b67a83dd925 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengths_decrease_by__works(void **state);
  *
  * @see f_type_array_array_lengths_decrease_by()
  */
-extern void test__f_type_array_array_lengths_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengths_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_decrease_by
index 8aacad3acc6ce779f9bba8e5a318a22d55f10b9d..5b88f60266cb70581efa6f9a5edc6f629da8d94e 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_array_lengths_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_array_lengths_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengths_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengths_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
index 9e5d4c1d285ea5d44d19782ae279e436cf3d743a..bf89633b28836f2eb9b4b65be253034da95daec3 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_array_lengths_increase__returns_data_not(void **s
  *
  * @see f_type_array_array_lengths_increase()
  */
-extern void test__f_type_array_array_lengths_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengths_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_increase
index 98f468052242164e791dce13e802d21b84aabb17..bb83dce597ff6414296a3f81d174434132b6883b 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_array_lengths_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengths_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
index 99cfc3047ab5032a3f07533ab0476e82c3c9f423..820cfa38b08a3d809a5836c34a9e95d01b2a1993 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengths_increase_by__works(void **state);
  *
  * @see f_type_array_array_lengths_increase_by()
  */
-extern void test__f_type_array_array_lengths_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengths_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_increase_by
index 5ac149856c7626006f2b1020da1325e479190a05..1c655c4cedf86ac804337e698cf245dcc55a17ee 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_array_lengths_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengths_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengths_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengths_t data = f_array_lengths_t_initialize;
index 297f223ddd7cdfa3fc2fdf47b228f2643f6cb4c6..648b40fa53e7f10682832f8111df364206ffc1b8 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengths_resize__works(void **state);
  *
  * @see f_type_array_array_lengths_resize()
  */
-extern void test__f_type_array_array_lengths_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengths_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengths_resize
index 1de770f9e746ca92b9e4937a6c072b1cb4ef23ce..a691c7eb57b70c834981028ee00352acb9d6e39f 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_array_lengthss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengthss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengthss_t_initialize;
index c75c5aeda602cbf971d18b7505ef4745dbd9e4bd..49ac75a8c9d6f5441fac52206e78d30a982cced1 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengthss_adjust__works(void **state);
  *
  * @see f_type_array_array_lengthss_adjust()
  */
-extern void test__f_type_array_array_lengthss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengthss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_adjust
index 161c263177ccde7c14a151342f0ff56a650ad087..53d7abdbd646c486bb2debed8e04a691c470d1d2 100644 (file)
@@ -9,52 +9,34 @@ void test__f_type_array_array_lengthss_append__works(void **state) {
 
   const int length = 5;
   const int length_inner = 2;
-  f_array_lengthss_t source = f_array_lengths_t_initialize;
-  f_array_lengthss_t destination = f_array_lengths_t_initialize;
+  f_array_lengths_t source = f_array_lengths_t_initialize;
+  f_array_lengthss_t destination = f_array_lengthss_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_resize(length, &source);
+    const f_status_t status = f_array_lengths_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_array_lengths_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_array_lengthss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +48,11 @@ void test__f_type_array_array_lengthss_append__works(void **state) {
 void test__f_type_array_array_lengthss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_array_lengthss_t source = f_array_lengths_t_initialize;
-  f_array_lengthss_t destination = f_array_lengths_t_initialize;
+  f_array_lengths_t source = f_array_lengths_t_initialize;
+  f_array_lengthss_t destination = f_array_lengthss_t_initialize;
 
   {
-    const f_status_t status = f_array_lengthss_resize(length, &source);
+    const f_status_t status = f_array_lengths_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +65,21 @@ void test__f_type_array_array_lengthss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_array_lengthss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengthss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_array_lengthss_t data = f_array_lengths_t_initialize;
+  const f_array_lengths_t data = f_array_lengths_t_initialize;
 
   {
     const f_status_t status = f_array_lengthss_append(data, 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
index 451b2e08018a13c1869985bd01e52ed971f637fe..26855d6fa82fa5c4e4a0be1ce04f1bd6e4d085fb 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_array_lengthss_append__returns_data_not(void **st
  *
  * @see f_type_array_array_lengthss_append()
  */
-extern void test__f_type_array_array_lengthss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengthss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append_all.c
new file mode 100644 (file)
index 0000000..213257b
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-array_lengthss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_array_lengthss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_array_lengthss_t source = f_array_lengthss_t_initialize;
+  f_array_lengthss_t destination = f_array_lengthss_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengthss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_array_lengths_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_array_lengthss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_array_lengthss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_array_lengthss_t source = f_array_lengthss_t_initialize;
+  f_array_lengthss_t destination = f_array_lengthss_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengthss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_array_lengthss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_array_lengthss_append_all__parameter_checking(void **state) {
+
+  const f_array_lengthss_t data = f_array_lengthss_t_initialize;
+
+  {
+    const f_status_t status = f_array_lengthss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-array_lengthss_append_all.h
new file mode 100644 (file)
index 0000000..497d99c
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__array_lengthss_append_all
+#define _TEST__F_type_array__array_lengthss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_array_lengthss_append_all()
+ */
+extern void test__f_type_array_array_lengthss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_array_lengthss_append_all()
+ */
+extern void test__f_type_array_array_lengthss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_array_lengthss_append_all()
+ */
+extern void test__f_type_array_array_lengthss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__array_lengthss_append_all
index e01550af480aa078cc9c9edfc2befddd1d081a8e..911307f31ffac4ce039e4be710fa308226f988e1 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_array_lengthss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_array_lengthss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
index f1ca465624b4d51363a1d39787e40f226ddeec78..b4248034a22916ab7edfbb7b071195814f495a1d 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengthss_decimate_by__works(void **state);
  *
  * @see f_type_array_array_lengthss_decimate_by()
  */
-extern void test__f_type_array_array_lengthss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengthss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_decimate_by
index 2c83fba6995ee22fa5a91b9a81c10cfe62e9ee3a..0a092ad39b8c5f2db192f4e2cb62b8e41c5372cf 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_array_lengthss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_array_lengthss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
index 02b5980a7377bac1860720de93a94e2df9375882..75c840d29fc588fc581a2e487120e840dea8df5e 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengthss_decrease_by__works(void **state);
  *
  * @see f_type_array_array_lengthss_decrease_by()
  */
-extern void test__f_type_array_array_lengthss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengthss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_decrease_by
index 089e8e7214889abccf3aefef040bc84174092378..d5ada76cd1face0fe0fd59a008e3e330943c9ed1 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_array_lengthss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_array_lengthss_increase__returns_data_not(void **state)
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengthss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengthss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
index 88a71cb120438f027863198dcf6db5858bfc23fe..6788793001a8275515962da3b0f2c11877c2d4d7 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_array_lengthss_increase__returns_data_not(void **
  *
  * @see f_type_array_array_lengthss_increase()
  */
-extern void test__f_type_array_array_lengthss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengthss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_increase
index 8fa1835027c04bf4f353c2102f260ef1590b7303..5bbbbf17dce249a83c150bbd300a150863c8a7d0 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_array_lengthss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengthss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengths_t_initialize;
index 05eb5265089dbfee5d1ea0dae90287894ed76c28..789f8e12b33cb7352abdd448b31625f6bffecd20 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengthss_increase_by__works(void **state);
  *
  * @see f_type_array_array_lengthss_increase_by()
  */
-extern void test__f_type_array_array_lengthss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengthss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_increase_by
index 2435445bc9bc432bc5295ff2034f95cd5741446e..a2d030f7bb55c0df114ef4e741155c60beb340c4 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_array_lengthss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_array_lengthss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_array_lengthss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_array_lengthss_t data = f_array_lengthss_t_initialize;
index a8fd772eccedf5650ea460f823b9b40279ccee03..0011f327618e579660beadf2887ede9b229a6c65 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_array_lengthss_resize__works(void **state);
  *
  * @see f_type_array_array_lengthss_resize()
  */
-extern void test__f_type_array_array_lengthss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_array_lengthss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__array_lengthss_resize
index a221c69adbaaa94387649742b8948ce9314001c5..4dbf3a40194fb93cb4b064ac3ead2ee7eeaf77c8 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_cells_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cells_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cells_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
index 49443d389e200b451472aa46dad639ebf9adf8b4..53d4c6344252327bc7aaed0c9c908de24c084292 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cells_adjust__works(void **state);
  *
  * @see f_type_array_cells_adjust()
  */
-extern void test__f_type_array_cells_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cells_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cells_adjust
index 605d3a0cdf388da51f4472ea8fecdf48ddcf09e5..195145612df8de08b043516e09df61736eb1ecfc 100644 (file)
@@ -7,82 +7,30 @@ extern "C" {
 
 void test__f_type_array_cells_append__works(void **state) {
 
-  const int length = 5;
-  f_cells_t source = f_cells_t_initialize;
+  const f_cell_t source = { .row = 1, .column = 2 };
   f_cells_t destination = f_cells_t_initialize;
 
-  const f_cell_t cell_0 = { .row = 1, .column = 2 };
-  const f_cell_t cell_1 = { .row = 3, .column = 4 };
-
-  {
-    const f_status_t status = f_cells_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  memcpy(&source.array[source.used++], (void *) &cell_0, sizeof(f_cell_t));
-  memcpy(&source.array[source.used++], (void *) &cell_1, sizeof(f_cell_t));
-
   {
     const f_status_t status = f_cells_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    assert_int_equal(destination.array[0].row, cell_0.row);
-    assert_int_equal(destination.array[0].column, cell_0.column);
-
-    assert_int_equal(destination.array[1].row, cell_1.row);
-    assert_int_equal(destination.array[1].column, cell_1.column);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].row, source.row);
+    assert_int_equal(destination.array[0].column, source.column);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_cells_append__returns_data_not(void **state) {
+void test__f_type_array_cells_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_cells_t source = f_cells_t_initialize;
-  f_cells_t destination = f_cells_t_initialize;
-
-  {
-    const f_status_t status = f_cells_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_cells_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_cells_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_cells_t data = f_cells_t_initialize;
+  const f_cell_t data = f_cell_t_initialize;
 
   {
     const f_status_t status = f_cells_append(data, 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
index e5145842e40c5bbe0a169da7f921b90f8195aa07..ba16169cb8b40562b948d4e0298c118dcf0ea848 100644 (file)
 extern void test__f_type_array_cells_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_cells_append()
- */
-extern void test__f_type_array_cells_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_cells_append()
  */
-extern void test__f_type_array_cells_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cells_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cells_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-cells_append_all.c
new file mode 100644 (file)
index 0000000..071c2b1
--- /dev/null
@@ -0,0 +1,85 @@
+#include "test-type_array.h"
+#include "test-type_array-cells_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_cells_append_all__works(void **state) {
+
+  const int length = 5;
+  f_cells_t source = f_cells_t_initialize;
+  f_cells_t destination = f_cells_t_initialize;
+
+  const f_cell_t cell_0 = { .row = 1, .column = 2 };
+  const f_cell_t cell_1 = { .row = 3, .column = 4 };
+
+  {
+    const f_status_t status = f_cells_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  memcpy(&source.array[source.used++], (void *) &cell_0, sizeof(f_cell_t));
+  memcpy(&source.array[source.used++], (void *) &cell_1, sizeof(f_cell_t));
+
+  {
+    const f_status_t status = f_cells_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    assert_int_equal(destination.array[0].row, cell_0.row);
+    assert_int_equal(destination.array[0].column, cell_0.column);
+
+    assert_int_equal(destination.array[1].row, cell_1.row);
+    assert_int_equal(destination.array[1].column, cell_1.column);
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_cells_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_cells_t source = f_cells_t_initialize;
+  f_cells_t destination = f_cells_t_initialize;
+
+  {
+    const f_status_t status = f_cells_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_cells_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_cells_append_all__parameter_checking(void **state) {
+
+  const f_cells_t data = f_cells_t_initialize;
+
+  {
+    const f_status_t status = f_cells_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cells_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-cells_append_all.h
new file mode 100644 (file)
index 0000000..31cd259
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__cells_append_all
+#define _TEST__F_type_array__cells_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_cells_append_all()
+ */
+extern void test__f_type_array_cells_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_cells_append_all()
+ */
+extern void test__f_type_array_cells_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_cells_append_all()
+ */
+extern void test__f_type_array_cells_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__cells_append_all
index d415836d3f8e00fd706724b3c96adbbacdc6ed7e..a9bf7b06d355b367a4d71b6c8aa38e2859046937 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_cells_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_cells_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cells_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
index 0d3fcbc3373bb64200fe971dfba97e8393540312..b689fff2ab5a620fb1392d72e6a74ad966f3fd59 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cells_decimate_by__works(void **state);
  *
  * @see f_type_array_cells_decimate_by()
  */
-extern void test__f_type_array_cells_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cells_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cells_decimate_by
index 93dee61b9402f99f837805d5ee45c3e4d78c8195..bd44d1b3042f258b7cad8a8546f9ce9addb69e67 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_cells_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_cells_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cells_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
index abb091ea66e8c0c4251dca667066194efea0df0e..09d89d339d089edf781f710bc2acce9995c98b1f 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cells_decrease_by__works(void **state);
  *
  * @see f_type_array_cells_decrease_by()
  */
-extern void test__f_type_array_cells_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cells_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cells_decrease_by
index 926ad2ca1d6b684fe57c6742b26d42c483101171..7842295d694d1736437b6e87e02c206f2f327ed9 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_cells_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_cells_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cells_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cells_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
index cf7d40891997058ff941084c0cd80c81e08edea9..81964f4e3ddf3c57c67b356889fff61f802736af 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_cells_increase__returns_data_not(void **state);
  *
  * @see f_type_array_cells_increase()
  */
-extern void test__f_type_array_cells_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cells_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cells_increase
index 3a53c5394a82b2ec0438f15809d585b42bb110d6..ed71d469d821f3748410097fab7c405932792825 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_cells_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cells_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cells_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
index b55f0817a7ab74ffaf654c02d5de3b161e3e897d..f3daa78175fd51d7716e41196bc9bacaab30922d 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cells_increase_by__works(void **state);
  *
  * @see f_type_array_cells_increase_by()
  */
-extern void test__f_type_array_cells_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cells_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cells_increase_by
index af1fec9f79ef7690817b393f0bca01efbcbdcfc3..35e6699c1302804892f1991516e2f48ae62aed38 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_cells_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cells_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cells_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_cells_t data = f_cells_t_initialize;
index f263e6b0683fc13b1a9c0f44affe83c1f85ee82c..b89bdf8a7c87b9254641980871dd68b0a9be8ad6 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cells_resize__works(void **state);
  *
  * @see f_type_array_cells_resize()
  */
-extern void test__f_type_array_cells_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cells_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cells_resize
index aadc7cd9e78dd9725f66f4fdf893683b68a6e53f..b44fcf28eaf5c84a600a479ceabd75f48a2f78d2 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_cellss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cellss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cellss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cellss_t_initialize;
index 1111bdc0c6130174f2fc01a286face78fb4267cb..b4d07e758707f581c2c3a2a01227c553af001cd5 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cellss_adjust__works(void **state);
  *
  * @see f_type_array_cellss_adjust()
  */
-extern void test__f_type_array_cellss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cellss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cellss_adjust
index 4f6d3453f0ffc4eebb033a5e24ba371391cc0d3b..9cbefbd7e54de2e364ea7d74ff7b478c0e16b572 100644 (file)
@@ -8,57 +8,38 @@ extern "C" {
 void test__f_type_array_cellss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_cellss_t source = f_cells_t_initialize;
-  f_cellss_t destination = f_cells_t_initialize;
+  f_cells_t source = f_cells_t_initialize;
+  f_cellss_t destination = f_cellss_t_initialize;
 
-  const f_cell_t cell_0 = { .row = 1, .column = 2 };
-  const f_cell_t cell_1 = { .row = 3, .column = 4 };
+  const f_cell_t cell = { .row = 1, .column = 2 };
 
   {
-    const f_status_t status = f_cellss_resize(length, &source);
+    const f_status_t status = f_cells_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_cells_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &cell_0, sizeof(f_cell_t));
-      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &cell_1, sizeof(f_cell_t));
-    } // for
-  }
+  while (source.used < length) {
+    memcpy(&source.array[source.used++], (void *) &cell, sizeof(f_cell_t));
+  } // while
 
   {
     const f_status_t status = f_cellss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
 
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      assert_int_equal(destination.array[i].array[0].row, cell_0.row);
-      assert_int_equal(destination.array[i].array[0].column, cell_0.column);
-
-      assert_int_equal(destination.array[i].array[1].row, cell_1.row);
-      assert_int_equal(destination.array[i].array[1].column, cell_1.column);
+      assert_int_equal(destination.array[0].array[i].row, cell.row);
+      assert_int_equal(destination.array[0].array[i].column, cell.column);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -70,11 +51,11 @@ void test__f_type_array_cellss_append__works(void **state) {
 void test__f_type_array_cellss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_cellss_t source = f_cells_t_initialize;
-  f_cellss_t destination = f_cells_t_initialize;
+  f_cells_t source = f_cellss_t_initialize;
+  f_cellss_t destination = f_cellss_t_initialize;
 
   {
-    const f_status_t status = f_cellss_resize(length, &source);
+    const f_status_t status = f_cells_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -87,26 +68,21 @@ void test__f_type_array_cellss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_cellss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cellss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_cellss_t data = f_cells_t_initialize;
+  f_cells_t data = f_cells_t_initialize;
 
   {
     const f_status_t status = f_cellss_append(data, 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
index 74f4c784ff7c8f1592a027eaafc23ca16bff272b..cc487251de3c85f2efca8631e16e2ff5174d8158 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_cellss_append__returns_data_not(void **state);
  *
  * @see f_type_array_cellss_append()
  */
-extern void test__f_type_array_cellss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cellss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cellss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.c
new file mode 100644 (file)
index 0000000..b7a1932
--- /dev/null
@@ -0,0 +1,109 @@
+#include "test-type_array.h"
+#include "test-type_array-cellss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_cellss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_cellss_t source = f_cellss_t_initialize;
+  f_cellss_t destination = f_cellss_t_initialize;
+
+  const f_cell_t cell_0 = { .row = 1, .column = 2 };
+  const f_cell_t cell_1 = { .row = 3, .column = 4 };
+
+  {
+    const f_status_t status = f_cellss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_cells_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &cell_0, sizeof(f_cell_t));
+      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &cell_1, sizeof(f_cell_t));
+    } // for
+  }
+
+  {
+    const f_status_t status = f_cellss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      assert_int_equal(destination.array[i].array[0].row, cell_0.row);
+      assert_int_equal(destination.array[i].array[0].column, cell_0.column);
+
+      assert_int_equal(destination.array[i].array[1].row, cell_1.row);
+      assert_int_equal(destination.array[i].array[1].column, cell_1.column);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_cellss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_cellss_t source = f_cellss_t_initialize;
+  f_cellss_t destination = f_cellss_t_initialize;
+
+  {
+    const f_status_t status = f_cellss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_cellss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_cellss_append_all__parameter_checking(void **state) {
+
+  const f_cellss_t data = f_cellss_t_initialize;
+
+  {
+    const f_status_t status = f_cellss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-cellss_append_all.h
new file mode 100644 (file)
index 0000000..2721cdd
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__cellss_append_all
+#define _TEST__F_type_array__cellss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_cellss_append_all()
+ */
+extern void test__f_type_array_cellss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_cellss_append_all()
+ */
+extern void test__f_type_array_cellss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_cellss_append_all()
+ */
+extern void test__f_type_array_cellss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__cellss_append_all
index 4c0dcad5608aa9dd4cfceacfaeaa539b00a9bc6f..abc400c21f41e735f45358c02f6b7fb436894ed4 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_cellss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_cellss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cellss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
index 93509eed2adcae11b3f52014cd095c727d3e1f58..3f43825281a8a6c98fe16abcb2d7d1ce10a697d7 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cellss_decimate_by__works(void **state);
  *
  * @see f_type_array_cellss_decimate_by()
  */
-extern void test__f_type_array_cellss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cellss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cellss_decimate_by
index a8e8e1bf3ae3a3f01485aa365fb6c791565cf94d..8fe429d4a275f53733de8b484cebf3d346ee7524 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_cellss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_cellss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cellss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
index b3cdd0a95b565fc8c7c487010150d039280f380c..9b5e4b07a7ad56a269e51d8ae2c4da638030be58 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cellss_decrease_by__works(void **state);
  *
  * @see f_type_array_cellss_decrease_by()
  */
-extern void test__f_type_array_cellss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cellss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cellss_decrease_by
index c34df58a80d77fecf07828a8a0a5522ed73ef36b..577bd627b2c9fce92ed87879a48249ce002efcae 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_cellss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_cellss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cellss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cellss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
index e5ce06b94a66c6125d09fc33c9a9fb8a272ba233..74ca065c7cfd8115d17c7382d481e4bec3d02801 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_cellss_increase__returns_data_not(void **state);
  *
  * @see f_type_array_cellss_increase()
  */
-extern void test__f_type_array_cellss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cellss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cellss_increase
index b0828fffce6738806b434fb2632e9848be1cd6d5..07e7c3707a31dac4225e694a6980186da352373f 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_cellss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cellss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cellss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cells_t_initialize;
index 16267cf4b24bef99e5326b29de2dee7a99c73204..9152f1dca685ea5048304f036e6a909c9ac277f5 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cellss_increase_by__works(void **state);
  *
  * @see f_type_array_cellss_increase_by()
  */
-extern void test__f_type_array_cellss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cellss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cellss_increase_by
index fed4516eff7a714655a2f50cccdacda9aadb1a0f..79fb875208471ea71a690884a3fb2a85d4d6703c 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_cellss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_cellss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_cellss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_cellss_t data = f_cellss_t_initialize;
index 03c7df1ba17456b57dbfcfd3b6f26cf852d7838a..a0977f0c3d6e7c57246c5380f8c6b3f74fc6ebad 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_cellss_resize__works(void **state);
  *
  * @see f_type_array_cellss_resize()
  */
-extern void test__f_type_array_cellss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_cellss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__cellss_resize
index c382c7d312c88bc3d32b62a1bcc3f9547cb8ca19..658031ed19f7d73eae2a734b23667bcdcb4bd92c 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_fll_ids_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_ids_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_ids_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
index d63264d3ab0a147864338da9f5226ae883f3fcb6..486be6fefe7f441bca0e50b6407598804481d9a7 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_ids_adjust__works(void **state);
  *
  * @see f_type_array_fll_ids_adjust()
  */
-extern void test__f_type_array_fll_ids_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_ids_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_adjust
index c23032453a8908f236fedcd5d480ce3cd27444ec..e208d80b18cffe5365b5290362f8eefc49006be5 100644 (file)
@@ -8,83 +8,31 @@ extern "C" {
 void test__f_type_array_fll_ids_append__works(void **state) {
 
   const int length = 5;
-  f_fll_ids_t source = f_fll_ids_t_initialize;
+  const f_fll_id_t source = { .name = "test", .type = 1, .used = 4 };
   f_fll_ids_t destination = f_fll_ids_t_initialize;
 
-  const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
-  const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
-
-  {
-    const f_status_t status = f_fll_ids_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  memcpy(&source.array[source.used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
-  memcpy(&source.array[source.used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
-
   {
     const f_status_t status = f_fll_ids_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    assert_string_equal(destination.array[0].name, fll_id_0.name);
-    assert_int_equal(destination.array[0].type, fll_id_0.type);
-    assert_int_equal(destination.array[0].used, fll_id_0.used);
-
-    assert_string_equal(destination.array[1].name, fll_id_1.name);
-    assert_int_equal(destination.array[1].type, fll_id_1.type);
-    assert_int_equal(destination.array[1].used, fll_id_1.used);
+    assert_int_equal(destination.used, 1);
+    assert_string_equal(destination.array[0].name, source.name);
+    assert_int_equal(destination.array[0].type, source.type);
+    assert_int_equal(destination.array[0].used, source.used);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_fll_ids_append__returns_data_not(void **state) {
+void test__f_type_array_fll_ids_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_fll_ids_t source = f_fll_ids_t_initialize;
-  f_fll_ids_t destination = f_fll_ids_t_initialize;
-
-  {
-    const f_status_t status = f_fll_ids_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_fll_ids_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_fll_ids_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_fll_ids_t data = f_fll_ids_t_initialize;
+  const f_fll_id_t data = f_fll_id_t_initialize;
 
   {
     const f_status_t status = f_fll_ids_append(data, 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
index 3b051fd8fda92572a3557532e7de1f9842b25861..a665436d9d30444441163738fd43c714e3bc7cb9 100644 (file)
 extern void test__f_type_array_fll_ids_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_fll_ids_append()
- */
-extern void test__f_type_array_fll_ids_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_fll_ids_append()
  */
-extern void test__f_type_array_fll_ids_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_ids_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append_all.c
new file mode 100644 (file)
index 0000000..1b12eb0
--- /dev/null
@@ -0,0 +1,87 @@
+#include "test-type_array.h"
+#include "test-type_array-fll_ids_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_fll_ids_append_all__works(void **state) {
+
+  const int length = 5;
+  f_fll_ids_t source = f_fll_ids_t_initialize;
+  f_fll_ids_t destination = f_fll_ids_t_initialize;
+
+  const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
+  const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
+
+  {
+    const f_status_t status = f_fll_ids_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  memcpy(&source.array[source.used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
+  memcpy(&source.array[source.used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
+
+  {
+    const f_status_t status = f_fll_ids_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    assert_string_equal(destination.array[0].name, fll_id_0.name);
+    assert_int_equal(destination.array[0].type, fll_id_0.type);
+    assert_int_equal(destination.array[0].used, fll_id_0.used);
+
+    assert_string_equal(destination.array[1].name, fll_id_1.name);
+    assert_int_equal(destination.array[1].type, fll_id_1.type);
+    assert_int_equal(destination.array[1].used, fll_id_1.used);
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_fll_ids_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_fll_ids_t source = f_fll_ids_t_initialize;
+  f_fll_ids_t destination = f_fll_ids_t_initialize;
+
+  {
+    const f_status_t status = f_fll_ids_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_fll_ids_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_fll_ids_append_all__parameter_checking(void **state) {
+
+  const f_fll_ids_t data = f_fll_ids_t_initialize;
+
+  {
+    const f_status_t status = f_fll_ids_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_ids_append_all.h
new file mode 100644 (file)
index 0000000..4093df1
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__fll_ids_append_all
+#define _TEST__F_type_array__fll_ids_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_fll_ids_append_all()
+ */
+extern void test__f_type_array_fll_ids_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_fll_ids_append_all()
+ */
+extern void test__f_type_array_fll_ids_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_fll_ids_append_all()
+ */
+extern void test__f_type_array_fll_ids_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__fll_ids_append_all
index ca014f360586062aef7c803cea1658c0f08dd25d..fa796a4622ebf77bef8df70f0de9964ea9e3d8b4 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_fll_ids_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_fll_ids_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
index 36a0149cdb08fa43284df398d48232bbb19a1eb9..cd4471d2e9f0865f3200badb67981c8a191c052e 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_ids_decimate_by__works(void **state);
  *
  * @see f_type_array_fll_ids_decimate_by()
  */
-extern void test__f_type_array_fll_ids_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_ids_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_decimate_by
index a2ef8a5cf796b06a154d8c9560c2d5fcc3c6fe60..a60e139364f2abd3c1e41651ffabd173593d0adc 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_fll_ids_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_fll_ids_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
index 8d47fe01bd98631aa7843fae32ad9cccd9e2d90b..9506bcad4c4c08373a9fc66b243d84fcbcda4e96 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_ids_decrease_by__works(void **state);
  *
  * @see f_type_array_fll_ids_decrease_by()
  */
-extern void test__f_type_array_fll_ids_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_ids_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_decrease_by
index 6ce6d106e9b3121e31aba444abc85c6e7972df71..a359f318d605148d70fdd40fa8ba9579abd38e07 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_fll_ids_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_fll_ids_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_ids_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_ids_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
index 313b6d6f41584e8c2bb03af527f9970d03b7b23b..f5e8d8760892def52916f8f1c466b144244abab9 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_fll_ids_increase__returns_data_not(void **state);
  *
  * @see f_type_array_fll_ids_increase()
  */
-extern void test__f_type_array_fll_ids_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_ids_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_increase
index 96a11ac862db9c1b4003193ec1bc3fbd66344ec1..e3b60b6be39d5422b37665d5ec12274f4d3997b1 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_fll_ids_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_ids_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
index 5a9866771ccff6a2398d4233aa8fca0bd32e5ea9..159d816f608fa25e375c054d7f8ab769f96ba4c9 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_ids_increase_by__works(void **state);
  *
  * @see f_type_array_fll_ids_increase_by()
  */
-extern void test__f_type_array_fll_ids_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_ids_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_increase_by
index 2e759943ac3b0b0e1985ce4b25724be0525c58a7..a5b56ed1f76663914cdc4b243ba224a092cc9d1a 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_fll_ids_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_ids_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_ids_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_ids_t data = f_fll_ids_t_initialize;
index 7f034bbeadea28164ff7b737360e8227f88a8efa..7ae4f8408a369b856b8c335c99a7f7d9e7df967a 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_ids_resize__works(void **state);
  *
  * @see f_type_array_fll_ids_resize()
  */
-extern void test__f_type_array_fll_ids_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_ids_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_ids_resize
index 188e147a748629242c5bd4f6d13ef1d0829708cb..979b56da9cc17780de37002e9d318b60d12ae7cc 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_fll_idss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_idss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_idss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_idss_t_initialize;
index 98f5d3797310297095cedba46e7bddd23379a255..6dfdf9536c5194e19ab8f46ba5be4775d4cfbe0d 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_idss_adjust__works(void **state);
  *
  * @see f_type_array_fll_idss_adjust()
  */
-extern void test__f_type_array_fll_idss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_idss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_adjust
index bb7dd28730af9fb774d000bf0da7981be542e5ea..a08c604047d668b07338e037f12411a943c8b5b8 100644 (file)
@@ -8,59 +8,39 @@ extern "C" {
 void test__f_type_array_fll_idss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_fll_idss_t source = f_fll_ids_t_initialize;
-  f_fll_idss_t destination = f_fll_ids_t_initialize;
+  f_fll_ids_t source = f_fll_ids_t_initialize;
+  f_fll_idss_t destination = f_fll_idss_t_initialize;
 
-  const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
-  const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
+  const f_fll_id_t fll_id = { .name = "test", .type = 1, .used = 4 };
 
   {
-    const f_status_t status = f_fll_idss_resize(length, &source);
+    const f_status_t status = f_fll_ids_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_fll_ids_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
-      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
-    } // for
-  }
+  while (source.used < length) {
+    memcpy(&source.array[source.used++], (void *) &fll_id, sizeof(f_fll_id_t));
+  } // while
 
   {
     const f_status_t status = f_fll_idss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
 
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      assert_string_equal(destination.array[i].array[0].name, fll_id_0.name);
-      assert_int_equal(destination.array[i].array[0].type, fll_id_0.type);
-      assert_int_equal(destination.array[i].array[0].used, fll_id_0.used);
-
-      assert_string_equal(destination.array[i].array[1].name, fll_id_1.name);
-      assert_int_equal(destination.array[i].array[1].type, fll_id_1.type);
-      assert_int_equal(destination.array[i].array[1].used, fll_id_1.used);
+      assert_string_equal(destination.array[0].array[i].name, fll_id.name);
+      assert_int_equal(destination.array[0].array[i].type, fll_id.type);
+      assert_int_equal(destination.array[0].array[i].used, fll_id.used);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -72,11 +52,11 @@ void test__f_type_array_fll_idss_append__works(void **state) {
 void test__f_type_array_fll_idss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_fll_idss_t source = f_fll_ids_t_initialize;
-  f_fll_idss_t destination = f_fll_ids_t_initialize;
+  f_fll_ids_t source = f_fll_idss_t_initialize;
+  f_fll_idss_t destination = f_fll_idss_t_initialize;
 
   {
-    const f_status_t status = f_fll_idss_resize(length, &source);
+    const f_status_t status = f_fll_ids_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -89,26 +69,21 @@ void test__f_type_array_fll_idss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_fll_idss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_idss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_fll_idss_t data = f_fll_ids_t_initialize;
+  f_fll_ids_t data = f_fll_ids_t_initialize;
 
   {
     const f_status_t status = f_fll_idss_append(data, 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
index 43a851e5e7bf2015ba7fa536f3ba06e508b1c8f2..9cbc569fbe7c881eea967e299198434cef0dd72e 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_fll_idss_append__returns_data_not(void **state);
  *
  * @see f_type_array_fll_idss_append()
  */
-extern void test__f_type_array_fll_idss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_idss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append_all.c
new file mode 100644 (file)
index 0000000..774d9c7
--- /dev/null
@@ -0,0 +1,111 @@
+#include "test-type_array.h"
+#include "test-type_array-fll_idss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_fll_idss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_fll_idss_t source = f_fll_idss_t_initialize;
+  f_fll_idss_t destination = f_fll_idss_t_initialize;
+
+  const f_fll_id_t fll_id_0 = { .name = "test", .type = 1, .used = 4 };
+  const f_fll_id_t fll_id_1 = { .name = "other", .type = 2, .used = 5 };
+
+  {
+    const f_status_t status = f_fll_idss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_fll_ids_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &fll_id_0, sizeof(f_fll_id_t));
+      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &fll_id_1, sizeof(f_fll_id_t));
+    } // for
+  }
+
+  {
+    const f_status_t status = f_fll_idss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      assert_string_equal(destination.array[i].array[0].name, fll_id_0.name);
+      assert_int_equal(destination.array[i].array[0].type, fll_id_0.type);
+      assert_int_equal(destination.array[i].array[0].used, fll_id_0.used);
+
+      assert_string_equal(destination.array[i].array[1].name, fll_id_1.name);
+      assert_int_equal(destination.array[i].array[1].type, fll_id_1.type);
+      assert_int_equal(destination.array[i].array[1].used, fll_id_1.used);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_fll_idss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_fll_idss_t source = f_fll_idss_t_initialize;
+  f_fll_idss_t destination = f_fll_idss_t_initialize;
+
+  {
+    const f_status_t status = f_fll_idss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_fll_idss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_fll_idss_append_all__parameter_checking(void **state) {
+
+  const f_fll_idss_t data = f_fll_idss_t_initialize;
+
+  {
+    const f_status_t status = f_fll_idss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-fll_idss_append_all.h
new file mode 100644 (file)
index 0000000..baa023d
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__fll_idss_append_all
+#define _TEST__F_type_array__fll_idss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_fll_idss_append_all()
+ */
+extern void test__f_type_array_fll_idss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_fll_idss_append_all()
+ */
+extern void test__f_type_array_fll_idss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_fll_idss_append_all()
+ */
+extern void test__f_type_array_fll_idss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__fll_idss_append_all
index 52ea7121e61d591f078864cea3fb23566611cd9b..168f7d428f13fd11b0aba9875124b2475ca8f733 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_fll_idss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_fll_idss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
index 30f011e0811522e688390ae0659e43d4325e30d9..c4edbe32503f38a350ac5c73a19ebc0e66b68b6e 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_idss_decimate_by__works(void **state);
  *
  * @see f_type_array_fll_idss_decimate_by()
  */
-extern void test__f_type_array_fll_idss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_idss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_decimate_by
index 852572660033c758daa25fa90dee02d44cbb38f4..3f7f826672149059517d1ed35e8a811cd0ac4035 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_fll_idss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_fll_idss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
index 21fa831305a40947a2c09043b83452ac9e1414db..35a43c333f5096c04e746bafd9a7a67aae239fd5 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_idss_decrease_by__works(void **state);
  *
  * @see f_type_array_fll_idss_decrease_by()
  */
-extern void test__f_type_array_fll_idss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_idss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_decrease_by
index 9915a6fdd4c188b7bbc8011470c963e0790333ce..d7e5a57a84dc429afd0163173ae39a84df4de418 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_fll_idss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_fll_idss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_idss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_idss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
index 5a9773a63ab199fa7028b6164ccfb2b9b88d62fd..358ba3e86047942f8d04185d2bf2089c4f8e8376 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_fll_idss_increase__returns_data_not(void **state)
  *
  * @see f_type_array_fll_idss_increase()
  */
-extern void test__f_type_array_fll_idss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_idss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_increase
index 764ae839d548a1ae10552ee8a44565b83240e8d0..05ba92e35713c7bca8c693be1d85aa73dc766f8a 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_fll_idss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_idss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_ids_t_initialize;
index 0636d44ce2b02fd55ba755e568e4545705463750..cf8687e95b63d37055141acdc884b4095de93688 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_idss_increase_by__works(void **state);
  *
  * @see f_type_array_fll_idss_increase_by()
  */
-extern void test__f_type_array_fll_idss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_idss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_increase_by
index 451a722f885a78b2267e52513a1217a7532d54eb..e0891ee1dfbfe3060af8cca5f06f0d328aaec591 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_fll_idss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_fll_idss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_fll_idss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_fll_idss_t data = f_fll_idss_t_initialize;
index 9d8db278930295313e257e131067fab6f3d4f9a9..42840151f3da1e4deb670957c4d9f0382a5e02c0 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_fll_idss_resize__works(void **state);
  *
  * @see f_type_array_fll_idss_resize()
  */
-extern void test__f_type_array_fll_idss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_fll_idss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__fll_idss_resize
index 0c92b26bef9c746966a8c2c9fb65e4c75a09e5e1..3463b16b5a21bc479f9bd981926db61c4fffff7d 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int128s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
index 58bb505d8e11a2b0f705635fa2fcdf31f1ae8454..467b522249c8c6d783aaff8bc1e218db51ffbca2 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128s_adjust__works(void **state);
  *
  * @see f_type_array_int128s_adjust()
  */
-extern void test__f_type_array_int128s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128s_adjust
index 56f80578d0ae34b1dffe2bfe02a7bca68d17de1c..b90596457115edbfb0de1221895cee0bdb79ce06 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_int128s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_int128s_t source = f_int128s_t_initialize;
+  const int128_t source = 3;
   f_int128s_t destination = f_int128s_t_initialize;
 
   {
-    const f_status_t status = f_int128s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_int128s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_int128s_append__returns_data_not(void **state) {
+void test__f_type_array_int128s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int128s_t source = f_int128s_t_initialize;
-  f_int128s_t destination = f_int128s_t_initialize;
-
-  {
-    const f_status_t status = f_int128s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int128s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_int128s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_int128s_t data = f_int128s_t_initialize;
+  const uint128_t data = 0;
 
   {
     const f_status_t status = f_int128s_append(data, 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
index 95f3f1d77b3193edb30fd0cf7ddd44c5013735ba..0ad1cba9e24abafd32a81baa343c6d1db1d05a91 100644 (file)
 extern void test__f_type_array_int128s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_int128s_append()
- */
-extern void test__f_type_array_int128s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_int128s_append()
  */
-extern void test__f_type_array_int128s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_append_all.c
new file mode 100644 (file)
index 0000000..281f207
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-int128s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int128s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_int128s_t source = f_int128s_t_initialize;
+  f_int128s_t destination = f_int128s_t_initialize;
+
+  {
+    const f_status_t status = f_int128s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_int128s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int128s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int128s_t source = f_int128s_t_initialize;
+  f_int128s_t destination = f_int128s_t_initialize;
+
+  {
+    const f_status_t status = f_int128s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int128s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int128s_append_all__parameter_checking(void **state) {
+
+  const f_int128s_t data = f_int128s_t_initialize;
+
+  {
+    const f_status_t status = f_int128s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128s_append_all.h
new file mode 100644 (file)
index 0000000..a63f610
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int128s_append_all
+#define _TEST__F_type_array__int128s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int128s_append_all()
+ */
+extern void test__f_type_array_int128s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int128s_append_all()
+ */
+extern void test__f_type_array_int128s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int128s_append_all()
+ */
+extern void test__f_type_array_int128s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int128s_append_all
index b2cc9e547bbf80ae923b5d32a1897d17e7bdf154..f9276b00c5545c0698a003bb9298feb669bb9c3c 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int128s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int128s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
index b8d393a452de652b0cb98b5bd777b228033520c7..27c95e5b2e8b09ab865b2c004d4cd2176ea3a77d 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128s_decimate_by__works(void **state);
  *
  * @see f_type_array_int128s_decimate_by()
  */
-extern void test__f_type_array_int128s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128s_decimate_by
index 09b67604a235ecbd903612398859b89fa4b84856..af81902b4721b82a0aeb6bdb0a939e2870d5eaed 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int128s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int128s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
index 82a61084dcf786f6c3fd79f720c7ff39700d17e5..614d3b554b19a29a0f286374bb4176a62ec7cc55 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128s_decrease_by__works(void **state);
  *
  * @see f_type_array_int128s_decrease_by()
  */
-extern void test__f_type_array_int128s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128s_decrease_by
index 30b8d758fc60a5848994ceecff00a8e144bece42..35aa7add77e3cda3b00394979461ba11b63bf629 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int128s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int128s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
index 2ef2e4dbb4953c400d40a54fc6c6162cde1a8575..daf6bdba0ba752f986ec0f5ca5482f92effdbe1d 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int128s_increase__returns_data_not(void **state);
  *
  * @see f_type_array_int128s_increase()
  */
-extern void test__f_type_array_int128s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128s_increase
index 48ff216e1dbc469f969dbc9a26d36489956749e0..37583da8a427afad69469131f0419a5e9e176c50 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int128s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
index e5b74b8ef2621e0a2cc12bec240a22d0bb0aaf41..b1c35bf917be52bb6a8978f5567107ae35bbe611 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128s_increase_by__works(void **state);
  *
  * @see f_type_array_int128s_increase_by()
  */
-extern void test__f_type_array_int128s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128s_increase_by
index 399d9b3655971c2705c2d4dd59a87fb32a3bdfca..19b6c1367258fa218cdb436ae20a157bcf329b29 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int128s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128s_t data = f_int128s_t_initialize;
index 4b1752d152986edb3823410b595f475284784193..4d4c60dcd1888ccf6628978f2be7642fa87d3a37 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128s_resize__works(void **state);
  *
  * @see f_type_array_int128s_resize()
  */
-extern void test__f_type_array_int128s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128s_resize
index dc07786b577ba17c9a7c1aeb8617cbc986ee5e1f..7bdd2832c1a1b4e54c342ab54ec68caf9d14c8b0 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int128ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128ss_t_initialize;
index 9adcfba8d7a876deb80486ff32c93769177b6c89..21c0fa84805eaf409b3feb8153d538d5ed5a04f2 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128ss_adjust__works(void **state);
  *
  * @see f_type_array_int128ss_adjust()
  */
-extern void test__f_type_array_int128ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128ss_adjust
index e38f4ebc8add8e5b35dcee2ccd66742de593ce05..c67b66d78a1452dc9d035c0213da60dbdcc6893d 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_int128ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_int128ss_t source = f_int128s_t_initialize;
-  f_int128ss_t destination = f_int128s_t_initialize;
+  f_int128s_t source = f_int128s_t_initialize;
+  f_int128ss_t destination = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_resize(length, &source);
+    const f_status_t status = f_int128s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_int128s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_int128ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_int128ss_append__works(void **state) {
 void test__f_type_array_int128ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int128ss_t source = f_int128s_t_initialize;
-  f_int128ss_t destination = f_int128s_t_initialize;
+  f_int128s_t source = f_int128s_t_initialize;
+  f_int128ss_t destination = f_int128ss_t_initialize;
 
   {
-    const f_status_t status = f_int128ss_resize(length, &source);
+    const f_status_t status = f_int128s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_int128ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_int128ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int128ss_t data = f_int128s_t_initialize;
+  f_int128s_t data = f_int128s_t_initialize;
 
   {
     const f_status_t status = f_int128ss_append(data, 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
index ee97741006949eb45465860920f81f7a4b311547..e27c02588e7f1e723ef0d27540191050cbb03427 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int128ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_int128ss_append()
  */
-extern void test__f_type_array_int128ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append_all.c
new file mode 100644 (file)
index 0000000..26f33bc
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-int128ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int128ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_int128ss_t source = f_int128ss_t_initialize;
+  f_int128ss_t destination = f_int128ss_t_initialize;
+
+  {
+    const f_status_t status = f_int128ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_int128s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_int128ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int128ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int128ss_t source = f_int128ss_t_initialize;
+  f_int128ss_t destination = f_int128ss_t_initialize;
+
+  {
+    const f_status_t status = f_int128ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int128ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int128ss_append_all__parameter_checking(void **state) {
+
+  const f_int128ss_t data = f_int128ss_t_initialize;
+
+  {
+    const f_status_t status = f_int128ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int128ss_append_all.h
new file mode 100644 (file)
index 0000000..8c0339f
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int128ss_append_all
+#define _TEST__F_type_array__int128ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int128ss_append_all()
+ */
+extern void test__f_type_array_int128ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int128ss_append_all()
+ */
+extern void test__f_type_array_int128ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int128ss_append_all()
+ */
+extern void test__f_type_array_int128ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int128ss_append_all
index 6e082c80de184840b1cc72216ec8699b884c91c4..1a6c370a2be9e7b65b1697ffb91b6a60bbe67f80 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int128ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int128ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128s_t_initialize;
index 75aa4f2ad7c8381320b478f46b55b715a4a95b17..b4a36479cefe2fdf9ac5a39b12bae39cc935b92e 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128ss_decimate_by__works(void **state);
  *
  * @see f_type_array_int128ss_decimate_by()
  */
-extern void test__f_type_array_int128ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128ss_decimate_by
index d622f362ec847eb1597c7fcad29316433983e804..a8ac1f498498a3147021c0c83281d4fde4e2931c 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int128ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int128ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128s_t_initialize;
index 9afeb069bef1cf704354662781aa32f2dccde688..f7f4da9c2c59f8328212d12da688417291e32e87 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128ss_decrease_by__works(void **state);
  *
  * @see f_type_array_int128ss_decrease_by()
  */
-extern void test__f_type_array_int128ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128ss_decrease_by
index c234ff513a4b29cc0b7e0bf85a26ce5c07991408..d0cfcc1cc435f48748c6df2a92cb25380d068463 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int128ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int128ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128s_t_initialize;
index 97c4c286cbc911acf3360cfb6633722b54df8ae1..5751599335b27f415931f377136e2395cb2f08d6 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int128ss_increase__returns_data_not(void **state)
  *
  * @see f_type_array_int128ss_increase()
  */
-extern void test__f_type_array_int128ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128ss_increase
index 43e6d7b2616bc7362310a3b230cd092be5f94954..8588735ac279f3f1309764b55c14e6dd3e913627 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int128ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128s_t_initialize;
index 9844d55371644ede9d3989935c482831a04d83a4..dbb6090a9c8c8dc235975382716bd018bd6e565e 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128ss_increase_by__works(void **state);
  *
  * @see f_type_array_int128ss_increase_by()
  */
-extern void test__f_type_array_int128ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128ss_increase_by
index 149159b9964bbdf7f0fd234c87d6b9d00420cf28..72eaa3fe1f215c0007af86438bc45ee3f02771ad 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int128ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int128ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int128ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int128ss_t data = f_int128ss_t_initialize;
index 37601156e8d4df3ea0c1d5cb670206bafd5c1bf2..821daa23a6c05f7588e78b8b80e0a78d86266fce 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int128ss_resize__works(void **state);
  *
  * @see f_type_array_int128ss_resize()
  */
-extern void test__f_type_array_int128ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int128ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int128ss_resize
index 529453aa6307a6c11e6b1b30748dc70949404215..3f0931e89eba712a4b0a5bb9b4eafc717717f25f 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int16s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
index 6fa62140903978e545cb03f8393ab2a70164fbd1..9376cd3f9eed11e5f8e53cf291d8329a06f99f71 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16s_adjust__works(void **state);
  *
  * @see f_type_array_int16s_adjust()
  */
-extern void test__f_type_array_int16s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16s_adjust
index d4133b959e4356bc9405eefbf135ef6be6e8e00f..163f197b9c193d9db245b7609f2a449adb909ccc 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_int16s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_int16s_t source = f_int16s_t_initialize;
+  const uint16_t source = 3;
   f_int16s_t destination = f_int16s_t_initialize;
 
   {
-    const f_status_t status = f_int16s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_int16s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_int16s_append__returns_data_not(void **state) {
+void test__f_type_array_int16s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int16s_t source = f_int16s_t_initialize;
-  f_int16s_t destination = f_int16s_t_initialize;
-
-  {
-    const f_status_t status = f_int16s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int16s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_int16s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_int16s_t data = f_int16s_t_initialize;
+  const uint16_t data = 0;
 
   {
     const f_status_t status = f_int16s_append(data, 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
index 98a2ddcd9b01c4d46b5055609288be84d2fb47d3..173530c15c9de12e5842d69a58c1d1ce142e200e 100644 (file)
 extern void test__f_type_array_int16s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_int16s_append()
- */
-extern void test__f_type_array_int16s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_int16s_append()
  */
-extern void test__f_type_array_int16s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_append_all.c
new file mode 100644 (file)
index 0000000..19506b0
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-int16s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int16s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_int16s_t source = f_int16s_t_initialize;
+  f_int16s_t destination = f_int16s_t_initialize;
+
+  {
+    const f_status_t status = f_int16s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_int16s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int16s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int16s_t source = f_int16s_t_initialize;
+  f_int16s_t destination = f_int16s_t_initialize;
+
+  {
+    const f_status_t status = f_int16s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int16s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int16s_append_all__parameter_checking(void **state) {
+
+  const f_int16s_t data = f_int16s_t_initialize;
+
+  {
+    const f_status_t status = f_int16s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16s_append_all.h
new file mode 100644 (file)
index 0000000..2a4637c
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int16s_append_all
+#define _TEST__F_type_array__int16s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int16s_append_all()
+ */
+extern void test__f_type_array_int16s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int16s_append_all()
+ */
+extern void test__f_type_array_int16s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int16s_append_all()
+ */
+extern void test__f_type_array_int16s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int16s_append_all
index cb4452c711d3f684038fa1ed2c78b5edd47a178b..9fff75ddf68c45b556982ec27189d6432a35b3f5 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int16s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int16s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
index 80a52186333010961951df626984911c742620c9..f77b1aed20f2a56daf74f019e02b5dd7873bd5b8 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16s_decimate_by__works(void **state);
  *
  * @see f_type_array_int16s_decimate_by()
  */
-extern void test__f_type_array_int16s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16s_decimate_by
index e6cd758afbf173ec1d2674955efc37880e690dc3..3d30dc178e02ad13dc93e159b9b115ecd5e624a8 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int16s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int16s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
index 56bacd4337e63c03d22720b4e0162c63b2d3a01a..b7a215d8e6fd3f6733510b723e46fdf4366cb78a 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16s_decrease_by__works(void **state);
  *
  * @see f_type_array_int16s_decrease_by()
  */
-extern void test__f_type_array_int16s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16s_decrease_by
index 26eaf90990aa7a5a7ee15f61d4defc757561cc5d..0d7fe4b64bddeffbf29909414fe4e6b5b10a1505 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int16s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int16s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
index e1c208ebbb651b7550740951d3fd56d6ea8d748f..8a9c1cba5abe4ff4f05216280e206293157d4d0e 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int16s_increase__returns_data_not(void **state);
  *
  * @see f_type_array_int16s_increase()
  */
-extern void test__f_type_array_int16s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16s_increase
index dbad4856a217d20c3b608155925743133234417b..2f717aeb03bc3ddef4b472b733088b8ae2220b81 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int16s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
index 719c9205ca1f1a30f70782c1cd09be161b5b3730..37e7b4d7539ee4940b0be45b91bd6684a87edd41 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16s_increase_by__works(void **state);
  *
  * @see f_type_array_int16s_increase_by()
  */
-extern void test__f_type_array_int16s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16s_increase_by
index 450e07d81cd3bc69940c68283a6cf2bcd8680592..c632a9ea45f25800434c01f560ade5c12b3ea033 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int16s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16s_t data = f_int16s_t_initialize;
index e1627b7123f8a59472342bee5665cd997ca64aa3..5f2933e5376029c22b3f4bb2c603a7c3592cc1f4 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16s_resize__works(void **state);
  *
  * @see f_type_array_int16s_resize()
  */
-extern void test__f_type_array_int16s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16s_resize
index 5bb4fc8b5a4ee5b0d4ba80c29db426ecf0008be1..3055b173827b4595ce26cf4b9cf1a43d3937d81c 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int16ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16ss_t_initialize;
index efb8582d7b7f14287cd4c53da4a7dbd2418c0eb8..c2412551f10482b713bcc97d62df4e52d74b75f8 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16ss_adjust__works(void **state);
  *
  * @see f_type_array_int16ss_adjust()
  */
-extern void test__f_type_array_int16ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16ss_adjust
index f1e23dc98ab80eb65201a820032800f4056b7674..36ee09d0065087196cc39ab8ca5da3961ba58afa 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_int16ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_int16ss_t source = f_int16s_t_initialize;
-  f_int16ss_t destination = f_int16s_t_initialize;
+  f_int16s_t source = f_int16s_t_initialize;
+  f_int16ss_t destination = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_resize(length, &source);
+    const f_status_t status = f_int16s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_int16s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_int16ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_int16ss_append__works(void **state) {
 void test__f_type_array_int16ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int16ss_t source = f_int16s_t_initialize;
-  f_int16ss_t destination = f_int16s_t_initialize;
+  f_int16s_t source = f_int16s_t_initialize;
+  f_int16ss_t destination = f_int16ss_t_initialize;
 
   {
-    const f_status_t status = f_int16ss_resize(length, &source);
+    const f_status_t status = f_int16s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_int16ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_int16ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int16ss_t data = f_int16s_t_initialize;
+  f_int16s_t data = f_int16s_t_initialize;
 
   {
     const f_status_t status = f_int16ss_append(data, 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
index c40ed3b00519f67b6de04673357d96e768a19600..7bab07fa0cab4d601c778f195bfa88aaad172c64 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int16ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_int16ss_append()
  */
-extern void test__f_type_array_int16ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append_all.c
new file mode 100644 (file)
index 0000000..08d3123
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-int16ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int16ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_int16ss_t source = f_int16ss_t_initialize;
+  f_int16ss_t destination = f_int16ss_t_initialize;
+
+  {
+    const f_status_t status = f_int16ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_int16s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_int16ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int16ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int16ss_t source = f_int16ss_t_initialize;
+  f_int16ss_t destination = f_int16ss_t_initialize;
+
+  {
+    const f_status_t status = f_int16ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int16ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int16ss_append_all__parameter_checking(void **state) {
+
+  const f_int16ss_t data = f_int16ss_t_initialize;
+
+  {
+    const f_status_t status = f_int16ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int16ss_append_all.h
new file mode 100644 (file)
index 0000000..8d9fe34
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int16ss_append_all
+#define _TEST__F_type_array__int16ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int16ss_append_all()
+ */
+extern void test__f_type_array_int16ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int16ss_append_all()
+ */
+extern void test__f_type_array_int16ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int16ss_append_all()
+ */
+extern void test__f_type_array_int16ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int16ss_append_all
index ac36f8d99164717b9f1a57bc63e73b27599fb519..fd7040ebca8cee643eacf9c01f421f7ee12b0ba1 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int16ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int16ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16s_t_initialize;
index 1384c682fcd186a3e4d9a466398b063ec19b620c..2bd7c2f9dca5a4c0579f99c811248dc606e95c8e 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16ss_decimate_by__works(void **state);
  *
  * @see f_type_array_int16ss_decimate_by()
  */
-extern void test__f_type_array_int16ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16ss_decimate_by
index 67ba87cd0a57b7a8148682a5bde788556bd8d786..ed3a4548e3d2c30bd1eac2c6b966ade4c015cbd5 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int16ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int16ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16s_t_initialize;
index a8813c98dde4bd62cc78ae206570d34bce9164b1..f5d687a1e9f29f98d30ce7b3cfd6bad741d266d5 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16ss_decrease_by__works(void **state);
  *
  * @see f_type_array_int16ss_decrease_by()
  */
-extern void test__f_type_array_int16ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16ss_decrease_by
index db4347046aff42a7457ac5b99cbedc02a00afefc..f1d8273d453870a3257a88d813869b799de9dc82 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int16ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int16ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16s_t_initialize;
index 032a4bb0504fad20b04e69db7eeb7df7fc053687..c0b275d4e2e48482bd1f529cf517bacf69357686 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int16ss_increase__returns_data_not(void **state);
  *
  * @see f_type_array_int16ss_increase()
  */
-extern void test__f_type_array_int16ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16ss_increase
index ffccc6eb85fe3f333d21711a46e8e9e82fc16651..cbb4a2901a98de9eb60a84f0b16c4d2e84122b76 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int16ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16s_t_initialize;
index 0d02ffb803475cb7526c740d725d49b429f7d88b..78956ec6bb85eddc550a7479b786c741ff1fc41a 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16ss_increase_by__works(void **state);
  *
  * @see f_type_array_int16ss_increase_by()
  */
-extern void test__f_type_array_int16ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16ss_increase_by
index 078b770ec46efb22ab1b913b8edc0bc56ec45d87..7a4e8925d85eb8b7991a4a56ea24a1d3e577b562 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int16ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int16ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int16ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int16ss_t data = f_int16ss_t_initialize;
index b57993d711f0071c47a156005a8e59992200a299..6f962b705004bac91c9d2674075031f1e4d248f0 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int16ss_resize__works(void **state);
  *
  * @see f_type_array_int16ss_resize()
  */
-extern void test__f_type_array_int16ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int16ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int16ss_resize
index 3cc76bf8c41e303b599fe12b7f98113567e71a5a..8aafe65edac36e82f4ba350cadabf1992c6b93cd 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int32s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
index cf4f06dccb117f2c5e4229e61c937442b95bbb8a..913daa8cc9df2d98181b3c29e60dcb16ad88db66 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32s_adjust__works(void **state);
  *
  * @see f_type_array_int32s_adjust()
  */
-extern void test__f_type_array_int32s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32s_adjust
index 596cddc569198a5ad0a731f2bc1f9da12f4a04f2..c384176b785f32f245d5a72072e5eae7e819a106 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_int32s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_int32s_t source = f_int32s_t_initialize;
+  const int32_t source = 3;
   f_int32s_t destination = f_int32s_t_initialize;
 
   {
-    const f_status_t status = f_int32s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_int32s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_int32s_append__returns_data_not(void **state) {
+void test__f_type_array_int32s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int32s_t source = f_int32s_t_initialize;
-  f_int32s_t destination = f_int32s_t_initialize;
-
-  {
-    const f_status_t status = f_int32s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int32s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_int32s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_int32s_t data = f_int32s_t_initialize;
+  const uint32_t data = 0;
 
   {
     const f_status_t status = f_int32s_append(data, 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
index 61330219d99cc50903d8364e98ad53adf2fd3f2f..4c22e28c4be5a55bb16374c03a86acff9fce7de9 100644 (file)
 extern void test__f_type_array_int32s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_int32s_append()
- */
-extern void test__f_type_array_int32s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_int32s_append()
  */
-extern void test__f_type_array_int32s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_append_all.c
new file mode 100644 (file)
index 0000000..dc8bfbc
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-int32s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int32s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_int32s_t source = f_int32s_t_initialize;
+  f_int32s_t destination = f_int32s_t_initialize;
+
+  {
+    const f_status_t status = f_int32s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_int32s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int32s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int32s_t source = f_int32s_t_initialize;
+  f_int32s_t destination = f_int32s_t_initialize;
+
+  {
+    const f_status_t status = f_int32s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int32s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int32s_append_all__parameter_checking(void **state) {
+
+  const f_int32s_t data = f_int32s_t_initialize;
+
+  {
+    const f_status_t status = f_int32s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32s_append_all.h
new file mode 100644 (file)
index 0000000..ed79d51
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int32s_append_all
+#define _TEST__F_type_array__int32s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int32s_append_all()
+ */
+extern void test__f_type_array_int32s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int32s_append_all()
+ */
+extern void test__f_type_array_int32s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int32s_append_all()
+ */
+extern void test__f_type_array_int32s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int32s_append_all
index cd2d362fa9e8f218fe565badead05dcd7a9d9039..d6b5032d83f8213019f9df2c2287e9ca7357969c 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int32s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int32s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
index 6fbb447dd97b0c3325fdc2e592ccfd02b1fe8ca7..ee9a6af92d83aa8326e5c1fb6abf939e1864a4d6 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32s_decimate_by__works(void **state);
  *
  * @see f_type_array_int32s_decimate_by()
  */
-extern void test__f_type_array_int32s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32s_decimate_by
index e0d167a33f18f1fe41b171370fcba943029b4c41..71279a42b8b4ea59c32b7c50e10a1355fb05a751 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int32s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int32s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
index fad9c5e2eb7991575564761c34bb618f97461ac6..ed428af5055d49cd8e3be8ba28c207389c5db2d1 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32s_decrease_by__works(void **state);
  *
  * @see f_type_array_int32s_decrease_by()
  */
-extern void test__f_type_array_int32s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32s_decrease_by
index a2d11f63d78680e73ff76508519c6d4968bfa3f4..a6d40221d45e43c2369bddd194a44c71db33f87f 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int32s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int32s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
index d7536cda1a45ed646f5a1a157f45621d836dd325..7fe8cf58a18efabc42916ec8b1ecadf312f17d41 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int32s_increase__returns_data_not(void **state);
  *
  * @see f_type_array_int32s_increase()
  */
-extern void test__f_type_array_int32s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32s_increase
index 4e4a8af47b1ce3e321efddc1b7ec8f735e45698b..c89ce82d71629533be5c8c4c7baa2f53864f6ebd 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int32s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
index 95ed773a4a5d37b417516f0e66448bc25dce9f0f..8be454eb72ccb367f5d6c0e324e79c1976b6c6b3 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32s_increase_by__works(void **state);
  *
  * @see f_type_array_int32s_increase_by()
  */
-extern void test__f_type_array_int32s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32s_increase_by
index db4251dd702df8e503dfbf3efbd09e7ba0b0c672..fdc0204a83a06ae628b993a58f884c1d2ac30ec2 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int32s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32s_t data = f_int32s_t_initialize;
index 64fb507e4fed5578ee0a8abe345dead76ed6366e..82f054e11257ea4a96896cf68543e1dc5c60f510 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32s_resize__works(void **state);
  *
  * @see f_type_array_int32s_resize()
  */
-extern void test__f_type_array_int32s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32s_resize
index c25b621aaf21e6a6406fb8cfb5ca4569071fac2e..a973a03614438366ade706f094a512fbddacd470 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int32ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32ss_t_initialize;
index 8d9200cd957b4d0c5cce78ef016c461c2100ae8c..a105b7bcba270006fd6a5b4b3dc4553eddbd7096 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32ss_adjust__works(void **state);
  *
  * @see f_type_array_int32ss_adjust()
  */
-extern void test__f_type_array_int32ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32ss_adjust
index 038ad3a49b177303afeb4ae9b4d394ec6af7633e..b4d67f967afdedcaea537b31ecf313613a5fe43b 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_int32ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_int32ss_t source = f_int32s_t_initialize;
-  f_int32ss_t destination = f_int32s_t_initialize;
+  f_int32s_t source = f_int32s_t_initialize;
+  f_int32ss_t destination = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_resize(length, &source);
+    const f_status_t status = f_int32s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_int32s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_int32ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_int32ss_append__works(void **state) {
 void test__f_type_array_int32ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int32ss_t source = f_int32s_t_initialize;
-  f_int32ss_t destination = f_int32s_t_initialize;
+  f_int32s_t source = f_int32s_t_initialize;
+  f_int32ss_t destination = f_int32ss_t_initialize;
 
   {
-    const f_status_t status = f_int32ss_resize(length, &source);
+    const f_status_t status = f_int32s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_int32ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_int32ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int32ss_t data = f_int32s_t_initialize;
+  f_int32s_t data = f_int32s_t_initialize;
 
   {
     const f_status_t status = f_int32ss_append(data, 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
index 7caf1fea577652d63220891a89a1d51ef4197513..5d56e68ab1a892a56caf056a370dd9667dd3cd42 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int32ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_int32ss_append()
  */
-extern void test__f_type_array_int32ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append_all.c
new file mode 100644 (file)
index 0000000..c002afa
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-int32ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int32ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_int32ss_t source = f_int32ss_t_initialize;
+  f_int32ss_t destination = f_int32ss_t_initialize;
+
+  {
+    const f_status_t status = f_int32ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_int32s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_int32ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int32ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int32ss_t source = f_int32ss_t_initialize;
+  f_int32ss_t destination = f_int32ss_t_initialize;
+
+  {
+    const f_status_t status = f_int32ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int32ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int32ss_append_all__parameter_checking(void **state) {
+
+  const f_int32ss_t data = f_int32ss_t_initialize;
+
+  {
+    const f_status_t status = f_int32ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int32ss_append_all.h
new file mode 100644 (file)
index 0000000..8aaeae7
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int32ss_append_all
+#define _TEST__F_type_array__int32ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int32ss_append_all()
+ */
+extern void test__f_type_array_int32ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int32ss_append_all()
+ */
+extern void test__f_type_array_int32ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int32ss_append_all()
+ */
+extern void test__f_type_array_int32ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int32ss_append_all
index 7e3f68639b09e5bbf54d161474894012d342d5d6..0fdb7e553b0a4901823fd88af40a4c6544df3033 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int32ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int32ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32s_t_initialize;
index 722bb5981152701962ca6308467370fea7bbf391..2fc576de988855f4d86fe21e710564423d7f6dec 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32ss_decimate_by__works(void **state);
  *
  * @see f_type_array_int32ss_decimate_by()
  */
-extern void test__f_type_array_int32ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32ss_decimate_by
index 688c10a831f07b791a5c28896f19f905b85d7a1b..99a08265dd08b01fde92a0fb401584e2b84d0cd7 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int32ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int32ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32s_t_initialize;
index 1fc42cda055239e36b7db0632fabd69f9a5c5006..9fa824773b9bf4cab2cffdf5c1e99400f2f497fa 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32ss_decrease_by__works(void **state);
  *
  * @see f_type_array_int32ss_decrease_by()
  */
-extern void test__f_type_array_int32ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32ss_decrease_by
index 35bfac7b71c9232fef663d94ac99148792440348..a3160a470c7099f0c7f23848b5245cac4def0950 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int32ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int32ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32s_t_initialize;
index 8fdccb367273d7074eb79b8b33a7ececc0087e09..ae844df2df9b3e43369b67b6d66e32a30cb68021 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int32ss_increase__returns_data_not(void **state);
  *
  * @see f_type_array_int32ss_increase()
  */
-extern void test__f_type_array_int32ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32ss_increase
index 30e121bf596372cef89f1cde3c2528083e0763f8..47f49fddb1272f56a6fbbff71eb7672555a1116e 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int32ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32s_t_initialize;
index 09b2d956d76471f18362b79403f2081a22084d67..e2ec6e57e58ae081850bc348f1d85a115234ac6a 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32ss_increase_by__works(void **state);
  *
  * @see f_type_array_int32ss_increase_by()
  */
-extern void test__f_type_array_int32ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32ss_increase_by
index 8805d36da7387cd18ba154cc60c92d9ab0b0cac0..c53d81e549982c1dbc99e18d06dc6a9ee3a161c6 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int32ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int32ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int32ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int32ss_t data = f_int32ss_t_initialize;
index aee14e10a7cad7bad5fe20eb585b6d9885e9c58e..32e26a829b9e807d40f636fae266cf96eb8751cf 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int32ss_resize__works(void **state);
  *
  * @see f_type_array_int32ss_resize()
  */
-extern void test__f_type_array_int32ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int32ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int32ss_resize
index fb63404d8c3d1057f646e9d004ef1ccf6d23f818..252565b07bd5cbd0684d181a4befea96bbad3bbb 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int64s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
index 090b24d44d6abc62423ee5a5e3aa0e8308d3018b..fca10f459a50acb4b7936f46ec579e3692668c24 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64s_adjust__works(void **state);
  *
  * @see f_type_array_int64s_adjust()
  */
-extern void test__f_type_array_int64s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64s_adjust
index 4bb91c66e69789979ef3589daa53238b55f96b8b..2515eeb303431180dd313c8d7361e78cd5fb582f 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_int64s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_int64s_t source = f_int64s_t_initialize;
+  const int64_t source = 3;
   f_int64s_t destination = f_int64s_t_initialize;
 
   {
-    const f_status_t status = f_int64s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_int64s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_int64s_append__returns_data_not(void **state) {
+void test__f_type_array_int64s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int64s_t source = f_int64s_t_initialize;
-  f_int64s_t destination = f_int64s_t_initialize;
-
-  {
-    const f_status_t status = f_int64s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int64s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_int64s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_int64s_t data = f_int64s_t_initialize;
+  const uint64_t data = 0;
 
   {
     const f_status_t status = f_int64s_append(data, 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
index 8bec71ba6893fe7b405251c1f2dbe5c557c7c115..050b258d0eac19945cfa4a64860071f915dd838c 100644 (file)
 extern void test__f_type_array_int64s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_int64s_append()
- */
-extern void test__f_type_array_int64s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_int64s_append()
  */
-extern void test__f_type_array_int64s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_append_all.c
new file mode 100644 (file)
index 0000000..dae1f31
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-int64s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int64s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_int64s_t source = f_int64s_t_initialize;
+  f_int64s_t destination = f_int64s_t_initialize;
+
+  {
+    const f_status_t status = f_int64s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_int64s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int64s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int64s_t source = f_int64s_t_initialize;
+  f_int64s_t destination = f_int64s_t_initialize;
+
+  {
+    const f_status_t status = f_int64s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int64s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int64s_append_all__parameter_checking(void **state) {
+
+  const f_int64s_t data = f_int64s_t_initialize;
+
+  {
+    const f_status_t status = f_int64s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64s_append_all.h
new file mode 100644 (file)
index 0000000..ae20d0c
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int64s_append_all
+#define _TEST__F_type_array__int64s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int64s_append_all()
+ */
+extern void test__f_type_array_int64s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int64s_append_all()
+ */
+extern void test__f_type_array_int64s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int64s_append_all()
+ */
+extern void test__f_type_array_int64s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int64s_append_all
index c3ae4c9fd4336c94714f8a5e7abc62972808fc5f..18cb0f7aacf92d80a55c2b987f54dce663c850e9 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int64s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int64s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
index 31123c6750661e3c7540fdebdb81e938cd76f3fe..3cd695b6bec82b4f86ba29476a03f7b1536f2931 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64s_decimate_by__works(void **state);
  *
  * @see f_type_array_int64s_decimate_by()
  */
-extern void test__f_type_array_int64s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64s_decimate_by
index 426014f0de673b43e5bf0803d6558e05e3596235..93d4de8a6c55baefd29b3699d01e69e5b5fd8366 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int64s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int64s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
index e79a317791eb522bc58f762bf43506eaa91951ce..9f7fcdc0f7eaa32b1dd95d614141a212b64b0c74 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64s_decrease_by__works(void **state);
  *
  * @see f_type_array_int64s_decrease_by()
  */
-extern void test__f_type_array_int64s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64s_decrease_by
index 90b472bba9cc55096ffafb0d265eb203dbf2b116..2aaf4f5d184b6ed5d782d22019b441801cd7e1f3 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int64s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int64s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
index 7538f33abe51939da1d7f099502db86ddd5cb213..ec62ee03146f4dec04d36585628898877ed9410d 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int64s_increase__returns_data_not(void **state);
  *
  * @see f_type_array_int64s_increase()
  */
-extern void test__f_type_array_int64s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64s_increase
index 4e04bfc5547a815dde997b3880d2283a6e3c12c9..77493005409c96a176dd4fc5660e291af4c28ed7 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int64s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
index 38dbd1a35645f7dc54ed103cd089647475f23a17..f8bd91a3e1902a3b59496e2ea15686610ba455f2 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64s_increase_by__works(void **state);
  *
  * @see f_type_array_int64s_increase_by()
  */
-extern void test__f_type_array_int64s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64s_increase_by
index da472e93d45d1eedc34b69d96e2abb58d67472ad..f2cf58d1b4307e5387b170d0d790451cdd87200f 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int64s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64s_t data = f_int64s_t_initialize;
index a70d30fd4df48bc2fe130ad36967b2d0934ae88b..7de48761d67d9e675b4f1dbf205999bfbf38bbac 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64s_resize__works(void **state);
  *
  * @see f_type_array_int64s_resize()
  */
-extern void test__f_type_array_int64s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64s_resize
index 0804f0a89d2f76f8c4467ba432c830ca56da4e9b..5bb533e85e45175547a07b3084c526e9282717f4 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int64ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64ss_t_initialize;
index 8c25372c0479ed2256d7c337dac22e1a14066f59..af3236440cfa77b3809a646fe5e051433b658282 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64ss_adjust__works(void **state);
  *
  * @see f_type_array_int64ss_adjust()
  */
-extern void test__f_type_array_int64ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64ss_adjust
index 826772ba9c39a1aba12d1284352258aeda2b93fd..f0bba2e0e4d2f974ee65d5deddceaba116562a9d 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_int64ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_int64ss_t source = f_int64s_t_initialize;
-  f_int64ss_t destination = f_int64s_t_initialize;
+  f_int64s_t source = f_int64s_t_initialize;
+  f_int64ss_t destination = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_resize(length, &source);
+    const f_status_t status = f_int64s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_int64s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_int64ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_int64ss_append__works(void **state) {
 void test__f_type_array_int64ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int64ss_t source = f_int64s_t_initialize;
-  f_int64ss_t destination = f_int64s_t_initialize;
+  f_int64s_t source = f_int64s_t_initialize;
+  f_int64ss_t destination = f_int64ss_t_initialize;
 
   {
-    const f_status_t status = f_int64ss_resize(length, &source);
+    const f_status_t status = f_int64s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_int64ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_int64ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int64ss_t data = f_int64s_t_initialize;
+  f_int64s_t data = f_int64s_t_initialize;
 
   {
     const f_status_t status = f_int64ss_append(data, 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
index ea50420c1e872bd8cb8edfa5ea358e0b1e492037..69065b9b5a8d711bbd23e91a35ee33c18e1ae6d3 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int64ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_int64ss_append()
  */
-extern void test__f_type_array_int64ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append_all.c
new file mode 100644 (file)
index 0000000..bd4b667
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-int64ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int64ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_int64ss_t source = f_int64ss_t_initialize;
+  f_int64ss_t destination = f_int64ss_t_initialize;
+
+  {
+    const f_status_t status = f_int64ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_int64s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_int64ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int64ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int64ss_t source = f_int64ss_t_initialize;
+  f_int64ss_t destination = f_int64ss_t_initialize;
+
+  {
+    const f_status_t status = f_int64ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int64ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int64ss_append_all__parameter_checking(void **state) {
+
+  const f_int64ss_t data = f_int64ss_t_initialize;
+
+  {
+    const f_status_t status = f_int64ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int64ss_append_all.h
new file mode 100644 (file)
index 0000000..6052ec5
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int64ss_append_all
+#define _TEST__F_type_array__int64ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int64ss_append_all()
+ */
+extern void test__f_type_array_int64ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int64ss_append_all()
+ */
+extern void test__f_type_array_int64ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int64ss_append_all()
+ */
+extern void test__f_type_array_int64ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int64ss_append_all
index 9e08407f37791db41d8259f89c7f6dd86e55f96e..03567e8e9736f3c4a9659cd7a83a77ae5ce74d4e 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int64ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int64ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64s_t_initialize;
index 9636e802e44d80ccba79b89bb94eec7e069fe6f1..a813fff39ea91e6917ffab6a06df16810b43818d 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64ss_decimate_by__works(void **state);
  *
  * @see f_type_array_int64ss_decimate_by()
  */
-extern void test__f_type_array_int64ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64ss_decimate_by
index f49a6e5b3c7a7b31648dcf00d3a99f09785835d1..f2909c013e8e871c8e788149a74e8b34cb1e8305 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int64ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int64ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64s_t_initialize;
index ef1adf1f06369fac959aec4c70d2c4d502dc686b..966ce27ca2b13c5f10acd6b65d5baba219c04224 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64ss_decrease_by__works(void **state);
  *
  * @see f_type_array_int64ss_decrease_by()
  */
-extern void test__f_type_array_int64ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64ss_decrease_by
index 45159b1b72827f6cdd07ba311bb147ea88dc00b7..b0e705438f92eb10c3d9f0c2f1173d3a579f9f27 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int64ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int64ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64s_t_initialize;
index ac70919a257f600b455d9ea42f09b3ac53317da7..2549016eb9d5821b3641fee05197ad8d178e02c3 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int64ss_increase__returns_data_not(void **state);
  *
  * @see f_type_array_int64ss_increase()
  */
-extern void test__f_type_array_int64ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64ss_increase
index f3e11f05666dec28ec41a848aa5e69743aaf73fb..206def8520806e59b3ea939190e9cc8fbb9147df 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int64ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64s_t_initialize;
index 3857a061f30c045beb4bae6e439549d6b46ba1db..689f6586f2a6fbcf669d47785df32d2364666823 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64ss_increase_by__works(void **state);
  *
  * @see f_type_array_int64ss_increase_by()
  */
-extern void test__f_type_array_int64ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64ss_increase_by
index b2a5f356744bccc7f55ed908600dcc015b233ed9..cceffafa84566da90ad6e39e922213c5a1789ae5 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int64ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int64ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int64ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int64ss_t data = f_int64ss_t_initialize;
index e1cee1d48c35981cc086a2a713585b9ea01e85a5..4d8570239fd79e22e0c9f457fc80254d72cf8697 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int64ss_resize__works(void **state);
  *
  * @see f_type_array_int64ss_resize()
  */
-extern void test__f_type_array_int64ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int64ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int64ss_resize
index 46c197322b7303d9ab3fd24605aca473e7439637..f857eb0e0a0c674761317af3ff52c280ca396a0d 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int8s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
index 800cd33305872d88dbec3728aa2bad103e4263ed..6fea315bb012ea562ddab417a61d1f89f309c22c 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8s_adjust__works(void **state);
  *
  * @see f_type_array_int8s_adjust()
  */
-extern void test__f_type_array_int8s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8s_adjust
index 5d4ecb15677b19a432e6346c2165ad9b187b0365..8412a3e209c5493e12297a43035f74dace409259 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_int8s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_int8s_t source = f_int8s_t_initialize;
+  const int8_t source = 3;
   f_int8s_t destination = f_int8s_t_initialize;
 
   {
-    const f_status_t status = f_int8s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_int8s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_int8s_append__returns_data_not(void **state) {
+void test__f_type_array_int8s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int8s_t source = f_int8s_t_initialize;
-  f_int8s_t destination = f_int8s_t_initialize;
-
-  {
-    const f_status_t status = f_int8s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_int8s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_int8s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_int8s_t data = f_int8s_t_initialize;
+  const uint8_t data = 0;
 
   {
     const f_status_t status = f_int8s_append(data, 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
index 3bda741f5104739bc6fe71ce3f8600d724f54ac6..221938dd18de6eaeb8d9efa68e4474fa1353f65a 100644 (file)
 extern void test__f_type_array_int8s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_int8s_append()
- */
-extern void test__f_type_array_int8s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_int8s_append()
  */
-extern void test__f_type_array_int8s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_append_all.c
new file mode 100644 (file)
index 0000000..79279e3
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-int8s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int8s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_int8s_t source = f_int8s_t_initialize;
+  f_int8s_t destination = f_int8s_t_initialize;
+
+  {
+    const f_status_t status = f_int8s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_int8s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int8s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int8s_t source = f_int8s_t_initialize;
+  f_int8s_t destination = f_int8s_t_initialize;
+
+  {
+    const f_status_t status = f_int8s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int8s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int8s_append_all__parameter_checking(void **state) {
+
+  const f_int8s_t data = f_int8s_t_initialize;
+
+  {
+    const f_status_t status = f_int8s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8s_append_all.h
new file mode 100644 (file)
index 0000000..28e46c8
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int8s_append_all
+#define _TEST__F_type_array__int8s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int8s_append_all()
+ */
+extern void test__f_type_array_int8s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int8s_append_all()
+ */
+extern void test__f_type_array_int8s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int8s_append_all()
+ */
+extern void test__f_type_array_int8s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int8s_append_all
index 744cb0da6febfc2089ac84112636ab8fc99caca7..388ed4957291c4c7e07c3a43bd655bef3190347c 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int8s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int8s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
index 873be7f8a741dcb0985390591166cb9cc60165f8..269b5d777d93fae59d5410861afd73f607ca28be 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8s_decimate_by__works(void **state);
  *
  * @see f_type_array_int8s_decimate_by()
  */
-extern void test__f_type_array_int8s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8s_decimate_by
index 118d7e801c23a928477ba6138d892d2cfc385e29..e5cfb1e2e7f049d0e6a820f568d7ff26f20a9e07 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int8s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int8s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
index de0ee34157bd0a932ccff9a799e86e884287c1f2..61b3b8401c5c51053483824def0331c1bda7ee14 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8s_decrease_by__works(void **state);
  *
  * @see f_type_array_int8s_decrease_by()
  */
-extern void test__f_type_array_int8s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8s_decrease_by
index 2d6de2a616a9819b8982ebeab9d333b3e5404f97..37d9220ab8706c35b0b5b0bf9dfab752b5caed66 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int8s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int8s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
index cf688badc0da8009e53fe704f8252735f83d187d..99012eada6976287438d45fce119deacd8340b9a 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int8s_increase__returns_data_not(void **state);
  *
  * @see f_type_array_int8s_increase()
  */
-extern void test__f_type_array_int8s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8s_increase
index 5fae4cdc4fcc6a2dcf4dd677098f8e3bdb8458d2..d847d5220e3cdb097af9beb655918848744f631a 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int8s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
index a0d242e6a1bceab4685f41c708fd2dfb2839cd29..0b903acc09cf8299b3d391d79d062eb1bea72aad 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8s_increase_by__works(void **state);
  *
  * @see f_type_array_int8s_increase_by()
  */
-extern void test__f_type_array_int8s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8s_increase_by
index b18288611368ff863d14fad7965e321f524a3375..c367b73699164b236d24cfea06618ade009378d1 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int8s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8s_t data = f_int8s_t_initialize;
index df99311ea34b7b0f6319f8c14adfea0757250cff..bf0e9ce72f889fbb5cc9bc89cf74f7d86593465c 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8s_resize__works(void **state);
  *
  * @see f_type_array_int8s_resize()
  */
-extern void test__f_type_array_int8s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8s_resize
index 2c185fe8b9e6b5015b080bdcb029872f584bca7e..d230abd2d85b47ce5d6504028264e5872456c172 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int8ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8ss_t_initialize;
index ba46d8bf1f0d1923ff8abc0ad1cc956c9149addf..6e982b8c516b1662c1ff119f00f978cfd3f8da1a 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8ss_adjust__works(void **state);
  *
  * @see f_type_array_int8ss_adjust()
  */
-extern void test__f_type_array_int8ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8ss_adjust
index e6ed2aab53a0192b34362986ae104e8f60e6ab2a..5372566f1ebdc8fe73fab7a52ccc3a2e3ab5351d 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_int8ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_int8ss_t source = f_int8s_t_initialize;
-  f_int8ss_t destination = f_int8s_t_initialize;
+  f_int8s_t source = f_int8s_t_initialize;
+  f_int8ss_t destination = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_resize(length, &source);
+    const f_status_t status = f_int8s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_int8s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_int8ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_int8ss_append__works(void **state) {
 void test__f_type_array_int8ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_int8ss_t source = f_int8s_t_initialize;
-  f_int8ss_t destination = f_int8s_t_initialize;
+  f_int8s_t source = f_int8s_t_initialize;
+  f_int8ss_t destination = f_int8ss_t_initialize;
 
   {
-    const f_status_t status = f_int8ss_resize(length, &source);
+    const f_status_t status = f_int8s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_int8ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_int8ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_int8ss_t data = f_int8s_t_initialize;
+  f_int8s_t data = f_int8s_t_initialize;
 
   {
     const f_status_t status = f_int8ss_append(data, 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
index 238c7de1b8b1f737caa118e663d13ea017cb1a56..57a27abf953bca101491558422a018cc0c0d0017 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int8ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_int8ss_append()
  */
-extern void test__f_type_array_int8ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append_all.c
new file mode 100644 (file)
index 0000000..6aeb35f
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-int8ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_int8ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_int8ss_t source = f_int8ss_t_initialize;
+  f_int8ss_t destination = f_int8ss_t_initialize;
+
+  {
+    const f_status_t status = f_int8ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_int8s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_int8ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_int8ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_int8ss_t source = f_int8ss_t_initialize;
+  f_int8ss_t destination = f_int8ss_t_initialize;
+
+  {
+    const f_status_t status = f_int8ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_int8ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_int8ss_append_all__parameter_checking(void **state) {
+
+  const f_int8ss_t data = f_int8ss_t_initialize;
+
+  {
+    const f_status_t status = f_int8ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-int8ss_append_all.h
new file mode 100644 (file)
index 0000000..2ce922d
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__int8ss_append_all
+#define _TEST__F_type_array__int8ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_int8ss_append_all()
+ */
+extern void test__f_type_array_int8ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_int8ss_append_all()
+ */
+extern void test__f_type_array_int8ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_int8ss_append_all()
+ */
+extern void test__f_type_array_int8ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__int8ss_append_all
index 6523a9df10c8dd1de9d4be07e3dc60f1e3f693ab..373da634334866bdd02a2c3f8a1722d23ccb78bb 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int8ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int8ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8s_t_initialize;
index 19afd6c34e973b340ca5e9306139659f9e738e33..aba84119cf6521694a3ed0f9620ad0a3c601962b 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8ss_decimate_by__works(void **state);
  *
  * @see f_type_array_int8ss_decimate_by()
  */
-extern void test__f_type_array_int8ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8ss_decimate_by
index ae62dd78cfb62ea36b7ea791c6efb4565ec70dad..67e3342cb32a0bc399c62ad7c84b15f38da2db08 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_int8ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_int8ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8s_t_initialize;
index 3944b7d065c11aa3a8c26adf4258eccd7ce5c83a..2925c2465ed8a241c361d4ece473a64cde1ff6ce 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8ss_decrease_by__works(void **state);
  *
  * @see f_type_array_int8ss_decrease_by()
  */
-extern void test__f_type_array_int8ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8ss_decrease_by
index 009e260aaeafea0b2a5616dfe6bce7523d264ca4..39445e040176d5dea26f13b216987aeffd7e8ef9 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_int8ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_int8ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8s_t_initialize;
index 5b08baba135863537127833b385f3112c89c70f2..1d18bb67b16609e53a5cd3b67e12080aa620a366 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_int8ss_increase__returns_data_not(void **state);
  *
  * @see f_type_array_int8ss_increase()
  */
-extern void test__f_type_array_int8ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8ss_increase
index bb20da4a3cedbb03202a33316d43b9b635e8bf36..dc4f64ee67c6dd400bb45f9489fecfbe3a4563fe 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_int8ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8s_t_initialize;
index 5668e6fb7583bf92cec6fe7c61dac4b4698d3ac6..1c807193702ee2c849521bc06e6b33d0d77ff650 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8ss_increase_by__works(void **state);
  *
  * @see f_type_array_int8ss_increase_by()
  */
-extern void test__f_type_array_int8ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8ss_increase_by
index 72018800a263749bb4e95a6f4884636f09e5277c..49b9f42a921c344249a659b158fb0db50c2d8878 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_int8ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_int8ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_int8ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_int8ss_t data = f_int8ss_t_initialize;
index b3eaf4704651cecbb868f82e69e811a346c23bb5..42dda375bfd59d9f66cfcc85636ccc03f54ecd2b 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_int8ss_resize__works(void **state);
  *
  * @see f_type_array_int8ss_resize()
  */
-extern void test__f_type_array_int8ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_int8ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__int8ss_resize
index 7bbd14c8f93ae88697620f3befc64e5502487350..4337c9935eaff88f90ad89eaada0e6fb77c3a655 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_states_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_states_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_states_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
index ef92edc79e53650d20d700a700b62fc443423474..dbc993a872f5ff510abaf5bcc9e5a8e69caea5fc 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_states_adjust__works(void **state);
  *
  * @see f_type_array_states_adjust()
  */
-extern void test__f_type_array_states_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_states_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__states_adjust
index 7c6e95b218a794bd9166b02e938fbc7a49854ea4..849dae4e7ee52ade469fd39dece86cdbcc474597 100644 (file)
@@ -7,92 +7,39 @@ extern "C" {
 
 void test__f_type_array_states_append__works(void **state) {
 
-  const int length = 5;
-  f_states_t source = f_states_t_initialize;
-  f_states_t destination = f_states_t_initialize;
-
-  const f_state_t state_0 = { .step_large = 10, .step_small = 1, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
-  const f_state_t state_1 = { .step_large = 20, .step_small = 2, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
-
-  {
-    const f_status_t status = f_states_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
+  int fake_1 = 1;
+  int fake_2 = 2;
+  int fake_3 = 3;
 
-  memcpy(&source.array[source.used++], (void *) &state_0, sizeof(f_state_t));
-  memcpy(&source.array[source.used++], (void *) &state_1, sizeof(f_state_t));
+  const f_state_t source = macro_f_state_t_initialize(12, 6, 0, 0, (void *) &fake_1, (void *) &fake_2, (void *) &fake_3);
+  f_states_t destination = f_states_t_initialize;
 
   {
     const f_status_t status = f_states_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    assert_int_equal(destination.array[0].step_large, state_0.step_large);
-    assert_int_equal(destination.array[0].step_small, state_0.step_small);
-    assert_null(destination.array[0].handle);
-    assert_null(destination.array[0].interrupt);
-    assert_null(destination.array[0].callbacks);
-    assert_null(destination.array[0].custom);
-    assert_null(destination.array[0].data);
-
-    assert_int_equal(destination.array[1].step_large, state_1.step_large);
-    assert_int_equal(destination.array[1].step_small, state_1.step_small);
-    assert_null(destination.array[1].handle);
-    assert_null(destination.array[1].interrupt);
-    assert_null(destination.array[1].callbacks);
-    assert_null(destination.array[1].custom);
-    assert_null(destination.array[1].data);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].step_large, source.step_large);
+    assert_int_equal(destination.array[0].step_small, source.step_small);
+    assert_int_equal(destination.array[0].handle, source.handle);
+    assert_int_equal(destination.array[0].interrupt, source.interrupt);
+    assert_int_equal(destination.array[0].callbacks, source.callbacks);
+    assert_int_equal(destination.array[0].custom, source.custom);
+    assert_int_equal(destination.array[0].data, source.data);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_states_append__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_states_t source = f_states_t_initialize;
-  f_states_t destination = f_states_t_initialize;
-
-  {
-    const f_status_t status = f_states_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_states_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_states_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_states_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_states_t data = f_states_t_initialize;
+  const f_state_t data = f_state_t_initialize;
 
   {
     const f_status_t status = f_states_append(data, 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
index 7afc0e0a899cf4628841f252969aa9e0f3cd0ee0..43d227d61b81aee118625918ad8ccb30e2119bd7 100644 (file)
 extern void test__f_type_array_states_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_states_append()
- */
-extern void test__f_type_array_states_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_states_append()
  */
-extern void test__f_type_array_states_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_states_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__states_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-states_append_all.c
new file mode 100644 (file)
index 0000000..0c7938c
--- /dev/null
@@ -0,0 +1,95 @@
+#include "test-type_array.h"
+#include "test-type_array-states_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_states_append_all__works(void **state) {
+
+  const int length = 5;
+  f_states_t source = f_states_t_initialize;
+  f_states_t destination = f_states_t_initialize;
+
+  const f_state_t state_0 = { .step_large = 10, .step_small = 1, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
+  const f_state_t state_1 = { .step_large = 20, .step_small = 2, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
+
+  {
+    const f_status_t status = f_states_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  memcpy(&source.array[source.used++], (void *) &state_0, sizeof(f_state_t));
+  memcpy(&source.array[source.used++], (void *) &state_1, sizeof(f_state_t));
+
+  {
+    const f_status_t status = f_states_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    assert_int_equal(destination.array[0].step_large, state_0.step_large);
+    assert_int_equal(destination.array[0].step_small, state_0.step_small);
+    assert_null(destination.array[0].handle);
+    assert_null(destination.array[0].interrupt);
+    assert_null(destination.array[0].callbacks);
+    assert_null(destination.array[0].custom);
+    assert_null(destination.array[0].data);
+
+    assert_int_equal(destination.array[1].step_large, state_1.step_large);
+    assert_int_equal(destination.array[1].step_small, state_1.step_small);
+    assert_null(destination.array[1].handle);
+    assert_null(destination.array[1].interrupt);
+    assert_null(destination.array[1].callbacks);
+    assert_null(destination.array[1].custom);
+    assert_null(destination.array[1].data);
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_states_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_states_t source = f_states_t_initialize;
+  f_states_t destination = f_states_t_initialize;
+
+  {
+    const f_status_t status = f_states_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_states_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_states_append_all__parameter_checking(void **state) {
+
+  const f_states_t data = f_states_t_initialize;
+
+  {
+    const f_status_t status = f_states_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-states_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-states_append_all.h
new file mode 100644 (file)
index 0000000..a1f2bab
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__states_append_all
+#define _TEST__F_type_array__states_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_states_append_all()
+ */
+extern void test__f_type_array_states_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_states_append_all()
+ */
+extern void test__f_type_array_states_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_states_append_all()
+ */
+extern void test__f_type_array_states_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__states_append_all
index 564888c5bea6ea40d0d76122d9c8e79726e0c9a9..0594ff3efd95f02cccf43e79204633b81bd6efa7 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_states_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_states_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_states_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
index 4b397bac3498d0ceb86732672618ca6226386029..a12f3ce1a9904faaee05196d7ecde7e9a17a18e0 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_states_decimate_by__works(void **state);
  *
  * @see f_type_array_states_decimate_by()
  */
-extern void test__f_type_array_states_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_states_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__states_decimate_by
index 886c5686372f58706136bd565f31204c1c4f5867..69f02f385c4a8aef23dde3f86abb327fc9f1f8cc 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_states_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_states_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_states_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
index 04cf75b94faf6ad158fa17b0d305298ba95c7add..6b0e7da0d58a89ae733064499eada0a436bd354c 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_states_decrease_by__works(void **state);
  *
  * @see f_type_array_states_decrease_by()
  */
-extern void test__f_type_array_states_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_states_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__states_decrease_by
index ae612f018a90dda656d6d3a28cab4d19953e4352..36bd2cb50f448a34a348587e3571b3542155c64f 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_states_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_states_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_states_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_states_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
index a653df20b92a98c77ea6e0ba5bc6210e1d843f5a..f3443ab0f0eded65ccacc1d1169b94a4c98c2a87 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_states_increase__returns_data_not(void **state);
  *
  * @see f_type_array_states_increase()
  */
-extern void test__f_type_array_states_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_states_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__states_increase
index 2de473e8597bae4d498d73ff565857c7f1f54e24..7fa61bd74c1a2f4367620fb74f84c526f54109bd 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_states_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_states_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_states_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
index 34a8cb0f85b3b5dcacd1de0b04cf025a88443200..e78e99eb3273d18358a002578c83f3106e1d9796 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_states_increase_by__works(void **state);
  *
  * @see f_type_array_states_increase_by()
  */
-extern void test__f_type_array_states_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_states_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__states_increase_by
index 668e137f1fb6895fa90b18f4ce1602a71412ead7..ada5a9bcfe5f20ff1315d2b6ce59066b05361d67 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_states_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_states_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_states_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_states_t data = f_states_t_initialize;
index 9b8e35b7c767a857a1c63ceb315f7fc3869e9607..79e7979a3d915cd2c17966a641734ad71dd89090 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_states_resize__works(void **state);
  *
  * @see f_type_array_states_resize()
  */
-extern void test__f_type_array_states_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_states_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__states_resize
index a48aa04c10a12b743a4d9f3756de861494602b94..61b28e3b9b3cf8fde08e40ae42ebbbb64f5434b0 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_statess_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statess_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statess_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_statess_t_initialize;
index 6537c779dff2b4e97f7d002c4c8680fd9781d82a..5cb604e0f23b9606a2c134dac32893596a906b46 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statess_adjust__works(void **state);
  *
  * @see f_type_array_statess_adjust()
  */
-extern void test__f_type_array_statess_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statess_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statess_adjust
index 11877422a3aa7b03e96c8efd5d99e5159efe8ced..585290aa6ae240d6ad0a7f1909b1172ab206201a 100644 (file)
@@ -8,67 +8,47 @@ extern "C" {
 void test__f_type_array_statess_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_statess_t source = f_states_t_initialize;
-  f_statess_t destination = f_states_t_initialize;
+  f_states_t source = f_states_t_initialize;
+  f_statess_t destination = f_statess_t_initialize;
 
-  const f_state_t state_0 = { .step_large = 10, .step_small = 1, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
-  const f_state_t state_1 = { .step_large = 20, .step_small = 2, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
+  int fake_1 = 1;
+  int fake_2 = 2;
+  int fake_3 = 3;
+
+  const f_state_t state_data = macro_f_state_t_initialize(12, 6, 0, 0, (void *) &fake_1, (void *) &fake_2, (void *) &fake_3);
 
   {
-    const f_status_t status = f_statess_resize(length, &source);
+    const f_status_t status = f_states_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_states_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &state_0, sizeof(f_state_t));
-      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &state_1, sizeof(f_state_t));
-    } // for
-  }
+  while (source.used < length) {
+    memcpy(&source.array[source.used++], (void *) &state_data, sizeof(f_state_t));
+  } // while
 
   {
     const f_status_t status = f_statess_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      assert_int_equal(destination.array[i].array[0].step_large, state_0.step_large);
-      assert_int_equal(destination.array[i].array[0].step_small, state_0.step_small);
-      assert_null(destination.array[i].array[0].handle);
-      assert_null(destination.array[i].array[0].interrupt);
-      assert_null(destination.array[i].array[0].callbacks);
-      assert_null(destination.array[i].array[0].custom);
-      assert_null(destination.array[i].array[0].data);
-
-      assert_int_equal(destination.array[i].array[1].step_large, state_1.step_large);
-      assert_int_equal(destination.array[i].array[1].step_small, state_1.step_small);
-      assert_null(destination.array[i].array[1].handle);
-      assert_null(destination.array[i].array[1].interrupt);
-      assert_null(destination.array[i].array[1].callbacks);
-      assert_null(destination.array[i].array[1].custom);
-      assert_null(destination.array[i].array[1].data);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+
+      assert_int_equal(destination.array[0].array[i].step_large, state_data.step_large);
+      assert_int_equal(destination.array[0].array[i].step_small, state_data.step_small);
+      assert_int_equal(destination.array[0].array[i].handle, state_data.handle);
+      assert_int_equal(destination.array[0].array[i].interrupt, state_data.interrupt);
+      assert_int_equal(destination.array[0].array[i].callbacks, state_data.callbacks);
+      assert_int_equal(destination.array[0].array[i].custom, state_data.custom);
+      assert_int_equal(destination.array[0].array[i].data, state_data.data);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -80,11 +60,11 @@ void test__f_type_array_statess_append__works(void **state) {
 void test__f_type_array_statess_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_statess_t source = f_states_t_initialize;
-  f_statess_t destination = f_states_t_initialize;
+  f_states_t source = f_states_t_initialize;
+  f_statess_t destination = f_statess_t_initialize;
 
   {
-    const f_status_t status = f_statess_resize(length, &source);
+    const f_status_t status = f_states_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -97,26 +77,21 @@ void test__f_type_array_statess_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_statess_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statess_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_statess_t data = f_states_t_initialize;
+  f_states_t data = f_states_t_initialize;
 
   {
     const f_status_t status = f_statess_append(data, 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
index 7aca8b8e7c13eeb0d117946d101638ad756805fc..54f6bf4f4ac7b4d8e7b4f71e67a06d5a9d0aaef8 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_statess_append__returns_data_not(void **state);
  *
  * @see f_type_array_statess_append()
  */
-extern void test__f_type_array_statess_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statess_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statess_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statess_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-statess_append_all.c
new file mode 100644 (file)
index 0000000..9146356
--- /dev/null
@@ -0,0 +1,119 @@
+#include "test-type_array.h"
+#include "test-type_array-statess_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_statess_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_statess_t source = f_statess_t_initialize;
+  f_statess_t destination = f_statess_t_initialize;
+
+  const f_state_t state_0 = { .step_large = 10, .step_small = 1, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
+  const f_state_t state_1 = { .step_large = 20, .step_small = 2, .handle = 0, .interrupt = 0, .callbacks = 0, .custom = 0, .data = 0 };
+
+  {
+    const f_status_t status = f_statess_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_states_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &state_0, sizeof(f_state_t));
+      memcpy(&source.array[source.used].array[source.array[source.used].used++], (void *) &state_1, sizeof(f_state_t));
+    } // for
+  }
+
+  {
+    const f_status_t status = f_statess_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      assert_int_equal(destination.array[i].array[0].step_large, state_0.step_large);
+      assert_int_equal(destination.array[i].array[0].step_small, state_0.step_small);
+      assert_null(destination.array[i].array[0].handle);
+      assert_null(destination.array[i].array[0].interrupt);
+      assert_null(destination.array[i].array[0].callbacks);
+      assert_null(destination.array[i].array[0].custom);
+      assert_null(destination.array[i].array[0].data);
+
+      assert_int_equal(destination.array[i].array[1].step_large, state_1.step_large);
+      assert_int_equal(destination.array[i].array[1].step_small, state_1.step_small);
+      assert_null(destination.array[i].array[1].handle);
+      assert_null(destination.array[i].array[1].interrupt);
+      assert_null(destination.array[i].array[1].callbacks);
+      assert_null(destination.array[i].array[1].custom);
+      assert_null(destination.array[i].array[1].data);
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_statess_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statess_t source = f_statess_t_initialize;
+  f_statess_t destination = f_statess_t_initialize;
+
+  {
+    const f_status_t status = f_statess_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_statess_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_statess_append_all__parameter_checking(void **state) {
+
+  const f_statess_t data = f_statess_t_initialize;
+
+  {
+    const f_status_t status = f_statess_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statess_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-statess_append_all.h
new file mode 100644 (file)
index 0000000..b8a72ea
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__statess_append_all
+#define _TEST__F_type_array__statess_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_statess_append_all()
+ */
+extern void test__f_type_array_statess_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_statess_append_all()
+ */
+extern void test__f_type_array_statess_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_statess_append_all()
+ */
+extern void test__f_type_array_statess_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__statess_append_all
index ff8eb9775563355a475576bdf4490ca0b631200c..037550296e0ce63ef7321787ecf5b29992d35289 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_statess_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_statess_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statess_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
index 56f8d038a04d64c334064b83dc9f88379c54297c..dae8b9df995014dabdfbe75416cb379bd192cb7a 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statess_decimate_by__works(void **state);
  *
  * @see f_type_array_statess_decimate_by()
  */
-extern void test__f_type_array_statess_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statess_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statess_decimate_by
index 5f8e2aab377ab876194d45a78bd733be52da65b4..753ff19b750a940b9c66da73a0b0607ecf43a789 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_statess_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_statess_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statess_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
index 6b6d36f86851e9c4c5fff8698d069d0fc323afae..b855d49f4b09661c029ca9c0d6f568a2aa68af79 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statess_decrease_by__works(void **state);
  *
  * @see f_type_array_statess_decrease_by()
  */
-extern void test__f_type_array_statess_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statess_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statess_decrease_by
index 2f09f9b3f390d0ae7f7227d18d311874d396c6ea..367d9a5ac37cb5d8761bf79a85b907034ab0f66c 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_statess_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_statess_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statess_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statess_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
index fa39f7eb0cbc5abb6be2661fd7af06e939430b65..d015d5d0c75aaba0b8b1c3790bc1d27aff6e768b 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_statess_increase__returns_data_not(void **state);
  *
  * @see f_type_array_statess_increase()
  */
-extern void test__f_type_array_statess_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statess_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statess_increase
index 5c7447c48efe03c9da0b0b7ee84aed4c520b0417..77070d2d72a7abd71054bcc5a39c057c9cbd116b 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_statess_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statess_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statess_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_states_t_initialize;
index fca473b2ef93f5ec1bacf110e1c1ae3e2688163a..a93ffba97fdb8bdc573b8728acfdec00c5649f2c 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statess_increase_by__works(void **state);
  *
  * @see f_type_array_statess_increase_by()
  */
-extern void test__f_type_array_statess_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statess_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statess_increase_by
index 2ef6251452a4b6c9624ab87b80df2deae4128da8..a953b9467fe358ef8bcd841f2a93ee029f8f3ba9 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_statess_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statess_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statess_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_statess_t data = f_statess_t_initialize;
index 5ec1007726dbc1d9dd3d17a5c2cf47c7a933f5a5..448f6d832228370e3e00407d0f3420ce5f546222 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statess_resize__works(void **state);
  *
  * @see f_type_array_statess_resize()
  */
-extern void test__f_type_array_statess_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statess_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statess_resize
index 2c4fb7a0718d3085e5bd154a6f4a8d061d58e23c..ba7dcc6bf674ce1651c6c326f367ab6997199ba3 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_statuss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statuss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statuss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
index 412065f1c021324ca53e254e3d4b96abd454c490..24e5d53d0474ef0bfc84ebb58f115209f9d76661 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statuss_adjust__works(void **state);
  *
  * @see f_type_array_statuss_adjust()
  */
-extern void test__f_type_array_statuss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statuss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statuss_adjust
index ce5f15052f693fa16a8eba76a89c56aec73d0273..fb8d905061aa701d9d872c86d266879fdd83dff8 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_statuss_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_statuss_t source = f_statuss_t_initialize;
+  const f_status_t source = 3;
   f_statuss_t destination = f_statuss_t_initialize;
 
   {
-    const f_status_t status = f_statuss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_statuss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_statuss_append__returns_data_not(void **state) {
+void test__f_type_array_statuss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_statuss_t source = f_statuss_t_initialize;
-  f_statuss_t destination = f_statuss_t_initialize;
-
-  {
-    const f_status_t status = f_statuss_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_statuss_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_statuss_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_statuss_t data = f_statuss_t_initialize;
+  const f_status_t data = f_status_t_initialize;
 
   {
     const f_status_t status = f_statuss_append(data, 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
index e4d1d99b01ee15607d00fe7a46c7b298774fa78d..6fb277f10f52e01d6ffe619b09c5fcaa2490bf72 100644 (file)
 extern void test__f_type_array_statuss_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_statuss_append()
- */
-extern void test__f_type_array_statuss_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_statuss_append()
  */
-extern void test__f_type_array_statuss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statuss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statuss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_append_all.c
new file mode 100644 (file)
index 0000000..07b1a06
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-statuss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_statuss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_statuss_t source = f_statuss_t_initialize;
+  f_statuss_t destination = f_statuss_t_initialize;
+
+  {
+    const f_status_t status = f_statuss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_statuss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_statuss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statuss_t source = f_statuss_t_initialize;
+  f_statuss_t destination = f_statuss_t_initialize;
+
+  {
+    const f_status_t status = f_statuss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_statuss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_statuss_append_all__parameter_checking(void **state) {
+
+  const f_statuss_t data = f_statuss_t_initialize;
+
+  {
+    const f_status_t status = f_statuss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statuss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-statuss_append_all.h
new file mode 100644 (file)
index 0000000..c870109
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__statuss_append_all
+#define _TEST__F_type_array__statuss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_statuss_append_all()
+ */
+extern void test__f_type_array_statuss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_statuss_append_all()
+ */
+extern void test__f_type_array_statuss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_statuss_append_all()
+ */
+extern void test__f_type_array_statuss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__statuss_append_all
index ec845a7e4b5bffb940484a82fc25a90109e3469f..962080cd834e1b4400dfeaf4d0d728ee22ae7e33 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_statuss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_statuss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statuss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
index f6e8bb2491cbbe804930f256dfe071cdd7344483..cd317d30d96a51147c6c12954fef027bfb00f18c 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statuss_decimate_by__works(void **state);
  *
  * @see f_type_array_statuss_decimate_by()
  */
-extern void test__f_type_array_statuss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statuss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statuss_decimate_by
index 4be9e7663d25edd6fdf1a7b4769fe2d701714b90..24bcde4b1f2e953de21d568bf336cb2b3a4cad92 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_statuss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_statuss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statuss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
index 8b8f43b50dc33f7fb1673f8b19a0dd0f6a4257b9..52aef547ef0c8ccff2bcea4e6529776335e6beb3 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statuss_decrease_by__works(void **state);
  *
  * @see f_type_array_statuss_decrease_by()
  */
-extern void test__f_type_array_statuss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statuss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statuss_decrease_by
index 04cfd656e6e1d1a248ee6a9941a37e2a8f760f63..5d68d7a07197f35845ded58f5778b3fb35ce1535 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_statuss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_statuss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statuss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statuss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
index 6c30bf03676ad0537ef024b0802f00e555dc64b4..65a9252e20ffde8567843bc982ad6e83a20858bc 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_statuss_increase__returns_data_not(void **state);
  *
  * @see f_type_array_statuss_increase()
  */
-extern void test__f_type_array_statuss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statuss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statuss_increase
index 7be778bef77709d16bc87b251fe30653c2ae2386..f828eaa829b03af7e598eaf71627ad30786503e0 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_statuss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statuss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statuss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
index 0f410bfd090840e05ab9c4aa9fef59c51aa95242..bdf0fb1c2a698a2762acf0d5c23eab4e6b4b1113 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statuss_increase_by__works(void **state);
  *
  * @see f_type_array_statuss_increase_by()
  */
-extern void test__f_type_array_statuss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statuss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statuss_increase_by
index f73f81e3ee29e08a082218ca6554477511db0d5a..2ecb2a4c612a000fc518550b26196e05cce6f4a1 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_statuss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statuss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statuss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_statuss_t data = f_statuss_t_initialize;
index e4e7ec1056d6a0ad61894ba1dbd84384b9e79b5d..4ce51812a91b274168566febb70c13227de1a259 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statuss_resize__works(void **state);
  *
  * @see f_type_array_statuss_resize()
  */
-extern void test__f_type_array_statuss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statuss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statuss_resize
index 1502c3146f962cee0a394776654877228659b7d3..d715069858aefbe654e62af24ed9494cf8f06acc 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_statusss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statusss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statusss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statusss_t_initialize;
index 9dfb7caaacff0bdcd98f4387521fd55143f8cf67..2e7f4e8ebd532fc56ed2a8a84cd3b9b40eee07e4 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statusss_adjust__works(void **state);
  *
  * @see f_type_array_statusss_adjust()
  */
-extern void test__f_type_array_statusss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statusss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statusss_adjust
index ef10deee9c541c3f513ff389aa82c3747907d474..a0ddc4278d83ea4b3417fdc0878ae23567051238 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_statusss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_statusss_t source = f_statuss_t_initialize;
-  f_statusss_t destination = f_statuss_t_initialize;
+  f_statuss_t source = f_statuss_t_initialize;
+  f_statusss_t destination = f_statusss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_resize(length, &source);
+    const f_status_t status = f_statuss_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_statuss_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_statusss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_statusss_append__works(void **state) {
 void test__f_type_array_statusss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_statusss_t source = f_statuss_t_initialize;
-  f_statusss_t destination = f_statuss_t_initialize;
+  f_statuss_t source = f_statuss_t_initialize;
+  f_statusss_t destination = f_statusss_t_initialize;
 
   {
-    const f_status_t status = f_statusss_resize(length, &source);
+    const f_status_t status = f_statuss_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_statusss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_statusss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statusss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_statusss_t data = f_statuss_t_initialize;
+  f_statuss_t data = f_statuss_t_initialize;
 
   {
     const f_status_t status = f_statusss_append(data, 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
index f67a8b5b8a9719ff2d55552cb9704f224fe72a3e..89b921e9a9020684f9ced17671cfaf82bbbbd4e7 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_statusss_append__returns_data_not(void **state);
  *
  * @see f_type_array_statusss_append()
  */
-extern void test__f_type_array_statusss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statusss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statusss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statusss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-statusss_append_all.c
new file mode 100644 (file)
index 0000000..b0b13a1
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-statusss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_statusss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_statusss_t source = f_statusss_t_initialize;
+  f_statusss_t destination = f_statusss_t_initialize;
+
+  {
+    const f_status_t status = f_statusss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_statuss_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_statusss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_statusss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_statusss_t source = f_statusss_t_initialize;
+  f_statusss_t destination = f_statusss_t_initialize;
+
+  {
+    const f_status_t status = f_statusss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_statusss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_statusss_append_all__parameter_checking(void **state) {
+
+  const f_statusss_t data = f_statusss_t_initialize;
+
+  {
+    const f_status_t status = f_statusss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-statusss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-statusss_append_all.h
new file mode 100644 (file)
index 0000000..54ac1cf
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__statusss_append_all
+#define _TEST__F_type_array__statusss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_statusss_append_all()
+ */
+extern void test__f_type_array_statusss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_statusss_append_all()
+ */
+extern void test__f_type_array_statusss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_statusss_append_all()
+ */
+extern void test__f_type_array_statusss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__statusss_append_all
index 72474b79456bf8d9b0eef5be88611d522b0cde2b..8a7b0411d1c6b3e2e7c8e59065cc30eabb0f4114 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_statusss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_statusss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statusss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
index 87d1f3ce013bd7a64bec0acad9e6b2274e6fc922..79428b90da9c7110e51b9a8fccfbd38be44cd560 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statusss_decimate_by__works(void **state);
  *
  * @see f_type_array_statusss_decimate_by()
  */
-extern void test__f_type_array_statusss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statusss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statusss_decimate_by
index f5b24e3c2a0ce57e1196cb704b1446cde20e0632..19b69cebc88b3857f5b09678248e2bf96d11373f 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_statusss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_statusss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statusss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
index deaa87a0c64782968e0fe5487c6c0ef5ad0c4dc2..e780d3ffa68c9f1e2f48be5144235d7c1e5d6ddb 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statusss_decrease_by__works(void **state);
  *
  * @see f_type_array_statusss_decrease_by()
  */
-extern void test__f_type_array_statusss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statusss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statusss_decrease_by
index 16a263401abd306ad4599d23bc417fc697a80ecb..b0476ae49ec007c99881ebb9ead8f59611c1bbd0 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_statusss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_statusss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statusss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statusss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
index faa511e49b978d65e436261e2896770342d1c6c1..18a1cabd13d4c529df86fabfcb1e94dffc0517bb 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_statusss_increase__returns_data_not(void **state)
  *
  * @see f_type_array_statusss_increase()
  */
-extern void test__f_type_array_statusss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statusss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statusss_increase
index e4afc46da4ad4a2e740b4fbe7a8777c9e51f8e64..0e980331d37449257cbaa3108e7647fa2baabd5d 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_statusss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statusss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statusss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statuss_t_initialize;
index 934a1d315e446c337e153d87081bd099d6639438..203c72adae85cf362f0388fe6ece6e7d42dde6f3 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statusss_increase_by__works(void **state);
  *
  * @see f_type_array_statusss_increase_by()
  */
-extern void test__f_type_array_statusss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statusss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statusss_increase_by
index af2d50ec0cc736730e0e98f675f7563f7af5f844..b3ecfda6425d16020fa6bb2a6af63e0df6f25ce8 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_statusss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_statusss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_statusss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_statusss_t data = f_statusss_t_initialize;
index e893fd2f199ee39e4bff5524e23d7f2ed45cf117..e95a2dee754509ad37377f9dd8085484b8694f97 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_statusss_resize__works(void **state);
  *
  * @see f_type_array_statusss_resize()
  */
-extern void test__f_type_array_statusss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_statusss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__statusss_resize
index 9f048e12a310c0dcf4e0ff82f34402b92f5ce39a..37025d71fd04c14fe79a69ab003e79c57fc26ff4 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint128s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
index 44fc7db2c108a934c08fb3378473c7a10e2edd5a..6315a5dc4bc6a8de68295471408eb0c5d7713c1e 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128s_adjust__works(void **state);
  *
  * @see f_type_array_uint128s_adjust()
  */
-extern void test__f_type_array_uint128s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128s_adjust
index fcb4011e9569d56e8e47df91e12e9ee01ccee2f6..516e45077dc50b922280a4a8c2bab555d2bc7029 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_uint128s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_uint128s_t source = f_uint128s_t_initialize;
+  const uint128_t source = 3;
   f_uint128s_t destination = f_uint128s_t_initialize;
 
   {
-    const f_status_t status = f_uint128s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_uint128s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint128s_append__returns_data_not(void **state) {
+void test__f_type_array_uint128s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint128s_t source = f_uint128s_t_initialize;
-  f_uint128s_t destination = f_uint128s_t_initialize;
-
-  {
-    const f_status_t status = f_uint128s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint128s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_uint128s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_uint128s_t data = f_uint128s_t_initialize;
+  const uint128_t data = 0;
 
   {
     const f_status_t status = f_uint128s_append(data, 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
index ac82d7c93c8f482e29bda7aa4d2b4db2b7df3763..93ccaf10a90d1145e269e68c3a4a371defaae478 100644 (file)
 extern void test__f_type_array_uint128s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_uint128s_append()
- */
-extern void test__f_type_array_uint128s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_uint128s_append()
  */
-extern void test__f_type_array_uint128s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append_all.c
new file mode 100644 (file)
index 0000000..afbad49
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-uint128s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint128s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_uint128s_t source = f_uint128s_t_initialize;
+  f_uint128s_t destination = f_uint128s_t_initialize;
+
+  {
+    const f_status_t status = f_uint128s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_uint128s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint128s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint128s_t source = f_uint128s_t_initialize;
+  f_uint128s_t destination = f_uint128s_t_initialize;
+
+  {
+    const f_status_t status = f_uint128s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint128s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint128s_append_all__parameter_checking(void **state) {
+
+  const f_uint128s_t data = f_uint128s_t_initialize;
+
+  {
+    const f_status_t status = f_uint128s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128s_append_all.h
new file mode 100644 (file)
index 0000000..40d61c7
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint128s_append_all
+#define _TEST__F_type_array__uint128s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint128s_append_all()
+ */
+extern void test__f_type_array_uint128s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint128s_append_all()
+ */
+extern void test__f_type_array_uint128s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint128s_append_all()
+ */
+extern void test__f_type_array_uint128s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint128s_append_all
index 2e60f42c300151a17a441537631b9241c197820c..d082f439fea760fd7da5aa6974702795e9f047b2 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint128s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint128s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
index 29fad70e2f0fd6cf3bd657103b988607fb29bb5a..a4f4356c4c5637ca9aa8639a8a59b095666744ed 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128s_decimate_by__works(void **state);
  *
  * @see f_type_array_uint128s_decimate_by()
  */
-extern void test__f_type_array_uint128s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128s_decimate_by
index f12052c105178b84d88637474c129447d59f5003..1d6b42ed45fdc0e0b5b1b7533afd9803f9d3d5c1 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint128s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint128s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
index 96ec7b185386b09a19e73bbdaa9069b2eb5e9247..9c21df093c3cd65424174e843dd49339f8e72a65 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128s_decrease_by__works(void **state);
  *
  * @see f_type_array_uint128s_decrease_by()
  */
-extern void test__f_type_array_uint128s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128s_decrease_by
index 497c0f39ce30decaa75b1719af67ff64a26bf1b2..5a8143f495d9eeff9c4f4b7caefdb1e3290a346c 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint128s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint128s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
index ffd3b01cda0c38641019f8a604b73a2f1b054901..94e707935d7181604cdffc12eac087fc600d08aa 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint128s_increase__returns_data_not(void **state)
  *
  * @see f_type_array_uint128s_increase()
  */
-extern void test__f_type_array_uint128s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128s_increase
index 4e956754490c2d536e44279f92cf59bd9965dad2..0cd3697001129a38c74ddcdb152e616434ef19b3 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint128s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
index fd71330ee13755d2b86449dbd1516f9f61d5a137..90317acbdc9f2e96749bb97667ac3023fd045903 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128s_increase_by__works(void **state);
  *
  * @see f_type_array_uint128s_increase_by()
  */
-extern void test__f_type_array_uint128s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128s_increase_by
index a44ec733ce4cb726c3f603ab52f99d8073f57549..65dcf2971a901626119edc6f7effa32160f61fad 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint128s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128s_t data = f_uint128s_t_initialize;
index a1ab9bd526a20840cd17ceb49cc0468a5695a49c..e21448d6884a05cd155e71f0455640ccb45d9e22 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128s_resize__works(void **state);
  *
  * @see f_type_array_uint128s_resize()
  */
-extern void test__f_type_array_uint128s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128s_resize
index 5e36340a31312d328cfd0139d48553454c8f6784..224e6354208f38240be2a3a38475be2c93f8386a 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint128ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128ss_t_initialize;
index 60c4b99b986b8f13dba272a51f18aa1d4404c322..3a0bcde0212ebda01368241f6a184832a8b5ddb4 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128ss_adjust__works(void **state);
  *
  * @see f_type_array_uint128ss_adjust()
  */
-extern void test__f_type_array_uint128ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_adjust
index e294fd9c07d9eb9803c58149c03566c474c637d3..50ba45dc791f2991e5d8fb6e0d72c4a4fd3a245c 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_uint128ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_uint128ss_t source = f_uint128s_t_initialize;
-  f_uint128ss_t destination = f_uint128s_t_initialize;
+  f_uint128s_t source = f_uint128s_t_initialize;
+  f_uint128ss_t destination = f_uint128ss_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_resize(length, &source);
+    const f_status_t status = f_uint128s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_uint128s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_uint128ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_uint128ss_append__works(void **state) {
 void test__f_type_array_uint128ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_uint128ss_t source = f_uint128s_t_initialize;
-  f_uint128ss_t destination = f_uint128s_t_initialize;
+  f_uint128s_t source = f_uint128s_t_initialize;
+  f_uint128ss_t destination = f_uint128ss_t_initialize;
 
   {
-    const f_status_t status = f_uint128ss_resize(length, &source);
+    const f_status_t status = f_uint128s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_uint128ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_uint128ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint128ss_t data = f_uint128s_t_initialize;
+  f_uint128s_t data = f_uint128s_t_initialize;
 
   {
     const f_status_t status = f_uint128ss_append(data, 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
index 1d666ac9086020c05e108ff9587071ec7740a504..d019beb4315e60329739a13932efba324702a747 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint128ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_uint128ss_append()
  */
-extern void test__f_type_array_uint128ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append_all.c
new file mode 100644 (file)
index 0000000..a3ca3c0
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-uint128ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint128ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_uint128ss_t source = f_uint128ss_t_initialize;
+  f_uint128ss_t destination = f_uint128ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint128ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_uint128s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_uint128ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint128ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint128ss_t source = f_uint128ss_t_initialize;
+  f_uint128ss_t destination = f_uint128ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint128ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint128ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint128ss_append_all__parameter_checking(void **state) {
+
+  const f_uint128ss_t data = f_uint128ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint128ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint128ss_append_all.h
new file mode 100644 (file)
index 0000000..0b10466
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint128ss_append_all
+#define _TEST__F_type_array__uint128ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint128ss_append_all()
+ */
+extern void test__f_type_array_uint128ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint128ss_append_all()
+ */
+extern void test__f_type_array_uint128ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint128ss_append_all()
+ */
+extern void test__f_type_array_uint128ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint128ss_append_all
index 106309aa91f89671847c437a917547ca7393d1ad..c5f8994f415cb3e492e19813ee7c50d8b4aefba1 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint128ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint128ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
index 494d0fee93dc6bf84db86e72fa0599589cab3984..763184e5678aaf98fdf2da1d97ed619a3cfa0527 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128ss_decimate_by__works(void **state);
  *
  * @see f_type_array_uint128ss_decimate_by()
  */
-extern void test__f_type_array_uint128ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_decimate_by
index 8dfc0f1f40e83927263e2cfeb3064a37706f3f39..e8d7ee58e113b84494733d8702bedbcdbe820282 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint128ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint128ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
index 3a97b72e6c03fa5499629655378ef3bfd7fe2a43..f6787bcc3a2a09ec468db1e7ac21664257421d6b 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128ss_decrease_by__works(void **state);
  *
  * @see f_type_array_uint128ss_decrease_by()
  */
-extern void test__f_type_array_uint128ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_decrease_by
index 6d5126bedf0c768e5290d651ed179bf0ae9d497b..85cb58e8d8764bcabb655de37783027f185a36e7 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint128ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint128ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
index adffcfdeb2f66a7d9a26962307cb40d21af9d262..98a2cce8a6a00c6353660ffcd0126115db4e33e5 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint128ss_increase__returns_data_not(void **state
  *
  * @see f_type_array_uint128ss_increase()
  */
-extern void test__f_type_array_uint128ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_increase
index 7a9954293950a20a0da0c5eb7692a52abd5dd330..90ee4a9dfb57953e702b744be05fe97d25bf2ab1 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint128ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128s_t_initialize;
index 0d2d2902824a4f2e3b5a63cf2f581d26aa112fc3..c1950d8b9f80a69c1a73c6ec906ec2f81baeebb7 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128ss_increase_by__works(void **state);
  *
  * @see f_type_array_uint128ss_increase_by()
  */
-extern void test__f_type_array_uint128ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_increase_by
index 83f6afa80d466053bef18dbfda5254b3bad82b4a..b4999f123b0963b1a86de680151e8e9da8189338 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint128ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint128ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint128ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint128ss_t data = f_uint128ss_t_initialize;
index db2f98fb09a228c8aec15d96bfffe5bccb6ea602..be44630df4cb43896155b06df56b4b7a57ffdef1 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint128ss_resize__works(void **state);
  *
  * @see f_type_array_uint128ss_resize()
  */
-extern void test__f_type_array_uint128ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint128ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint128ss_resize
index 6098400bbb509353a7624d46d069ca0a5e0dbc95..e5845d17362a38b159dc75a1f079541c09b0609b 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint16s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
index 2012422fd3c36a5764df3d37a74f85a9b0605f32..ba5c21f7bfa65b53668f6bac924a35276cb53c16 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16s_adjust__works(void **state);
  *
  * @see f_type_array_uint16s_adjust()
  */
-extern void test__f_type_array_uint16s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16s_adjust
index f00fb0a256ca29e79d43c178ad4618a31fae44a2..62f6a654381f87336476c76b8d5fcafc27f18e38 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_uint16s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_uint16s_t source = f_uint16s_t_initialize;
+  const uint16_t source = 3;
   f_uint16s_t destination = f_uint16s_t_initialize;
 
   {
-    const f_status_t status = f_uint16s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_uint16s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint16s_append__returns_data_not(void **state) {
+void test__f_type_array_uint16s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint16s_t source = f_uint16s_t_initialize;
-  f_uint16s_t destination = f_uint16s_t_initialize;
-
-  {
-    const f_status_t status = f_uint16s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint16s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_uint16s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_uint16s_t data = f_uint16s_t_initialize;
+  const uint16_t data = 0;
 
   {
     const f_status_t status = f_uint16s_append(data, 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
index a568c77b858def4ab372348f07f42ca42ace09d0..3a111c66d022cd2edd1c5b1b3f7aed6b097f70c3 100644 (file)
 extern void test__f_type_array_uint16s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_uint16s_append()
- */
-extern void test__f_type_array_uint16s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_uint16s_append()
  */
-extern void test__f_type_array_uint16s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append_all.c
new file mode 100644 (file)
index 0000000..519411b
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-uint16s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint16s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_uint16s_t source = f_uint16s_t_initialize;
+  f_uint16s_t destination = f_uint16s_t_initialize;
+
+  {
+    const f_status_t status = f_uint16s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_uint16s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint16s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint16s_t source = f_uint16s_t_initialize;
+  f_uint16s_t destination = f_uint16s_t_initialize;
+
+  {
+    const f_status_t status = f_uint16s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint16s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint16s_append_all__parameter_checking(void **state) {
+
+  const f_uint16s_t data = f_uint16s_t_initialize;
+
+  {
+    const f_status_t status = f_uint16s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16s_append_all.h
new file mode 100644 (file)
index 0000000..db4a986
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint16s_append_all
+#define _TEST__F_type_array__uint16s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint16s_append_all()
+ */
+extern void test__f_type_array_uint16s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint16s_append_all()
+ */
+extern void test__f_type_array_uint16s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint16s_append_all()
+ */
+extern void test__f_type_array_uint16s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint16s_append_all
index f68ffec34372a94fe5c11ea563a588ffe998399b..6dbfbd33312f6841be15caba4347948c9cfc3a98 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint16s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint16s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
index 4dce39657d000ad0695a01065bf7d93273e0d861..1a76948667e62853903f4e794de21ba7457efe20 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16s_decimate_by__works(void **state);
  *
  * @see f_type_array_uint16s_decimate_by()
  */
-extern void test__f_type_array_uint16s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16s_decimate_by
index f3a24bb55c0665371d1187e7f5accadff41c31a8..bc68694e1f64e7147e78dfe6b5837b9e7ab92f0e 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint16s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint16s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
index dae04f426480cd82ebb6b0f6291f2e010edad554..144eda0ba824e03f15e131e624fbdea1996f3e9a 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16s_decrease_by__works(void **state);
  *
  * @see f_type_array_uint16s_decrease_by()
  */
-extern void test__f_type_array_uint16s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16s_decrease_by
index 728366955a95f664faf24b9c4e088dc5f1187998..065a40afa5630d24edb29795608e1faaa38576b9 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint16s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint16s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
index a8c7ef5fb36a404a30d1934f7bc0f6493d6491e7..a754c56c450bb059125c6a562a8f9c2956a3a197 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint16s_increase__returns_data_not(void **state);
  *
  * @see f_type_array_uint16s_increase()
  */
-extern void test__f_type_array_uint16s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16s_increase
index 180084978eaab3317a4a1020f07bf1de4061286b..ca07bdc927159735057e262cff509f889b51b7b5 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint16s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
index 6a327db55c301a882df7a6ae1db61fb1f564899b..61a7e0f1a53b4f89aed5c8477243e92147ff2c20 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16s_increase_by__works(void **state);
  *
  * @see f_type_array_uint16s_increase_by()
  */
-extern void test__f_type_array_uint16s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16s_increase_by
index 73aab29807e0ea000b4cffd03345cb40ffd07e16..5357df0b936ac8e6864d6018a9a19e7ecd62ff79 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint16s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16s_t data = f_uint16s_t_initialize;
index 3bb8875d9e1f1f8982c7ff794b637501f9351004..d34513e67ada3835f17c213d72b91abd664ba9df 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16s_resize__works(void **state);
  *
  * @see f_type_array_uint16s_resize()
  */
-extern void test__f_type_array_uint16s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16s_resize
index 4aa80afddac7f7f60b24a3bf22ee88289e30b16b..58dce85dddd33896e5f10da7fb3a59c9aa55e8c9 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint16ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16ss_t_initialize;
index 8d66d02b1d4dc07d3971834950f807efcd7e0dda..427d558b73e427480d6d33f34f6b84e73c3c202d 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16ss_adjust__works(void **state);
  *
  * @see f_type_array_uint16ss_adjust()
  */
-extern void test__f_type_array_uint16ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_adjust
index 70a2087b9d41f3b1745e6000ba81611d9de61b06..a89594f5f6d0da75f5224921e27b799f7853655e 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_uint16ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_uint16ss_t source = f_uint16s_t_initialize;
-  f_uint16ss_t destination = f_uint16s_t_initialize;
+  f_uint16s_t source = f_uint16s_t_initialize;
+  f_uint16ss_t destination = f_uint16ss_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_resize(length, &source);
+    const f_status_t status = f_uint16s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_uint16s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_uint16ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_uint16ss_append__works(void **state) {
 void test__f_type_array_uint16ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_uint16ss_t source = f_uint16s_t_initialize;
-  f_uint16ss_t destination = f_uint16s_t_initialize;
+  f_uint16s_t source = f_uint16s_t_initialize;
+  f_uint16ss_t destination = f_uint16ss_t_initialize;
 
   {
-    const f_status_t status = f_uint16ss_resize(length, &source);
+    const f_status_t status = f_uint16s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_uint16ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_uint16ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint16ss_t data = f_uint16s_t_initialize;
+  f_uint16s_t data = f_uint16s_t_initialize;
 
   {
     const f_status_t status = f_uint16ss_append(data, 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
index 8da5310cfcd0ae2a1c49f816f2bbe424cbe06477..3ddc590b345576ab10a084a6b4bd6c583a893178 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint16ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_uint16ss_append()
  */
-extern void test__f_type_array_uint16ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append_all.c
new file mode 100644 (file)
index 0000000..4f1f37c
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-uint16ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint16ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_uint16ss_t source = f_uint16ss_t_initialize;
+  f_uint16ss_t destination = f_uint16ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint16ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_uint16s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_uint16ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint16ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint16ss_t source = f_uint16ss_t_initialize;
+  f_uint16ss_t destination = f_uint16ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint16ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint16ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint16ss_append_all__parameter_checking(void **state) {
+
+  const f_uint16ss_t data = f_uint16ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint16ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint16ss_append_all.h
new file mode 100644 (file)
index 0000000..2048169
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint16ss_append_all
+#define _TEST__F_type_array__uint16ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint16ss_append_all()
+ */
+extern void test__f_type_array_uint16ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint16ss_append_all()
+ */
+extern void test__f_type_array_uint16ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint16ss_append_all()
+ */
+extern void test__f_type_array_uint16ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint16ss_append_all
index 291cf945fc0530d5c0f18e6d23f14983989a33e9..f02ea0d2ffdc082c78d36abf16fd28e446947213 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint16ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint16ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
index 68c690fb5b0932a7a08e9c2f2119d2e7f56bffd7..08b335dbf31ed568e38955a61308a8ea9376b2c2 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16ss_decimate_by__works(void **state);
  *
  * @see f_type_array_uint16ss_decimate_by()
  */
-extern void test__f_type_array_uint16ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_decimate_by
index c789a8d90e0ecd8aaa1aa7c1ae5ae6a2d96e15cf..4a547abfe28b072fe85467d776c3070a33e1a435 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint16ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint16ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
index c8bb1699765de9be6037e907297b8a76c440164b..e9c46e3967ec7b364a493a0a3da940128dabf910 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16ss_decrease_by__works(void **state);
  *
  * @see f_type_array_uint16ss_decrease_by()
  */
-extern void test__f_type_array_uint16ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_decrease_by
index 58330cf639422a684c20ac7d89a4b89b7de2b739..b47b0d22cec4db9a3d531ffa576c237e7daae07a 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint16ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint16ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
index 9f4472ea915965f57982ec57d19e565c6efabf4b..df1cbf28545e7c492051ee75ff517e0d698ea2aa 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint16ss_increase__returns_data_not(void **state)
  *
  * @see f_type_array_uint16ss_increase()
  */
-extern void test__f_type_array_uint16ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_increase
index 091537981dfa09ff72d42f6f16dbdd39a9d5ca8f..4ad84b62d4c744b6fba54eecc83e9fd51b198db1 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint16ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16s_t_initialize;
index 6a5d8b3d2d2cda813936cffab8e912941ae5ce89..54cc5a3a6c899902c41c4c12f65a7a66ebd4ff62 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16ss_increase_by__works(void **state);
  *
  * @see f_type_array_uint16ss_increase_by()
  */
-extern void test__f_type_array_uint16ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_increase_by
index 77a877c0b45bf7e84eb52f186d39a6adf8fc2d6b..4936f1b5a8e6292049729e164c1c7b0b10ed193c 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint16ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint16ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint16ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint16ss_t data = f_uint16ss_t_initialize;
index c34e572959009e51f893f69482e7372119afeea6..5f1af71ee77d8a236fec64edcd3564e6f6c98377 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint16ss_resize__works(void **state);
  *
  * @see f_type_array_uint16ss_resize()
  */
-extern void test__f_type_array_uint16ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint16ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint16ss_resize
index b2edc91e424027331c36fb189442001a6fed1394..70af09099530af8e079b426034fb38056f69628d 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint32s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
index b6511831c63992062672669b8b968fb79d1dbc80..4b85870327be30e9c2099fbaaeb41041b4e97302 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32s_adjust__works(void **state);
  *
  * @see f_type_array_uint32s_adjust()
  */
-extern void test__f_type_array_uint32s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32s_adjust
index db0d4821133a19f08974a730dd255937ba7d6d4d..723abf7630d820a87c0d20f6220f149e5ad50e7d 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_uint32s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_uint32s_t source = f_uint32s_t_initialize;
+  const uint32_t source = 3;
   f_uint32s_t destination = f_uint32s_t_initialize;
 
   {
-    const f_status_t status = f_uint32s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_uint32s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint32s_append__returns_data_not(void **state) {
+void test__f_type_array_uint32s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint32s_t source = f_uint32s_t_initialize;
-  f_uint32s_t destination = f_uint32s_t_initialize;
-
-  {
-    const f_status_t status = f_uint32s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint32s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_uint32s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_uint32s_t data = f_uint32s_t_initialize;
+  const uint32_t data = 0;
 
   {
     const f_status_t status = f_uint32s_append(data, 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
index dbf57e988801b6ddcb3ad0bd47b76668698085c1..884e11e4e9603f95658d7e2bb4e35b32fa9a3743 100644 (file)
 extern void test__f_type_array_uint32s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_uint32s_append()
- */
-extern void test__f_type_array_uint32s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_uint32s_append()
  */
-extern void test__f_type_array_uint32s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append_all.c
new file mode 100644 (file)
index 0000000..43529a0
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-uint32s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint32s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_uint32s_t source = f_uint32s_t_initialize;
+  f_uint32s_t destination = f_uint32s_t_initialize;
+
+  {
+    const f_status_t status = f_uint32s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_uint32s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint32s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint32s_t source = f_uint32s_t_initialize;
+  f_uint32s_t destination = f_uint32s_t_initialize;
+
+  {
+    const f_status_t status = f_uint32s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint32s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint32s_append_all__parameter_checking(void **state) {
+
+  const f_uint32s_t data = f_uint32s_t_initialize;
+
+  {
+    const f_status_t status = f_uint32s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32s_append_all.h
new file mode 100644 (file)
index 0000000..521e499
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint32s_append_all
+#define _TEST__F_type_array__uint32s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint32s_append_all()
+ */
+extern void test__f_type_array_uint32s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint32s_append_all()
+ */
+extern void test__f_type_array_uint32s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint32s_append_all()
+ */
+extern void test__f_type_array_uint32s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint32s_append_all
index 57ad5a01161938aa5d7a55d6b320490067ecd9ac..950d1b012795d930a65417d4a01446d55a7f6a1f 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint32s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint32s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
index a4cd42a16eeb9fe6523908e5ca6c5f4735ccc22d..f549ca6cc8fd26314f733c7ad13e11144680c215 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32s_decimate_by__works(void **state);
  *
  * @see f_type_array_uint32s_decimate_by()
  */
-extern void test__f_type_array_uint32s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32s_decimate_by
index 4c9be8b17727f4d1a3e951d3be6b6f0404cabee0..392052b3e66d3311f7702857e230c50830760715 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint32s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint32s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
index d0fa5da0aa17a0de1b0ecf16ff9d45051718a44e..35f03bba2fb9e83716a3205662049d4538a00bee 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32s_decrease_by__works(void **state);
  *
  * @see f_type_array_uint32s_decrease_by()
  */
-extern void test__f_type_array_uint32s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32s_decrease_by
index bc65739bda3d5e5df197368c6b92cd24d59f3bd7..d77df7fcbfcc288ca6f58ab7203a01f582ef49ab 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint32s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint32s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
index 842a5b9219379301bce9e296ccb587380300f3e7..e0db8f355fb3cb6451a32aa861a55dcce87e1432 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint32s_increase__returns_data_not(void **state);
  *
  * @see f_type_array_uint32s_increase()
  */
-extern void test__f_type_array_uint32s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32s_increase
index f9ab27748660858f62ce18adc92797caaf6f53dc..f165f0411e0bb21f9e1cf7d9c94a204bfe57c138 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint32s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
index dda9416c3426e21fdb33e74ff91e70f399db6b00..6afbf5d7052aa6393376a51cafde16aafbbfc142 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32s_increase_by__works(void **state);
  *
  * @see f_type_array_uint32s_increase_by()
  */
-extern void test__f_type_array_uint32s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32s_increase_by
index 70694db6c1fcc76a150fec4c91d7c7b0d13d2b28..4006ef2a9b3fcf0a9cc96f19c8bcdd2b722b2aa0 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint32s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32s_t data = f_uint32s_t_initialize;
index b16a71402077cbeb8f166af32d0bd41c697aa798..26a116d378509ddba9f46c4866e4b6b6e4f6e0f2 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32s_resize__works(void **state);
  *
  * @see f_type_array_uint32s_resize()
  */
-extern void test__f_type_array_uint32s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32s_resize
index 5b59bd9ecd36c3648100617d773e81f19a9d987b..d1808091bba2f777a216ba2dea17d239ee9a0d39 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint32ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32ss_t_initialize;
index 58461103556391e9770f45d9bde03776892d3dbe..5d27154dea3b5a48096cd47fc8c67f52f0dd68cf 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32ss_adjust__works(void **state);
  *
  * @see f_type_array_uint32ss_adjust()
  */
-extern void test__f_type_array_uint32ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_adjust
index 03e3de4450a16b0338036b4294ae934db8ecb608..32cd338063dd8cf6dd3ecd1d7dce15016860dbd1 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_uint32ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_uint32ss_t source = f_uint32s_t_initialize;
-  f_uint32ss_t destination = f_uint32s_t_initialize;
+  f_uint32s_t source = f_uint32s_t_initialize;
+  f_uint32ss_t destination = f_uint32ss_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_resize(length, &source);
+    const f_status_t status = f_uint32s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_uint32s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_uint32ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_uint32ss_append__works(void **state) {
 void test__f_type_array_uint32ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_uint32ss_t source = f_uint32s_t_initialize;
-  f_uint32ss_t destination = f_uint32s_t_initialize;
+  f_uint32s_t source = f_uint32s_t_initialize;
+  f_uint32ss_t destination = f_uint32ss_t_initialize;
 
   {
-    const f_status_t status = f_uint32ss_resize(length, &source);
+    const f_status_t status = f_uint32s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_uint32ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_uint32ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint32ss_t data = f_uint32s_t_initialize;
+  f_uint32s_t data = f_uint32s_t_initialize;
 
   {
     const f_status_t status = f_uint32ss_append(data, 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
index e5ce496b7acd8c39b223360dfbe5a306b6555c1f..fd2cf401f72d6af0efba3f590d2c13ad5e68f17d 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint32ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_uint32ss_append()
  */
-extern void test__f_type_array_uint32ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append_all.c
new file mode 100644 (file)
index 0000000..032593a
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-uint32ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint32ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_uint32ss_t source = f_uint32ss_t_initialize;
+  f_uint32ss_t destination = f_uint32ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint32ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_uint32s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_uint32ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint32ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint32ss_t source = f_uint32ss_t_initialize;
+  f_uint32ss_t destination = f_uint32ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint32ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint32ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint32ss_append_all__parameter_checking(void **state) {
+
+  const f_uint32ss_t data = f_uint32ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint32ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint32ss_append_all.h
new file mode 100644 (file)
index 0000000..8ca0605
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint32ss_append_all
+#define _TEST__F_type_array__uint32ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint32ss_append_all()
+ */
+extern void test__f_type_array_uint32ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint32ss_append_all()
+ */
+extern void test__f_type_array_uint32ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint32ss_append_all()
+ */
+extern void test__f_type_array_uint32ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint32ss_append_all
index c3a2a4461a1d5f2ea4fc5f7e423be819fbb02ebe..d941d027a2256ce275bc6e14e298331b53f6001c 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint32ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint32ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
index fb792ee83bd27cb11c331f212679070614b20ef7..50380ba119fa8fd69baf53fb59efe167c382d851 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32ss_decimate_by__works(void **state);
  *
  * @see f_type_array_uint32ss_decimate_by()
  */
-extern void test__f_type_array_uint32ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_decimate_by
index 58c0ccd616c6177946889033550ea74f5d0e6f5c..f7fd55030b1ce59f82c30b0d97e30bab835a75c0 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint32ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint32ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
index 5789def64ab18cf0d62e57e32f0905bcdd23fdfb..695a5c9d42224c7c183d6f4301caabbb9abc9036 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32ss_decrease_by__works(void **state);
  *
  * @see f_type_array_uint32ss_decrease_by()
  */
-extern void test__f_type_array_uint32ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_decrease_by
index 4ecb41bb63c7c7d2fcd45c93f14fb2d73e4d4e3e..432b3621ce037d9e33fdfe00846c7b05966f4e22 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint32ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint32ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
index 1fcb7e7a3be00e44bf8b37faf9538b0f7ac8628f..18beac0dabf77ae9ccb258c197e0389b3565eb5f 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint32ss_increase__returns_data_not(void **state)
  *
  * @see f_type_array_uint32ss_increase()
  */
-extern void test__f_type_array_uint32ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_increase
index 77c6ba894f18a2d42679aa4f7d6a2de805dba08b..07000c3653b6f1895fe95617e363469a450309a5 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint32ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32s_t_initialize;
index 64578c44eac51f927140be8a6944a117dffd7843..c05511d79741b7fc43262d80b995c3f07e014a38 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32ss_increase_by__works(void **state);
  *
  * @see f_type_array_uint32ss_increase_by()
  */
-extern void test__f_type_array_uint32ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_increase_by
index a0e214556095fe1763d98ca5103d553d900bad09..16b522ecdf58696ba6b9700c34aa6b72859c43fc 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint32ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint32ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint32ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint32ss_t data = f_uint32ss_t_initialize;
index 1d523b8ac790f19842c508aeca85f04fac64650a..fd1ed4c5aedc8471747d2399232f5d3f68a50c94 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint32ss_resize__works(void **state);
  *
  * @see f_type_array_uint32ss_resize()
  */
-extern void test__f_type_array_uint32ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint32ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint32ss_resize
index 6620d3a2ac68141fc60d95cb3894dfdf879c1e63..4336952012a4c5d21d0103e6653ae7c39b9efa85 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint64s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
index 729ce1e50fd1a02f52987db506c702cec018b997..90f6b3454fedb2ffa97721cf90910b0a17ee5600 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64s_adjust__works(void **state);
  *
  * @see f_type_array_uint64s_adjust()
  */
-extern void test__f_type_array_uint64s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64s_adjust
index ebd7dd29c7b8b68b34de886d159ca2c1559e1e2e..243e2307ed67b451b978b04a27fdf83c445b08b1 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_uint64s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_uint64s_t source = f_uint64s_t_initialize;
+  const uint64_t source = 3;
   f_uint64s_t destination = f_uint64s_t_initialize;
 
   {
-    const f_status_t status = f_uint64s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_uint64s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint64s_append__returns_data_not(void **state) {
+void test__f_type_array_uint64s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint64s_t source = f_uint64s_t_initialize;
-  f_uint64s_t destination = f_uint64s_t_initialize;
-
-  {
-    const f_status_t status = f_uint64s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint64s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_uint64s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_uint64s_t data = f_uint64s_t_initialize;
+  const uint64_t data = 0;
 
   {
     const f_status_t status = f_uint64s_append(data, 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
index 052d08c44c08a27cbc637ce5a94e098ffc146bd9..2cc3a26b9997560dbfcf29daf1e2c50826d483c6 100644 (file)
 extern void test__f_type_array_uint64s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_uint64s_append()
- */
-extern void test__f_type_array_uint64s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_uint64s_append()
  */
-extern void test__f_type_array_uint64s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append_all.c
new file mode 100644 (file)
index 0000000..7b8902c
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-uint64s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint64s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_uint64s_t source = f_uint64s_t_initialize;
+  f_uint64s_t destination = f_uint64s_t_initialize;
+
+  {
+    const f_status_t status = f_uint64s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_uint64s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint64s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint64s_t source = f_uint64s_t_initialize;
+  f_uint64s_t destination = f_uint64s_t_initialize;
+
+  {
+    const f_status_t status = f_uint64s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint64s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint64s_append_all__parameter_checking(void **state) {
+
+  const f_uint64s_t data = f_uint64s_t_initialize;
+
+  {
+    const f_status_t status = f_uint64s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64s_append_all.h
new file mode 100644 (file)
index 0000000..0a43b51
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint64s_append_all
+#define _TEST__F_type_array__uint64s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint64s_append_all()
+ */
+extern void test__f_type_array_uint64s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint64s_append_all()
+ */
+extern void test__f_type_array_uint64s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint64s_append_all()
+ */
+extern void test__f_type_array_uint64s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint64s_append_all
index 10980dc4aaa80d9068742178d8c9a300a6744aad..f2e2f707477bd72a3e8b34881afdb96f84b75268 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint64s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint64s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
index 6ea01a52708ceec7f95641cae226957ae48f0873..46c9b0152172817bd52e991364a56412c4654eab 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64s_decimate_by__works(void **state);
  *
  * @see f_type_array_uint64s_decimate_by()
  */
-extern void test__f_type_array_uint64s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64s_decimate_by
index 6b072d24b9b21382d3ec61eecc831e18093eb8b4..09d1858115fceee0cece97b3837bbd0572255cd1 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint64s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint64s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
index 0706759b02d79fe1ef90e24eab098c1a29d556b9..69cdf74b40521422526c18abf8a189e96896fed6 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64s_decrease_by__works(void **state);
  *
  * @see f_type_array_uint64s_decrease_by()
  */
-extern void test__f_type_array_uint64s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64s_decrease_by
index b97928b81aa60e545649f7bfaeb892bbd5b6a394..5f4e3d09d886d74de68f12f4a1ae508a803ae4b6 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint64s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint64s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
index 5fb5e7b3e3487cff46ab7e7baaa299d04af4bf7b..76a95f800d63cdded1ae242615a2900f1427f909 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint64s_increase__returns_data_not(void **state);
  *
  * @see f_type_array_uint64s_increase()
  */
-extern void test__f_type_array_uint64s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64s_increase
index 0c96224dc97656a6c53d2ef76b82f8a2435ae636..89c33b06f5ed2665f30565f30aa547526a6d22e3 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint64s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
index 2115798d96b4dda6fa5794297aed05f2c097917f..e0395215a0431e3f0e5a8f2bd59deb0822e61b74 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64s_increase_by__works(void **state);
  *
  * @see f_type_array_uint64s_increase_by()
  */
-extern void test__f_type_array_uint64s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64s_increase_by
index 862bd4abc6008ba0685bbc5fa564837747c78053..53e459a6f390e7d54c3ae81219f0a5d873838068 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint64s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64s_t data = f_uint64s_t_initialize;
index 22e96d0b70a617065e539238653ffc274bd8732d..f28ff4b883f8fbbed212f6a553e6f70757cd5bd8 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64s_resize__works(void **state);
  *
  * @see f_type_array_uint64s_resize()
  */
-extern void test__f_type_array_uint64s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64s_resize
index bf51ef6328ac92300378c2587845b3c37773c850..a069aa3a6189385c233fddad61ef0082a9ea6a1e 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint64ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64ss_t_initialize;
index b93e170a595d52bf7f17054fdc58dd19f3534254..66269a7590e843ac248f43706a0a2e724ffd2421 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64ss_adjust__works(void **state);
  *
  * @see f_type_array_uint64ss_adjust()
  */
-extern void test__f_type_array_uint64ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_adjust
index 69c4a41e402915fbf8b84504004ae81ee9fd70d4..1e5448435e5fd0c45df070f246a752a95b317e9f 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_uint64ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_uint64ss_t source = f_uint64s_t_initialize;
-  f_uint64ss_t destination = f_uint64s_t_initialize;
+  f_uint64s_t source = f_uint64s_t_initialize;
+  f_uint64ss_t destination = f_uint64ss_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_resize(length, &source);
+    const f_status_t status = f_uint64s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_uint64s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_uint64ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_uint64ss_append__works(void **state) {
 void test__f_type_array_uint64ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_uint64ss_t source = f_uint64s_t_initialize;
-  f_uint64ss_t destination = f_uint64s_t_initialize;
+  f_uint64s_t source = f_uint64s_t_initialize;
+  f_uint64ss_t destination = f_uint64ss_t_initialize;
 
   {
-    const f_status_t status = f_uint64ss_resize(length, &source);
+    const f_status_t status = f_uint64s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_uint64ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_uint64ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint64ss_t data = f_uint64s_t_initialize;
+  f_uint64s_t data = f_uint64s_t_initialize;
 
   {
     const f_status_t status = f_uint64ss_append(data, 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
index 64913fc9597febad9d733d7cb1e1a5011877a6e9..071d13a5dcbbd5f4c23778a9e180673aceb0ff4d 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint64ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_uint64ss_append()
  */
-extern void test__f_type_array_uint64ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append_all.c
new file mode 100644 (file)
index 0000000..80edb1f
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-uint64ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint64ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_uint64ss_t source = f_uint64ss_t_initialize;
+  f_uint64ss_t destination = f_uint64ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint64ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_uint64s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_uint64ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint64ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint64ss_t source = f_uint64ss_t_initialize;
+  f_uint64ss_t destination = f_uint64ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint64ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint64ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint64ss_append_all__parameter_checking(void **state) {
+
+  const f_uint64ss_t data = f_uint64ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint64ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint64ss_append_all.h
new file mode 100644 (file)
index 0000000..0bc11ed
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint64ss_append_all
+#define _TEST__F_type_array__uint64ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint64ss_append_all()
+ */
+extern void test__f_type_array_uint64ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint64ss_append_all()
+ */
+extern void test__f_type_array_uint64ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint64ss_append_all()
+ */
+extern void test__f_type_array_uint64ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint64ss_append_all
index 4bed12f3bfcde44bb83f531745afadea32924e40..53edea25dd36a7ab8bc4f90875f06278620eb285 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint64ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint64ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
index b3ed09f3325b44a3d78a607a310655e07bee54f5..97a969e2794b09fc643c8d2c91d5c5ac03b7ce87 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64ss_decimate_by__works(void **state);
  *
  * @see f_type_array_uint64ss_decimate_by()
  */
-extern void test__f_type_array_uint64ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_decimate_by
index 7fddf9f7f8aa674a7ee57d897023c9da7087826f..a5d8132cf2ba7daeccf61294457a1b34783607e6 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint64ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint64ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
index 0cabd0537cd8c8cd41ed702c1fe925a6039d7b9f..9927a943809543a3957682f2bcf69db354a47394 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64ss_decrease_by__works(void **state);
  *
  * @see f_type_array_uint64ss_decrease_by()
  */
-extern void test__f_type_array_uint64ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_decrease_by
index b08052e0b5bf4303b59e5faebeb91b3386dc0008..8338db8f4bcc23070e4534ce5fd00ecb566a1765 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint64ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint64ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
index faa336d93850178eac232032a85956547e289917..ad9671be57a35790ee9b78132448433f30af5781 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint64ss_increase__returns_data_not(void **state)
  *
  * @see f_type_array_uint64ss_increase()
  */
-extern void test__f_type_array_uint64ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_increase
index 0ffde43e62d4c9769b509b0cb9c1dd2dffa95422..ae5192f7a46957868e4444787d1b47c9ccd392d9 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint64ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64s_t_initialize;
index d187b23d9943649691fdb4a04c6e646fa80cfc23..31732689769dbf26e5b28ef80b59e93c82c902d3 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64ss_increase_by__works(void **state);
  *
  * @see f_type_array_uint64ss_increase_by()
  */
-extern void test__f_type_array_uint64ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_increase_by
index 94e43db88de1bfa21c415d6dda43e87713e99b35..c471785b2e7f1925749e57c8f940e582909db04d 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint64ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint64ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint64ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint64ss_t data = f_uint64ss_t_initialize;
index 5f221661c16cdebe3096227ccdbe4b5657c622a9..acd18bc4af4ac8eb508b6136cbcf623ca3352f5f 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint64ss_resize__works(void **state);
  *
  * @see f_type_array_uint64ss_resize()
  */
-extern void test__f_type_array_uint64ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint64ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint64ss_resize
index 67fd00d393150fd02360046ac17e4171311a3772..33440e2e6179b82797094a1dbce707e302b0a5fe 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint8s_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8s_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8s_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
index dee94c0ab499c02cda852e7d7d2153979c6ce6dc..d5afab2d6cf4f16468e952e88fdfb73fa629a027 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8s_adjust__works(void **state);
  *
  * @see f_type_array_uint8s_adjust()
  */
-extern void test__f_type_array_uint8s_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8s_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8s_adjust
index f8ad96dfd556c36a9ba07fa95adfad550b8e0e82..d039c4784bb0d72d8a567284d732a21743105c5c 100644 (file)
@@ -7,79 +7,29 @@ extern "C" {
 
 void test__f_type_array_uint8s_append__works(void **state) {
 
-  const int length = 5;
-  const int length_used = 2;
-  f_uint8s_t source = f_uint8s_t_initialize;
+  const uint8_t source = 3;
   f_uint8s_t destination = f_uint8s_t_initialize;
 
   {
-    const f_status_t status = f_uint8s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  for (; source.used < length_used; ++source.used) {
-    source.array[source.used] = source.used + 1;
-  } // for
-
-  {
     const f_status_t status = f_uint8s_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_array_length_t i = 0; i < source.used; ++i) {
-      assert_int_equal(destination.array[i], i + 1);
-    } // for
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0], source);
   }
 
-  free((void *) source.array);
   free((void *) destination.array);
 }
 
-void test__f_type_array_uint8s_append__returns_data_not(void **state) {
+void test__f_type_array_uint8s_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint8s_t source = f_uint8s_t_initialize;
-  f_uint8s_t destination = f_uint8s_t_initialize;
-
-  {
-    const f_status_t status = f_uint8s_resize(length, &source);
-
-    assert_int_equal(status, F_none);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_uint8s_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-  }
-
-  free((void *) source.array);
-  assert_null(destination.array);
-}
-
-void test__f_type_array_uint8s_append__fails_on_invalid_parameter(void **state) {
-
-  const int length = 5;
-  f_uint8s_t data = f_uint8s_t_initialize;
+  const uint8_t data = 0;
 
   {
     const f_status_t status = f_uint8s_append(data, 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
index e0b062aa2366189621db8dcb8f00c6c66f5fb158..02968f7b72a356141b63143028326ce236c7daf5 100644 (file)
 extern void test__f_type_array_uint8s_append__works(void **state);
 
 /**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_type_array_uint8s_append()
- */
-extern void test__f_type_array_uint8s_append__returns_data_not(void **state);
-
-/**
  * Test that the function correctly fails on invalid parameter.
  *
  * @see f_type_array_uint8s_append()
  */
-extern void test__f_type_array_uint8s_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8s_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8s_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append_all.c
new file mode 100644 (file)
index 0000000..a94ae53
--- /dev/null
@@ -0,0 +1,82 @@
+#include "test-type_array.h"
+#include "test-type_array-uint8s_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint8s_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_used = 2;
+  f_uint8s_t source = f_uint8s_t_initialize;
+  f_uint8s_t destination = f_uint8s_t_initialize;
+
+  {
+    const f_status_t status = f_uint8s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  for (; source.used < length_used; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
+
+  {
+    const f_status_t status = f_uint8s_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < source.used; ++i) {
+      assert_int_equal(destination.array[i], i + 1);
+    } // for
+  }
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint8s_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint8s_t source = f_uint8s_t_initialize;
+  f_uint8s_t destination = f_uint8s_t_initialize;
+
+  {
+    const f_status_t status = f_uint8s_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint8s_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint8s_append_all__parameter_checking(void **state) {
+
+  const f_uint8s_t data = f_uint8s_t_initialize;
+
+  {
+    const f_status_t status = f_uint8s_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8s_append_all.h
new file mode 100644 (file)
index 0000000..039bf1f
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint8s_append_all
+#define _TEST__F_type_array__uint8s_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint8s_append_all()
+ */
+extern void test__f_type_array_uint8s_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint8s_append_all()
+ */
+extern void test__f_type_array_uint8s_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint8s_append_all()
+ */
+extern void test__f_type_array_uint8s_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint8s_append_all
index 434e3b3dd93992a6ce09d35b78adbc3c6f427a21..40ceac019ea8c024db9d7978a19dcab3bef5edc7 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint8s_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint8s_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
index 5575c3a5a723671ea1440e43045f46803583de79..fe4247b6d4d23247dae7550352904dc720f56e21 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8s_decimate_by__works(void **state);
  *
  * @see f_type_array_uint8s_decimate_by()
  */
-extern void test__f_type_array_uint8s_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8s_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8s_decimate_by
index 5559b3817098613c330e44d7cda372225cb918c3..a2baa1bf7e90f196bc01e6d0736a9f7d2e8969ea 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint8s_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint8s_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
index 5fcb7a445bfecea542b536d302b341a081658c83..6157173ced3c2f61693348adfccdc7d9683b8e7e 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8s_decrease_by__works(void **state);
  *
  * @see f_type_array_uint8s_decrease_by()
  */
-extern void test__f_type_array_uint8s_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8s_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8s_decrease_by
index 16671188c2ec76955cb164fbf4add422361116fa..690bbaf4dcb9c9cb015d45a7df726cf02ee75e9c 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint8s_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint8s_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8s_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8s_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
index 18cf51442d5f68a68da91527f1601203b5248035..77be5544431a38519666249cbf0dc1c6149f0d28 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint8s_increase__returns_data_not(void **state);
  *
  * @see f_type_array_uint8s_increase()
  */
-extern void test__f_type_array_uint8s_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8s_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8s_increase
index 8fb4be53b8d4157cc7c9f7bd2b883fe3222b8eb0..f507bd1e8d31fd70a7d1fdeccedab17c5e891f07 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint8s_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8s_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8s_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
index 34783da4ffa4d8109b5118add0e991ef3b7cf2aa..7c8206f8c8c2c779a781933accac57ffcbf2280e 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8s_increase_by__works(void **state);
  *
  * @see f_type_array_uint8s_increase_by()
  */
-extern void test__f_type_array_uint8s_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8s_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8s_increase_by
index 86d997e9b81c19ba794cad15952c12dbc601bd89..83b457a6999805c6e5715ff2761b48ad7180171e 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint8s_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8s_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8s_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8s_t data = f_uint8s_t_initialize;
index a19fa0f34121c85c8e4d1defd171d1604de72bb4..8f258e3d31b6ad9105f519f99fbf14f7723aa68b 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8s_resize__works(void **state);
  *
  * @see f_type_array_uint8s_resize()
  */
-extern void test__f_type_array_uint8s_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8s_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8s_resize
index 8d4d4a55044d05b074eea46c37b43006fef19b22..ec3eed98f5019415aef9e464a630fa073acdbc39 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint8ss_adjust__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8ss_adjust__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8ss_adjust__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8ss_t_initialize;
index 223dce3eed129e7770a37dc4e37caba9f15c506c..b6d8dfb32cb0f00fb95eed9ca53b6dd91913ebc3 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8ss_adjust__works(void **state);
  *
  * @see f_type_array_uint8ss_adjust()
  */
-extern void test__f_type_array_uint8ss_adjust__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8ss_adjust__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_adjust
index e9c6fed43a518f12cef059f0f7042ca38280d951..650d761a53dd505f4856329d2bfc0ddac44a4d77 100644 (file)
@@ -8,53 +8,34 @@ extern "C" {
 void test__f_type_array_uint8ss_append__works(void **state) {
 
   const int length = 5;
-  const int length_inner = 2;
-  f_uint8ss_t source = f_uint8s_t_initialize;
-  f_uint8ss_t destination = f_uint8s_t_initialize;
+  f_uint8s_t source = f_uint8s_t_initialize;
+  f_uint8ss_t destination = f_uint8ss_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_resize(length, &source);
+    const f_status_t status = f_uint8s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
     assert_int_equal(source.size, length);
   }
 
-  {
-    for (; source.used < length; ++source.used) {
-
-      const f_status_t status = f_uint8s_resize(length_inner, &source.array[source.used]);
-
-      assert_int_equal(status, F_none);
-
-      for (f_array_length_t i = 0; i < length_inner; ++i) {
-        source.array[source.used].array[source.array[source.used].used++] = i + 1;
-      } // for
-    } // for
-  }
+  for (; source.used < length; ++source.used) {
+    source.array[source.used] = source.used + 1;
+  } // for
 
   {
     const f_status_t status = f_uint8ss_append(source, &destination);
 
     assert_int_equal(status, F_none);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].used, source.used);
+    assert_int_equal(destination.array[0].size, source.used);
 
-    for (f_array_length_t i = 0; i < destination.used; ++i) {
-
-      assert_int_equal(destination.array[i].used, length_inner);
-      assert_int_equal(destination.array[i].size, length_inner);
-
-      for (f_array_length_t j = 0; j < length_inner; ++j) {
-        assert_int_equal(destination.array[i].array[j], j + 1);
-      } // for
+    for (f_array_length_t i = 0; i < destination.array[0].used; ++i) {
+      assert_int_equal(destination.array[0].array[i], i + 1);
     } // for
   }
 
-  for (f_array_length_t i = 0; i < source.used; ++i) {
-    free((void *) source.array[i].array);
-  } // for
-
   for (f_array_length_t i = 0; i < destination.used; ++i) {
     free((void *) destination.array[i].array);
   } // for
@@ -66,11 +47,11 @@ void test__f_type_array_uint8ss_append__works(void **state) {
 void test__f_type_array_uint8ss_append__returns_data_not(void **state) {
 
   const int length = 5;
-  f_uint8ss_t source = f_uint8s_t_initialize;
-  f_uint8ss_t destination = f_uint8s_t_initialize;
+  f_uint8s_t source = f_uint8s_t_initialize;
+  f_uint8ss_t destination = f_uint8ss_t_initialize;
 
   {
-    const f_status_t status = f_uint8ss_resize(length, &source);
+    const f_status_t status = f_uint8s_resize(length, &source);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.used, 0);
@@ -83,26 +64,21 @@ void test__f_type_array_uint8ss_append__returns_data_not(void **state) {
     assert_int_equal(status, F_data_not);
     assert_int_equal(destination.used, 0);
     assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
   }
 
   free((void *) source.array);
-  assert_null(destination.array);
 }
 
-void test__f_type_array_uint8ss_append__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8ss_append__parameter_checking(void **state) {
 
-  const int length = 5;
-  f_uint8ss_t data = f_uint8s_t_initialize;
+  f_uint8s_t data = f_uint8s_t_initialize;
 
   {
     const f_status_t status = f_uint8ss_append(data, 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
index 62e245177c2e4c721024bf9f89472cc57b4a9a08..c7f66334fdc1ff03d4457a2de30b35ea08006f22 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint8ss_append__returns_data_not(void **state);
  *
  * @see f_type_array_uint8ss_append()
  */
-extern void test__f_type_array_uint8ss_append__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8ss_append__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_append
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append_all.c
new file mode 100644 (file)
index 0000000..5a4d14d
--- /dev/null
@@ -0,0 +1,105 @@
+#include "test-type_array.h"
+#include "test-type_array-uint8ss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_uint8ss_append_all__works(void **state) {
+
+  const int length = 5;
+  const int length_inner = 2;
+  f_uint8ss_t source = f_uint8ss_t_initialize;
+  f_uint8ss_t destination = f_uint8ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint8ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    for (; source.used < length; ++source.used) {
+
+      const f_status_t status = f_uint8s_resize(length_inner, &source.array[source.used]);
+
+      assert_int_equal(status, F_none);
+
+      for (f_array_length_t i = 0; i < length_inner; ++i) {
+        source.array[source.used].array[source.array[source.used].used++] = i + 1;
+      } // for
+    } // for
+  }
+
+  {
+    const f_status_t status = f_uint8ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_array_length_t i = 0; i < destination.used; ++i) {
+
+      assert_int_equal(destination.array[i].used, length_inner);
+      assert_int_equal(destination.array[i].size, length_inner);
+
+      for (f_array_length_t j = 0; j < length_inner; ++j) {
+        assert_int_equal(destination.array[i].array[j], j + 1);
+      } // for
+    } // for
+  }
+
+  for (f_array_length_t i = 0; i < source.used; ++i) {
+    free((void *) source.array[i].array);
+  } // for
+
+  for (f_array_length_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) source.array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_uint8ss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_uint8ss_t source = f_uint8ss_t_initialize;
+  f_uint8ss_t destination = f_uint8ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint8ss_resize(length, &source);
+
+    assert_int_equal(status, F_none);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_uint8ss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_uint8ss_append_all__parameter_checking(void **state) {
+
+  const f_uint8ss_t data = f_uint8ss_t_initialize;
+
+  {
+    const f_status_t status = f_uint8ss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-uint8ss_append_all.h
new file mode 100644 (file)
index 0000000..8ec2cb0
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__uint8ss_append_all
+#define _TEST__F_type_array__uint8ss_append_all
+
+/**
+ * Test that the function works.
+ *
+ * @see f_type_array_uint8ss_append_all()
+ */
+extern void test__f_type_array_uint8ss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_type_array_uint8ss_append_all()
+ */
+extern void test__f_type_array_uint8ss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_type_array_uint8ss_append_all()
+ */
+extern void test__f_type_array_uint8ss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__uint8ss_append_all
index c8418fbb8cd799b499326d2bbd87549b8b204b9f..b9cca5db9a394fc29ac4ab7d2e16b2e3500ac3cd 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint8ss_decimate_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint8ss_decimate_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
index 70c6812c227bbb65ccae18a4c67beee9c6b3eace..f92c2940503f82780291847e37e9901c84dabbc2 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8ss_decimate_by__works(void **state);
  *
  * @see f_type_array_uint8ss_decimate_by()
  */
-extern void test__f_type_array_uint8ss_decimate_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8ss_decimate_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_decimate_by
index 9c5fac8d86aa9611cf090136b98fafc9e36f9d92..61a91cb51d89e74cabfa054c48e97df9d1c1ecf8 100644 (file)
@@ -29,7 +29,7 @@ void test__f_type_array_uint8ss_decrease_by__works(void **state) {
   assert_null(data.array);
 }
 
-void test__f_type_array_uint8ss_decrease_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
index 21c4271a667e03cec582114774c4350184b4693f..d78af8dc82602ca8f4f868b54bcd9c38488f9ee0 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8ss_decrease_by__works(void **state);
  *
  * @see f_type_array_uint8ss_decrease_by()
  */
-extern void test__f_type_array_uint8ss_decrease_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8ss_decrease_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_decrease_by
index 1f608f78299e39e4345fc168c1e46080460fe2de..99f761228573d30a705a91051932c23b4d0463d9 100644 (file)
@@ -25,7 +25,7 @@ void test__f_type_array_uint8ss_increase__works(void **state) {
 
     assert_int_equal(status, F_none);
     assert_int_equal(data.used, length);
-    assert_int_equal(data.size, length * 2);
+    assert_in_range(data.size, length + 1, length + 1 + F_memory_default_allocation_small_d);
   }
 
   free((void *) data.array);
@@ -55,7 +55,7 @@ void test__f_type_array_uint8ss_increase__returns_data_not(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8ss_increase__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8ss_increase__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
index 88b7ac1c5c8eca0803dbac89dd6742e242c32481..a82b67d4ef2294c8bf1ed8843ba10309d1ca75fb 100644 (file)
@@ -29,6 +29,6 @@ extern void test__f_type_array_uint8ss_increase__returns_data_not(void **state);
  *
  * @see f_type_array_uint8ss_increase()
  */
-extern void test__f_type_array_uint8ss_increase__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8ss_increase__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_increase
index 8bb2b87eedb83363a61aae49238173906b122e8e..2d6e55c1ccaa8ec133e5157029f85e6f58b56c4c 100644 (file)
@@ -31,7 +31,7 @@ void test__f_type_array_uint8ss_increase_by__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8ss_increase_by__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8s_t_initialize;
index 0ab87795a730627216030205f4a95f854b5da5f9..e0bc0ecf5ba744875c1bdc621f26633c6f4e2966 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8ss_increase_by__works(void **state);
  *
  * @see f_type_array_uint8ss_increase_by()
  */
-extern void test__f_type_array_uint8ss_increase_by__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8ss_increase_by__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_increase_by
index c0f346b837f9b5282a71317d9136df58141d4565..251db7571cb81dfde6bbca2d8bf4e2df1512bfe9 100644 (file)
@@ -21,7 +21,7 @@ void test__f_type_array_uint8ss_resize__works(void **state) {
   free((void *) data.array);
 }
 
-void test__f_type_array_uint8ss_resize__fails_on_invalid_parameter(void **state) {
+void test__f_type_array_uint8ss_resize__parameter_checking(void **state) {
 
   const int length = 5;
   f_uint8ss_t data = f_uint8ss_t_initialize;
index b0180491b4c496ea0b3b00a95aa2029b1633716e..69a47186635209fca1112c28a22f13114e659067 100644 (file)
@@ -22,6 +22,6 @@ extern void test__f_type_array_uint8ss_resize__works(void **state);
  *
  * @see f_type_array_uint8ss_resize()
  */
-extern void test__f_type_array_uint8ss_resize__fails_on_invalid_parameter(void **state);
+extern void test__f_type_array_uint8ss_resize__parameter_checking(void **state);
 
 #endif // _TEST__F_type_array__uint8ss_resize
index ce1c7cf736ac0c3f9923faf93ecec997b98f733a..fded1e5948fd85ba22f453eac3dfb2833b2fdec7 100644 (file)
@@ -18,514 +18,621 @@ int main(void) {
 
   const struct CMUnitTest tests[] = {
     cmocka_unit_test(test__f_type_array_array_lengths_adjust__works),
-    cmocka_unit_test(test__f_type_array_array_lengths_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengths_append__works),
-    cmocka_unit_test(test__f_type_array_array_lengths_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_array_lengths_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_array_lengths_append_all__works),
+    cmocka_unit_test(test__f_type_array_array_lengths_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_array_lengths_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_array_lengths_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengths_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_array_lengths_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengths_increase__works),
     cmocka_unit_test(test__f_type_array_array_lengths_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_array_lengths_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengths_increase_by__works),
-    cmocka_unit_test(test__f_type_array_array_lengths_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengths_resize__works),
-    cmocka_unit_test(test__f_type_array_array_lengths_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_array_lengthss_adjust__works),
-    cmocka_unit_test(test__f_type_array_array_lengthss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengthss_append__works),
     cmocka_unit_test(test__f_type_array_array_lengthss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_array_lengthss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_array_lengthss_append_all__works),
+    cmocka_unit_test(test__f_type_array_array_lengthss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_array_lengthss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_array_lengthss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengthss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_array_lengthss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengthss_increase__works),
     cmocka_unit_test(test__f_type_array_array_lengthss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_array_lengthss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengthss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_array_lengthss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_array_lengthss_resize__works),
-    cmocka_unit_test(test__f_type_array_array_lengthss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_cells_adjust__works),
-    cmocka_unit_test(test__f_type_array_cells_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cells_append__works),
-    cmocka_unit_test(test__f_type_array_cells_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_cells_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_cells_append_all__works),
+    cmocka_unit_test(test__f_type_array_cells_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_cells_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_cells_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cells_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_cells_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cells_increase__works),
     cmocka_unit_test(test__f_type_array_cells_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_cells_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cells_increase_by__works),
-    cmocka_unit_test(test__f_type_array_cells_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cells_resize__works),
-    cmocka_unit_test(test__f_type_array_cells_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_cellss_adjust__works),
-    cmocka_unit_test(test__f_type_array_cellss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cellss_append__works),
     cmocka_unit_test(test__f_type_array_cellss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_cellss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_cellss_append_all__works),
+    cmocka_unit_test(test__f_type_array_cellss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_cellss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_cellss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cellss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_cellss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cellss_increase__works),
     cmocka_unit_test(test__f_type_array_cellss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_cellss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cellss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_cellss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_cellss_resize__works),
-    cmocka_unit_test(test__f_type_array_cellss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_fll_ids_adjust__works),
-    cmocka_unit_test(test__f_type_array_fll_ids_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_ids_append__works),
-    cmocka_unit_test(test__f_type_array_fll_ids_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_fll_ids_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_fll_ids_append_all__works),
+    cmocka_unit_test(test__f_type_array_fll_ids_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_fll_ids_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_fll_ids_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_ids_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_fll_ids_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_ids_increase__works),
     cmocka_unit_test(test__f_type_array_fll_ids_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_fll_ids_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_ids_increase_by__works),
-    cmocka_unit_test(test__f_type_array_fll_ids_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_ids_resize__works),
-    cmocka_unit_test(test__f_type_array_fll_ids_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_fll_idss_adjust__works),
-    cmocka_unit_test(test__f_type_array_fll_idss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_idss_append__works),
     cmocka_unit_test(test__f_type_array_fll_idss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_fll_idss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_fll_idss_append_all__works),
+    cmocka_unit_test(test__f_type_array_fll_idss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_idss_increase__works),
     cmocka_unit_test(test__f_type_array_fll_idss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_fll_idss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_idss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_fll_idss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_fll_idss_resize__works),
-    cmocka_unit_test(test__f_type_array_fll_idss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int8s_adjust__works),
-    cmocka_unit_test(test__f_type_array_int8s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8s_append__works),
-    cmocka_unit_test(test__f_type_array_int8s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int8s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int8s_append_all__works),
+    cmocka_unit_test(test__f_type_array_int8s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int8s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int8s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int8s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8s_increase__works),
     cmocka_unit_test(test__f_type_array_int8s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int8s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int8s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8s_resize__works),
-    cmocka_unit_test(test__f_type_array_int8s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int8ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_int8ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8ss_append__works),
     cmocka_unit_test(test__f_type_array_int8ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int8ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int8ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_int8ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int8ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int8ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int8ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8ss_increase__works),
     cmocka_unit_test(test__f_type_array_int8ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int8ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int8ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int8ss_resize__works),
-    cmocka_unit_test(test__f_type_array_int8ss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int16s_adjust__works),
-    cmocka_unit_test(test__f_type_array_int16s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16s_append__works),
-    cmocka_unit_test(test__f_type_array_int16s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int16s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int16s_append_all__works),
+    cmocka_unit_test(test__f_type_array_int16s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int16s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int16s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int16s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16s_increase__works),
     cmocka_unit_test(test__f_type_array_int16s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int16s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int16s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16s_resize__works),
-    cmocka_unit_test(test__f_type_array_int16s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int16ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_int16ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16ss_append__works),
     cmocka_unit_test(test__f_type_array_int16ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int16ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int16ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_int16ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int16ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int16ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int16ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16ss_increase__works),
     cmocka_unit_test(test__f_type_array_int16ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int16ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int16ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int16ss_resize__works),
-    cmocka_unit_test(test__f_type_array_int16ss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int32s_adjust__works),
-    cmocka_unit_test(test__f_type_array_int32s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32s_append__works),
-    cmocka_unit_test(test__f_type_array_int32s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int32s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int32s_append_all__works),
+    cmocka_unit_test(test__f_type_array_int32s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int32s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int32s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int32s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32s_increase__works),
     cmocka_unit_test(test__f_type_array_int32s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int32s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int32s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32s_resize__works),
-    cmocka_unit_test(test__f_type_array_int32s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int32ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_int32ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32ss_append__works),
     cmocka_unit_test(test__f_type_array_int32ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int32ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int32ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_int32ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int32ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int32ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int32ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32ss_increase__works),
     cmocka_unit_test(test__f_type_array_int32ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int32ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int32ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int32ss_resize__works),
-    cmocka_unit_test(test__f_type_array_int32ss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int64s_adjust__works),
-    cmocka_unit_test(test__f_type_array_int64s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64s_append__works),
-    cmocka_unit_test(test__f_type_array_int64s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int64s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int64s_append_all__works),
+    cmocka_unit_test(test__f_type_array_int64s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int64s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int64s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int64s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64s_increase__works),
     cmocka_unit_test(test__f_type_array_int64s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int64s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int64s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64s_resize__works),
-    cmocka_unit_test(test__f_type_array_int64s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int64ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_int64ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64ss_append__works),
     cmocka_unit_test(test__f_type_array_int64ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int64ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int64ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_int64ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int64ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int64ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int64ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64ss_increase__works),
     cmocka_unit_test(test__f_type_array_int64ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int64ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int64ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int64ss_resize__works),
-    cmocka_unit_test(test__f_type_array_int64ss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int128s_adjust__works),
-    cmocka_unit_test(test__f_type_array_int128s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128s_append__works),
-    cmocka_unit_test(test__f_type_array_int128s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int128s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int128s_append_all__works),
+    cmocka_unit_test(test__f_type_array_int128s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int128s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int128s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int128s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128s_increase__works),
     cmocka_unit_test(test__f_type_array_int128s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int128s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int128s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128s_resize__works),
-    cmocka_unit_test(test__f_type_array_int128s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_int128ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_int128ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128ss_append__works),
     cmocka_unit_test(test__f_type_array_int128ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int128ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_int128ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_int128ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_int128ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_int128ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_int128ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128ss_increase__works),
     cmocka_unit_test(test__f_type_array_int128ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_int128ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_int128ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_int128ss_resize__works),
-    cmocka_unit_test(test__f_type_array_int128ss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_states_adjust__works),
-    cmocka_unit_test(test__f_type_array_states_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_states_append__works),
-    cmocka_unit_test(test__f_type_array_states_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_states_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_states_append_all__works),
+    cmocka_unit_test(test__f_type_array_states_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_states_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_states_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_states_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_states_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_states_increase__works),
     cmocka_unit_test(test__f_type_array_states_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_states_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_states_increase_by__works),
-    cmocka_unit_test(test__f_type_array_states_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_states_resize__works),
-    cmocka_unit_test(test__f_type_array_states_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_statess_adjust__works),
-    cmocka_unit_test(test__f_type_array_statess_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statess_append__works),
     cmocka_unit_test(test__f_type_array_statess_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_statess_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_statess_append_all__works),
+    cmocka_unit_test(test__f_type_array_statess_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_statess_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_statess_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statess_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_statess_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statess_increase__works),
     cmocka_unit_test(test__f_type_array_statess_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_statess_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statess_increase_by__works),
-    cmocka_unit_test(test__f_type_array_statess_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statess_resize__works),
-    cmocka_unit_test(test__f_type_array_statess_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_statuss_adjust__works),
-    cmocka_unit_test(test__f_type_array_statuss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statuss_append__works),
-    cmocka_unit_test(test__f_type_array_statuss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_statuss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_statuss_append_all__works),
+    cmocka_unit_test(test__f_type_array_statuss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_statuss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_statuss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statuss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_statuss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statuss_increase__works),
     cmocka_unit_test(test__f_type_array_statuss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_statuss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statuss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_statuss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statuss_resize__works),
-    cmocka_unit_test(test__f_type_array_statuss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_statusss_adjust__works),
-    cmocka_unit_test(test__f_type_array_statusss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statusss_append__works),
     cmocka_unit_test(test__f_type_array_statusss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_statusss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_statusss_append_all__works),
+    cmocka_unit_test(test__f_type_array_statusss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_statusss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_statusss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statusss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_statusss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statusss_increase__works),
     cmocka_unit_test(test__f_type_array_statusss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_statusss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statusss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_statusss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_statusss_resize__works),
-    cmocka_unit_test(test__f_type_array_statusss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint8s_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint8s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8s_append__works),
-    cmocka_unit_test(test__f_type_array_uint8s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint8s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint8s_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint8s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint8s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint8s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint8s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8s_increase__works),
     cmocka_unit_test(test__f_type_array_uint8s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint8s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint8s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8s_resize__works),
-    cmocka_unit_test(test__f_type_array_uint8s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint8ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint8ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8ss_append__works),
     cmocka_unit_test(test__f_type_array_uint8ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint8ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint8ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint8ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8ss_increase__works),
     cmocka_unit_test(test__f_type_array_uint8ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint8ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint8ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint8ss_resize__works),
-    cmocka_unit_test(test__f_type_array_uint8ss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint16s_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint16s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16s_append__works),
-    cmocka_unit_test(test__f_type_array_uint16s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint16s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint16s_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint16s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint16s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint16s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint16s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16s_increase__works),
     cmocka_unit_test(test__f_type_array_uint16s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint16s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint16s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16s_resize__works),
-    cmocka_unit_test(test__f_type_array_uint16s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint16ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint16ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16ss_append__works),
     cmocka_unit_test(test__f_type_array_uint16ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint16ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint16ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint16ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16ss_increase__works),
     cmocka_unit_test(test__f_type_array_uint16ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint16ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint16ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint16ss_resize__works),
-    cmocka_unit_test(test__f_type_array_uint16ss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint32s_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint32s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32s_append__works),
-    cmocka_unit_test(test__f_type_array_uint32s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint32s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint32s_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint32s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint32s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint32s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint32s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32s_increase__works),
     cmocka_unit_test(test__f_type_array_uint32s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint32s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint32s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32s_resize__works),
-    cmocka_unit_test(test__f_type_array_uint32s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint32ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint32ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32ss_append__works),
     cmocka_unit_test(test__f_type_array_uint32ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint32ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint32ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint32ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32ss_increase__works),
     cmocka_unit_test(test__f_type_array_uint32ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint32ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint32ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint32ss_resize__works),
-    cmocka_unit_test(test__f_type_array_uint32ss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint64s_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint64s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64s_append__works),
-    cmocka_unit_test(test__f_type_array_uint64s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint64s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint64s_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint64s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint64s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint64s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint64s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64s_increase__works),
     cmocka_unit_test(test__f_type_array_uint64s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint64s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint64s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64s_resize__works),
-    cmocka_unit_test(test__f_type_array_uint64s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint64ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint64ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64ss_append__works),
     cmocka_unit_test(test__f_type_array_uint64ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint64ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint64ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint64ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64ss_increase__works),
     cmocka_unit_test(test__f_type_array_uint64ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint64ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint64ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint64ss_resize__works),
-    cmocka_unit_test(test__f_type_array_uint64ss_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint128s_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint128s_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128s_append__works),
-    cmocka_unit_test(test__f_type_array_uint128s_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint128s_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint128s_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint128s_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint128s_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint128s_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128s_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint128s_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128s_increase__works),
     cmocka_unit_test(test__f_type_array_uint128s_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint128s_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128s_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint128s_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128s_resize__works),
-    cmocka_unit_test(test__f_type_array_uint128s_resize__fails_on_invalid_parameter),
 
     cmocka_unit_test(test__f_type_array_uint128ss_adjust__works),
-    cmocka_unit_test(test__f_type_array_uint128ss_adjust__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128ss_append__works),
     cmocka_unit_test(test__f_type_array_uint128ss_append__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint128ss_append__fails_on_invalid_parameter),
+    cmocka_unit_test(test__f_type_array_uint128ss_append_all__works),
+    cmocka_unit_test(test__f_type_array_uint128ss_append_all__returns_data_not),
     cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__works),
-    cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__works),
-    cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128ss_increase__works),
     cmocka_unit_test(test__f_type_array_uint128ss_increase__returns_data_not),
-    cmocka_unit_test(test__f_type_array_uint128ss_increase__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128ss_increase_by__works),
-    cmocka_unit_test(test__f_type_array_uint128ss_increase_by__fails_on_invalid_parameter),
     cmocka_unit_test(test__f_type_array_uint128ss_resize__works),
-    cmocka_unit_test(test__f_type_array_uint128ss_resize__fails_on_invalid_parameter),
+
+    #ifndef _di_level_0_parameter_checking_
+      cmocka_unit_test(test__f_type_array_array_lengths_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengths_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengths_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengths_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengths_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengths_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengths_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengths_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_array_lengthss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengthss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengthss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengthss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengthss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengthss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengthss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_array_lengthss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_cells_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cells_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cells_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cells_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cells_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cells_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cells_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cells_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_cellss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cellss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cellss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cellss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cellss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cellss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cellss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_cellss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_fll_ids_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_ids_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_ids_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_ids_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_ids_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_ids_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_ids_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_ids_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_fll_idss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_idss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_idss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_idss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_idss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_idss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_idss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_fll_idss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int8s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int8ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int8ss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int16s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int16ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int16ss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int32s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int32ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int32ss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int64s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int64ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int64ss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int128s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_int128ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_int128ss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_states_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_states_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_states_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_states_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_states_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_states_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_states_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_states_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_statess_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statess_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statess_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statess_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statess_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statess_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statess_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statess_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_statuss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statuss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statuss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statuss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statuss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statuss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statuss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statuss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_statusss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statusss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statusss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statusss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statusss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statusss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statusss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_statusss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint8s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint8ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint8ss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint16s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint16ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint16ss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint32s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint32ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint32ss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint64s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint64ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint64ss_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint128s_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128s_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128s_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128s_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128s_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128s_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128s_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128s_resize__parameter_checking),
+
+      cmocka_unit_test(test__f_type_array_uint128ss_adjust__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128ss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128ss_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128ss_decimate_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128ss_decrease_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128ss_increase__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128ss_increase_by__parameter_checking),
+      cmocka_unit_test(test__f_type_array_uint128ss_resize__parameter_checking),
+    #endif // _di_level_0_parameter_checking_
   };
 
   return cmocka_run_group_tests(tests, setup, setdown);
index 32990594ccb578b380cc43964b847054b11ea2de..4c210fb3dae2b235e43067930c1135bfd97fd971 100644 (file)
@@ -27,6 +27,7 @@
 // Test includes.
 #include "test-type_array-array_lengths_adjust.h"
 #include "test-type_array-array_lengths_append.h"
+#include "test-type_array-array_lengths_append_all.h"
 #include "test-type_array-array_lengths_decimate_by.h"
 #include "test-type_array-array_lengths_decrease_by.h"
 #include "test-type_array-array_lengths_increase.h"
@@ -34,6 +35,7 @@
 #include "test-type_array-array_lengths_resize.h"
 #include "test-type_array-array_lengthss_adjust.h"
 #include "test-type_array-array_lengthss_append.h"
+#include "test-type_array-array_lengthss_append_all.h"
 #include "test-type_array-array_lengthss_decimate_by.h"
 #include "test-type_array-array_lengthss_decrease_by.h"
 #include "test-type_array-array_lengthss_increase.h"
@@ -41,6 +43,7 @@
 #include "test-type_array-array_lengthss_resize.h"
 #include "test-type_array-cells_adjust.h"
 #include "test-type_array-cells_append.h"
+#include "test-type_array-cells_append_all.h"
 #include "test-type_array-cells_decimate_by.h"
 #include "test-type_array-cells_decrease_by.h"
 #include "test-type_array-cells_increase.h"
@@ -48,6 +51,7 @@
 #include "test-type_array-cells_resize.h"
 #include "test-type_array-cellss_adjust.h"
 #include "test-type_array-cellss_append.h"
+#include "test-type_array-cellss_append_all.h"
 #include "test-type_array-cellss_decimate_by.h"
 #include "test-type_array-cellss_decrease_by.h"
 #include "test-type_array-cellss_increase.h"
@@ -55,6 +59,7 @@
 #include "test-type_array-cellss_resize.h"
 #include "test-type_array-fll_ids_adjust.h"
 #include "test-type_array-fll_ids_append.h"
+#include "test-type_array-fll_ids_append_all.h"
 #include "test-type_array-fll_ids_decimate_by.h"
 #include "test-type_array-fll_ids_decrease_by.h"
 #include "test-type_array-fll_ids_increase.h"
@@ -62,6 +67,7 @@
 #include "test-type_array-fll_ids_resize.h"
 #include "test-type_array-fll_idss_adjust.h"
 #include "test-type_array-fll_idss_append.h"
+#include "test-type_array-fll_idss_append_all.h"
 #include "test-type_array-fll_idss_decimate_by.h"
 #include "test-type_array-fll_idss_decrease_by.h"
 #include "test-type_array-fll_idss_increase.h"
@@ -69,6 +75,7 @@
 #include "test-type_array-fll_idss_resize.h"
 #include "test-type_array-int8s_adjust.h"
 #include "test-type_array-int8s_append.h"
+#include "test-type_array-int8s_append_all.h"
 #include "test-type_array-int8s_decimate_by.h"
 #include "test-type_array-int8s_decrease_by.h"
 #include "test-type_array-int8s_increase.h"
@@ -76,6 +83,7 @@
 #include "test-type_array-int8s_resize.h"
 #include "test-type_array-int8ss_adjust.h"
 #include "test-type_array-int8ss_append.h"
+#include "test-type_array-int8ss_append_all.h"
 #include "test-type_array-int8ss_decimate_by.h"
 #include "test-type_array-int8ss_decrease_by.h"
 #include "test-type_array-int8ss_increase.h"
@@ -83,6 +91,7 @@
 #include "test-type_array-int8ss_resize.h"
 #include "test-type_array-int16s_adjust.h"
 #include "test-type_array-int16s_append.h"
+#include "test-type_array-int16s_append_all.h"
 #include "test-type_array-int16s_decimate_by.h"
 #include "test-type_array-int16s_decrease_by.h"
 #include "test-type_array-int16s_increase.h"
@@ -90,6 +99,7 @@
 #include "test-type_array-int16s_resize.h"
 #include "test-type_array-int16ss_adjust.h"
 #include "test-type_array-int16ss_append.h"
+#include "test-type_array-int16ss_append_all.h"
 #include "test-type_array-int16ss_decimate_by.h"
 #include "test-type_array-int16ss_decrease_by.h"
 #include "test-type_array-int16ss_increase.h"
 #include "test-type_array-int16ss_resize.h"
 #include "test-type_array-int32s_adjust.h"
 #include "test-type_array-int32s_append.h"
+#include "test-type_array-int32s_append_all.h"
 #include "test-type_array-int32s_decimate_by.h"
 #include "test-type_array-int32s_decrease_by.h"
 #include "test-type_array-int32s_increase.h"
 #include "test-type_array-int32s_resize.h"
 #include "test-type_array-int32ss_adjust.h"
 #include "test-type_array-int32ss_append.h"
+#include "test-type_array-int32ss_append_all.h"
 #include "test-type_array-int32ss_decimate_by.h"
 #include "test-type_array-int32ss_decrease_by.h"
 #include "test-type_array-int32ss_increase.h"
 #include "test-type_array-int32ss_resize.h"
 #include "test-type_array-int64s_adjust.h"
 #include "test-type_array-int64s_append.h"
+#include "test-type_array-int64s_append_all.h"
 #include "test-type_array-int64s_decimate_by.h"
 #include "test-type_array-int64s_decrease_by.h"
 #include "test-type_array-int64s_increase.h"
 #include "test-type_array-int64s_resize.h"
 #include "test-type_array-int64ss_adjust.h"
 #include "test-type_array-int64ss_append.h"
+#include "test-type_array-int64ss_append_all.h"
 #include "test-type_array-int64ss_decimate_by.h"
 #include "test-type_array-int64ss_decrease_by.h"
 #include "test-type_array-int64ss_increase.h"
 #include "test-type_array-int64ss_resize.h"
 #include "test-type_array-int128s_adjust.h"
 #include "test-type_array-int128s_append.h"
+#include "test-type_array-int128s_append_all.h"
 #include "test-type_array-int128s_decimate_by.h"
 #include "test-type_array-int128s_decrease_by.h"
 #include "test-type_array-int128s_increase.h"
 #include "test-type_array-int128s_resize.h"
 #include "test-type_array-int128ss_adjust.h"
 #include "test-type_array-int128ss_append.h"
+#include "test-type_array-int128ss_append_all.h"
 #include "test-type_array-int128ss_decimate_by.h"
 #include "test-type_array-int128ss_decrease_by.h"
 #include "test-type_array-int128ss_increase.h"
 #include "test-type_array-int128ss_resize.h"
 #include "test-type_array-states_adjust.h"
 #include "test-type_array-states_append.h"
+#include "test-type_array-states_append_all.h"
 #include "test-type_array-states_decimate_by.h"
 #include "test-type_array-states_decrease_by.h"
 #include "test-type_array-states_increase.h"
 #include "test-type_array-states_resize.h"
 #include "test-type_array-statess_adjust.h"
 #include "test-type_array-statess_append.h"
+#include "test-type_array-statess_append_all.h"
 #include "test-type_array-statess_decimate_by.h"
 #include "test-type_array-statess_decrease_by.h"
 #include "test-type_array-statess_increase.h"
 #include "test-type_array-statess_resize.h"
 #include "test-type_array-statuss_adjust.h"
 #include "test-type_array-statuss_append.h"
+#include "test-type_array-statuss_append_all.h"
 #include "test-type_array-statuss_decimate_by.h"
 #include "test-type_array-statuss_decrease_by.h"
 #include "test-type_array-statuss_increase.h"
 #include "test-type_array-statuss_resize.h"
 #include "test-type_array-statusss_adjust.h"
 #include "test-type_array-statusss_append.h"
+#include "test-type_array-statusss_append_all.h"
 #include "test-type_array-statusss_decimate_by.h"
 #include "test-type_array-statusss_decrease_by.h"
 #include "test-type_array-statusss_increase.h"
 #include "test-type_array-statusss_resize.h"
 #include "test-type_array-uint8s_adjust.h"
 #include "test-type_array-uint8s_append.h"
+#include "test-type_array-uint8s_append_all.h"
 #include "test-type_array-uint8s_decimate_by.h"
 #include "test-type_array-uint8s_decrease_by.h"
 #include "test-type_array-uint8s_increase.h"
 #include "test-type_array-uint8s_resize.h"
 #include "test-type_array-uint8ss_adjust.h"
 #include "test-type_array-uint8ss_append.h"
+#include "test-type_array-uint8ss_append_all.h"
 #include "test-type_array-uint8ss_decimate_by.h"
 #include "test-type_array-uint8ss_decrease_by.h"
 #include "test-type_array-uint8ss_increase.h"
 #include "test-type_array-uint8ss_resize.h"
 #include "test-type_array-uint16s_adjust.h"
 #include "test-type_array-uint16s_append.h"
+#include "test-type_array-uint16s_append_all.h"
 #include "test-type_array-uint16s_decimate_by.h"
 #include "test-type_array-uint16s_decrease_by.h"
 #include "test-type_array-uint16s_increase.h"
 #include "test-type_array-uint16s_resize.h"
 #include "test-type_array-uint16ss_adjust.h"
 #include "test-type_array-uint16ss_append.h"
+#include "test-type_array-uint16ss_append_all.h"
 #include "test-type_array-uint16ss_decimate_by.h"
 #include "test-type_array-uint16ss_decrease_by.h"
 #include "test-type_array-uint16ss_increase.h"
 #include "test-type_array-uint16ss_resize.h"
 #include "test-type_array-uint32s_adjust.h"
 #include "test-type_array-uint32s_append.h"
+#include "test-type_array-uint32s_append_all.h"
 #include "test-type_array-uint32s_decimate_by.h"
 #include "test-type_array-uint32s_decrease_by.h"
 #include "test-type_array-uint32s_increase.h"
 #include "test-type_array-uint32s_resize.h"
 #include "test-type_array-uint32ss_adjust.h"
 #include "test-type_array-uint32ss_append.h"
+#include "test-type_array-uint32ss_append_all.h"
 #include "test-type_array-uint32ss_decimate_by.h"
 #include "test-type_array-uint32ss_decrease_by.h"
 #include "test-type_array-uint32ss_increase.h"
 #include "test-type_array-uint32ss_resize.h"
 #include "test-type_array-uint64s_adjust.h"
 #include "test-type_array-uint64s_append.h"
+#include "test-type_array-uint64s_append_all.h"
 #include "test-type_array-uint64s_decimate_by.h"
 #include "test-type_array-uint64s_decrease_by.h"
 #include "test-type_array-uint64s_increase.h"
 #include "test-type_array-uint64s_resize.h"
 #include "test-type_array-uint64ss_adjust.h"
 #include "test-type_array-uint64ss_append.h"
+#include "test-type_array-uint64ss_append_all.h"
 #include "test-type_array-uint64ss_decimate_by.h"
 #include "test-type_array-uint64ss_decrease_by.h"
 #include "test-type_array-uint64ss_increase.h"
 #include "test-type_array-uint64ss_resize.h"
 #include "test-type_array-uint128s_adjust.h"
 #include "test-type_array-uint128s_append.h"
+#include "test-type_array-uint128s_append_all.h"
 #include "test-type_array-uint128s_decimate_by.h"
 #include "test-type_array-uint128s_decrease_by.h"
 #include "test-type_array-uint128s_increase.h"
 #include "test-type_array-uint128s_resize.h"
 #include "test-type_array-uint128ss_adjust.h"
 #include "test-type_array-uint128ss_append.h"
+#include "test-type_array-uint128ss_append_all.h"
 #include "test-type_array-uint128ss_decimate_by.h"
 #include "test-type_array-uint128ss_decrease_by.h"
 #include "test-type_array-uint128ss_increase.h"
index fe639e2468ed6396bcc95e2e86f624b23175711e..507daa979ec345abb92620f9033b8aee9aac5def 100644 (file)
@@ -75,17 +75,16 @@ extern "C" {
 #if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) || !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_)
   f_status_t private_f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) {
 
-    f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_utf_string_t), (void **) & dynamic->string);
+    const f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_utf_string_t), (void **) & dynamic->string);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      dynamic->size = length;
+    dynamic->size = length;
 
-      if (dynamic->used > dynamic->size) {
-        dynamic->used = length;
-      }
+    if (dynamic->used > dynamic->size) {
+      dynamic->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_) || !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_)
 
@@ -108,16 +107,15 @@ extern "C" {
   f_status_t private_f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) {
 
     const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_utf_string_t), (void **) & dynamic->string);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      dynamic->size = length;
+    dynamic->size = length;
 
-      if (dynamic->used > dynamic->size) {
-        dynamic->used = length;
-      }
+    if (dynamic->used > dynamic->size) {
+      dynamic->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_append_assure_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_append_assure_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(f_utf_string_dynamic_partial_append) || !defined(_di_f_utf_string_dynamic_partial_append_assure_) || !defined(_di_f_utf_string_dynamic_partial_mash_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_map_multis_append_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_mash_) || !defined(_di_f_utf_string_maps_append_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_triples_append_)
 
@@ -137,16 +135,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(dynamics->size, length, sizeof(f_utf_string_dynamic_t), (void **) & dynamics->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      dynamics->size = length;
+    dynamics->size = length;
 
-      if (dynamics->used > dynamics->size) {
-        dynamics->used = length;
-      }
+    if (dynamics->used > dynamics->size) {
+      dynamics->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_dynamics_adjust_) || !defined(_di_f_utf_string_dynamics_append_) || !defined(_di_f_utf_string_dynamics_decimate_by_) || !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_append_)
 
@@ -189,16 +186,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(dynamics->size, length, sizeof(f_utf_string_dynamic_t), (void **) & dynamics->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      dynamics->size = length;
+    dynamics->size = length;
 
-      if (dynamics->used > dynamics->size) {
-        dynamics->used = length;
-      }
+    if (dynamics->used > dynamics->size) {
+      dynamics->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_dynamics_decrease_by_) || !defined(_di_f_utf_string_dynamics_increase_) || !defined(_di_f_utf_string_dynamics_increase_by_)
 
@@ -221,16 +217,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(map_multis->size, length, sizeof(f_utf_string_map_multi_t), (void **) & map_multis->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      map_multis->size = length;
+    map_multis->size = length;
 
-      if (map_multis->used > map_multis->size) {
-        map_multis->used = length;
-      }
+    if (map_multis->used > map_multis->size) {
+      map_multis->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_map_multis_adjust_) || !defined(_di_f_utf_string_map_multis_decimate_by_)
 
@@ -253,16 +248,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(map_multis->size, length, sizeof(f_utf_string_map_multi_t), (void **) & map_multis->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      map_multis->size = length;
+    map_multis->size = length;
 
-      if (map_multis->used > map_multis->size) {
-        map_multis->used = length;
-      }
+    if (map_multis->used > map_multis->size) {
+      map_multis->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_map_multis_decrease_by_) || !defined(_di_f_utf_string_map_multis_increase_) || !defined(_di_f_utf_string_map_multis_increase_by_) || !defined(_di_f_utf_string_map_multis_terminate_) || !defined(_di_f_utf_string_map_multis_terminate_after_)
 
@@ -285,16 +279,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(maps->size, length, sizeof(f_utf_string_map_t), (void **) & maps->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      maps->size = length;
+    maps->size = length;
 
-      if (maps->used > maps->size) {
-        maps->used = length;
-      }
+    if (maps->used > maps->size) {
+      maps->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_maps_adjust_) || !defined(_di_f_utf_string_maps_decimate_by_)
 
@@ -317,16 +310,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(maps->size, length, sizeof(f_utf_string_map_t), (void **) & maps->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      maps->size = length;
+    maps->size = length;
 
-      if (maps->used > maps->size) {
-        maps->used = length;
-      }
+    if (maps->used > maps->size) {
+      maps->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_maps_decrease_by_) || !defined(_di_f_utf_string_maps_increase_) || !defined(_di_f_utf_string_maps_increase_by_) || !defined(_di_f_utf_string_maps_terminate_) || !defined(_di_f_utf_string_maps_terminate_after_)
 
@@ -351,6 +343,7 @@ extern "C" {
     }
 
     destination->used = destination->used + length;
+
     return F_none;
   }
 #endif // !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_)
@@ -443,16 +436,15 @@ extern "C" {
     } // for
 
     status = f_memory_adjust(triples->size, length, sizeof(f_utf_string_triple_t), (void **) & triples->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      triples->size = length;
+    triples->size = length;
 
-      if (triples->used > triples->size) {
-        triples->used = length;
-      }
+    if (triples->used > triples->size) {
+      triples->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_triples_adjust_) || !defined(_di_f_utf_string_triples_decimate_by_)
 
@@ -478,16 +470,15 @@ extern "C" {
     } // for
 
     status = f_memory_resize(triples->size, length, sizeof(f_utf_string_triple_t), (void **) & triples->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      triples->size = length;
+    triples->size = length;
 
-      if (triples->used > triples->size) {
-        triples->used = length;
-      }
+    if (triples->used > triples->size) {
+      triples->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // !defined(_di_f_utf_string_triples_decrease_) || !defined(_di_f_utf_string_triples_decrease_by_) || !defined(_di_f_utf_string_triples_increase_) || !defined(_di_f_utf_string_triples_increase_by_) || !defined(_di_f_utf_string_triples_terminate_) || !defined(_di_f_utf_string_triples_terminate_after_)
 
index 27f2c49713b055a2521008b0671fe8515f6b627a..79c0a42fff494ae47b05ebe1ea644ed400907426 100644 (file)
@@ -10,7 +10,7 @@ extern "C" {
   f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quoted, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) {
 
     f_status_t status = F_none;
-    f_string_range_t destination_range = macro_f_string_range_t_initialize(destination->used);
+    f_string_range_t destination_range = macro_f_string_range_t_initialize2(destination->used);
     f_array_length_t i = 0;
 
     uint8_t width = 0;
@@ -188,7 +188,7 @@ extern "C" {
   f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) {
 
     f_status_t status = F_none;
-    f_string_range_t destination_range = macro_f_string_range_t_initialize(destination->used);
+    f_string_range_t destination_range = macro_f_string_range_t_initialize2(destination->used);
     f_array_length_t i = 0;
 
     uint8_t width = 0;
index 8e6382e0b27ef687078e4b3a5dcdc70fa2f03ed5..51e5fb50a05df579b3a7293791ad4fbd4a3d89db 100644 (file)
@@ -158,7 +158,7 @@ extern "C" {
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = 0;
-    f_string_range_t range = macro_f_string_range_t_initialize(object.used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(object.used);
 
     status = fl_fss_basic_object_write(object, quote, f_fss_complete_full_e, state, &range, destination);
 
index e660048e73ccfc3ce06700563db219b5062f5b43..f19a4dde41c86940b9f34e3ea4d7c0f35150ba68 100644 (file)
@@ -135,7 +135,7 @@ extern "C" {
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = 0;
-    f_string_range_t range = macro_f_string_range_t_initialize(object.used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(object.used);
 
     status = fl_fss_basic_list_object_write(object, f_fss_complete_full_e, state, &range, destination);
 
index b83899f7022ec2e3e64937243dfe1e6f96d12f17..006b1d1824477d020894e9f2196a42913a7f23c1 100644 (file)
@@ -132,7 +132,7 @@ extern "C" {
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = 0;
-    f_string_range_t range = macro_f_string_range_t_initialize(object.used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(object.used);
 
     status = fl_fss_embedded_list_object_write(object, f_fss_complete_full_e, state, &range, destination);
 
index d8ec86656edb9a9e927ef56ebba4ec46e4008dc2..98ad6bd735b4d37fcabeeb5f04b01f7fbf4a9c11 100644 (file)
@@ -197,7 +197,7 @@ extern "C" {
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = 0;
-    f_string_range_t range = macro_f_string_range_t_initialize(object.used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(object.used);
 
     status = fl_fss_extended_object_write(object, quote, f_fss_complete_full_e, state, &range, destination);
 
index a6df5f436453faa9a97ac636218e038d2a66f3c4..4c7e85b61c2b481c3d79ac09023d73f5048a61f1 100644 (file)
@@ -132,7 +132,7 @@ extern "C" {
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = 0;
-    f_string_range_t range = macro_f_string_range_t_initialize(object.used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(object.used);
 
     status = fl_fss_extended_list_object_write(object, f_fss_complete_full_e, state, &range, destination);
 
index 10ea51098926c5e28635e821bab7f5c4df3a5d71..35a14006d0cfdf2edd5acb17cab2d857fd1750e7 100644 (file)
@@ -183,7 +183,7 @@ extern "C" {
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = 0;
-    f_string_range_t range = macro_f_string_range_t_initialize(object.used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(object.used);
 
     status = fl_fss_basic_list_object_write(object, trim ? f_fss_complete_full_trim_e : f_fss_complete_full_e, state, &range, destination);
 
index 43061e4a282d241e48150a82add2bb21535b9753..08d8755994fe2c65432501ae70b5f5bbda3c0094 100644 (file)
@@ -13,7 +13,7 @@ extern "C" {
       if (escaped->used > escaped->size) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
-    const f_string_range_t range = macro_f_string_range_t_initialize(content.used);
+    const f_string_range_t range = macro_f_string_range_t_initialize2(content.used);
 
     return private_fll_iki_content_partial_escape(content, range, quote.string[0], escaped);
   }
@@ -55,7 +55,7 @@ extern "C" {
       if (unescaped->used > unescaped->size) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
-    const f_string_range_t range = macro_f_string_range_t_initialize(content.used);
+    const f_string_range_t range = macro_f_string_range_t_initialize2(content.used);
 
     return private_fll_iki_content_partial_unescape(content, range, quote.string[0], unescaped);
   }
index 532e229cc24100a521776dbcdd53c91f26b4fbcf..4b8016e70960857707a212c74285ec58c65ec6dc 100644 (file)
@@ -331,7 +331,7 @@ extern "C" {
 
     {
       f_state_t state = macro_f_state_t_initialize(control_allocation_large_d, control_allocation_small_d, 0, &control_signal_state_interrupt_fss, 0, (void *) main, 0);
-      f_string_range_t range_packet = macro_f_string_range_t_initialize(data->cache.large.used);
+      f_string_range_t range_packet = macro_f_string_range_t_initialize2(data->cache.large.used);
 
       status = fll_fss_basic_list_read(data->cache.large, state, &range_packet, &data->cache.packet_objects, &data->cache.packet_contents, &data->cache.delimits, 0, 0);
       if (F_status_is_error(status)) return status;
index 0dd3bce7330851b033e972f370c49b9dac0338c5..a5846261f49604f1a5ddabe2728f293090931053 100644 (file)
@@ -29,19 +29,16 @@ extern "C" {
 #ifndef _di_controller_pids_resize_
   f_status_t controller_pids_resize(const f_array_length_t length, controller_pids_t * const pids) {
 
-    f_status_t status = F_none;
-
-    status = f_memory_resize(pids->size, length, sizeof(controller_rule_t), (void **) & pids->array);
+    const f_status_t status = f_memory_resize(pids->size, length, sizeof(controller_rule_t), (void **) & pids->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      pids->size = length;
+    pids->size = length;
 
-      if (pids->used > pids->size) {
-        pids->used = length;
-      }
+    if (pids->used > pids->size) {
+      pids->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_controller_pids_resize_
 
@@ -114,9 +111,9 @@ extern "C" {
     } // for
 
     status = f_memory_resize(processs->size, length, sizeof(controller_process_t), (void **) & processs->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status) && length) {
-
+    if (length) {
       controller_process_t *process = 0;
 
       // The lock must be initialized, but only once, so initialize immediately upon allocation.
@@ -147,11 +144,10 @@ extern "C" {
 
           return status;
         }
-        else {
-          for (f_array_length_t i = 0; i < controller_rule_action_type__enum_size_e; ++i) {
-            process->rule.status[i] = F_known_not;
-          } // for
-        }
+
+        for (f_array_length_t i = 0; i < controller_rule_action_type__enum_size_e; ++i) {
+          process->rule.status[i] = F_known_not;
+        } // for
       } // for
 
       processs->size = length;
@@ -161,7 +157,7 @@ extern "C" {
       }
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_controller_processs_resize_
 
index 8fbc54bb6a3b5a60ec7a0d27a475844dc13c9afe..a638272a373f617f27ceedcea54cabcd83830175 100644 (file)
@@ -155,16 +155,15 @@ extern "C" {
     } // for
 
     const f_status_t status = f_memory_resize(ons->size, length, sizeof(controller_rule_on_t), (void **) & ons->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      ons->size = length;
+    ons->size = length;
 
-      if (ons->used > ons->size) {
-        ons->used = length;
-      }
+    if (ons->used > ons->size) {
+      ons->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_controller_rule_ons_resize_
 
@@ -204,16 +203,15 @@ extern "C" {
     } // for
 
     const f_status_t status = f_memory_resize(rules->size, length, sizeof(controller_rule_t), (void **) & rules->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      rules->size = length;
+    rules->size = length;
 
-      if (rules->used > rules->size) {
-        rules->used = length;
-      }
+    if (rules->used > rules->size) {
+      rules->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_controller_rules_resize_
 
index c86ae4618ea4f28eaa769afa94569d0ab5c6471f..08f5396fc57afd58c8441a2364f97ffb2e438682 100644 (file)
@@ -112,16 +112,15 @@ extern "C" {
     } // for
 
     const f_status_t status = f_memory_resize(tasks->size, length, sizeof(controller_task_t), (void **) & tasks->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      tasks->size = length;
+    tasks->size = length;
 
-      if (tasks->used > tasks->size) {
-        tasks->used = length;
-      }
+    if (tasks->used > tasks->size) {
+      tasks->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_controller_tasks_resize_
 
index 7e815054071516831d4e4447e4a966d4102bb012..77c60d740cb3a7ad17f6929394688db606d379fb 100644 (file)
@@ -207,7 +207,7 @@ extern "C" {
 
     if (F_status_is_error_not(status)) {
       f_number_unsigned_t number = 0;
-      f_string_range_t range = macro_f_string_range_t_initialize(pid_buffer.used);
+      f_string_range_t range = macro_f_string_range_t_initialize2(pid_buffer.used);
 
       for (; range.start < pid_buffer.used; ++range.start) {
         if (!isspace(pid_buffer.string[range.start])) break;
@@ -260,7 +260,7 @@ extern "C" {
 
     if (F_status_is_error_not(status)) {
       f_number_unsigned_t number = 0;
-      f_string_range_t range = macro_f_string_range_t_initialize(pid_buffer.used);
+      f_string_range_t range = macro_f_string_range_t_initialize2(pid_buffer.used);
 
       for (; range.start < pid_buffer.used; ++range.start) {
         if (!isspace(pid_buffer.string[range.start])) break;
@@ -362,7 +362,7 @@ extern "C" {
     }
 
     if (destination->used >= setting->path_current.used) {
-      const f_string_range_t range = macro_f_string_range_t_initialize(setting->path_current.used);
+      const f_string_range_t range = macro_f_string_range_t_initialize2(setting->path_current.used);
 
       if (fl_string_dynamic_partial_compare(*destination, setting->path_current, range, range) == F_equal_to) {
         f_array_length_t length = destination->used - setting->path_current.used;
index 6b98acd87c32124566e48aa3d1404f7e6fb48d95..8a4e5ebcf0b5e575b9d1f9cbd48a28036f2c9398 100644 (file)
@@ -1642,7 +1642,7 @@ extern "C" {
       if (cache->buffer_file.used) {
         controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_entry, global.thread);
         f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
-        f_string_range_t range = macro_f_string_range_t_initialize(cache->buffer_file.used);
+        f_string_range_t range = macro_f_string_range_t_initialize2(cache->buffer_file.used);
 
         status = fll_fss_basic_list_read(cache->buffer_file, state, &range, &cache->object_items, &cache->content_items, &cache->delimits, 0, &cache->comments);
 
index 33155949c5d761505b216644a09f61feb3e53b4d..ef932beb015186996cf3831c094b70de6a83d5c5 100644 (file)
@@ -418,7 +418,7 @@ extern "C" {
             state.step_small = controller_common_allocation_iki_small_d;
             state.interrupt = &controller_thread_signal_state_iki;
 
-            f_string_range_t range_iki = macro_f_string_range_t_initialize(actions->array[actions->used].parameters.array[0].used);
+            f_string_range_t range_iki = macro_f_string_range_t_initialize2(actions->array[actions->used].parameters.array[0].used);
 
             status = fl_iki_read(state, &actions->array[actions->used].parameters.array[0], &range_iki, &actions->array[actions->used].ikis.array[0]);
 
@@ -729,7 +729,7 @@ extern "C" {
             state.step_small = controller_common_allocation_iki_small_d;
             state.interrupt = &controller_thread_signal_state_iki;
 
-            f_string_range_t range_iki = macro_f_string_range_t_initialize(actions->array[actions->used].parameters.array[0].used);
+            f_string_range_t range_iki = macro_f_string_range_t_initialize2(actions->array[actions->used].parameters.array[0].used);
 
             status = fl_iki_read(state, &actions->array[actions->used].parameters.array[0], &range_iki, &actions->array[actions->used].ikis.array[0]);
 
@@ -928,7 +928,7 @@ extern "C" {
     status = f_string_maps_append_all(source.parameter, &destination->parameter);
     if (F_status_is_error(status)) return status;
 
-    status = f_string_dynamics_append(source.environment, &destination->environment);
+    status = f_string_dynamics_append_all(source.environment, &destination->environment);
     if (F_status_is_error(status)) return status;
 
     if (source.ons.used) {
@@ -944,21 +944,21 @@ extern "C" {
         if (source.ons.array[i].need.used) {
           destination->ons.array[i].need.used = 0;
 
-          status = f_string_dynamics_append(source.ons.array[i].need, &destination->ons.array[i].need);
+          status = f_string_dynamics_append_all(source.ons.array[i].need, &destination->ons.array[i].need);
           if (F_status_is_error(status)) return status;
         }
 
         if (source.ons.array[i].want.used) {
           destination->ons.array[i].want.used = 0;
 
-          status = f_string_dynamics_append(source.ons.array[i].want, &destination->ons.array[i].want);
+          status = f_string_dynamics_append_all(source.ons.array[i].want, &destination->ons.array[i].want);
           if (F_status_is_error(status)) return status;
         }
 
         if (source.ons.array[i].wish.used) {
           destination->ons.array[i].wish.used = 0;
 
-          status = f_string_dynamics_append(source.ons.array[i].wish, &destination->ons.array[i].wish);
+          status = f_string_dynamics_append_all(source.ons.array[i].wish, &destination->ons.array[i].wish);
           if (F_status_is_error(status)) return status;
         }
       } // for
@@ -966,7 +966,7 @@ extern "C" {
       destination->ons.used = source.ons.used;
     }
 
-    status = f_int32s_append(source.affinity, &destination->affinity);
+    status = f_int32s_append_all(source.affinity, &destination->affinity);
     if (F_status_is_error(status)) return status;
 
     if (source.capability) {
@@ -977,7 +977,7 @@ extern "C" {
     status = f_control_group_copy(source.cgroup, &destination->cgroup);
     if (F_status_is_error(status)) return status;
 
-    status = f_int32s_append(source.groups, &destination->groups);
+    status = f_int32s_append_all(source.groups, &destination->groups);
     if (F_status_is_error(status)) return status;
 
     status = f_limit_sets_copy(source.limits, &destination->limits);
@@ -1017,6 +1017,7 @@ extern "C" {
         if (F_status_is_error(status)) return status;
 
         for (j = 0; j < controller_rule_action_type_execute__enum_size_e; ++j) {
+
           item_destination->reruns[j].is = item_source->reruns[j].is;
           item_destination->reruns[j].failure.count = item_source->reruns[j].failure.count;
           item_destination->reruns[j].failure.delay = item_source->reruns[j].failure.delay;
@@ -1038,10 +1039,10 @@ extern "C" {
           action_destination->parameters.used = 0;
           action_destination->ikis.used = 0;
 
-          status = f_string_dynamics_append(action_source->parameters, &action_destination->parameters);
+          status = f_string_dynamics_append_all(action_source->parameters, &action_destination->parameters);
           if (F_status_is_error(status)) return status;
 
-          status = f_iki_datas_append(action_source->ikis, &action_destination->ikis);
+          status = f_iki_datas_append_all(action_source->ikis, &action_destination->ikis);
           if (F_status_is_error(status)) return status;
         } // for
 
@@ -2343,7 +2344,7 @@ extern "C" {
     f_status_t status = F_none;
     controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread);
     f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
-    f_string_range_t range = macro_f_string_range_t_initialize(cache->buffer_item.used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(cache->buffer_item.used);
     f_array_length_t last = 0;
 
     uint8_t type = 0;
@@ -3808,7 +3809,7 @@ extern "C" {
       if (cache->buffer_file.used) {
         controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread);
         f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
-        f_string_range_t range = macro_f_string_range_t_initialize(cache->buffer_file.used);
+        f_string_range_t range = macro_f_string_range_t_initialize2(cache->buffer_file.used);
 
         status = fll_fss_basic_list_read(cache->buffer_file, state, &range, &cache->object_items, &cache->content_items, &cache->delimits, 0, &cache->comments);
 
@@ -3968,7 +3969,7 @@ extern "C" {
     f_status_t status = F_none;
     f_status_t status_return = F_none;
 
-    f_string_range_t range = macro_f_string_range_t_initialize(cache->buffer_item.used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(cache->buffer_item.used);
     f_string_range_t range2 = f_string_range_t_initialize;
 
     {
index ced35c531eebcaef5c2cd05fb33bc9d05c128b93..504c0fd4c9c2c137af29b7f07814dae965d3b32f 100644 (file)
@@ -202,19 +202,21 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_capability_copy().
  *   Errors (with error bit) from: f_control_group_copy().
+ *   Errors (with error bit) from: f_iki_datas_append_all().
+ *   Errors (with error bit) from: f_int32s_append_all().
  *   Errors (with error bit) from: f_limit_sets_copy().
  *   Errors (with error bit) from: f_string_dynamic_append().
- *   Errors (with error bit) from: f_string_dynamics_append().
+ *   Errors (with error bit) from: f_string_dynamics_append_all().
  *   Errors (with error bit) from: f_string_maps_append_all().
- *   Errors (with error bit) from: f_int32s_append().
  *
  *  @see f_capability_copy()
  *  @see f_control_group_copy()
+ *  @see f_iki_datas_append_all()
+ *  @see f_int32s_append_all()
  *  @see f_limit_sets_append()
  *  @see f_string_dynamic_append()
- *  @see f_string_dynamics_append()
+ *  @see f_string_dynamics_append_all()
  *  @see f_string_maps_append_all()
- *  @see f_int32s_append()
  */
 #ifndef _di_controller_rule_copy_
   extern f_status_t controller_rule_copy(const controller_rule_t source, controller_rule_t *destination) F_attribute_visibility_internal_d;
index 1699d0fa3cd810607139112f18fdc4769ca47ec9..8bc3fa259ae3c3f583c96b39d0abd4cc0478b9f0 100644 (file)
@@ -105,7 +105,7 @@ extern "C" {
       }
 
       if (F_status_is_error_not(*status)) {
-        f_string_range_t range = macro_f_string_range_t_initialize(buffer.used);
+        f_string_range_t range = macro_f_string_range_t_initialize2(buffer.used);
         f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
 
         {
index 4f04124fdd41a3a756ee941ef2a8b35f9dd3c332..6396e8499129cd0deede1511941defe061e4aaee 100644 (file)
@@ -48,7 +48,7 @@ extern "C" {
     f_fss_contents_t list_contents = f_fss_contents_t_initialize;
 
     {
-      f_string_range_t range = macro_f_string_range_t_initialize(data_make->buffer.used);
+      f_string_range_t range = macro_f_string_range_t_initialize2(data_make->buffer.used);
       f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
       f_fss_comments_t comments = f_fss_comments_t_initialize;
 
index ffd4ddfd0fab947fc3949f1d8759159edf133c7d..f9b79c9140a5ddc6a497b328ed55e8f306402f1d 100644 (file)
@@ -156,9 +156,9 @@ extern "C" {
     const f_string_static_t vocabulary_define = macro_f_string_static_t_initialize2(F_iki_vocabulary_0002_define_s, F_iki_vocabulary_0002_define_s_length);
     const f_string_static_t vocabulary_parameter = macro_f_string_static_t_initialize2(F_iki_vocabulary_0002_parameter_s, F_iki_vocabulary_0002_parameter_s_length);
 
-    const f_string_range_t range_context = macro_f_string_range_t_initialize(F_iki_vocabulary_0002_context_s_length);
-    const f_string_range_t range_define = macro_f_string_range_t_initialize(F_iki_vocabulary_0002_define_s_length);
-    const f_string_range_t range_parameter = macro_f_string_range_t_initialize(F_iki_vocabulary_0002_parameter_s_length);
+    const f_string_range_t range_context = macro_f_string_range_t_initialize2(F_iki_vocabulary_0002_context_s_length);
+    const f_string_range_t range_define = macro_f_string_range_t_initialize2(F_iki_vocabulary_0002_define_s_length);
+    const f_string_range_t range_parameter = macro_f_string_range_t_initialize2(F_iki_vocabulary_0002_parameter_s_length);
 
     f_iki_data_t iki_data = f_iki_data_t_initialize;
 
index 615614048e4d23b6f90a296b72750f78e1bc1849..f7b152be8e127b087b3167b08a01d0bc7cbbcb76 100644 (file)
@@ -26,7 +26,7 @@ extern "C" {
       return F_status_set_error(F_false);
     }
 
-    const f_string_range_t range = macro_f_string_range_t_initialize(data_make->path.stack.array[0].used);
+    const f_string_range_t range = macro_f_string_range_t_initialize2(data_make->path.stack.array[0].used);
 
     if (range.start <= range.stop) {
       status = fl_string_dynamic_partial_compare(data_make->path.stack.array[0], data_make->path_cache, range, range);
index fae9d9e13df10bd4d5135fafae7a7cc03cc7b06b..06361a98065b4ca9ecbd1e22548fdf75079b1da4 100644 (file)
@@ -619,7 +619,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
 
               {
                 f_state_t state = f_state_t_initialize;
-                f_string_range_t input = macro_f_string_range_t_initialize(local_buffer.used);
+                f_string_range_t input = macro_f_string_range_t_initialize2(local_buffer.used);
 
                 status = fll_fss_basic_read(local_buffer, state, &input, &basic_objects, &basic_contents, 0, &delimits, 0);
               }
@@ -1193,7 +1193,7 @@ f_status_t firewall_buffer_rules(firewall_main_t * const main, const f_string_st
 
   {
     f_state_t state = f_state_t_initialize;
-    f_string_range_t input = macro_f_string_range_t_initialize(local->buffer.used);
+    f_string_range_t input = macro_f_string_range_t_initialize2(local->buffer.used);
 
     status = fll_fss_basic_list_read(local->buffer, state, &input, &local->chain_objects, &local->chain_contents, &delimits, 0, &comments);
   }
index 3393043bdba2e9f6fa392f6fc5b254bb6e31e898..3bee387581144960b7980d21b591e7a445c1311b 100644 (file)
@@ -456,7 +456,7 @@ extern "C" {
               --length;
             }
 
-            f_string_range_t range = macro_f_string_range_t_initialize(length);
+            f_string_range_t range = macro_f_string_range_t_initialize2(length);
 
             // Ignore leading plus sign.
             if (data.argv[index].string[0] == f_string_ascii_plus_s.string[0]) {
index 0a3a246464190417c8de6fc5a06b58edca6e7f78..f706c11bc385e598e1ec4f554ba011026673c72c 100644 (file)
@@ -44,16 +44,15 @@ extern "C" {
     } // for
 
     const f_status_t status = f_memory_resize(depths->size, length, sizeof(fss_basic_list_read_depth_t), (void **) & depths->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      depths->size = length;
+    depths->size = length;
 
-      if (depths->used > depths->size) {
-        depths->used = length;
-      }
+    if (depths->used > depths->size) {
+      depths->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_fss_basic_list_read_depths_resize_
 
index 704a32aaf1e706f76a8928d2550cf0336e1536a7..0778eafb5dac3ceacc3e2c3fb8cab77f9da91cec 100644 (file)
@@ -244,7 +244,7 @@ extern "C" {
   f_status_t fss_basic_list_read_load(fll_program_data_t * const main, fss_basic_list_read_data_t * const data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_basic_list_read_common_allocation_large_d, fss_basic_list_read_common_allocation_small_d, 0, 0, 0, 0, 0);
-    f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
+    f_string_range_t input = macro_f_string_range_t_initialize2(data->buffer.used);
 
     data->delimits_object.used = 0;
     data->delimits_content.used = 0;
index df2fe435ba5f3d5d4728d555fccb04365782a607..62ce652ce59218943685dbd82958c292de3281c8 100644 (file)
@@ -326,7 +326,7 @@ extern "C" {
         const f_array_length_t index = main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.used - 1];
 
         if (main->parameters.arguments.array[index].used) {
-          f_string_range_t range = macro_f_string_range_t_initialize(main->parameters.arguments.array[index].used);
+          f_string_range_t range = macro_f_string_range_t_initialize2(main->parameters.arguments.array[index].used);
 
           for (; range.start < main->parameters.arguments.array[index].used; ++range.start) {
 
index 46d18c4259a8c5938f62925b9a095cda6979b5ce..654c9da24ebd86fca028ecfc0b374064c0b7ba1c 100644 (file)
@@ -451,7 +451,7 @@ extern "C" {
               --length;
             }
 
-            f_string_range_t range = macro_f_string_range_t_initialize(length);
+            f_string_range_t range = macro_f_string_range_t_initialize2(length);
 
             // Ignore leading plus sign.
             if (data.argv[index].string[0] == f_string_ascii_plus_s.string[0]) {
index 1961d073e17231b3521a536901324dd65dab74ec..37a08b9a41390a7031c8f037e1f4dac26d755db7 100644 (file)
@@ -43,16 +43,15 @@ extern "C" {
     } // for
 
     const f_status_t status = f_memory_resize(depths->size, length, sizeof(fss_basic_read_depth_t), (void **) & depths->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      depths->size = length;
+    depths->size = length;
 
-      if (depths->used > depths->size) {
-        depths->used = length;
-      }
+    if (depths->used > depths->size) {
+      depths->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_fss_basic_read_depths_resize_
 
index c58189c8175ae6cb89c4c042300940169e76577a..3c033ca7b87749f946e7aaf95e4e95af03096a49 100644 (file)
@@ -212,7 +212,7 @@ extern "C" {
   f_status_t fss_basic_read_load(fll_program_data_t * const main, fss_basic_read_data_t * const data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_basic_read_common_allocation_large_d, fss_basic_read_common_allocation_small_d, 0, 0, 0, 0, 0);
-    f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
+    f_string_range_t input = macro_f_string_range_t_initialize2(data->buffer.used);
 
     data->delimits.used = 0;
     data->quotes.used = 0;
index 92c08bef804a3e67d4cdd9ad6e1872fb11563369..b9a980631f8376da8849f122e37cd1f33b3b97b2 100644 (file)
@@ -325,7 +325,7 @@ extern "C" {
 
         // Even though this standard does not utilize this parameter, provide the validation for consistency.
         if (argv[index].used) {
-          f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
+          f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
 
           for (; range.start < argv[index].used; ++range.start) {
 
index de023961c587bd9231d16d61dea1db4485cea745..ad65cd987c6525ecf63b00695c02a4bf01e2f1c6 100644 (file)
@@ -374,7 +374,7 @@ extern "C" {
               --length;
             }
 
-            f_string_range_t range = macro_f_string_range_t_initialize(length);
+            f_string_range_t range = macro_f_string_range_t_initialize2(length);
 
             // Ignore leading plus sign.
             if (argv[index].string[0] == f_string_ascii_plus_s.string[0]) {
index 901abc307481bb781d191b5c16bfd38db75fb37c..a0c4eee1866be17e1b455e8647c0fa31f1732abb 100644 (file)
@@ -240,7 +240,7 @@ extern "C" {
 
     {
       f_state_t state = macro_f_state_t_initialize(fss_embedded_list_read_common_allocation_large_d, fss_embedded_list_read_common_allocation_small_d, 0, 0, 0, 0, 0);
-      f_string_range_t input = macro_f_string_range_t_initialize(main->buffer.used);
+      f_string_range_t input = macro_f_string_range_t_initialize2(main->buffer.used);
 
       objects_delimits->used = 0;
       contents_delimits->used = 0;
index 718da78f50d344d0cbccd3b32b6bb10e59721be2..fd9e082397c746cd782ed499488d1b3aeae7f3eb 100644 (file)
@@ -327,7 +327,7 @@ extern "C" {
         const f_array_length_t index = main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.used - 1];
 
         if (argv[index].used) {
-          f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
+          f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
 
           for (; range.start < argv[index].used; ++range.start) {
 
index 7dbfd1959a16157ab4cfd738f6a7b9d6ebc053d5..fd33c887487531e41196120f0f69ebabe1005f8c 100644 (file)
@@ -451,7 +451,7 @@ extern "C" {
               --length;
             }
 
-            f_string_range_t range = macro_f_string_range_t_initialize(length);
+            f_string_range_t range = macro_f_string_range_t_initialize2(length);
 
             // Ignore leading plus sign.
             if (data.argv[index].string[0] == f_string_ascii_plus_s.string[0]) {
index a9862584f078d5ab074cb2f7b956ea9d3d7ca927..083e43b980f54e50dc3c7d7d92995a3d811c1d9f 100644 (file)
@@ -44,16 +44,15 @@ extern "C" {
     } // for
 
     const f_status_t status = f_memory_resize(depths->size, length, sizeof(fss_extended_list_read_depth_t), (void **) & depths->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      depths->size = length;
+    depths->size = length;
 
-      if (depths->used > depths->size) {
-        depths->used = length;
-      }
+    if (depths->used > depths->size) {
+      depths->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_fss_extended_list_read_depths_resize_
 
index f298769b9851b574ec904fb1b07b371966a91674..134d73b43d894594d71fd2ea2cf87fb78ff3b81e 100644 (file)
@@ -234,7 +234,7 @@ extern "C" {
   f_status_t fss_extended_list_read_load(fll_program_data_t * const main, fss_extended_list_read_data_t * const data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_extended_list_read_common_allocation_large_d, fss_extended_list_read_common_allocation_small_d, 0, 0, 0, 0, 0);
-    f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
+    f_string_range_t input = macro_f_string_range_t_initialize2(data->buffer.used);
 
     data->delimits_object.used = 0;
     data->delimits_content.used = 0;
index 4304d2e648fe168fc61b080e83d50da2ef6aeff0..16cd23c489bff049529835a1dfc4299f6087e2d1 100644 (file)
@@ -326,7 +326,7 @@ extern "C" {
         const f_array_length_t index = main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.used - 1];
 
         if (argv[index].used) {
-          f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
+          f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
 
           for (; range.start < argv[index].used; ++range.start) {
 
index becbad10ff7d958fbdcfc28c885ae664fe09a5c1..36e9e55cab51f6fc9a75afe9e375dba7ddfed5d9 100644 (file)
@@ -454,7 +454,7 @@ extern "C" {
               --length;
             }
 
-            f_string_range_t range = macro_f_string_range_t_initialize(length);
+            f_string_range_t range = macro_f_string_range_t_initialize2(length);
 
             // Ignore leading plus sign.
             if (data.argv[index].string[0] == f_string_ascii_plus_s.string[0]) {
index 9e850e69c32d3b9d1e0f5acbf105559d0e56f109..7c9f9f45231e20698b08f4da00a73728951be128 100644 (file)
@@ -45,16 +45,15 @@ extern "C" {
     } // for
 
     const f_status_t status = f_memory_resize(depths->size, length, sizeof(fss_extended_read_depth_t), (void **) & depths->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      depths->size = length;
+    depths->size = length;
 
-      if (depths->used > depths->size) {
-        depths->used = length;
-      }
+    if (depths->used > depths->size) {
+      depths->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_fss_extended_read_depths_resize_
 
index c9d4c5c0e57fcdbd8a11010a235edbea755f6c17..d23d8d4688277c4661b50ddb5b6e9abd8160c431 100644 (file)
@@ -247,7 +247,7 @@ extern "C" {
   f_status_t fss_extended_read_load(fll_program_data_t * const main, fss_extended_read_data_t * const data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_extended_read_common_allocation_large_d, fss_extended_read_common_allocation_small_d, 0, 0, 0, 0, 0);
-    f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
+    f_string_range_t input = macro_f_string_range_t_initialize2(data->buffer.used);
 
     data->delimits_object.used = 0;
     data->delimits_content.used = 0;
index 3bf4f47dca8faa62136bc6d6a973b4c2e38a7f01..fa2d301789dc1f9724b3dc4c9505da4a8b0cbaab 100644 (file)
@@ -337,7 +337,7 @@ extern "C" {
 
         // Even though this standard does not utilize this parameter, provide the validation for consistency.
         if (argv[index].used) {
-          f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
+          f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
 
           for (; range.start < argv[index].used; ++range.start) {
 
index 0a77e9453aebf0e2a75ffe369bd407c7eabe8f0a..233a04ce1104cae823371f75998291352ca78147 100644 (file)
@@ -229,7 +229,7 @@ extern "C" {
       else if (main->parameters.array[fss_identify_parameter_name_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[fss_identify_parameter_name_e].values.array[main->parameters.array[fss_identify_parameter_name_e].values.used - 1];
         const f_array_length_t length = data.argv[index].used;
-        const f_string_range_t range = macro_f_string_range_t_initialize(length);
+        const f_string_range_t range = macro_f_string_range_t_initialize2(length);
 
         if (length == 0) {
           flockfile(main->error.to.stream);
index e397fd1199f08120792a026df4ea2de5cd6e749a..ed623ffef1b62d387b4a22441de52f18bee10b58 100644 (file)
@@ -156,7 +156,7 @@ extern "C" {
 
     if (mode) {
       f_array_length_t number = 0;
-      f_string_range_t range = macro_f_string_range_t_initialize(data->name.used);
+      f_string_range_t range = macro_f_string_range_t_initialize2(data->name.used);
 
       for (f_array_length_t i = 0; i < data->name.used; ++i) {
 
index a21240d3f785d6aebf629e58ec2e90898e33fcd7..5f9ac54b0cea9fa640957453937517c3a208f811 100644 (file)
@@ -474,7 +474,7 @@ extern "C" {
               --length;
             }
 
-            f_string_range_t range = macro_f_string_range_t_initialize(length);
+            f_string_range_t range = macro_f_string_range_t_initialize2(length);
 
             // Ignore leading plus sign.
             if (data.argv[index].string[0] == f_string_ascii_plus_s.string[0]) {
index af4159537e39f73005516be62fcbc63ad6db6776..b7191026de7e143847e04e9e606ebec35d6208a5 100644 (file)
@@ -50,16 +50,15 @@ extern "C" {
     } // for
 
     const f_status_t status = f_memory_resize(depths->size, length, sizeof(fss_payload_read_depth_t), (void **) & depths->array);
+    if (F_status_is_error(status)) return status;
 
-    if (F_status_is_error_not(status)) {
-      depths->size = length;
+    depths->size = length;
 
-      if (depths->used > depths->size) {
-        depths->used = length;
-      }
+    if (depths->used > depths->size) {
+      depths->used = length;
     }
 
-    return status;
+    return F_none;
   }
 #endif // _di_fss_payload_read_depths_resize_
 
index 47e0f45bd83b5df3fd5081ad09a62da677782c5d..7efc8a8c37fe1c00c0f618db1f713f59d720120e 100644 (file)
@@ -243,7 +243,7 @@ extern "C" {
   f_status_t fss_payload_read_load(fll_program_data_t * const main, fss_payload_read_data_t * const data) {
 
     f_state_t state = macro_f_state_t_initialize(fss_payload_read_common_allocation_large_d, fss_payload_read_common_allocation_small_d, 0, 0, 0, 0, 0);
-    f_string_range_t input = macro_f_string_range_t_initialize(data->buffer.used);
+    f_string_range_t input = macro_f_string_range_t_initialize2(data->buffer.used);
 
     data->delimits_object.used = 0;
     data->delimits_content.used = 0;
index 2b5756ad8e0d4de7a66ab22a3177eb543b5dac6d..d35c01ca40cf0dc6e197726e24ecc9822f317086 100644 (file)
@@ -330,7 +330,7 @@ extern "C" {
         const f_array_length_t index = main->parameters.array[fss_payload_write_parameter_prepend_e].values.array[main->parameters.array[fss_payload_write_parameter_prepend_e].values.used - 1];
 
         if (argv[index].used) {
-          f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
+          f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
 
           for (; range.start < argv[index].used; range.start++) {
 
index eabeb71d39e08ca98c38a4241541903f4b4bf624..a0071ea16f3a95c332eea532f3814c1e8d80bed1 100644 (file)
@@ -23,7 +23,7 @@ extern "C" {
         f_print_dynamic(substitutions.array[i].with, main->output.to.stream);
       }
       else {
-        f_string_range_t range = macro_f_string_range_t_initialize2(iki_data.variable.array[index].start, iki_data.content.array[index].start - 1);
+        f_string_range_t range = macro_f_string_range_t_initialize(iki_data.variable.array[index].start, iki_data.content.array[index].start - 1);
 
         f_print_dynamic_partial(main->buffer, range, main->output.to.stream);
 
index f126463e607b1fb28005d946ae51ebce35a09154..40874db8fa8dfd97485be6c4d9028a42b9347820 100644 (file)
@@ -42,7 +42,7 @@ extern "C" {
     f_iki_data_t iki_data = f_iki_data_t_initialize;
 
     if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) {
-      f_string_range_t buffer_range = macro_f_string_range_t_initialize(main->buffer.used);
+      f_string_range_t buffer_range = macro_f_string_range_t_initialize2(main->buffer.used);
 
       status = iki_read_process_at(main, &buffer_range);
 
@@ -69,7 +69,7 @@ extern "C" {
       status = iki_read_process_buffer_total(main, &iki_data);
     }
     else {
-      f_string_range_t buffer_range = macro_f_string_range_t_initialize(main->buffer.used);
+      f_string_range_t buffer_range = macro_f_string_range_t_initialize2(main->buffer.used);
 
       status = iki_read_process_at(main, &buffer_range);
 
@@ -332,7 +332,7 @@ extern "C" {
         } // for
 
         if (name_missed) {
-          macro_f_memory_structure_increment(status, names, 1, F_iki_default_allocation_step_d, macro_f_string_dynamics_t_resize, F_array_too_large);
+          macro_f_memory_structure_increment(status, names, 1, F_iki_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
 
           if (F_status_is_error(status)) {
             fll_error_print(main->error, F_status_set_fine(status), "macro_f_memory_structure_increment", F_true);
@@ -454,7 +454,7 @@ extern "C" {
   f_status_t iki_read_process_buffer_total(iki_read_main_t * const main, f_iki_data_t *iki_data) {
 
     f_status_t status = F_none;
-    f_string_range_t range = macro_f_string_range_t_initialize(main->buffer.used);
+    f_string_range_t range = macro_f_string_range_t_initialize2(main->buffer.used);
 
     status = iki_read_process_at(main, &range);
 
@@ -579,7 +579,7 @@ extern "C" {
       for (j = 0; j < vocabulary->used; ++j) {
 
         if (fl_string_dynamic_partial_compare_string(main->parameters.arguments.array[index].string, main->buffer, main->parameters.arguments.array[index].used, vocabulary->array[j]) == F_equal_to) {
-          macro_f_memory_structure_increment(status, substitutionss[j], 1, F_iki_default_allocation_step_d, macro_iki_read_substitutions_t_resize, F_array_too_large);
+          macro_f_memory_structure_increment(status, substitutionss[j], 1, F_iki_default_allocation_small_d, macro_iki_read_substitutions_t_resize, F_array_too_large);
           if (F_status_is_error(status)) return status;
 
           index = parameter->values.array[i + 1];