]> Kevux Git Server - fll/commitdiff
Update: Add missing array types for time and date structures.
authorKevin Day <Kevin@kevux.org>
Thu, 4 Dec 2025 05:44:57 +0000 (23:44 -0600)
committerKevin Day <Kevin@kevux.org>
Thu, 4 Dec 2025 05:44:57 +0000 (23:44 -0600)
Update the build files.
Add unit tests.

39 files changed:
build/disable/level_0/f_type.h
build/disable/level_0/f_type_array.h
build/disable/level_2/fll_program.h
build/level_0/settings
build/monolithic/settings
build/stand_alone/byte_dump.config.h
build/stand_alone/byte_dump.settings
build/stand_alone/example.config.h
build/stand_alone/example.settings
build/stand_alone/fake.config.h
build/stand_alone/fake.settings
build/stand_alone/utf8.config.h
build/stand_alone/utf8.settings
level_0/f_type/c/type.h
level_0/f_type/c/type/date.h [new file with mode: 0644]
level_0/f_type/c/type/time.h
level_0/f_type/data/build/settings
level_0/f_type_array/c/type_array.h
level_0/f_type_array/c/type_array/date.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/date.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/time.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/time.h [new file with mode: 0644]
level_0/f_type_array/data/build/settings
level_0/f_type_array/data/build/settings-mocks
level_0/f_type_array/data/build/settings-tests
level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array.c
level_0/f_type_array/tests/unit/c/test-type_array.h

index 1af95d426eda476c8c70d3ec09b3ee62d77942af..f67c90297dccc216bfa4afd6b9240a43197fed94 100644 (file)
@@ -3,7 +3,11 @@
 #define _di_f_cells_t_
 #define _di_f_cellss_t_
 #define _di_f_date_simple_t_
+#define _di_f_date_simples_t_
+#define _di_f_date_simpless_t_
 #define _di_f_date_t_
+#define _di_f_dates_t_
+#define _di_f_datess_t_
 #define _di_f_file_t_
 #define _di_f_files_t_
 #define _di_f_filess_t_
@@ -55,6 +59,8 @@
 #define _di_f_statusss_t_
 #define _di_f_time_part_t_
 #define _di_f_time_simple_t_
+#define _di_f_time_simples_t_
+#define _di_f_time_simpless_t_
 #define _di_f_time_spec_t_
 #define _di_f_time_t_
 #define _di_f_time_value_t_
index 0906e755de8f109da24eb3795f9055ed3e270d08..e56505295f64f724b78f73fd4911479db9e6990a 100644 (file)
@@ -1,5 +1,9 @@
 #define _di_f_cellss_delete_callback_
 #define _di_f_cellss_destroy_callback_
+#define _di_f_date_simpless_delete_callback_
+#define _di_f_date_simpless_destroy_callback_
+#define _di_f_datess_delete_callback_
+#define _di_f_datess_destroy_callback_
 #define _di_f_filess_delete_callback_
 #define _di_f_filess_destroy_callback_
 #define _di_f_fll_ids_delete_callback_
@@ -53,6 +57,8 @@
 #define _di_f_statess_destroy_callback_
 #define _di_f_statusss_delete_callback_
 #define _di_f_statusss_destroy_callback_
+#define _di_f_time_simpless_delete_callback_
+#define _di_f_time_simpless_destroy_callback_
 #define _di_f_uidss_delete_callback_
 #define _di_f_uidss_destroy_callback_
 #define _di_f_uint128ss_delete_callback_
index 2d8c200cad3032e1b086f16fc2cf50b34e5c099d..2ea1b9b4550db983882962b55505c4b2ae92f7b6 100644 (file)
@@ -40,6 +40,8 @@
 #define _di_fll_program_print_error_parameter_process_
 #define _di_fll_program_print_error_parameter_range_start_before_stop_
 #define _di_fll_program_print_error_parameter_support_not_
+#define _di_fll_program_print_error_parameter_too_few_
+#define _di_fll_program_print_error_parameter_too_many_
 #define _di_fll_program_print_error_parameter_value_too_long_
 #define _di_fll_program_print_error_pipe_invalid_form_feed_
 #define _di_fll_program_print_error_pipe_missing_content_
index 1c61246074e02ff9099ef719aede2cef727e87f5..3f88db5527fa51a1bc6f9d928c0a133e7a7274dd 100644 (file)
@@ -77,7 +77,7 @@ build_sources_library string/map_multi.c string/map_multis.c string/map_multiss.
 build_sources_library string/static.c string/statics.c string/staticss.c
 build_sources_library string/triple.c string/triples.c string/tripless.c
 build_sources_library time.c
-build_sources_library type_array/cell.c type_array/file.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/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.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/cell.c type_array/date.c type_array/file.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/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/time.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
 build_sources_library utf.c private-utf.c private-utf_alphabetic.c private-utf_combining.c private-utf_control.c private-utf_digit.c private-utf_emoji.c private-utf_numeric.c private-utf_phonetic.c private-utf_private.c private-utf_punctuation.c private-utf_subscript.c private-utf_superscript.c private-utf_symbol.c private-utf_unassigned.c private-utf_valid.c private-utf_whitespace.c private-utf_wide.c private-utf_word.c private-utf_zero_width.c
 build_sources_library utf/common.c utf/convert.c
 build_sources_library utf/dynamic.c utf/dynamics.c utf/dynamicss.c
@@ -136,8 +136,8 @@ build_sources_headers string/map_multi.h string/map_multis.h string/map_multiss.
 build_sources_headers string/static.h string/statics.h string/staticss.h
 build_sources_headers string/triple.h string/triples.h string/tripless.h
 build_sources_headers time.h time/common.h
-build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h type/void.h
-build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.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/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.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 type.h type/cell.h type/date.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h type/void.h
+build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/date.h type_array/file.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/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/time.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/convert.h utf/dynamic.h utf/dynamics.h utf/dynamicss.h utf/is.h utf/is_character.h utf/map.h utf/maps.h utf/mapss.h utf/map_multi.h utf/map_multis.h utf/map_multiss.h utf/static.h utf/statics.h utf/staticss.h utf/string.h utf/triple.h utf/triples.h utf/tripless.h
 
 build_sources_headers-thread thread.h
index 895026727db364eaed63a324c706f1079d7b9552..ea6658f4fb0f322d2f45614861221323543883b9 100644 (file)
@@ -77,7 +77,7 @@ build_sources_library level_0/string/map_multi.c level_0/string/map_multis.c lev
 build_sources_library level_0/string/static.c level_0/string/statics.c level_0/string/staticss.c
 build_sources_library level_0/string/triple.c level_0/string/triples.c level_0/string/tripless.c
 build_sources_library level_0/time.c
-build_sources_library level_0/type_array/cell.c level_0/type_array/file.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/number_signed.c level_0/type_array/number_unsigned.c level_0/type_array/pid.c level_0/type_array/poll.c level_0/type_array/quantity.c level_0/type_array/quantitys.c level_0/type_array/quantityss.c level_0/type_array/range.c level_0/type_array/ranges.c level_0/type_array/rangess.c level_0/type_array/range_double.c level_0/type_array/range_doubles.c level_0/type_array/range_doubless.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/cell.c level_0/type_array/date.c level_0/type_array/file.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/number_signed.c level_0/type_array/number_unsigned.c level_0/type_array/pid.c level_0/type_array/poll.c level_0/type_array/quantity.c level_0/type_array/quantitys.c level_0/type_array/quantityss.c level_0/type_array/range.c level_0/type_array/ranges.c level_0/type_array/rangess.c level_0/type_array/range_double.c level_0/type_array/range_doubles.c level_0/type_array/range_doubless.c level_0/type_array/state.c level_0/type_array/status.c level_0/type_array/time.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/utf.c level_0/private-utf.c level_0/private-utf_alphabetic.c level_0/private-utf_combining.c level_0/private-utf_control.c level_0/private-utf_digit.c level_0/private-utf_emoji.c level_0/private-utf_numeric.c level_0/private-utf_phonetic.c level_0/private-utf_private.c level_0/private-utf_punctuation.c level_0/private-utf_subscript.c level_0/private-utf_superscript.c level_0/private-utf_symbol.c level_0/private-utf_unassigned.c level_0/private-utf_valid.c level_0/private-utf_whitespace.c level_0/private-utf_wide.c level_0/private-utf_word.c level_0/private-utf_zero_width.c
 build_sources_library level_0/utf/common.c level_0/utf/convert.c
 build_sources_library level_0/utf/dynamic.c level_0/utf/dynamics.c level_0/utf/dynamicss.c
@@ -157,8 +157,8 @@ build_sources_headers level_0/string/map_multi.h level_0/string/map_multis.h lev
 build_sources_headers level_0/string/static.h level_0/string/statics.h level_0/string/staticss.h
 build_sources_headers level_0/string/triple.h level_0/string/triples.h level_0/string/tripless.h
 build_sources_headers level_0/time.h level_0/time/common.h
-build_sources_headers level_0/type.h level_0/type/cell.h level_0/type/file.h level_0/type/fll.h level_0/type/mode.h level_0/type/number.h level_0/type/pid.h level_0/type/quantity.h level_0/type/range.h level_0/type/range_double.h level_0/type/state.h level_0/type/status.h level_0/type/time.h level_0/type/void.h
-build_sources_headers level_0/type_array.h level_0/type_array_file.h level_0/type_array/common.h level_0/type_array/cell.h level_0/type_array/file.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/number_signed.h level_0/type_array/number_unsigned.h level_0/type_array/pid.h level_0/type_array/poll.h level_0/type_array/quantity.h level_0/type_array/quantitys.h level_0/type_array/quantityss.h level_0/type_array/range.h level_0/type_array/ranges.h level_0/type_array/rangess.h level_0/type_array/range_double.h level_0/type_array/range_doubles.h level_0/type_array/range_doubless.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/type.h level_0/type/cell.h level_0/type/date.h level_0/type/file.h level_0/type/fll.h level_0/type/mode.h level_0/type/number.h level_0/type/pid.h level_0/type/quantity.h level_0/type/range.h level_0/type/range_double.h level_0/type/state.h level_0/type/status.h level_0/type/time.h level_0/type/void.h
+build_sources_headers level_0/type_array.h level_0/type_array_file.h level_0/type_array/common.h level_0/type_array/cell.h level_0/type_array/date.h level_0/type_array/file.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/number_signed.h level_0/type_array/number_unsigned.h level_0/type_array/pid.h level_0/type_array/poll.h level_0/type_array/quantity.h level_0/type_array/quantitys.h level_0/type_array/quantityss.h level_0/type_array/range.h level_0/type_array/ranges.h level_0/type_array/rangess.h level_0/type_array/range_double.h level_0/type_array/range_doubles.h level_0/type_array/range_doubless.h level_0/type_array/state.h level_0/type_array/status.h level_0/type_array/time.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/convert.h level_0/utf/dynamic.h level_0/utf/dynamics.h level_0/utf/dynamicss.h level_0/utf/is.h level_0/utf/is_character.h level_0/utf/map.h level_0/utf/maps.h level_0/utf/mapss.h level_0/utf/map_multi.h level_0/utf/map_multis.h level_0/utf/map_multiss.h level_0/utf/static.h level_0/utf/statics.h level_0/utf/staticss.h level_0/utf/string.h level_0/utf/triple.h level_0/utf/triples.h level_0/utf/tripless.h
 
 build_sources_headers level_1/control_group.h
index a2b887db3b96b35e29dd655a344a24b0a754e30c..8590bf0accd842eff2df85e473e96ea0bad32f5b 100644 (file)
 //#define _di_f_conversion_number_unsigned_print_
 //#define _di_f_conversion_number_unsigned_to_string_
 #define _di_f_date_simple_t_
+#define _di_f_date_simples_t_
+#define _di_f_date_simpless_delete_callback_
+#define _di_f_date_simpless_destroy_callback_
+#define _di_f_date_simpless_t_
 #define _di_f_date_t_
+#define _di_f_dates_t_
+#define _di_f_datess_delete_callback_
+#define _di_f_datess_destroy_callback_
+#define _di_f_datess_t_
 #define _di_f_file_access_
 #define _di_f_file_access_at_
 #define _di_f_file_access_mode_d_
 #define _di_f_statess_delete_callback_
 #define _di_f_statess_destroy_callback_
 #define _di_f_statess_t_
-//#define _di_f_status_e_
 //#define _di_f_status_debug_d_
+//#define _di_f_status_e_
 //#define _di_f_status_mask_d_
 //#define _di_f_status_t_
 #define _di_f_statuss_t_
 #define _di_f_thread_mutex_attributess_t_
 #define _di_f_thread_mutex_consistent_
 #define _di_f_thread_mutex_create_
-#define _di_f_thread_mutex_d_
 #define _di_f_thread_mutex_delete_
 #define _di_f_thread_mutex_full_delete_
 #define _di_f_thread_mutex_full_t_
 #define _di_f_thread_unlock_
 #define _di_f_time_part_t_
 #define _di_f_time_simple_t_
+#define _di_f_time_simples_t_
+#define _di_f_time_simpless_delete_callback_
+#define _di_f_time_simpless_destroy_callback_
+#define _di_f_time_simpless_t_
 #define _di_f_time_spec_t_
 #define _di_f_time_t_
 #define _di_f_time_value_t_
 //#define _di_fl_print_warning_s_
 //#define _di_fll_error_file_flag_e_
 //#define _di_fll_error_file_print_
+#define _di_fll_error_file_print_one_
+#define _di_fll_error_file_print_simple_
 //#define _di_fll_error_file_type_directory_s_
 //#define _di_fll_error_file_type_e_
 //#define _di_fll_error_file_type_file_s_
index 778e38db66e96618c7aea20aff2fb29ad17715b7..a3e9d23be46f7181973fd62af8ce5a5391e4ad43 100644 (file)
@@ -50,7 +50,7 @@ build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_
 build_sources_program fll/level_0/signal.c
 build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c
 build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c
-build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c  fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c  fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
+build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/date.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c  fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c  fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/time.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
 build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c
 build_sources_program fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c
index ff0fd661ce876919fd210a987d28c947c06d2922..f7c5f31371a9f10a9c810244c909dd3eb8644f73 100644 (file)
 //#define _di_f_conversion_number_unsigned_print_
 //#define _di_f_conversion_number_unsigned_to_string_
 #define _di_f_date_simple_t_
+#define _di_f_date_simples_t_
+#define _di_f_date_simpless_delete_callback_
+#define _di_f_date_simpless_destroy_callback_
+#define _di_f_date_simpless_t_
 #define _di_f_date_t_
+#define _di_f_dates_t_
+#define _di_f_datess_delete_callback_
+#define _di_f_datess_destroy_callback_
+#define _di_f_datess_t_
 #define _di_f_file_access_
 #define _di_f_file_access_at_
 #define _di_f_file_access_mode_d_
 #define _di_f_statess_delete_callback_
 #define _di_f_statess_destroy_callback_
 #define _di_f_statess_t_
-//#define _di_f_status_e_
 //#define _di_f_status_debug_d_
+//#define _di_f_status_e_
 //#define _di_f_status_mask_d_
 //#define _di_f_status_t_
 #define _di_f_statuss_t_
 #define _di_f_thread_mutex_attributess_t_
 #define _di_f_thread_mutex_consistent_
 #define _di_f_thread_mutex_create_
-#define _di_f_thread_mutex_d_
 #define _di_f_thread_mutex_delete_
 #define _di_f_thread_mutex_full_delete_
 #define _di_f_thread_mutex_full_t_
 #define _di_f_time_of_day_set_
 #define _di_f_time_part_t_
 #define _di_f_time_simple_t_
+#define _di_f_time_simples_t_
+#define _di_f_time_simpless_delete_callback_
+#define _di_f_time_simpless_destroy_callback_
+#define _di_f_time_simpless_t_
 #define _di_f_time_sleep_spec_
 #define _di_f_time_spec_millisecond_
 #define _di_f_time_spec_nanosecond_
 //#define _di_fl_print_warning_s_
 //#define _di_fll_error_file_flag_e_
 //#define _di_fll_error_file_print_
+#define _di_fll_error_file_print_one_
+#define _di_fll_error_file_print_simple_
 //#define _di_fll_error_file_type_directory_s_
 //#define _di_fll_error_file_type_e_
 //#define _di_fll_error_file_type_file_s_
index cb1455fa19c3aa329ec9aa4354564ed5ffc7d8b2..be47945969629fc93c998b95e19c14cec028d1a6 100644 (file)
@@ -50,7 +50,7 @@ build_sources_program fll/level_0/rip.c fll/level_0/rip/utf.c fll/level_0/privat
 build_sources_program fll/level_0/signal.c
 build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c
 build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c
-build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c  fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c  fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
+build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/date.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c  fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c  fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/time.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
 build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c
 build_sources_program fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c
index c0499681530eab999877aca602f482e655319aff..4816557189387664d27a9ca5ff9b3ce0feaa8a47 100644 (file)
 //#define _di_f_conversion_number_unsigned_print_
 //#define _di_f_conversion_number_unsigned_to_string_
 #define _di_f_date_simple_t_
+#define _di_f_date_simples_t_
+#define _di_f_date_simpless_delete_callback_
+#define _di_f_date_simpless_destroy_callback_
+#define _di_f_date_simpless_t_
 #define _di_f_date_t_
+#define _di_f_dates_t_
+#define _di_f_datess_delete_callback_
+#define _di_f_datess_destroy_callback_
+#define _di_f_datess_t_
 //#define _di_f_directory_at_d_
 //#define _di_f_directory_back_s_
 //#define _di_f_directory_compare_call_t_
 #define _di_f_statess_delete_callback_
 #define _di_f_statess_destroy_callback_
 #define _di_f_statess_t_
-//#define _di_f_status_e_
 //#define _di_f_status_debug_d_
+//#define _di_f_status_e_
 //#define _di_f_status_mask_d_
 //#define _di_f_status_t_
 #define _di_f_statuss_t_
 #define _di_f_thread_mutex_attributess_t_
 #define _di_f_thread_mutex_consistent_
 #define _di_f_thread_mutex_create_
-#define _di_f_thread_mutex_d_
 #define _di_f_thread_mutex_delete_
 #define _di_f_thread_mutex_full_delete_
 #define _di_f_thread_mutex_full_t_
 #define _di_f_thread_unlock_
 #define _di_f_time_part_t_
 #define _di_f_time_simple_t_
+#define _di_f_time_simples_t_
+#define _di_f_time_simpless_delete_callback_
+#define _di_f_time_simpless_destroy_callback_
+#define _di_f_time_simpless_t_
 #define _di_f_time_spec_t_
 #define _di_f_time_t_
 #define _di_f_time_value_t_
 //#define _di_fl_print_warning_s_
 //#define _di_fll_error_file_flag_e_
 //#define _di_fll_error_file_print_
+#define _di_fll_error_file_print_one_
+#define _di_fll_error_file_print_simple_
 //#define _di_fll_error_file_type_directory_s_
 //#define _di_fll_error_file_type_e_
 //#define _di_fll_error_file_type_file_s_
index 7dde9bf3308e03642ff8bbc356343d30f2357f24..5ebd18766ab0a4912f49698c8e5eaacec7913223 100644 (file)
@@ -64,7 +64,7 @@ build_sources_program fll/level_0/rip.c fll/level_0/rip/utf.c fll/level_0/privat
 build_sources_program fll/level_0/signal.c
 build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c
 build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c
-build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c  fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c  fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
+build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/date.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c  fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c  fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/time.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
 build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c
 build_sources_program fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c
index 9e12cb3860b1af5c2e899d9fe68ff227449d17a8..51c3655f3b26e04898167cd2244ea3fdccfd408c 100644 (file)
 //#define _di_f_conversion_number_unsigned_print_
 //#define _di_f_conversion_number_unsigned_to_string_
 #define _di_f_date_simple_t_
+#define _di_f_date_simples_t_
+#define _di_f_date_simpless_delete_callback_
+#define _di_f_date_simpless_destroy_callback_
+#define _di_f_date_simpless_t_
 #define _di_f_date_t_
+#define _di_f_dates_t_
+#define _di_f_datess_delete_callback_
+#define _di_f_datess_destroy_callback_
+#define _di_f_datess_t_
 #define _di_f_file_access_
 #define _di_f_file_access_at_
 #define _di_f_file_access_mode_d_
 #define _di_f_statess_delete_callback_
 #define _di_f_statess_destroy_callback_
 #define _di_f_statess_t_
-//#define _di_f_status_e_
 //#define _di_f_status_debug_d_
+//#define _di_f_status_e_
 //#define _di_f_status_mask_d_
 //#define _di_f_status_t_
 #define _di_f_statuss_t_
 #define _di_f_thread_mutex_attributess_t_
 #define _di_f_thread_mutex_consistent_
 #define _di_f_thread_mutex_create_
-#define _di_f_thread_mutex_d_
 #define _di_f_thread_mutex_delete_
 #define _di_f_thread_mutex_full_delete_
 #define _di_f_thread_mutex_full_t_
 #define _di_f_thread_unlock_
 #define _di_f_time_part_t_
 #define _di_f_time_simple_t_
+#define _di_f_time_simples_t_
+#define _di_f_time_simpless_delete_callback_
+#define _di_f_time_simpless_destroy_callback_
+#define _di_f_time_simpless_t_
 #define _di_f_time_spec_t_
 #define _di_f_time_t_
 #define _di_f_time_value_t_
index 994f4910e7757ae209584880c9fd6e099f804b92..0f8e415b9cca8b255c4f415b10ee279405296414 100644 (file)
@@ -51,7 +51,7 @@ build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_
 build_sources_program fll/level_0/signal.c
 build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c
 build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c
-build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c  fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c  fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
+build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/date.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c  fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c  fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/time.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
 build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c
 build_sources_program fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c
index ba951756b781bfbeb10d416a66b936d71a89765b..f12927576d7b46ea29e2e7a2c1d65c2f5880b97e 100644 (file)
@@ -28,7 +28,7 @@
 
 // FLL-0 type includes.
 #include <fll/level_0/type/number.h>
-#include <fll/level_0/type/status.h>
+#include <fll/level_0/type/status.h> // Must be after number.h.
 #include <fll/level_0/type/cell.h>
 #include <fll/level_0/type/fll.h>
 #include <fll/level_0/type/mode.h>
@@ -38,6 +38,7 @@
 #include <fll/level_0/type/range_double.h>
 #include <fll/level_0/type/state.h>
 #include <fll/level_0/type/time.h>
+#include <fll/level_0/type/date.h> // Must be after time.h.
 #include <fll/level_0/type/void.h>
 
 #ifdef __cplusplus
diff --git a/level_0/f_type/c/type/date.h b/level_0/f_type/c/type/date.h
new file mode 100644 (file)
index 0000000..aefb423
--- /dev/null
@@ -0,0 +1,291 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines date type data.
+ *
+ * This is auto-included by type.h and should not need to be explicitly included.
+ */
+#ifndef _F_type_date_h
+#define _F_type_date_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Hold a unit of Time along with a year to represent a date.
+ *
+ * This implementation of a date using the unit of Time is limited on the size of the year.
+ * The value for year is expected to be a signed number.
+ * For anything that needs a larger (or smaller) year, create a new type or use the "year string format" of Time.
+ *
+ * In "year string format" of Time, a Year may be prepended to the Time followed by a single colon ':' to associate a year with the Time.
+ * This Year has no minimum or maximum but may not have decimals.
+ *
+ * For example, "2020:86400000000000" would represent: January 02, 2020 0:00 UTC.
+ * For example, "2020:86.4 TT" would represent: January 02, 2020 0:00 UTC.
+ *
+ * Properties:
+ *   - year: A number representing the year.
+ *   - time: A number representing the time.
+ */
+#ifndef _di_f_date_t_
+  typedef struct {
+    f_number_signed_t year;
+    f_time_t time;
+  } f_date_t;
+
+  #define f_date_t_initialize { \
+    .year = f_number_signed_t_initialize, \
+    .time = f_time_t_initialize, \
+  }
+
+  #define macro_f_date_t_initialize_1(year_value, time_value) { \
+    .year = year_value, \
+    .time = time_value, \
+  }
+
+  #define macro_f_date_t_clear(date) { \
+    date.year = 0; \
+    date.time = 0; \
+  }
+#endif // _di_f_date_t_
+
+/**
+ * An array of f_date_t.
+ *
+ * The macros are defined in type_array.h or type_array_file.h.
+ *
+ * Properties:
+ *   - array: An array of f_date_t.
+ *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
+ */
+#ifndef _di_f_dates_t_
+  typedef struct {
+    f_date_t *array;
+
+    f_number_unsigned_t used;
+    f_number_unsigned_t size;
+  } f_dates_t;
+
+  #define f_dates_t_initialize { \
+    .array = 0, \
+    .used  = 0, \
+    .size  = 0, \
+  }
+
+  #define macro_f_dates_t_initialize_1(array_value, used_value, size_value) { \
+    .array = array_value, \
+    .used  = used_value, \
+    .size  = size_value, \
+  }
+
+  #define macro_f_dates_t_initialize_2(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = length_value, \
+  }
+
+  #define macro_f_dates_t_initialize_3(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = 0, \
+  }
+
+  #define macro_f_dates_t_clear(dates) { \
+    dates.array = 0; \
+    dates.used = 0; \
+    dates.size = 0; \
+  }
+#endif // _di_f_dates_t_
+
+/**
+ * An array of f_dates_t.
+ *
+ * The macros are defined in type_array.h or type_array_file.h.
+ *
+ * Properties:
+ *   - array: The array of f_dates_t.
+ *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
+ */
+#ifndef _di_f_datess_t_
+  typedef struct {
+    f_dates_t *array;
+
+    f_number_unsigned_t used;
+    f_number_unsigned_t size;
+  } f_datess_t;
+
+  #define f_datess_t_initialize { \
+    .array = 0, \
+    .used  = 0, \
+    .size  = 0, \
+  }
+
+  #define macro_f_datess_t_initialize_1(array_value, used_value, size_value) { \
+    .array = array_value, \
+    .used  = used_value, \
+    .size  = size_value, \
+  }
+
+  #define macro_f_datess_t_initialize_2(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = length_value, \
+  }
+
+  #define macro_f_datess_t_initialize_3(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = 0, \
+  }
+
+  #define macro_f_datess_t_clear(datess) { \
+    datess.array = 0; \
+    datess.used = 0; \
+    datess.size = 0; \
+  }
+#endif // _di_f_datess_t_
+
+/**
+ * A variation of f_date_t that using f_time_simple_t rather than f_time_t.
+ *
+ * This can is a more precise alternative to f_date_t because it stores nanoseconds.
+ *
+ * The f_time_simple_t.time.seconds can be directly cast to the f_date_t.time.
+ *
+ * Properties:
+ *   - year: A number representing the year.
+ *   - time: A number representing the time with seconds and nanoseconds.
+ */
+#ifndef _di_f_date_simple_t_
+  typedef struct {
+    f_time_t year;
+    f_time_simple_t time;
+  } f_date_simple_t;
+
+  #define f_date_simple_t_initialize { \
+    .year = f_time_t_initialize, \
+    .time = f_time_simple_t_initialize, \
+  }
+
+  #define macro_f_date_simple_t_initialize_1(year_value, time_value) { \
+    .year = year_value, \
+    .time = time_value, \
+  }
+
+  #define macro_f_date_simple_t_clear(date_simple) { \
+    date_simple.year = 0; \
+    date_simple.time = 0; \
+  }
+#endif // _di_f_date_simple_t_
+
+/**
+ * An array of f_date_simple_t.
+ *
+ * The macros are defined in type_array.h or type_array_file.h.
+ *
+ * Properties:
+ *   - array: An array of f_date_simple_t.
+ *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
+ */
+#ifndef _di_f_date_simples_t_
+  typedef struct {
+    f_date_simple_t *array;
+
+    f_number_unsigned_t used;
+    f_number_unsigned_t size;
+  } f_date_simples_t;
+
+  #define f_date_simples_t_initialize { \
+    .array = 0, \
+    .used  = 0, \
+    .size  = 0, \
+  }
+
+  #define macro_f_date_simples_t_initialize_1(array_value, used_value, size_value) { \
+    .array = array_value, \
+    .used  = used_value, \
+    .size  = size_value, \
+  }
+
+  #define macro_f_date_simples_t_initialize_2(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = length_value, \
+  }
+
+  #define macro_f_date_simples_t_initialize_3(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = 0, \
+  }
+
+  #define macro_f_date_simples_t_clear(date_simples) { \
+    date_simples.array = 0; \
+    date_simples.used = 0; \
+    date_simples.size = 0; \
+  }
+#endif // _di_f_date_simples_t_
+
+/**
+ * An array of f_date_simples_t.
+ *
+ * The macros are defined in type_array.h or type_array_file.h.
+ *
+ * Properties:
+ *   - array: The array of f_date_simples_t.
+ *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
+ */
+#ifndef _di_f_date_simpless_t_
+  typedef struct {
+    f_date_simples_t *array;
+
+    f_number_unsigned_t used;
+    f_number_unsigned_t size;
+  } f_date_simpless_t;
+
+  #define f_date_simpless_t_initialize { \
+    .array = 0, \
+    .used  = 0, \
+    .size  = 0, \
+  }
+
+  #define macro_f_date_simpless_t_initialize_1(array_value, used_value, size_value) { \
+    .array = array_value, \
+    .used  = used_value, \
+    .size  = size_value, \
+  }
+
+  #define macro_f_date_simpless_t_initialize_2(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = length_value, \
+  }
+
+  #define macro_f_date_simpless_t_initialize_3(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = 0, \
+  }
+
+  #define macro_f_date_simpless_t_clear(date_simpless) { \
+    date_simpless.array = 0; \
+    date_simpless.used = 0; \
+    date_simpless.size = 0; \
+  }
+#endif // _di_f_date_simpless_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_date_h
index fb8ae7e4c80682bf885b576868c61ba2ee682aca..2fc768e2877021b245869e25fa64b9e7439f5007 100644 (file)
@@ -110,76 +110,102 @@ extern "C" {
 #endif // _di_f_time_simple_t_
 
 /**
- * Hold a unit of Time along with a year to represent a date.
+ * An array of f_time_simple_t.
  *
- * This implementation of a date using the unit of Time is limited on the size of the year.
- * The value for year is expected to be a signed number.
- * For anything that needs a larger (or smaller) year, create a new type or use the "year string format" of Time.
- *
- * In "year string format" of Time, a Year may be prepended to the Time followed by a single colon ':' to associate a year with the Time.
- * This Year has no minimum or maximum but may not have decimals.
- *
- * For example, "2020:86400000000000" would represent: January 02, 2020 0:00 UTC.
- * For example, "2020:86.4 TT" would represent: January 02, 2020 0:00 UTC.
+ * The macros are defined in type_array.h or type_array_file.h.
  *
  * Properties:
- *   - year: A number representing the year.
- *   - time: A number representing the time.
+ *   - array: An array of f_time_simple_t.
+ *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
  */
-#ifndef _di_f_date_t_
+#ifndef _di_f_time_simples_t_
   typedef struct {
-    f_number_signed_t year;
-    f_time_t time;
-  } f_date_t;
+    f_time_simple_t *array;
+
+    f_number_unsigned_t used;
+    f_number_unsigned_t size;
+  } f_time_simples_t;
+
+  #define f_time_simples_t_initialize { \
+    .array = 0, \
+    .used  = 0, \
+    .size  = 0, \
+  }
+
+  #define macro_f_time_simples_t_initialize_1(array_value, used_value, size_value) { \
+    .array = array_value, \
+    .used  = used_value, \
+    .size  = size_value, \
+  }
 
-  #define f_date_t_initialize { \
-    .year = f_number_signed_t_initialize, \
-    .time = f_time_t_initialize, \
+  #define macro_f_time_simples_t_initialize_2(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = length_value, \
   }
 
-  #define macro_f_date_t_initialize_1(year_value, time_value) { \
-    .year = year_value, \
-    .time = time_value, \
+  #define macro_f_time_simples_t_initialize_3(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = 0, \
   }
 
-  #define macro_f_date_t_clear(date) { \
-    date.year = 0; \
-    date.time = 0; \
+  #define macro_f_time_simples_t_clear(time_simples) { \
+    time_simples.array = 0; \
+    time_simples.used = 0; \
+    time_simples.size = 0; \
   }
-#endif // _di_f_date_t_
+#endif // _di_f_time_simples_t_
 
 /**
- * A variation of f_date_t that using f_time_simple_t rather than f_time_t.
+ * An array of f_time_simples_t.
  *
- * This can is a more precise alternative to f_date_t because it stores nanoseconds.
- *
- * The f_time_simple_t.time.seconds can be directly cast to the f_date_t.time.
+ * The macros are defined in type_array.h or type_array_file.h.
  *
  * Properties:
- *   - year: A number representing the year.
- *   - time: A number representing the time with seconds and nanoseconds.
+ *   - array: The array of f_time_simples_t.
+ *   - used:  Total number of allocated spaces used.
+ *   - size:  Total amount of allocated space.
  */
-#ifndef _di_f_date_simple_t_
+#ifndef _di_f_time_simpless_t_
   typedef struct {
-    f_time_t year;
-    f_time_simple_t time;
-  } f_date_simple_t;
+    f_time_simples_t *array;
+
+    f_number_unsigned_t used;
+    f_number_unsigned_t size;
+  } f_time_simpless_t;
+
+  #define f_time_simpless_t_initialize { \
+    .array = 0, \
+    .used  = 0, \
+    .size  = 0, \
+  }
+
+  #define macro_f_time_simpless_t_initialize_1(array_value, used_value, size_value) { \
+    .array = array_value, \
+    .used  = used_value, \
+    .size  = size_value, \
+  }
 
-  #define f_date_simple_t_initialize { \
-    .year = f_time_t_initialize, \
-    .time = f_time_simple_t_initialize, \
+  #define macro_f_time_simpless_t_initialize_2(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = length_value, \
   }
 
-  #define macro_f_date_simple_t_initialize_1(year_value, time_value) { \
-    .year = year_value, \
-    .time = time_value, \
+  #define macro_f_time_simpless_t_initialize_3(array_value, length_value) { \
+    .array = array_value, \
+    .used  = length_value, \
+    .size  = 0, \
   }
 
-  #define macro_f_date_simple_t_clear(date_simple) { \
-    date_simple.year = 0; \
-    date_simple.time = 0; \
+  #define macro_f_time_simpless_t_clear(time_simpless) { \
+    time_simpless.array = 0; \
+    time_simpless.used = 0; \
+    time_simpless.size = 0; \
   }
-#endif // _di_f_date_simple_t_
+#endif // _di_f_time_simpless_t_
 
 #ifdef __cplusplus
 } // extern "C"
index 1eafa4ba880d12149a4771d4205d6147384f3ecb..0726b25d59597286318600af1432d1743d0f01f7 100644 (file)
@@ -38,7 +38,7 @@ build_libraries_shared -lc
 
 build_libraries_static -l:libc.a
 
-build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h type/void.h
+build_sources_headers type.h type/cell.h type/date.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h type/void.h
 
 build_script yes
 build_shared yes
index baecd4a5e8b1f288f1dcd0374790992b3ca75be3..5430056aa872113fbe246edfb6668e5106089872 100644 (file)
@@ -20,6 +20,7 @@
 // FLL-0 type_array includes.
 #include <fll/level_0/type_array/common.h>
 #include <fll/level_0/type_array/cell.h>
+#include <fll/level_0/type_array/date.h>
 #include <fll/level_0/type_array/fll_id.h>
 #include <fll/level_0/type_array/int8.h>
 #include <fll/level_0/type_array/int16.h>
@@ -40,6 +41,7 @@
 #include <fll/level_0/type_array/range_doubless.h>
 #include <fll/level_0/type_array/state.h>
 #include <fll/level_0/type_array/status.h>
+#include <fll/level_0/type_array/time.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>
diff --git a/level_0/f_type_array/c/type_array/date.c b/level_0/f_type_array/c/type_array/date.c
new file mode 100644 (file)
index 0000000..6eff328
--- /dev/null
@@ -0,0 +1,90 @@
+#include "../type_array.h"
+#include "../type_array_file.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_datess_delete_callback_
+  f_status_t f_datess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+    {
+      f_dates_t * const array = (f_dates_t *) void_array;
+      f_status_t status = F_okay;
+
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+        if (array[i].size && array[i].array) {
+          status = f_memory_array_resize(0, sizeof(f_date_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
+
+    return F_okay;
+  }
+#endif // _di_f_datess_delete_callback_
+
+#ifndef _di_f_datess_destroy_callback_
+  f_status_t f_datess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+    {
+      f_dates_t * const array = (f_dates_t *) void_array;
+      f_status_t status = F_okay;
+
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+        if (array[i].size && array[i].array) {
+          status = f_memory_array_adjust(0, sizeof(f_date_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
+
+    return F_okay;
+  }
+#endif // _di_f_datess_destroy_callback_
+
+#ifndef _di_f_date_simpless_delete_callback_
+  f_status_t f_date_simpless_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+    {
+      f_date_simples_t * const array = (f_date_simples_t *) void_array;
+      f_status_t status = F_okay;
+
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+        if (array[i].size && array[i].array) {
+          status = f_memory_array_resize(0, sizeof(f_date_simple_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
+
+    return F_okay;
+  }
+#endif // _di_f_date_simpless_delete_callback_
+
+#ifndef _di_f_date_simpless_destroy_callback_
+  f_status_t f_date_simpless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+    {
+      f_date_simples_t * const array = (f_date_simples_t *) void_array;
+      f_status_t status = F_okay;
+
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+        if (array[i].size && array[i].array) {
+          status = f_memory_array_adjust(0, sizeof(f_date_simple_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
+
+    return F_okay;
+  }
+#endif // _di_f_date_simpless_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/date.h b/level_0/f_type_array/c/type_array/date.h
new file mode 100644 (file)
index 0000000..ac85aeb
--- /dev/null
@@ -0,0 +1,143 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * 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_date_h
+#define _F_type_array_date_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_datess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ *   The inclusive start position in the array to start deleting.
+ * @param stop
+ *   The exclusive stop position in the array to stop deleting.
+ * @param array
+ *   The array structure to delete all values of.
+ *
+ *   Must not be NULL.
+ *
+ * @return
+ *   F_okay on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_datess_delete_callback_
+  extern f_status_t f_datess_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_datess_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_datess_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ *   The inclusive start position in the array to start deleting.
+ * @param stop
+ *   The exclusive stop position in the array to stop deleting.
+ * @param array
+ *   The array structure to delete all values of.
+ *
+ *   Must not be NULL.
+ *
+ * @return
+ *   F_okay on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_datess_destroy_callback_
+  extern f_status_t f_datess_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_datess_destroy_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_date_simpless_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ *   The inclusive start position in the array to start deleting.
+ * @param stop
+ *   The exclusive stop position in the array to stop deleting.
+ * @param array
+ *   The array structure to delete all values of.
+ *
+ *   Must not be NULL.
+ *
+ * @return
+ *   F_okay on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_date_simpless_delete_callback_
+  extern f_status_t f_date_simpless_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_date_simpless_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_date_simpless_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ *   The inclusive start position in the array to start deleting.
+ * @param stop
+ *   The exclusive stop position in the array to stop deleting.
+ * @param array
+ *   The array structure to delete all values of.
+ *
+ *   Must not be NULL.
+ *
+ * @return
+ *   F_okay on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_date_simpless_destroy_callback_
+  extern f_status_t f_date_simpless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_date_simpless_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_date_h
diff --git a/level_0/f_type_array/c/type_array/time.c b/level_0/f_type_array/c/type_array/time.c
new file mode 100644 (file)
index 0000000..6a3fc1f
--- /dev/null
@@ -0,0 +1,50 @@
+#include "../type_array.h"
+#include "../type_array_file.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_time_simpless_delete_callback_
+  f_status_t f_time_simpless_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+    {
+      f_time_simples_t * const array = (f_time_simples_t *) void_array;
+      f_status_t status = F_okay;
+
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+        if (array[i].size && array[i].array) {
+          status = f_memory_array_resize(0, sizeof(f_time_simple_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
+
+    return F_okay;
+  }
+#endif // _di_f_time_simpless_delete_callback_
+
+#ifndef _di_f_time_simpless_destroy_callback_
+  f_status_t f_time_simpless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+    {
+      f_time_simples_t * const array = (f_time_simples_t *) void_array;
+      f_status_t status = F_okay;
+
+      for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+        if (array[i].size && array[i].array) {
+          status = f_memory_array_adjust(0, sizeof(f_time_simple_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          if (F_status_is_error(status)) return status;
+        }
+      } // for
+    }
+
+    return F_okay;
+  }
+#endif // _di_f_time_simpless_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/time.h b/level_0/f_type_array/c/type_array/time.h
new file mode 100644 (file)
index 0000000..c83756d
--- /dev/null
@@ -0,0 +1,83 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * 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_time_h
+#define _F_type_array_time_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_time_simpless_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ *   The inclusive start position in the array to start deleting.
+ * @param stop
+ *   The exclusive stop position in the array to stop deleting.
+ * @param array
+ *   The array structure to delete all values of.
+ *
+ *   Must not be NULL.
+ *
+ * @return
+ *   F_okay on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_time_simpless_delete_callback_
+  extern f_status_t f_time_simpless_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_time_simpless_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_time_simpless_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ *   The inclusive start position in the array to start deleting.
+ * @param stop
+ *   The exclusive stop position in the array to stop deleting.
+ * @param array
+ *   The array structure to delete all values of.
+ *
+ *   Must not be NULL.
+ *
+ * @return
+ *   F_okay on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_time_simpless_destroy_callback_
+  extern f_status_t f_time_simpless_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_time_simpless_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_time_h
index a873bf7bed4d5789c8073a9ffe187215a3dff1f9..aa44b652173fdee4aa969e4da321e55a731d0b68 100644 (file)
@@ -40,9 +40,9 @@ build_libraries_shared-individual -lf_memory
 build_libraries_static -l:libc.a
 build_libraries_static-individual -l:libf_memory.a
 
-build_sources_library type_array/cell.c type_array/file.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/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.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/cell.c type_array/date.c type_array/file.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/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/time.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
 
-build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.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/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.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 type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/date.h type_array/file.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/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/time.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
 
 build_script yes
 build_shared yes
index 95567a094af36b8cf06c1541871bc92872403a34..9ca70b5bc68e694f191435634e8a226d89fef6b7 100644 (file)
@@ -30,10 +30,10 @@ build_language c
 build_libraries -lc
 build_libraries-individual -lf_memory
 
-build_sources_library type_array/cell.c type_array/file.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/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.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/cell.c type_array/date.c type_array/file.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/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/time.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
 build_sources_library ../../tests/unit/c/mock-type_array.c
 
-build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.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/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.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 type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/date.h type_array/file.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/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/time.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
 
 build_script yes
 build_shared yes
index eb7c558e3445c63a6fef441bb8f0ecbee1c6d645..43b4ad3aad42d6b559c102699816c399defa651b 100644 (file)
@@ -24,6 +24,8 @@ build_libraries -lc -lcmocka
 build_libraries-individual -lf_memory -lf_type_array
 
 build_sources_program test-type_array-cellss_delete_callback.c test-type_array-cellss_destroy_callback.c
+build_sources_program test-type_array-date_simpless_delete_callback.c test-type_array-date_simpless_destroy_callback.c
+build_sources_program test-type_array-datess_delete_callback.c test-type_array-datess_destroy_callback.c
 build_sources_program test-type_array-filess_delete_callback.c test-type_array-filess_destroy_callback.c
 build_sources_program test-type_array-fll_idss_delete_callback.c test-type_array-fll_idss_destroy_callback.c
 build_sources_program test-type_array-int8ss_delete_callback.c test-type_array-int8ss_destroy_callback.c
@@ -43,6 +45,7 @@ build_sources_program test-type_array-range_doubles_append.c test-type_array-ran
 build_sources_program test-type_array-range_doubless_delete_callback.c test-type_array-range_doubless_destroy_callback.c
 build_sources_program test-type_array-statess_delete_callback.c test-type_array-statess_destroy_callback.c
 build_sources_program test-type_array-statusss_delete_callback.c test-type_array-statusss_destroy_callback.c
+build_sources_program test-type_array-time_simpless_delete_callback.c test-type_array-time_simpless_destroy_callback.c
 build_sources_program test-type_array-uint8ss_delete_callback.c test-type_array-uint8ss_destroy_callback.c
 build_sources_program test-type_array-uint16ss_delete_callback.c test-type_array-uint16ss_destroy_callback.c
 build_sources_program test-type_array-uint32ss_delete_callback.c test-type_array-uint32ss_destroy_callback.c
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.c
new file mode 100644 (file)
index 0000000..460c2bc
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-date_simpless_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_date_simpless_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_date_simple_t data = f_date_simple_t_initialize;
+  f_date_simple_t data_array[] = { data };
+  f_date_simples_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_date_simples_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_date_simpless_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_date_simpless_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_date_simpless_t datass = f_date_simpless_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_date_simples_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_date_simple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_date_simpless_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_delete_callback.h
new file mode 100644 (file)
index 0000000..73ce306
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__date_simpless_delete_callback
+#define _TEST__F_type_array__date_simpless_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_date_simpless_delete_callback()
+ */
+extern void test__f_type_array_date_simpless_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_date_simpless_delete_callback()
+ */
+extern void test__f_type_array_date_simpless_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__date_simpless_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.c
new file mode 100644 (file)
index 0000000..738ca4d
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-date_simpless_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_date_simpless_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_date_simple_t data = f_date_simple_t_initialize;
+  f_date_simple_t data_array[] = { data };
+  f_date_simples_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_date_simples_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_date_simpless_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_date_simpless_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_date_simpless_t datass = f_date_simpless_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_date_simples_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_date_simple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_date_simpless_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-date_simpless_destroy_callback.h
new file mode 100644 (file)
index 0000000..d712f6b
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__date_simpless_destroy_callback
+#define _TEST__F_type_array__date_simpless_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_date_simpless_destroy_callback()
+ */
+extern void test__f_type_array_date_simpless_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_date_simpless_destroy_callback()
+ */
+extern void test__f_type_array_date_simpless_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__date_simpless_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.c
new file mode 100644 (file)
index 0000000..2973642
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-datess_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_datess_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_date_t data = f_date_t_initialize;
+  f_date_t data_array[] = { data };
+  f_dates_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_dates_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_datess_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_datess_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_datess_t datass = f_datess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_dates_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_date_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_datess_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-datess_delete_callback.h
new file mode 100644 (file)
index 0000000..ce30b22
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__datess_delete_callback
+#define _TEST__F_type_array__datess_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_datess_delete_callback()
+ */
+extern void test__f_type_array_datess_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_datess_delete_callback()
+ */
+extern void test__f_type_array_datess_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__datess_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.c
new file mode 100644 (file)
index 0000000..5e73a0d
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-datess_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_datess_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_date_t data = f_date_t_initialize;
+  f_date_t data_array[] = { data };
+  f_dates_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_dates_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_datess_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_datess_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_datess_t datass = f_datess_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_dates_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_date_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_datess_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-datess_destroy_callback.h
new file mode 100644 (file)
index 0000000..1b795b8
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__datess_destroy_callback
+#define _TEST__F_type_array__datess_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_datess_destroy_callback()
+ */
+extern void test__f_type_array_datess_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_datess_destroy_callback()
+ */
+extern void test__f_type_array_datess_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__datess_destroy_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.c
new file mode 100644 (file)
index 0000000..da96932
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-time_simpless_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_time_simpless_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_time_simple_t data = f_time_simple_t_initialize;
+  f_time_simple_t data_array[] = { data };
+  f_time_simples_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_time_simples_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_time_simpless_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_time_simpless_delete_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_time_simpless_t datass = f_time_simpless_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_time_simples_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_time_simple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_time_simpless_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_delete_callback.h
new file mode 100644 (file)
index 0000000..53dc5c0
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__time_simpless_delete_callback
+#define _TEST__F_type_array__time_simpless_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_time_simpless_delete_callback()
+ */
+extern void test__f_type_array_time_simpless_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_time_simpless_delete_callback()
+ */
+extern void test__f_type_array_time_simpless_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__time_simpless_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.c
new file mode 100644 (file)
index 0000000..17d55d8
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-time_simpless_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_time_simpless_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_time_simple_t data = f_time_simple_t_initialize;
+  f_time_simple_t data_array[] = { data };
+  f_time_simples_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_time_simples_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_time_simpless_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_time_simpless_destroy_callback__works(void **state) {
+
+  mock_unwrap = 1;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_time_simpless_t datass = f_time_simpless_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_time_simples_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_time_simple_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_time_simpless_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-time_simpless_destroy_callback.h
new file mode 100644 (file)
index 0000000..db28716
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__time_simpless_destroy_callback
+#define _TEST__F_type_array__time_simpless_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_time_simpless_destroy_callback()
+ */
+extern void test__f_type_array_time_simpless_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_time_simpless_destroy_callback()
+ */
+extern void test__f_type_array_time_simpless_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__time_simpless_destroy_callback
index e1b0ebcd2063b48be4089a58a022083aa5c06e39..3dbf9f4b2ed5dfd7c074cf01e4327343eb0666c5 100644 (file)
@@ -23,6 +23,12 @@ int main(void) {
     cmocka_unit_test(test__f_type_array_cellss_destroy_callback__fails),
     cmocka_unit_test(test__f_type_array_cellss_destroy_callback__works),
 
+    cmocka_unit_test(test__f_type_array_date_simpless_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_date_simpless_delete_callback__works),
+
+    cmocka_unit_test(test__f_type_array_datess_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_datess_delete_callback__works),
+
     cmocka_unit_test(test__f_type_array_filess_delete_callback__fails),
     cmocka_unit_test(test__f_type_array_filess_delete_callback__works),
 
@@ -126,6 +132,9 @@ int main(void) {
     cmocka_unit_test(test__f_type_array_statusss_destroy_callback__fails),
     cmocka_unit_test(test__f_type_array_statusss_destroy_callback__works),
 
+    cmocka_unit_test(test__f_type_array_time_simpless_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_time_simpless_delete_callback__works),
+
     cmocka_unit_test(test__f_type_array_uint8ss_delete_callback__fails),
     cmocka_unit_test(test__f_type_array_uint8ss_delete_callback__works),
 
@@ -160,6 +169,12 @@ int main(void) {
       // f_cellss_destroy_callback() doesn't use parameter checking.
       // f_cellss_delete_callback() doesn't use parameter checking.
 
+      // f_date_simpless_destroy_callback() doesn't use parameter checking.
+      // f_date_simpless_delete_callback() doesn't use parameter checking.
+
+      // f_datess_destroy_callback() doesn't use parameter checking.
+      // f_datess_delete_callback() doesn't use parameter checking.
+
       // f_filess_destroy_callback() doesn't use parameter checking.
       // f_filess_delete_callback() doesn't use parameter checking.
 
@@ -215,6 +230,9 @@ int main(void) {
       // f_statusss_destroy_callback() doesn't use parameter checking.
       // f_statusss_delete_callback() doesn't use parameter checking.
 
+      // f_time_simpless_destroy_callback() doesn't use parameter checking.
+      // f_time_simpless_delete_callback() doesn't use parameter checking.
+
       // f_uint8ss_destroy_callback() doesn't use parameter checking.
       // f_uint8ss_delete_callback() doesn't use parameter checking.
 
index 4ad370780201d2980892965a8e507551de86a5c2..338089afd91c41c3cd1a40dc6092a478d30a7903 100644 (file)
 // Test includes.
 #include "test-type_array-cellss_delete_callback.h"
 #include "test-type_array-cellss_destroy_callback.h"
+#include "test-type_array-date_simpless_delete_callback.h"
+#include "test-type_array-date_simpless_destroy_callback.h"
+#include "test-type_array-datess_delete_callback.h"
+#include "test-type_array-datess_destroy_callback.h"
 #include "test-type_array-filess_delete_callback.h"
 #include "test-type_array-filess_destroy_callback.h"
 #include "test-type_array-fll_idss_delete_callback.h"
@@ -70,6 +74,8 @@
 #include "test-type_array-statess_destroy_callback.h"
 #include "test-type_array-statusss_delete_callback.h"
 #include "test-type_array-statusss_destroy_callback.h"
+#include "test-type_array-time_simpless_delete_callback.h"
+#include "test-type_array-time_simpless_destroy_callback.h"
 #include "test-type_array-uint8ss_delete_callback.h"
 #include "test-type_array-uint8ss_destroy_callback.h"
 #include "test-type_array-uint16ss_delete_callback.h"