]> Kevux Git Server - fll/commitdiff
Refactor: The f_string_quantity_t into f_quantity_t.
authorKevin Day <kevin@kevux.org>
Sat, 3 Feb 2024 23:45:31 +0000 (17:45 -0600)
committerKevin Day <kevin@kevux.org>
Sat, 3 Feb 2024 23:45:31 +0000 (17:45 -0600)
This makes the f_string_quantity_t consistent similar to how f_string_range_t was refactored into f_range_t.
This is done because there is no actual string value in f_string_quantity_t.
There are only numeric values.

72 files changed:
build/disable/level_0/f_console.h
build/disable/level_0/f_fss.h
build/disable/level_0/f_iki.h
build/disable/level_0/f_random.h [new file with mode: 0644]
build/disable/level_0/f_socket.h
build/disable/level_0/f_string.h
build/disable/level_0/f_type.h
build/disable/level_0/f_type_array.h
build/disable/level_1/fl_fss.h
build/level_0/settings
build/monolithic/settings
build/stand_alone/byte_dump.settings
build/stand_alone/fake.config.h
build/stand_alone/fake.settings
build/stand_alone/firewall.settings
build/stand_alone/utf8.settings
level_0/f_abstruse/c/abstruse/enum.h
level_0/f_abstruse/c/abstruse/private-abstruse.c
level_0/f_abstruse/c/abstruse/type.h
level_0/f_string/c/string.h
level_0/f_string/c/string/quantity.c [deleted file]
level_0/f_string/c/string/quantity.h [deleted file]
level_0/f_string/c/string/quantitys.h [deleted file]
level_0/f_string/data/build/settings
level_0/f_string/data/build/settings-mocks
level_0/f_string/data/build/settings-tests
level_0/f_string/tests/unit/c/test-string-quantitys_append.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_append.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantitys_append_all.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_append.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_append.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_append_all.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_append_all.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.h [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.c [deleted file]
level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.h [deleted file]
level_0/f_string/tests/unit/c/test-string.c
level_0/f_string/tests/unit/c/test-string.h
level_0/f_type/c/type.h
level_0/f_type/c/type/quantity.h [new file with mode: 0644]
level_0/f_type/data/build/settings
level_0/f_type_array/c/type_array.h
level_0/f_type_array/c/type_array/quantity.c [new file with mode: 0644]
level_0/f_type_array/c/type_array/quantity.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/quantitys.c [moved from level_0/f_string/c/string/quantitys.c with 52% similarity]
level_0/f_type_array/c/type_array/quantitys.h [new file with mode: 0644]
level_0/f_type_array/c/type_array/quantityss.c [moved from level_0/f_string/c/string/quantityss.c with 55% similarity]
level_0/f_type_array/c/type_array/quantityss.h [moved from level_0/f_string/c/string/quantityss.h with 53% similarity]
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-quantitys_append.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append_all.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append_all.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantityss_delete_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantityss_delete_callback.h [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantityss_destroy_callback.c [new file with mode: 0644]
level_0/f_type_array/tests/unit/c/test-type_array-quantityss_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
level_1/fl_status_string/data/build/dependencies
level_1/fl_status_string/data/build/settings
level_1/fl_status_string/data/build/settings-tests
level_3/fss_read/c/main/process_normal.c
level_3/fss_read/c/payload/fss_read.c

index 3ec25cc3dd453ec7adb5725de7d2010783f78c5b..ba0df85098dffaf52280d7266f3f49ba797a5cbc 100644 (file)
@@ -7,6 +7,7 @@
 #define _di_f_console_parameter_prioritize_left_
 #define _di_f_console_parameter_prioritize_right_
 #define _di_f_console_parameter_process_
+#define _di_f_console_parameter_reset_
 #define _di_f_console_parameters_delete_
 #define _di_f_console_parameters_destroy_
 #define _di_f_console_parameters_t_
index 41ed53916d28cb40561e0c99b1d32f7d89307d88..9974283ff8575fb130b652fb87917c133c55d380 100644 (file)
@@ -42,7 +42,7 @@
 #define _di_f_fss_payload_comment_header_begin_s_
 #define _di_f_fss_payload_comment_header_end_s_
 #define _di_f_fss_payload_comment_header_s_
-#define _di_f_fss_payload_header_map_e_
+#define _di_f_fss_payload_header_map_flag_e_
 #define _di_f_fss_payload_object_end_s_
 #define _di_f_fss_payload_object_header_s_
 #define _di_f_fss_payload_object_id_s_
@@ -57,6 +57,9 @@
 #define _di_f_fss_payload_object_type_s_
 #define _di_f_fss_payload_s_
 #define _di_f_fss_placeholder_s_
+#define _di_f_fss_quote_double_null_s_
+#define _di_f_fss_quote_grave_null_s_
+#define _di_f_fss_quote_single_null_s_
 #define _di_f_fss_quote_type_e_
 #define _di_f_fss_s_
 #define _di_f_fss_seek_to_eol_
index 3c8596227dc326554dd43b3810da2e773114f7f3..09a174c323c257fd457bce236da21e9692720a30 100644 (file)
@@ -19,8 +19,8 @@
 #define _di_f_iki_read_
 #define _di_f_iki_state_flag_e_
 #define _di_f_iki_syntax_placeholder_s_
-#define _di_f_iki_syntax_quote_backtick_s_
 #define _di_f_iki_syntax_quote_double_s_
+#define _di_f_iki_syntax_quote_grave_s_
 #define _di_f_iki_syntax_quote_single_s_
 #define _di_f_iki_syntax_s_
 #define _di_f_iki_syntax_separator_s_
diff --git a/build/disable/level_0/f_random.h b/build/disable/level_0/f_random.h
new file mode 100644 (file)
index 0000000..522c18f
--- /dev/null
@@ -0,0 +1,5 @@
+#define _di_f_random_get_
+#define _di_f_random_read_
+#define _di_f_random_seed_
+#define _di_f_random_seed_flag_d_
+#define _di_f_random_seed_set_
index f38edcbf7c8d71f63fb966c08befec67ead178b9..cf40546e6fe772a2083ed84a63c8ceb79c14e5da 100644 (file)
@@ -1,14 +1,12 @@
 #define _di_f_socket_accept_
 #define _di_f_socket_address_family_e_
+#define _di_f_socket_address_form_e_
 #define _di_f_socket_addressss_delete_callback_
 #define _di_f_socket_addressss_destroy_callback_
 #define _di_f_socket_addressss_t_
 #define _di_f_socket_addresss_t_
 #define _di_f_socket_address_t_
 #define _di_f_socket_bind_
-#define _di_f_socket_bind_inet4_
-#define _di_f_socket_bind_inet6_
-#define _di_f_socket_bind_local_
 #define _di_f_socket_close_e_
 #define _di_f_socket_connect_
 #define _di_f_socket_create_
index 8cf0ea551646f157a7c60d02dc53f3bcf7f40ccf..273b91b61b49b5bd87c2a98fdc4063d28c7c7491 100644 (file)
@@ -42,6 +42,8 @@
 #define _di_f_string_dynamicss_destroy_callback_
 #define _di_f_string_dynamicss_t_
 #define _di_f_string_dynamics_t_
+#define _di_f_string_dynamic_strip_null_
+#define _di_f_string_dynamic_strip_null_range_
 #define _di_f_string_dynamic_t_
 #define _di_f_string_dynamic_terminate_
 #define _di_f_string_dynamic_terminate_after_
 #define _di_f_string_prepend_assure_
 #define _di_f_string_prepend_assure_nulless_
 #define _di_f_string_prepend_nulless_
-#define _di_f_string_quantitys_append_
-#define _di_f_string_quantitys_append_all_
-#define _di_f_string_quantityss_append_
-#define _di_f_string_quantityss_append_all_
-#define _di_f_string_quantityss_delete_callback_
-#define _di_f_string_quantityss_destroy_callback_
-#define _di_f_string_quantityss_t_
-#define _di_f_string_quantitys_t_
-#define _di_f_string_quantity_t_
-#define _di_f_string_range_double_empty_c_
-#define _di_f_string_range_doubles_append_
-#define _di_f_string_range_doubles_append_all_
-#define _di_f_string_range_doubless_append_
-#define _di_f_string_range_doubless_append_all_
-#define _di_f_string_range_doubless_delete_callback_
-#define _di_f_string_range_doubless_destroy_callback_
-#define _di_f_string_range_doubless_t_
-#define _di_f_string_range_doubles_t_
-#define _di_f_string_range_double_t_
-#define _di_f_string_range_empty_c_
-#define _di_f_string_ranges_append_
-#define _di_f_string_ranges_append_all_
-#define _di_f_string_rangess_append_
-#define _di_f_string_rangess_append_all_
-#define _di_f_string_rangess_delete_callback_
-#define _di_f_string_rangess_destroy_callback_
-#define _di_f_string_rangess_t_
-#define _di_f_string_ranges_t_
-#define _di_f_string_range_t_
 #define _di_f_string_seek_line_
 #define _di_f_string_seek_line_to_
 #define _di_f_string_seek_to_
index 8ca5223c2c7e24894b7f29b1c3b80452a888c586..a5550446e0b50dc1f58e10518df3bfb8dbfec264 100644 (file)
 #define _di_f_pollss_t_
 #define _di_f_polls_t_
 #define _di_f_poll_t_
+#define _di_f_quantityss_t_
+#define _di_f_quantitys_t_
+#define _di_f_quantity_t_
+#define _di_f_range_doubless_t_
+#define _di_f_range_doubles_t_
+#define _di_f_range_double_t_
+#define _di_f_rangess_t_
+#define _di_f_ranges_t_
+#define _di_f_range_t_
 #define _di_f_statess_t_
 #define _di_f_states_t_
 #define _di_f_state_t_
index a626817a0ebf9df85af092fea510b961afb95e8b..9dca16d09bf49599fff31f7917bffb5d7dd1e047 100644 (file)
 #define _di_f_number_unsignedss_destroy_callback_
 #define _di_f_pollss_delete_callback_
 #define _di_f_pollss_destroy_callback_
+#define _di_f_quantity_empty_c_
+#define _di_f_quantitys_append_
+#define _di_f_quantitys_append_all_
+#define _di_f_quantityss_append_
+#define _di_f_quantityss_append_all_
+#define _di_f_quantityss_delete_callback_
+#define _di_f_quantityss_destroy_callback_
+#define _di_f_range_double_empty_c_
+#define _di_f_range_doubles_append_
+#define _di_f_range_doubles_append_all_
+#define _di_f_range_doubless_append_
+#define _di_f_range_doubless_append_all_
+#define _di_f_range_doubless_delete_callback_
+#define _di_f_range_doubless_destroy_callback_
+#define _di_f_range_empty_c_
+#define _di_f_ranges_append_
+#define _di_f_ranges_append_all_
+#define _di_f_rangess_append_
+#define _di_f_rangess_append_all_
+#define _di_f_rangess_delete_callback_
+#define _di_f_rangess_destroy_callback_
 #define _di_f_statess_delete_callback_
 #define _di_f_statess_destroy_callback_
 #define _di_f_statusss_delete_callback_
index b64a80bc4c74ac3adbe6c731cfdae7e687667dae..3193b3e7d7210a64bb5565ca449f40fcc4a1b009 100644 (file)
@@ -1,6 +1,6 @@
+#define _di_f_fss_payload_header_internal_t_
+#define _di_f_fss_payload_header_state_t_
 #define _di_f_fss_payload_header_write_d_
-#define _di_f_fss_payload_header_write_internal_t_
-#define _di_f_fss_payload_header_write_state_t_
 #define _di_fl_fss_basic_content_read_
 #define _di_fl_fss_basic_content_write_
 #define _di_fl_fss_basic_list_content_read_
@@ -21,5 +21,5 @@
 #define _di_fl_fss_extended_list_object_write_
 #define _di_fl_fss_extended_object_read_
 #define _di_fl_fss_extended_object_write_
+#define _di_fl_fss_payload_d_
 #define _di_fl_fss_payload_header_map_
-#define _di_fl_fss_payload_header_write_
index 72a9b31551cd398a373eca3a5c8fb2370f3ae40a..ba4a0c00fd9551a1072462d4f06ef3e519d4166e 100644 (file)
@@ -68,11 +68,10 @@ build_sources_library private-string.c string/common.c
 build_sources_library string/dynamic.c string/dynamics.c string/dynamicss.c
 build_sources_library string/map.c string/maps.c string/mapss.c
 build_sources_library string/map_multi.c string/map_multis.c string/map_multiss.c
-build_sources_library string/quantity.c string/quantitys.c string/quantityss.c
 build_sources_library string/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/poll.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/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/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 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
@@ -117,12 +116,11 @@ build_sources_headers string.h string/common.h
 build_sources_headers string/dynamic.h string/dynamics.h string/dynamicss.h
 build_sources_headers string/map.h string/maps.h string/mapss.h
 build_sources_headers string/map_multi.h string/map_multis.h string/map_multiss.h
-build_sources_headers string/quantity.h string/quantitys.h string/quantityss.h
 build_sources_headers string/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
-build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/range.h type/range_double.h type/state.h type/status.h type/time.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/poll.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/file.h type/fll.h type/mode.h type/number.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.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/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 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 thread/attribute.h thread/barrier.h thread/barrier_attribute.h thread/condition.h thread/condition_attribute.h thread/id.h thread/key.h thread/lock.h thread/lock_attribute.h thread/mutex.h thread/mutex_attribute.h thread/once.h thread/semaphore.h thread/set.h thread/spin.h
index b4c2c43e8dd381af59413d9a45ad5c78a129098c..17f0d05a94325cf85b63460b9885970bbe178e3e 100644 (file)
@@ -68,11 +68,10 @@ build_sources_library level_0/private-string.c level_0/string/common.c
 build_sources_library level_0/string/dynamic.c level_0/string/dynamics.c level_0/string/dynamicss.c
 build_sources_library level_0/string/map.c level_0/string/maps.c level_0/string/mapss.c
 build_sources_library level_0/string/map_multi.c level_0/string/map_multis.c level_0/string/map_multiss.c
-build_sources_library level_0/string/quantity.c level_0/string/quantitys.c level_0/string/quantityss.c
 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/poll.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/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/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/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
@@ -138,12 +137,11 @@ build_sources_headers level_0/string.h level_0/string/common.h
 build_sources_headers level_0/string/dynamic.h level_0/string/dynamics.h level_0/string/dynamicss.h
 build_sources_headers level_0/string/map.h level_0/string/maps.h level_0/string/mapss.h
 build_sources_headers level_0/string/map_multi.h level_0/string/map_multis.h level_0/string/map_multiss.h
-build_sources_headers level_0/string/quantity.h level_0/string/quantitys.h level_0/string/quantityss.h
 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
-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/range.h  level_0/type/range_double.h level_0/type/state.h level_0/type/status.h level_0/type/time.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/poll.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/file.h level_0/type/fll.h level_0/type/mode.h level_0/type/number.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
+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/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/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 02f7a6406f9de7c563b81f394715618afbaf25fc..5452f5baa721b17e9895189a4d068479df1ba4b8 100644 (file)
@@ -31,7 +31,7 @@ build_sources_program fll/level_0/memory.c fll/level_0/private-memory.c fll/leve
 build_sources_program fll/level_0/pipe.c
 build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
 build_sources_program fll/level_0/signal.c
-build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.cfll/level_0/string/quantity.c fll/level_0/string/static.c fll/level_0/string/triple.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/static.c fll/level_0/string/triple.c
 build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/range.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
 build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/map_multi.c fll/level_0/utf/static.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/private-dynamic.c fll/level_0/utf/private-map.c fll/level_0/utf/private-map_multi.c fll/level_0/utf/private-triple.c fll/level_0/utf/private-string.c
index 65386e12ef221958ce73dfbbf71490e09a84b84e..8539e7467f96ea9d6b412e9ad57c3fe624d128d7 100644 (file)
 //#define _di_f_console_parameter_prioritize_left_
 //#define _di_f_console_parameter_prioritize_right_
 //#define _di_f_console_parameter_process_
+#define _di_f_console_parameter_reset_
 //#define _di_f_console_parameters_delete_
 #define _di_f_console_parameters_destroy_
 //#define _di_f_console_parameters_t_
 #define _di_f_fss_payload_comment_header_begin_s_
 #define _di_f_fss_payload_comment_header_end_s_
 #define _di_f_fss_payload_comment_header_s_
+#define _di_f_fss_payload_header_internal_t_
 #define _di_f_fss_payload_header_map_flag_e_
+#define _di_f_fss_payload_header_state_t_
+#define _di_f_fss_payload_header_write_d_
 #define _di_f_fss_payload_object_end_s_
 #define _di_f_fss_payload_object_header_s_
 #define _di_f_fss_payload_object_id_s_
 #define _di_fl_fss_extended_list_object_write_
 //#define _di_fl_fss_extended_object_read_
 #define _di_fl_fss_extended_object_write_
+#define _di_fl_fss_payload_d_
 #define _di_fl_fss_payload_header_map_
 #define _di_fl_fss_payload_header_maps_
 //#define _di_fl_iki_read_
 #define _di_f_print_to_safely_terminated_
 #define _di_f_print_to_terminated_
 //#define _di_f_print_write_max_d_
+#define _di_f_quantity_empty_c_
+#define _di_f_quantitys_append_
+#define _di_f_quantitys_append_all_
+#define _di_f_quantityss_append_
+#define _di_f_quantityss_append_all_
+#define _di_f_quantityss_delete_callback_
+#define _di_f_quantityss_destroy_callback_
+#define _di_f_quantityss_t_
+#define _di_f_quantitys_t_
+#define _di_f_quantity_t_
 #define _di_f_random_get_
 #define _di_f_random_read_
 #define _di_f_random_seed_
+#define _di_f_random_seed_flag_d_
 #define _di_f_random_seed_set_
 #define _di_f_range_double_empty_c_
 #define _di_f_range_doubles_append_
 #define _di_f_string_prepend_assure_
 #define _di_f_string_prepend_assure_nulless_
 #define _di_f_string_prepend_nulless_
-#define _di_f_string_quantitys_append_
-#define _di_f_string_quantitys_append_all_
-#define _di_f_string_quantityss_append_
-#define _di_f_string_quantityss_append_all_
-#define _di_f_string_quantityss_delete_callback_
-#define _di_f_string_quantityss_destroy_callback_
-#define _di_f_string_quantityss_t_
-#define _di_f_string_quantitys_t_
-#define _di_f_string_quantity_t_
 #define _di_f_string_seek_line_
 #define _di_f_string_seek_line_to_
 #define _di_f_string_seek_to_
index a97b7ea7180a27ac6e4b350dd2298fd459f48148..d59884c629eaa9b602944b52c6b9cf0c3e7e0d35 100644 (file)
@@ -56,8 +56,8 @@ build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_
 build_sources_program fll/level_0/rip.c fll/level_0/rip/utf.c fll/level_0/private-rip.c fll/level_0/rip/private-utf.c
 build_sources_program fll/level_0/signal.c
 build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c
-build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/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/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/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/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 435486065a58858f92083655d5cfbd33e8305f3a..1d8cb199e606a1074ed7ce5cd90ffd3cd70c134a 100644 (file)
@@ -40,9 +40,9 @@ build_sources_program fll/level_0/path.c fll/level_0/private-path.c fll/level_0/
 build_sources_program fll/level_0/pipe.c
 build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
 build_sources_program fll/level_0/signal.c
-build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/quantity.c fll/level_0/string/static.c fll/level_0/string/triple.c
+build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/static.c fll/level_0/string/triple.c
 build_sources_program fll/level_0/thread.c fll/level_0/private-thread.c fll/level_0/thread/attribute.c fll/level_0/thread/barrier.c fll/level_0/thread/barrier_attribute.c fll/level_0/thread/condition.c fll/level_0/thread/condition_attribute.c fll/level_0/thread/id.c fll/level_0/thread/key.c fll/level_0/thread/lock.c fll/level_0/thread/lock_attribute.c fll/level_0/thread/mutex.c fll/level_0/thread/mutex_attribute.c fll/level_0/thread/once.c fll/level_0/thread/semaphore.c fll/level_0/thread/set.c fll/level_0/thread/spin.c
-build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/range.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/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/range.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c
 build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c
 build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/map_multi.c fll/level_0/utf/static.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/private-dynamic.c fll/level_0/utf/private-map.c fll/level_0/utf/private-map_multi.c fll/level_0/utf/private-triple.c fll/level_0/utf/private-string.c
 
index 60e92cf181f7ebbe9e4913b82d5897a7515aa404..ed4d5151dc0904cb1f5570a478a6155c20c6b969 100644 (file)
@@ -32,8 +32,8 @@ build_sources_program fll/level_0/pipe.c
 build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c
 build_sources_program fll/level_0/signal.c
 build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c
-build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/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/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/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/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 35260bbb9d494a8645f1942721e9b033a8f708fc..fac37bb1a18cfbda4cb575ee77dba0a934f91118 100644 (file)
@@ -43,8 +43,8 @@ extern "C" {
  *   - maps:       Maps to f_string_maps_t.
  *   - map_multi:  Maps to f_string_map_multi_t.
  *   - map_multis: Maps to f_string_map_multis_t.
- *   - quantity:   Maps to f_string_quantity_t.
- *   - quantitys:  Maps to f_string_quantitys_t.
+ *   - quantity:   Maps to f_quantity_t.
+ *   - quantitys:  Maps to f_quantitys_t.
  *   - range:      Maps to f_range_t.
  *   - ranges:     Maps to f_ranges_t.
  *   - triple:     Maps to f_string_triple_t.
index c94594c6d5f0b995bd7a692fa913b06628ec579a..893792a13335a6cab4df57141dfd7ba2a0cbba29 100644 (file)
@@ -131,7 +131,7 @@ extern "C" {
 
       case f_abstruse_quantitys_e:
         if (abstruse->is.a_quantitys.size) {
-          return f_memory_array_resize(0, sizeof(f_string_quantity_t), (void **) &abstruse->is.a_quantitys.array, &abstruse->is.a_quantitys.used, &abstruse->is.a_quantitys.size);
+          return f_memory_array_resize(0, sizeof(f_quantity_t), (void **) &abstruse->is.a_quantitys.array, &abstruse->is.a_quantitys.used, &abstruse->is.a_quantitys.size);
         }
 
         break;
@@ -299,7 +299,7 @@ extern "C" {
 
       case f_abstruse_quantitys_e:
         if (abstruse->is.a_quantitys.size) {
-          return f_memory_array_adjust(0, sizeof(f_string_quantity_t), (void **) &abstruse->is.a_quantitys.array, &abstruse->is.a_quantitys.used, &abstruse->is.a_quantitys.size);
+          return f_memory_array_adjust(0, sizeof(f_quantity_t), (void **) &abstruse->is.a_quantitys.array, &abstruse->is.a_quantitys.used, &abstruse->is.a_quantitys.size);
         }
 
         break;
index f5c2e9c7269d36630a3f5c8809add6a8091175e7..b58a793ce4ce19a73cacb7864673aab7bd298c22 100644 (file)
@@ -48,8 +48,8 @@ extern "C" {
     f_string_maps_t       a_maps;
     f_string_map_multi_t  a_map_multi;
     f_string_map_multis_t a_map_multis;
-    f_string_quantity_t   a_quantity;
-    f_string_quantitys_t  a_quantitys;
+    f_quantity_t   a_quantity;
+    f_quantitys_t  a_quantitys;
     f_string_triple_t     a_triple;
     f_string_triples_t    a_triples;
     void *                a_void;
index e1092c2a4a3271abc3228e0dc733238af60e0bd6..656f25dd7e7087ee4ac3934353d59be7b443f0df 100644 (file)
@@ -35,9 +35,6 @@
 #include <fll/level_0/string/map_multi.h>
 #include <fll/level_0/string/map_multis.h>
 #include <fll/level_0/string/map_multiss.h>
-#include <fll/level_0/string/quantity.h>
-#include <fll/level_0/string/quantitys.h>
-#include <fll/level_0/string/quantityss.h>
 #include <fll/level_0/string/triple.h>
 #include <fll/level_0/string/triples.h>
 #include <fll/level_0/string/tripless.h>
diff --git a/level_0/f_string/c/string/quantity.c b/level_0/f_string/c/string/quantity.c
deleted file mode 100644 (file)
index 19bfbd9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "../string.h"
-#include "../private-string.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/c/string/quantity.h b/level_0/f_string/c/string/quantity.h
deleted file mode 100644 (file)
index 8dee426..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Defines quantity string data.
- *
- * This is auto-included by string.h and should not need to be explicitly included.
- */
-#ifndef _F_string_quantity_h
-#define _F_string_quantity_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Store string quantity.
- *
- * Similar to f_range_t, except total is relative to start and is not an absolute stop position.
- *
- * Two common uses for when total is 0 is:
- * 1) Exactly that, process a total of 0 strings bytes.
- * 2) Process with no limit, aka infinite.
- *
- * Properties:
- *   - start: The position where the string starts (based on some string/buffer).
- *   - total: The total number of elements within that string/buffer the quantity represents.
- */
-#ifndef _di_f_string_quantity_t_
-  typedef struct {
-    f_number_unsigned_t start;
-    f_number_unsigned_t total;
-  } f_string_quantity_t;
-
-  #define f_string_quantity_t_initialize { 0, 0 }
-
-  #define macro_f_string_quantity_t_initialize_1(start, total) { start, total }
-
-  #define macro_f_string_quantity_t_clear(quantity) \
-    quantity.start = 0; \
-    quantity.total = 0;
-#endif // _di_f_string_quantity_t_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _F_string_quantity_h
diff --git a/level_0/f_string/c/string/quantitys.h b/level_0/f_string/c/string/quantitys.h
deleted file mode 100644 (file)
index 74ed1f6..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Defines quantity string data.
- *
- * This is auto-included by string.h and should not need to be explicitly included.
- */
-#ifndef _F_string_quantitys_h
-#define _F_string_quantitys_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * An array of string quantitys.
- *
- * Properties:
- *   - array: The array of string quantitys.
- *   - size:  Total amount of allocated space.
- *   - used:  Total number of allocated spaces used.
- */
-#ifndef _di_f_string_quantitys_t_
-  typedef struct {
-    f_string_quantity_t *array;
-
-    f_number_unsigned_t size;
-    f_number_unsigned_t used;
-  } f_string_quantitys_t;
-
-  #define f_string_quantitys_t_initialize { 0, 0, 0 }
-
-  #define macro_f_string_quantitys_t_initialize_1(array, size, used) { array, size, used }
-  #define macro_f_string_quantitys_t_initialize_2(array, length) { array, length, length }
-
-  #define macro_f_string_quantitys_t_clear(quantitys) \
-    quantitys.array = 0; \
-    quantitys.size = 0; \
-    quantitys.used = 0;
-#endif // _di_f_string_quantitys_t_
-
-/**
- * Append the single source quantity onto the destination.
- *
- * @param source
- *   The source quantity to append.
- * @param destination
- *   The destination quantitys the source is appended onto.
- *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantitys_append_
-  extern f_status_t f_string_quantitys_append(const f_string_quantity_t source, f_string_quantitys_t * const destination);
-#endif // _di_f_string_quantitys_append_
-
-/**
- * Append the source quantitys onto the destination.
- *
- * @param source
- *   The source quantitys to append.
- * @param destination
- *   The destination quantitys the source is appended onto.
- *
- * @return
- *   F_okay on success.
- *   F_data_not on success, but there is nothing to append (size == 0).
- *
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- *   Errors (with error bit) from: f_memory_resize().
- */
-#ifndef _di_f_string_quantitys_append_all_
-  extern f_status_t f_string_quantitys_append_all(const f_string_quantitys_t source, f_string_quantitys_t * const destination);
-#endif // _di_f_string_quantitys_append_all_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _F_string_quantitys_h
index c051c7373d3f42c292259562a31a432ee1c57490..829f19347cf8874101433c253364035b72adce09 100644 (file)
@@ -38,7 +38,6 @@ build_sources_library private-string.c string/common.c
 build_sources_library string/dynamic.c string/dynamics.c string/dynamicss.c
 build_sources_library string/map.c string/maps.c string/mapss.c
 build_sources_library string/map_multi.c string/map_multis.c string/map_multiss.c
-build_sources_library string/quantity.c string/quantitys.c string/quantityss.c
 build_sources_library string/static.c string/statics.c string/staticss.c
 build_sources_library string/triple.c string/triples.c string/tripless.c
 
@@ -46,7 +45,6 @@ build_sources_headers string.h string/common.h
 build_sources_headers string/dynamic.h string/dynamics.h string/dynamicss.h
 build_sources_headers string/map.h string/maps.h string/mapss.h
 build_sources_headers string/map_multi.h string/map_multis.h string/map_multiss.h
-build_sources_headers string/quantity.h string/quantitys.h string/quantityss.h
 build_sources_headers string/static.h string/statics.h string/staticss.h
 build_sources_headers string/triple.h string/triples.h string/tripless.h
 
index 55fb3442cdcced1c844c0b380f1efa2fe4ccc19c..43e3b9d17962b55e5ce138f800f2f5a65f6cbb72 100644 (file)
@@ -25,7 +25,6 @@ build_sources_library private-string.c string/common.c
 build_sources_library string/dynamic.c string/dynamics.c string/dynamicss.c
 build_sources_library string/map.c string/maps.c string/mapss.c
 build_sources_library string/map_multi.c string/map_multis.c string/map_multiss.c
-build_sources_library string/quantity.c string/quantitys.c string/quantityss.c
 build_sources_library string/static.c string/statics.c string/staticss.c
 build_sources_library string/triple.c string/triples.c string/tripless.c
 build_sources_library ../../tests/unit/c/mock-string.c
@@ -34,7 +33,6 @@ build_sources_headers string.h string/common.h
 build_sources_headers string/dynamic.h string/dynamics.h string/dynamicss.h
 build_sources_headers string/map.h string/maps.h string/mapss.h
 build_sources_headers string/map_multi.h string/map_multis.h string/map_multiss.h
-build_sources_headers string/quantity.h string/quantitys.h string/quantityss.h
 build_sources_headers string/static.h string/statics.h string/staticss.h
 build_sources_headers string/triple.h string/triples.h string/tripless.h
 
index 9ff452df8e10b16c16696b9923282fc543815bb3..d59746314bfa196e1dab70b31381d0ba4e70f7c6 100644 (file)
@@ -49,8 +49,6 @@ build_sources_program test-string-mapss_delete_callback.c test-string-mapss_dest
 build_sources_program test-string-mash.c test-string-mash_nulless.c
 build_sources_program test-string-mish.c test-string-mish_nulless.c
 build_sources_program test-string-prepend.c test-string-prepend_assure.c test-string-prepend_assure_nulless.c test-string-prepend_nulless.c
-build_sources_program test-string-quantitys_append.c test-string-quantitys_append_all.c test-string-quantityss_append.c test-string-quantityss_append_all.c
-build_sources_program test-string-quantityss_delete_callback.c test-string-quantityss_destroy_callback.c
 build_sources_program test-string-seek_line.c test-string-seek_line_to.c test-string-seek_to.c
 build_sources_program test-string-triples_append.c test-string-triples_append_all.c test-string-tripless_append.c test-string-tripless_append_all.c
 build_sources_program test-string-triples_delete_callback.c test-string-triples_destroy_callback.c
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_append.c b/level_0/f_string/tests/unit/c/test-string-quantitys_append.c
deleted file mode 100644 (file)
index 181186d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantitys_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantitys_append__works(void **state) {
-
-  const f_string_quantity_t source = macro_f_string_quantity_t_initialize_1(1, 2);
-  f_string_quantitys_t destination = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_append(source, &destination);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(destination.used, 1);
-    assert_int_equal(destination.array[0].start, source.start);
-    assert_int_equal(destination.array[0].total, source.total);
-  }
-
-  free((void *) destination.array);
-}
-
-void test__f_string_quantitys_append__parameter_checking(void **state) {
-
-  const f_string_quantity_t data = f_string_quantity_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_append.h b/level_0/f_string/tests/unit/c/test-string-quantitys_append.h
deleted file mode 100644 (file)
index 8f023bd..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_string_quantitys_append_h
-#define _TEST__F_string_quantitys_append_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantitys_append()
- */
-extern void test__f_string_quantitys_append__works(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantitys_append()
- */
-extern void test__f_string_quantitys_append__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantitys_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c b/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.c
deleted file mode 100644 (file)
index e872384..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantitys_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantitys_append_all__works(void **state) {
-
-  const int length_sources = 2;
-
-  f_string_quantity_t sources_array[] = {
-    macro_f_string_quantity_t_initialize_1(1, 2),
-    macro_f_string_quantity_t_initialize_1(3, 4),
-  };
-
-  const f_string_quantitys_t source = macro_f_string_quantitys_t_initialize_1(sources_array, 0, length_sources);
-  f_string_quantitys_t destination = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_append_all(source, &destination);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(destination.used, source.used);
-    assert_int_equal(destination.size, source.used);
-
-    for (f_number_unsigned_t i = 0; i < length_sources; ++i) {
-
-      assert_int_equal(destination.array[i].start, source.array[i].start);
-      assert_int_equal(destination.array[i].total, source.array[i].total);
-    } // for
-  }
-
-  free((void *) destination.array);
-}
-
-void test__f_string_quantitys_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t source = f_string_quantitys_t_initialize;
-  f_string_quantitys_t destination = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_memory_array_resize(length, sizeof(f_string_quantity_t), (void **) &source.array, &source.used, &source.size);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_quantitys_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_string_quantitys_append_all__parameter_checking(void **state) {
-
-  const f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantitys_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.h b/level_0/f_string/tests/unit/c/test-string-quantitys_append_all.h
deleted file mode 100644 (file)
index 0c22220..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_string_quantitys_append_all_h
-#define _TEST__F_string_quantitys_append_all_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantitys_append_all()
- */
-extern void test__f_string_quantitys_append_all__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_quantitys_append_all()
- */
-extern void test__f_string_quantitys_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantitys_append_all()
- */
-extern void test__f_string_quantitys_append_all__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantitys_append_all_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_append.c b/level_0/f_string/tests/unit/c/test-string-quantityss_append.c
deleted file mode 100644 (file)
index 801fbf7..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_append.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_append__works(void **state) {
-
-  const int length_sources = 2;
-
-  f_string_quantity_t sources_array[] = {
-    macro_f_string_quantity_t_initialize_1(1, 2),
-    macro_f_string_quantity_t_initialize_1(3, 4),
-  };
-
-  const f_string_quantitys_t source = macro_f_string_quantitys_t_initialize_1(sources_array, 0, length_sources);
-  f_string_quantityss_t destination = f_string_quantityss_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_append(source, &destination);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(destination.array[0].used, length_sources);
-
-    for (f_number_unsigned_t i = 0; i < length_sources; ++i) {
-
-      assert_int_equal(destination.array[0].array[i].start, sources_array[i].start);
-      assert_int_equal(destination.array[0].array[i].total, sources_array[i].total);
-    } // for
-  }
-
-  free((void *) destination.array[0].array);
-  free((void *) destination.array);
-}
-
-void test__f_string_quantityss_append__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_quantitys_t source = f_string_quantityss_t_initialize;
-  f_string_quantityss_t destination = f_string_quantityss_t_initialize;
-
-  {
-    const f_status_t status = f_memory_array_resize(length, sizeof(f_string_quantity_t), (void **) &source.array, &source.used, &source.size);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_quantityss_append(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_string_quantityss_append__parameter_checking(void **state) {
-
-  f_string_quantitys_t data = f_string_quantitys_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_append(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_append.h b/level_0/f_string/tests/unit/c/test-string-quantityss_append.h
deleted file mode 100644 (file)
index 7ef50a9..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_string_quantityss_append_h
-#define _TEST__F_string_quantityss_append_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_append()
- */
-extern void test__f_string_quantityss_append__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_quantityss_append()
- */
-extern void test__f_string_quantityss_append__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantityss_append()
- */
-extern void test__f_string_quantityss_append__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantityss_append_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_append_all.c b/level_0/f_string/tests/unit/c/test-string-quantityss_append_all.c
deleted file mode 100644 (file)
index 73a9a7b..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_append_all.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_append_all__works(void **state) {
-
-  const int length_sources = 2;
-  const int length_sources_set = 2;
-
-  f_string_quantity_t sources_array1[] = {
-    macro_f_string_quantity_t_initialize_1(1, 2),
-    macro_f_string_quantity_t_initialize_1(3, 4),
-  };
-
-  f_string_quantity_t sources_array2[] = {
-    macro_f_string_quantity_t_initialize_1(5, 6),
-    macro_f_string_quantity_t_initialize_1(7, 8),
-  };
-
-  f_string_quantitys_t sources_set_array[] = {
-    macro_f_string_quantitys_t_initialize_1(sources_array1, 0, length_sources),
-    macro_f_string_quantitys_t_initialize_1(sources_array2, 0, length_sources),
-  };
-
-  const f_string_quantityss_t source = macro_f_string_quantityss_t_initialize_1(sources_set_array, 0, length_sources_set);
-  f_string_quantityss_t destination = f_string_quantityss_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_append_all(source, &destination);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(destination.used, source.used);
-
-    for (f_number_unsigned_t j = 0; j < length_sources_set; ++j) {
-
-      for (f_number_unsigned_t i = 0; i < length_sources; ++i) {
-
-        assert_int_equal(destination.array[j].array[i].start, sources_set_array[j].array[i].start);
-        assert_int_equal(destination.array[j].array[i].total, sources_set_array[j].array[i].total);
-      } // for
-    } // for
-  }
-
-  for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
-    free((void *) destination.array[i].array);
-  } // for
-
-  free((void *) destination.array);
-}
-
-void test__f_string_quantityss_append_all__returns_data_not(void **state) {
-
-  const int length = 5;
-  f_string_quantityss_t source = f_string_quantityss_t_initialize;
-  f_string_quantityss_t destination = f_string_quantityss_t_initialize;
-
-  {
-    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_string_quantitys_t), (void **) &source.array, &source.used, &source.size, &f_string_quantityss_delete_callback);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(source.used, 0);
-    assert_int_equal(source.size, length);
-  }
-
-  {
-    const f_status_t status = f_string_quantityss_append_all(source, &destination);
-
-    assert_int_equal(status, F_data_not);
-    assert_int_equal(destination.used, 0);
-    assert_int_equal(destination.size, 0);
-    assert_null(destination.array);
-  }
-
-  free((void *) source.array);
-}
-
-void test__f_string_quantityss_append_all__parameter_checking(void **state) {
-
-  const f_string_quantityss_t data = f_string_quantityss_t_initialize;
-
-  {
-    const f_status_t status = f_string_quantityss_append_all(data, 0);
-
-    assert_int_equal(status, F_status_set_error(F_parameter));
-  }
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_append_all.h b/level_0/f_string/tests/unit/c/test-string-quantityss_append_all.h
deleted file mode 100644 (file)
index 28f45bc..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_string_quantityss_append_all_h
-#define _TEST__F_string_quantityss_append_all_h
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_append_all()
- */
-extern void test__f_string_quantityss_append_all__works(void **state);
-
-/**
- * Test that the function returns F_data_not when asked to copy an empty structure.
- *
- * @see f_string_quantityss_append_all()
- */
-extern void test__f_string_quantityss_append_all__returns_data_not(void **state);
-
-/**
- * Test that the function correctly fails on invalid parameter.
- *
- * @see f_string_quantityss_append_all()
- */
-extern void test__f_string_quantityss_append_all__parameter_checking(void **state);
-
-#endif // _TEST__F_string_quantityss_append_all_h
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.c b/level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.c
deleted file mode 100644 (file)
index 061a069..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_delete_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_delete_callback__fails(void **state) {
-
-  mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
-
-  f_string_quantity_t data = f_string_quantity_t_initialize;
-  f_string_quantity_t data_array[] = { data };
-  f_string_quantitys_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_string_quantitys_t datas_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_resize, true);
-    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
-
-    const f_status_t status = f_string_quantityss_delete_callback(0, 1, (void *) datas_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_string_quantityss_delete_callback__works(void **state) {
-
-  mock_unwrap = 0;
-  mock_unwrap_f_memory = 1;
-
-  const f_number_unsigned_t length = 1;
-
-  f_string_quantityss_t datass = f_string_quantityss_t_initialize;
-
-  {
-    f_status_t status = f_memory_array_resize(length, sizeof(f_string_quantitys_t), (void **) &datass.array, &datass.used, &datass.size);
-    assert_int_equal(status, F_okay);
-
-    status = f_memory_array_resize(1, sizeof(f_string_quantity_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
-    assert_int_equal(status, F_okay);
-  }
-
-  {
-    const f_status_t status = f_string_quantityss_delete_callback(0, length, (void *) datass.array);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(datass.array[0].size, 0);
-  }
-
-  free((void *) datass.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.h b/level_0/f_string/tests/unit/c/test-string-quantityss_delete_callback.h
deleted file mode 100644 (file)
index 4f3ec97..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_string__quantityss_delete_callback
-#define _TEST__F_string__quantityss_delete_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_string_quantityss_delete_callback()
- */
-extern void test__f_string_quantityss_delete_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_delete_callback()
- */
-extern void test__f_string_quantityss_delete_callback__works(void **state);
-
-#endif // _TEST__F_string__quantityss_delete_callback
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.c b/level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.c
deleted file mode 100644 (file)
index 35fe553..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "test-string.h"
-#include "test-string-quantityss_destroy_callback.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void test__f_string_quantityss_destroy_callback__fails(void **state) {
-
-  mock_unwrap = 0;
-  mock_unwrap_f_memory = 0;
-
-  f_string_quantity_t data = f_string_quantity_t_initialize;
-  f_string_quantity_t data_array[] = { data };
-  f_string_quantitys_t datas = { .array = data_array, .used = 1, .size = 1 };
-  f_string_quantitys_t datas_array[] = { datas };
-
-  {
-    will_return(__wrap_f_memory_array_adjust, true);
-    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
-
-    const f_status_t status = f_string_quantityss_destroy_callback(0, 1, (void *) datas_array);
-
-    assert_int_equal(status, F_status_set_error(F_failure));
-  }
-}
-
-void test__f_string_quantityss_destroy_callback__works(void **state) {
-
-  mock_unwrap = 0;
-  mock_unwrap_f_memory = 1;
-
-  const f_number_unsigned_t length = 1;
-
-  f_string_quantityss_t datass = f_string_quantityss_t_initialize;
-
-  {
-    f_status_t status = f_memory_array_adjust(length, sizeof(f_string_quantitys_t), (void **) &datass.array, &datass.used, &datass.size);
-    assert_int_equal(status, F_okay);
-
-    status = f_memory_array_adjust(1, sizeof(f_string_quantity_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
-    assert_int_equal(status, F_okay);
-  }
-
-  {
-    const f_status_t status = f_string_quantityss_destroy_callback(0, length, (void *) datass.array);
-
-    assert_int_equal(status, F_okay);
-    assert_int_equal(datass.array[0].size, 0);
-  }
-
-  free((void *) datass.array);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.h b/level_0/f_string/tests/unit/c/test-string-quantityss_destroy_callback.h
deleted file mode 100644 (file)
index f88891b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: String
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the array types in the type project.
- */
-#ifndef _TEST__F_string__quantityss_destroy_callback
-#define _TEST__F_string__quantityss_destroy_callback
-
-/**
- * Test that the function fails.
- *
- * @see f_string_quantityss_destroy_callback()
- */
-extern void test__f_string_quantityss_destroy_callback__fails(void **state);
-
-/**
- * Test that the function works.
- *
- * @see f_string_quantityss_destroy_callback()
- */
-extern void test__f_string_quantityss_destroy_callback__works(void **state);
-
-#endif // _TEST__F_string__quantityss_destroy_callback
index a162a31cb754fc5fc9995b7e60ac6bac4de034fe..7abebf3fd4e0a4e952acf96ddccb7ea9e1c50706 100644 (file)
@@ -124,15 +124,6 @@ int main(void) {
     cmocka_unit_test(test__f_string_prepend_assure_nulless__works),
     cmocka_unit_test(test__f_string_prepend_nulless__works),
 
-    cmocka_unit_test(test__f_string_quantitys_append__works),
-    cmocka_unit_test(test__f_string_quantitys_append_all__works),
-    cmocka_unit_test(test__f_string_quantitys_append_all__returns_data_not),
-
-    cmocka_unit_test(test__f_string_quantityss_append__works),
-    cmocka_unit_test(test__f_string_quantityss_append__returns_data_not),
-    cmocka_unit_test(test__f_string_quantityss_append_all__works),
-    cmocka_unit_test(test__f_string_quantityss_append_all__returns_data_not),
-
     cmocka_unit_test(test__f_string_triples_append__works),
     cmocka_unit_test(test__f_string_triples_append_all__works),
     cmocka_unit_test(test__f_string_triples_append_all__returns_data_not),
@@ -185,11 +176,6 @@ int main(void) {
     cmocka_unit_test(test__f_string_mapss_delete_callback__works),
     cmocka_unit_test(test__f_string_mapss_destroy_callback__works),
 
-    cmocka_unit_test(test__f_string_quantityss_delete_callback__fails),
-    cmocka_unit_test(test__f_string_quantityss_destroy_callback__fails),
-    cmocka_unit_test(test__f_string_quantityss_delete_callback__works),
-    cmocka_unit_test(test__f_string_quantityss_destroy_callback__works),
-
     cmocka_unit_test(test__f_string_triples_delete_callback__fails),
     cmocka_unit_test(test__f_string_triples_destroy_callback__fails),
     cmocka_unit_test(test__f_string_triples_delete_callback__works),
@@ -274,11 +260,6 @@ int main(void) {
       cmocka_unit_test(test__f_string_prepend_assure_nulless__parameter_checking),
       cmocka_unit_test(test__f_string_prepend_nulless__parameter_checking),
 
-      cmocka_unit_test(test__f_string_quantitys_append__parameter_checking),
-      cmocka_unit_test(test__f_string_quantitys_append_all__parameter_checking),
-      cmocka_unit_test(test__f_string_quantityss_append__parameter_checking),
-      cmocka_unit_test(test__f_string_quantityss_append_all__parameter_checking),
-
       cmocka_unit_test(test__f_string_triples_append__parameter_checking),
       cmocka_unit_test(test__f_string_triples_append_all__parameter_checking),
       cmocka_unit_test(test__f_string_tripless_append__parameter_checking),
@@ -308,9 +289,6 @@ int main(void) {
       // f_string_mapss_delete_callback() doesn't use parameter checking.
       // f_string_mapss_destroy_callback() doesn't use parameter checking.
 
-      // f_string_quantityss_delete_callback() doesn't use parameter checking.
-      // f_string_quantityss_destroy_callback() doesn't use parameter checking.
-
       // f_string_triples_delete_callback() doesn't use parameter checking.
       // f_string_triples_destroy_callback() doesn't use parameter checking.
 
index 109711d27bc056eae5a33135d9bc2bf60528c583..fbe350c87f85f2414affd183c7c37c7954a8f8c9 100644 (file)
 #include "test-string-prepend_assure.h"
 #include "test-string-prepend_assure_nulless.h"
 #include "test-string-prepend_nulless.h"
-#include "test-string-quantitys_append.h"
-#include "test-string-quantitys_append_all.h"
-#include "test-string-quantityss_append.h"
-#include "test-string-quantityss_append_all.h"
-#include "test-string-quantityss_delete_callback.h"
-#include "test-string-quantityss_destroy_callback.h"
 #include "test-string-seek_line.h"
 #include "test-string-seek_line_to.h"
 #include "test-string-seek_to.h"
index c518a4206852d27ff3feb62b3afcf2d544d90c4a..bdd74644887ca70854f4c8c59a52c468f883a49a 100644 (file)
@@ -29,6 +29,7 @@
 #include <fll/level_0/type/cell.h>
 #include <fll/level_0/type/fll.h>
 #include <fll/level_0/type/mode.h>
+#include <fll/level_0/type/quantity.h>
 #include <fll/level_0/type/range.h>
 #include <fll/level_0/type/range_double.h>
 #include <fll/level_0/type/state.h>
diff --git a/level_0/f_type/c/type/quantity.h b/level_0/f_type/c/type/quantity.h
new file mode 100644 (file)
index 0000000..7ca7613
--- /dev/null
@@ -0,0 +1,105 @@
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines quantity type data.
+ *
+ * This is auto-included by type.h and should not need to be explicitly included.
+ */
+#ifndef _F_quantity_h
+#define _F_quantity_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Store quantity range based on a start position and a total.
+ *
+ * Similar to f_range_t, except total is relative to start and is not an absolute stop position.
+ *
+ * Two common uses for when total is 0 is:
+ * 1) Exactly that, process a total of 0 strings bytes.
+ * 2) Process with no limit, aka infinite.
+ *
+ * Properties:
+ *   - start: The position where the string starts (based on some string/buffer).
+ *   - total: The total number of elements within that string/buffer the quantity represents.
+ */
+#ifndef _di_f_quantity_t_
+  typedef struct {
+    f_number_unsigned_t start;
+    f_number_unsigned_t total;
+  } f_quantity_t;
+
+  #define f_quantity_t_initialize { 0, 0 }
+
+  #define macro_f_quantity_t_initialize_1(start, total) { start, total }
+
+  #define macro_f_quantity_t_clear(quantity) \
+    quantity.start = 0; \
+    quantity.total = 0;
+#endif // _di_f_quantity_t_
+
+/**
+ * An array of quantitys.
+ *
+ * Properties:
+ *   - array: The array of quantitys.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_quantitys_t_
+  typedef struct {
+    f_quantity_t *array;
+
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_quantitys_t;
+
+  #define f_quantitys_t_initialize { 0, 0, 0 }
+
+  #define macro_f_quantitys_t_initialize_1(array, size, used) { array, size, used }
+  #define macro_f_quantitys_t_initialize_2(array, length) { array, length, length }
+
+  #define macro_f_quantitys_t_clear(quantitys) \
+    quantitys.array = 0; \
+    quantitys.size = 0; \
+    quantitys.used = 0;
+#endif // _di_f_quantitys_t_
+
+/**
+ * This holds an array of f_quantitys_t.
+ *
+ * Properties:
+ *   - array: The array of quantitys arrays.
+ *   - size:  Total amount of allocated space.
+ *   - used:  Total number of allocated spaces used.
+ */
+#ifndef _di_f_quantityss_t_
+  typedef struct {
+    f_quantitys_t *array;
+
+    f_number_unsigned_t size;
+    f_number_unsigned_t used;
+  } f_quantityss_t;
+
+  #define f_quantityss_t_initialize { 0, 0, 0 }
+
+  #define macro_f_quantityss_t_initialize_1(array, size, used) { array, size, used }
+  #define macro_f_quantityss_t_initialize_2(array, length) { array, length, length }
+
+  #define macro_f_quantityss_t_clear(quantityss) \
+    quantityss.array = 0; \
+    quantityss.size = 0; \
+    quantityss.used = 0;
+#endif // _di_f_quantityss_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_quantity_h
index c033a5b15f0cb576ef6e63c8808dcab83e0ed9a1..d769cf1a9472e14b185c87c0263f07fcef2a09ab 100644 (file)
@@ -32,7 +32,7 @@ build_language c
 
 build_libraries -lc
 
-build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/range.h type/range_double.h type/state.h type/status.h type/time.h
+build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h
 
 build_script yes
 build_shared yes
index b6a03c6c013982c47005cbf605c6f95ee9c8b41a..c40939282d85276832bea7131ccff8f819ccad30 100644 (file)
@@ -28,6 +28,9 @@
 #include <fll/level_0/type_array/int128.h>
 #include <fll/level_0/type_array/number_signed.h>
 #include <fll/level_0/type_array/number_unsigned.h>
+#include <fll/level_0/type_array/quantity.h>
+#include <fll/level_0/type_array/quantitys.h>
+#include <fll/level_0/type_array/quantityss.h>
 #include <fll/level_0/type_array/range.h>
 #include <fll/level_0/type_array/ranges.h>
 #include <fll/level_0/type_array/rangess.h>
diff --git a/level_0/f_type_array/c/type_array/quantity.c b/level_0/f_type_array/c/type_array/quantity.c
new file mode 100644 (file)
index 0000000..f569d9f
--- /dev/null
@@ -0,0 +1,14 @@
+#include "../type_array.h"
+#include "quantity.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_quantity_empty_c_
+  const f_quantity_t f_quantity_empty_c = { 0, 0 };
+#endif // _di_f_quantity_empty_c_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/c/type_array/quantity.h b/level_0/f_type_array/c/type_array/quantity.h
new file mode 100644 (file)
index 0000000..eb0aca6
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * 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_quantity_h
+#define _F_type_array_quantity_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Provide a static empty quantity.
+ *
+ * This is intended to represent an empty or disabled quantity.
+ */
+#ifndef _di_f_quantity_empty_c_
+  extern const f_quantity_t f_quantity_empty_c;
+#endif // _di_f_quantity_empty_c_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_quantity_h
similarity index 52%
rename from level_0/f_string/c/string/quantitys.c
rename to level_0/f_type_array/c/type_array/quantitys.c
index 134e1027277d0b0732997d035daebcf0e51f29f0..28f0a0d1add1d73b37a29c5b23c4bd26b6d6f9f8 100644 (file)
@@ -1,18 +1,18 @@
-#include "../string.h"
-#include "../private-string.h"
+#include "../type_array.h"
+#include "quantitys.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_quantitys_append_
-  f_status_t f_string_quantitys_append(const f_string_quantity_t source, f_string_quantitys_t * const destination) {
+#ifndef _di_f_quantitys_append_
+  f_status_t f_quantitys_append(const f_quantity_t source, f_quantitys_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
     {
-      const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_quantity_t), (void **) &destination->array, &destination->used, &destination->size);
+      const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_quantity_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
     }
 
@@ -21,10 +21,10 @@ extern "C" {
 
     return F_okay;
   }
-#endif // _di_f_string_quantitys_append_
+#endif // _di_f_quantitys_append_
 
-#ifndef _di_f_string_quantitys_append_all_
-  f_status_t f_string_quantitys_append_all(const f_string_quantitys_t source, f_string_quantitys_t * const destination) {
+#ifndef _di_f_quantitys_append_all_
+  f_status_t f_quantitys_append_all(const f_quantitys_t source, f_quantitys_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -32,19 +32,19 @@ extern "C" {
     if (!source.used) return F_data_not;
 
     {
-      const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_quantity_t), (void **) &destination->array, &destination->used, &destination->size);
+      const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_quantity_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
     }
 
-    for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
+    for (f_number_unsigned_t i = 0; i < source.used; ++i) {
 
       destination->array[destination->used].start = source.array[i].start;
-      destination->array[destination->used].total = source.array[i].total;
+      destination->array[destination->used++].total = source.array[i].total;
     } // for
 
     return F_okay;
   }
-#endif // _di_f_string_quantitys_append_all_
+#endif // _di_f_quantitys_append_all_
 
 #ifdef __cplusplus
 } // extern "C"
diff --git a/level_0/f_type_array/c/type_array/quantitys.h b/level_0/f_type_array/c/type_array/quantitys.h
new file mode 100644 (file)
index 0000000..38dd611
--- /dev/null
@@ -0,0 +1,63 @@
+/**
+ * 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_quantitys_h
+#define _F_type_array_quantitys_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Append the single source quantity onto the destination.
+ *
+ * @param source
+ *   The source quantity to append.
+ * @param destination
+ *   The destination quantitys the source is appended onto.
+ *
+ * @return
+ *   F_okay on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_quantitys_append_
+  extern f_status_t f_quantitys_append(const f_quantity_t source, f_quantitys_t * const destination);
+#endif // _di_f_quantitys_append_
+
+/**
+ * Append the source quantitys onto the destination.
+ *
+ * @param source
+ *   The source quantitys to append.
+ * @param destination
+ *   The destination quantitys the source is appended onto.
+ *
+ * @return
+ *   F_okay on success.
+ *   F_data_not on success, but there is nothing to append (size == 0).
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_quantitys_append_all_
+  extern f_status_t f_quantitys_append_all(const f_quantitys_t source, f_quantitys_t * const destination);
+#endif // _di_f_quantitys_append_all_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_quantitys_h
similarity index 55%
rename from level_0/f_string/c/string/quantityss.c
rename to level_0/f_type_array/c/type_array/quantityss.c
index 72a1ec3b55d70451899564dc02bf01e602eaeba6..7148b16f3df3af6265f3a17a3748bb305b4b5655 100644 (file)
@@ -1,12 +1,12 @@
-#include "../string.h"
-#include "../private-string.h"
+#include "../type_array.h"
+#include "quantityss.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_f_string_quantityss_append_
-  f_status_t f_string_quantityss_append(const f_string_quantitys_t source, f_string_quantityss_t * const destination) {
+#ifndef _di_f_quantityss_append_
+  f_status_t f_quantityss_append(const f_quantitys_t source, f_quantityss_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -14,14 +14,14 @@ extern "C" {
     if (!source.used) return F_data_not;
 
     {
-      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_string_quantitys_t), (void **) &destination->array, &destination->used, &destination->size);
+      f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_quantitys_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
 
-      f_string_quantitys_t * const destination_inner = &destination->array[destination->used];
+      f_quantitys_t * const destination_inner = &destination->array[destination->used];
       destination_inner->used = 0;
 
       if (source.used) {
-        status = f_memory_array_increase_by(source.used, sizeof(f_string_quantity_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
+        status = f_memory_array_increase_by(source.used, sizeof(f_quantity_t), (void **) &destination_inner->array, &destination_inner->used, &destination_inner->size);
         if (F_status_is_error(status)) return status;
 
         for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination_inner->used) {
@@ -36,10 +36,10 @@ extern "C" {
 
     return F_okay;
   }
-#endif // _di_f_string_quantityss_append_
+#endif // _di_f_quantityss_append_
 
-#ifndef _di_f_string_quantityss_append_all_
-  f_status_t f_string_quantityss_append_all(const f_string_quantityss_t source, f_string_quantityss_t * const destination) {
+#ifndef _di_f_quantityss_append_all_
+  f_status_t f_quantityss_append_all(const f_quantityss_t source, f_quantityss_t * const destination) {
     #ifndef _di_level_0_parameter_checking_
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -47,10 +47,10 @@ extern "C" {
     if (!source.used) return F_data_not;
 
     {
-      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_string_quantitys_t), (void **) &destination->array, &destination->used, &destination->size);
+      f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_quantitys_t), (void **) &destination->array, &destination->used, &destination->size);
       if (F_status_is_error(status)) return status;
 
-      f_string_quantitys_t * destination_inner = 0;
+      f_quantitys_t * destination_inner = 0;
       f_number_unsigned_t j = 0;
 
       for (f_number_unsigned_t i = 0; i < source.used; ++i, ++destination->used) {
@@ -59,7 +59,7 @@ extern "C" {
         destination_inner->used = 0;
 
         if (source.array[i].used) {
-          status = f_memory_array_increase_by(source.array[i].used, sizeof(f_string_quantity_t), (void **) &destination->array[destination->used].array, &destination->array[destination->used].used, &destination->array[destination->used].size);
+          status = f_memory_array_increase_by(source.array[i].used, sizeof(f_quantity_t), (void **) &destination->array[destination->used].array, &destination->array[destination->used].used, &destination->array[destination->used].size);
           if (F_status_is_error(status)) return status;
 
           for (j = 0; j < source.array[i].used; ++j, ++destination_inner->used) {
@@ -73,19 +73,19 @@ extern "C" {
 
     return F_okay;
   }
-#endif // _di_f_string_quantityss_append_all_
+#endif // _di_f_quantityss_append_all_
 
-#ifndef _di_f_string_quantityss_delete_callback_
-  f_status_t f_string_quantityss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_quantityss_delete_callback_
+  f_status_t f_quantityss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
     {
-      f_string_quantitys_t * const array = (f_string_quantitys_t *) void_array;
+      f_quantitys_t * const array = (f_quantitys_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_string_quantity_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          status = f_memory_array_resize(0, sizeof(f_quantity_t), (void **) &array[i].array, &array[i].used, &array[i].size);
           if (F_status_is_error(status)) return status;
         }
       } // for
@@ -93,19 +93,19 @@ extern "C" {
 
     return F_okay;
   }
-#endif // _di_f_string_quantityss_delete_callback_
+#endif // _di_f_quantityss_delete_callback_
 
-#ifndef _di_f_string_quantityss_destroy_callback_
-  f_status_t f_string_quantityss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+#ifndef _di_f_quantityss_destroy_callback_
+  f_status_t f_quantityss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
 
     {
-      f_string_quantitys_t * const array = (f_string_quantitys_t *) void_array;
+      f_quantitys_t * const array = (f_quantitys_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_string_quantity_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+          status = f_memory_array_adjust(0, sizeof(f_quantity_t), (void **) &array[i].array, &array[i].used, &array[i].size);
           if (F_status_is_error(status)) return status;
         }
       } // for
@@ -113,7 +113,8 @@ extern "C" {
 
     return F_okay;
   }
-#endif // _di_f_string_quantityss_destroy_callback_
+#endif // _di_f_quantityss_destroy_callback_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
similarity index 53%
rename from level_0/f_string/c/string/quantityss.h
rename to level_0/f_type_array/c/type_array/quantityss.h
index 7e3810ceced46555592874462bdd7508ecadfaa6..1db6e0bc8c63d3485dc7abedd9aa23da9b5d6f15 100644 (file)
@@ -1,49 +1,22 @@
 /**
  * FLL - Level 0
  *
- * Project: String
+ * Project: Type
  * API Version: 0.7
  * Licenses: lgpl-2.1-or-later
  *
- * Defines quantity string data.
+ * Defines data to be used for/by type (array) related functionality.
  *
- * This is auto-included by string.h and should not need to be explicitly included.
+ * This is auto-included by type_array.h and should not need to be explicitly included.
  */
-#ifndef _F_string_quantityss_h
-#define _F_string_quantityss_h
+#ifndef _F_type_array_quantityss_h
+#define _F_type_array_quantityss_h
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /**
- * This holds an array of f_string_quantitys_t.
- *
- * Properties:
- *   - array: The array of quantitys arrays.
- *   - size:  Total amount of allocated space.
- *   - used:  Total number of allocated spaces used.
- */
-#ifndef _di_f_string_quantityss_t_
-  typedef struct {
-    f_string_quantitys_t *array;
-
-    f_number_unsigned_t size;
-    f_number_unsigned_t used;
-  } f_string_quantityss_t;
-
-  #define f_string_quantityss_t_initialize { 0, 0, 0 }
-
-  #define macro_f_string_quantityss_t_initialize_1(array, size, used) { array, size, used }
-  #define macro_f_string_quantityss_t_initialize_2(array, length) { array, length, length }
-
-  #define macro_f_string_quantityss_t_clear(quantityss) \
-    quantityss.array = 0; \
-    quantityss.size = 0; \
-    quantityss.used = 0;
-#endif // _di_f_string_quantityss_t_
-
-/**
  * Append the single source quantitys onto the destination.
  *
  * @param source
@@ -59,9 +32,9 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_string_quantityss_append_
-  extern f_status_t f_string_quantityss_append(const f_string_quantitys_t source, f_string_quantityss_t * const destination);
-#endif // _di_f_string_quantityss_append_
+#ifndef _di_f_quantityss_append_
+  extern f_status_t f_quantityss_append(const f_quantitys_t source, f_quantityss_t * const destination);
+#endif // _di_f_quantityss_append_
 
 /**
  * Append the source quantityss onto the destination.
@@ -79,12 +52,12 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_memory_resize().
  */
-#ifndef _di_f_string_quantityss_append_all_
-  extern f_status_t f_string_quantityss_append_all(const f_string_quantityss_t source, f_string_quantityss_t * const destination);
-#endif // _di_f_string_quantityss_append_all_
+#ifndef _di_f_quantityss_append_all_
+  extern f_status_t f_quantityss_append_all(const f_quantityss_t source, f_quantityss_t * const destination);
+#endif // _di_f_quantityss_append_all_
 
 /**
- * A callback intended to be passed to f_memory_arrayss_resize() for an f_string_quantityss_t structure.
+ * A callback intended to be passed to f_memory_arrayss_resize() for an f_quantityss_t structure.
  *
  * This is only called when shrinking the array and generally should perform deallocations.
  *
@@ -107,12 +80,12 @@ extern "C" {
  *
  * @see f_memory_array_resize()
  */
-#ifndef _di_f_string_quantityss_delete_callback_
-  extern f_status_t f_string_quantityss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_string_quantityss_delete_callback_
+#ifndef _di_f_quantityss_delete_callback_
+  extern f_status_t f_quantityss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_quantityss_delete_callback_
 
 /**
- * A callback intended to be passed to f_memory_arrayss_adjust() for an f_string_quantityss_t structure.
+ * A callback intended to be passed to f_memory_arrayss_adjust() for an f_quantityss_t structure.
  *
  * This is only called when shrinking the array and generally should perform deallocations.
  *
@@ -135,12 +108,12 @@ extern "C" {
  *
  * @see f_memory_array_adjust()
  */
-#ifndef _di_f_string_quantityss_destroy_callback_
-  extern f_status_t f_string_quantityss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
-#endif // _di_f_string_quantityss_destroy_callback_
+#ifndef _di_f_quantityss_destroy_callback_
+  extern f_status_t f_quantityss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_quantityss_destroy_callback_
 
 #ifdef __cplusplus
 } // extern "C"
 #endif
 
-#endif // _F_string_quantityss_h
+#endif // _F_type_array_quantityss_h
index 38b960abf4a9baca62e6c204b9a2729c0aabcb62..48a82c44c32ea3efbf30f94599ba88fe9c5ebb80 100644 (file)
@@ -33,9 +33,9 @@ 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/poll.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/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/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_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/poll.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/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/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_script yes
 build_shared yes
index b9a7a7b0e0089485e2c5df4497fd67e8967aa8ce..2bfe367c2d09652404edad59f0478f126118a7d7 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/poll.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/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/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 ../../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/poll.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/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/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_script yes
 build_shared yes
index 33d30092a6ea9258c1b114af6c1984ec8bc2bfd4..f1bc7a7926e87aba735393f09d922424f629cc22 100644 (file)
@@ -34,6 +34,8 @@ build_sources_program test-type_array-int128ss_delete_callback.c test-type_array
 build_sources_program test-type_array-number_signedss_delete_callback.c test-type_array-number_signedss_destroy_callback.c
 build_sources_program test-type_array-number_unsignedss_delete_callback.c test-type_array-number_unsignedss_destroy_callback.c
 build_sources_program test-type_array-pollss_delete_callback.c test-type_array-pollss_destroy_callback.c
+build_sources_program test-type_array-quantitys_append.c test-type_array-quantitys_append_all.c test-type_array-quantityss_append.c test-type_array-quantityss_append_all.c
+build_sources_program test-type_array-quantityss_delete_callback.c test-type_array-quantityss_destroy_callback.c
 build_sources_program test-type_array-ranges_append.c test-type_array-ranges_append_all.c test-type_array-rangess_append.c test-type_array-rangess_append_all.c
 build_sources_program test-type_array-rangess_delete_callback.c test-type_array-rangess_destroy_callback.c
 build_sources_program test-type_array-range_doubles_append.c test-type_array-range_doubles_append_all.c test-type_array-range_doubless_append.c test-type_array-range_doubless_append_all.c
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append.c
new file mode 100644 (file)
index 0000000..d2ac352
--- /dev/null
@@ -0,0 +1,38 @@
+#include "test-type_array.h"
+#include "test-type_array-quantitys_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_quantitys_append__works(void **state) {
+
+  const f_quantity_t source = macro_f_quantity_t_initialize_1(1, 2);
+  f_quantitys_t destination = f_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_quantitys_append(source, &destination);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(destination.used, 1);
+    assert_int_equal(destination.array[0].start, source.start);
+    assert_int_equal(destination.array[0].total, source.total);
+  }
+
+  free((void *) destination.array);
+}
+
+void test__f_type_array_quantitys_append__parameter_checking(void **state) {
+
+  const f_quantity_t data = f_quantity_t_initialize;
+
+  {
+    const f_status_t status = f_quantitys_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append.h b/level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append.h
new file mode 100644 (file)
index 0000000..1b5f135
--- /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__quantitys_append_h
+#define _TEST__F_type_array__quantitys_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_quantitys_append()
+ */
+extern void test__f_type_array_quantitys_append__works(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_quantitys_append()
+ */
+extern void test__f_type_array_quantitys_append__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__quantitys_append_h
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append_all.c
new file mode 100644 (file)
index 0000000..a4fe8ca
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-type_array.h"
+#include "test-type_array-quantitys_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_quantitys_append_all__works(void **state) {
+
+  const int length_sources = 2;
+
+  f_quantity_t sources_array[] = {
+    macro_f_quantity_t_initialize_1(1, 2),
+    macro_f_quantity_t_initialize_1(3, 4),
+  };
+
+  const f_quantitys_t source = macro_f_quantitys_t_initialize_1(sources_array, 0, length_sources);
+  f_quantitys_t destination = f_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_quantitys_append_all(source, &destination);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(destination.used, source.used);
+    assert_int_equal(destination.size, source.used);
+
+    for (f_number_unsigned_t i = 0; i < length_sources; ++i) {
+
+      assert_int_equal(destination.array[i].start, source.array[i].start);
+      assert_int_equal(destination.array[i].total, source.array[i].total);
+    } // for
+  }
+
+  free((void *) destination.array);
+}
+
+void test__f_type_array_quantitys_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_quantitys_t source = f_quantitys_t_initialize;
+  f_quantitys_t destination = f_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_memory_array_resize(length, sizeof(f_quantity_t), (void **) &source.array, &source.used, &source.size);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_quantitys_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_quantitys_append_all__parameter_checking(void **state) {
+
+  const f_quantitys_t data = f_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_quantitys_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-quantitys_append_all.h
new file mode 100644 (file)
index 0000000..17839c2
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__quantitys_append_all_h
+#define _TEST__F_type_array__quantitys_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_quantitys_append_all()
+ */
+extern void test__f_type_array_quantitys_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_quantitys_append_all()
+ */
+extern void test__f_type_array_quantitys_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_quantitys_append_all()
+ */
+extern void test__f_type_array_quantitys_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__quantitys_append_all_h
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append.c b/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append.c
new file mode 100644 (file)
index 0000000..91da59d
--- /dev/null
@@ -0,0 +1,76 @@
+#include "test-type_array.h"
+#include "test-type_array-quantityss_append.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_quantityss_append__works(void **state) {
+
+  const int length_sources = 2;
+
+  f_quantity_t sources_array[] = {
+    macro_f_quantity_t_initialize_1(1, 2),
+    macro_f_quantity_t_initialize_1(3, 4),
+  };
+
+  const f_quantitys_t source = macro_f_quantitys_t_initialize_1(sources_array, 0, length_sources);
+  f_quantityss_t destination = f_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_quantityss_append(source, &destination);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(destination.array[0].used, length_sources);
+
+    for (f_number_unsigned_t i = 0; i < length_sources; ++i) {
+
+      assert_int_equal(destination.array[0].array[i].start, sources_array[i].start);
+      assert_int_equal(destination.array[0].array[i].total, sources_array[i].total);
+    } // for
+  }
+
+  free((void *) destination.array[0].array);
+  free((void *) destination.array);
+}
+
+void test__f_type_array_quantityss_append__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_quantitys_t source = f_quantityss_t_initialize;
+  f_quantityss_t destination = f_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_quantitys_t), (void **) &source.array, &source.used, &source.size, &f_quantityss_delete_callback);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_quantityss_append(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_quantityss_append__parameter_checking(void **state) {
+
+  f_quantitys_t data = f_quantitys_t_initialize;
+
+  {
+    const f_status_t status = f_quantityss_append(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append.h b/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append.h
new file mode 100644 (file)
index 0000000..bea2655
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__quantityss_append_h
+#define _TEST__F_type_array__quantityss_append_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_quantityss_append()
+ */
+extern void test__f_type_array_quantityss_append__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_quantityss_append()
+ */
+extern void test__f_type_array_quantityss_append__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_quantityss_append()
+ */
+extern void test__f_type_array_quantityss_append__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__quantityss_append_h
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append_all.c b/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append_all.c
new file mode 100644 (file)
index 0000000..6b8e3dc
--- /dev/null
@@ -0,0 +1,93 @@
+#include "test-type_array.h"
+#include "test-type_array-quantityss_append_all.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_quantityss_append_all__works(void **state) {
+
+  const int length_sources = 2;
+  const int length_sources_set = 2;
+
+  f_quantity_t sources_array1[] = {
+    macro_f_quantity_t_initialize_1(1, 2),
+    macro_f_quantity_t_initialize_1(3, 4),
+  };
+
+  f_quantity_t sources_array2[] = {
+    macro_f_quantity_t_initialize_1(5, 6),
+    macro_f_quantity_t_initialize_1(7, 8),
+  };
+
+  f_quantitys_t sources_set_array[] = {
+    macro_f_quantitys_t_initialize_1(sources_array1, 0, length_sources),
+    macro_f_quantitys_t_initialize_1(sources_array2, 0, length_sources),
+  };
+
+  const f_quantityss_t source = macro_f_quantityss_t_initialize_1(sources_set_array, 0, length_sources_set);
+  f_quantityss_t destination = f_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_quantityss_append_all(source, &destination);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(destination.used, source.used);
+
+    for (f_number_unsigned_t j = 0; j < length_sources_set; ++j) {
+
+      for (f_number_unsigned_t i = 0; i < length_sources; ++i) {
+
+        assert_int_equal(destination.array[j].array[i].start, sources_set_array[j].array[i].start);
+        assert_int_equal(destination.array[j].array[i].total, sources_set_array[j].array[i].total);
+      } // for
+    } // for
+  }
+
+  for (f_number_unsigned_t i = 0; i < destination.used; ++i) {
+    free((void *) destination.array[i].array);
+  } // for
+
+  free((void *) destination.array);
+}
+
+void test__f_type_array_quantityss_append_all__returns_data_not(void **state) {
+
+  const int length = 5;
+  f_quantityss_t source = f_quantityss_t_initialize;
+  f_quantityss_t destination = f_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_memory_arrays_resize(length, sizeof(f_quantitys_t), (void **) &source.array, &source.used, &source.size, &f_quantityss_delete_callback);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(source.used, 0);
+    assert_int_equal(source.size, length);
+  }
+
+  {
+    const f_status_t status = f_quantityss_append_all(source, &destination);
+
+    assert_int_equal(status, F_data_not);
+    assert_int_equal(destination.used, 0);
+    assert_int_equal(destination.size, 0);
+    assert_null(destination.array);
+  }
+
+  free((void *) source.array);
+}
+
+void test__f_type_array_quantityss_append_all__parameter_checking(void **state) {
+
+  const f_quantityss_t data = f_quantityss_t_initialize;
+
+  {
+    const f_status_t status = f_quantityss_append_all(data, 0);
+
+    assert_int_equal(status, F_status_set_error(F_parameter));
+  }
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append_all.h b/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_append_all.h
new file mode 100644 (file)
index 0000000..2b08e94
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * 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__quantityss_append_all_h
+#define _TEST__F_type_array__quantityss_append_all_h
+
+/**
+ * Test that the function works.
+ *
+ * @see f_quantityss_append_all()
+ */
+extern void test__f_type_array_quantityss_append_all__works(void **state);
+
+/**
+ * Test that the function returns F_data_not when asked to copy an empty structure.
+ *
+ * @see f_quantityss_append_all()
+ */
+extern void test__f_type_array_quantityss_append_all__returns_data_not(void **state);
+
+/**
+ * Test that the function correctly fails on invalid parameter.
+ *
+ * @see f_quantityss_append_all()
+ */
+extern void test__f_type_array_quantityss_append_all__parameter_checking(void **state);
+
+#endif // _TEST__F_type_array__quantityss_append_all_h
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_delete_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_delete_callback.c
new file mode 100644 (file)
index 0000000..7c8a63b
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-quantityss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_quantityss_delete_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_quantity_t data = f_quantity_t_initialize;
+  f_quantity_t data_array[] = { data };
+  f_quantitys_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_quantitys_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_resize, true);
+    will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+    const f_status_t status = f_quantityss_delete_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_quantityss_delete_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_quantityss_t datass = f_quantityss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_resize(length, sizeof(f_quantitys_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_resize(1, sizeof(f_quantity_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_quantityss_delete_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_delete_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_delete_callback.h
new file mode 100644 (file)
index 0000000..6a00e95
--- /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__quantityss_delete_callback
+#define _TEST__F_type_array__quantityss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_quantityss_delete_callback()
+ */
+extern void test__f_type_array_quantityss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_quantityss_delete_callback()
+ */
+extern void test__f_type_array_quantityss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__quantityss_delete_callback
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_destroy_callback.c b/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_destroy_callback.c
new file mode 100644 (file)
index 0000000..625a5d9
--- /dev/null
@@ -0,0 +1,57 @@
+#include "test-type_array.h"
+#include "test-type_array-quantityss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_quantityss_destroy_callback__fails(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 0;
+
+  f_quantity_t data = f_quantity_t_initialize;
+  f_quantity_t data_array[] = { data };
+  f_quantitys_t datas = { .array = data_array, .used = 1, .size = 1 };
+  f_quantitys_t datas_array[] = { datas };
+
+  {
+    will_return(__wrap_f_memory_array_adjust, true);
+    will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+    const f_status_t status = f_quantityss_destroy_callback(0, 1, (void *) datas_array);
+
+    assert_int_equal(status, F_status_set_error(F_failure));
+  }
+}
+
+void test__f_type_array_quantityss_destroy_callback__works(void **state) {
+
+  mock_unwrap = 0;
+  mock_unwrap_f_memory = 1;
+
+  const f_number_unsigned_t length = 1;
+
+  f_quantityss_t datass = f_quantityss_t_initialize;
+
+  {
+    f_status_t status = f_memory_array_adjust(length, sizeof(f_quantitys_t), (void **) &datass.array, &datass.used, &datass.size);
+    assert_int_equal(status, F_okay);
+
+    status = f_memory_array_adjust(1, sizeof(f_quantity_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+    assert_int_equal(status, F_okay);
+  }
+
+  {
+    const f_status_t status = f_quantityss_destroy_callback(0, length, (void *) datass.array);
+
+    assert_int_equal(status, F_okay);
+    assert_int_equal(datass.array[0].size, 0);
+  }
+
+  free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_destroy_callback.h b/level_0/f_type_array/tests/unit/c/test-type_array-quantityss_destroy_callback.h
new file mode 100644 (file)
index 0000000..8f2dff0
--- /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__quantityss_destroy_callback
+#define _TEST__F_type_array__quantityss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_quantityss_destroy_callback()
+ */
+extern void test__f_type_array_quantityss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_quantityss_destroy_callback()
+ */
+extern void test__f_type_array_quantityss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__quantityss_destroy_callback
index f18509c7d638b0154327e4be9c9032627014fc5f..67d18e5e00be7c4011b819dfcd222f332383bdf9 100644 (file)
@@ -83,6 +83,20 @@ int main(void) {
     cmocka_unit_test(test__f_type_array_pollss_destroy_callback__fails),
     cmocka_unit_test(test__f_type_array_pollss_destroy_callback__works),
 
+    cmocka_unit_test(test__f_type_array_quantitys_append__works),
+    cmocka_unit_test(test__f_type_array_quantitys_append_all__works),
+    cmocka_unit_test(test__f_type_array_quantitys_append_all__returns_data_not),
+
+    cmocka_unit_test(test__f_type_array_quantityss_append__works),
+    cmocka_unit_test(test__f_type_array_quantityss_append__returns_data_not),
+    cmocka_unit_test(test__f_type_array_quantityss_append_all__works),
+    cmocka_unit_test(test__f_type_array_quantityss_append_all__returns_data_not),
+
+    cmocka_unit_test(test__f_type_array_quantityss_delete_callback__fails),
+    cmocka_unit_test(test__f_type_array_quantityss_destroy_callback__fails),
+    cmocka_unit_test(test__f_type_array_quantityss_delete_callback__works),
+    cmocka_unit_test(test__f_type_array_quantityss_destroy_callback__works),
+
     cmocka_unit_test(test__f_type_array_ranges_append__works),
     cmocka_unit_test(test__f_type_array_ranges_append_all__works),
     cmocka_unit_test(test__f_type_array_ranges_append_all__returns_data_not),
@@ -173,6 +187,14 @@ int main(void) {
       // f_pollss_destroy_callback() doesn't use parameter checking.
       // f_pollss_delete_callback() doesn't use parameter checking.
 
+      cmocka_unit_test(test__f_type_array_quantitys_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_quantitys_append_all__parameter_checking),
+      cmocka_unit_test(test__f_type_array_quantityss_append__parameter_checking),
+      cmocka_unit_test(test__f_type_array_quantityss_append_all__parameter_checking),
+
+      // f_quantityss_delete_callback() doesn't use parameter checking.
+      // f_quantityss_destroy_callback() doesn't use parameter checking.
+
       cmocka_unit_test(test__f_type_array_ranges_append__parameter_checking),
       cmocka_unit_test(test__f_type_array_ranges_append_all__parameter_checking),
       cmocka_unit_test(test__f_type_array_rangess_append__parameter_checking),
index 30ebcc01c826a1310f948a91ab6a48bba98805c9..9c46ac98fde327882a42f7dedb07ee5762d8c78e 100644 (file)
 #include "test-type_array-number_unsignedss_destroy_callback.h"
 #include "test-type_array-pollss_delete_callback.h"
 #include "test-type_array-pollss_destroy_callback.h"
+#include "test-type_array-quantitys_append.h"
+#include "test-type_array-quantitys_append_all.h"
+#include "test-type_array-quantityss_append.h"
+#include "test-type_array-quantityss_append_all.h"
+#include "test-type_array-quantityss_delete_callback.h"
+#include "test-type_array-quantityss_destroy_callback.h"
 #include "test-type_array-ranges_append.h"
 #include "test-type_array-ranges_append_all.h"
 #include "test-type_array-rangess_append.h"
index 06e84ce77ed371f20d3eb2d43ad4eeea41e875c3..b3af143976e0f85437f9a650efe2c20e2297f64b 100644 (file)
@@ -5,6 +5,7 @@ f_status
 f_memory
 f_string
 f_utf
+f_type_array
 f_compare
 f_conversion
 f_parse
index af5a811a50bf0c0ccb06bb239343607643ef547f..9220a1ce05591f708159a2e473194e7fe5668d59 100644 (file)
@@ -31,7 +31,7 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc
-build_libraries-individual -lf_compare -lf_conversion -lf_parse -lf_memory -lf_status_string -lf_string -lf_utf
+build_libraries-individual -lf_compare -lf_conversion -lf_parse -lf_memory -lf_status_string -lf_string -lf_type_array -lf_utf
 
 build_sources_library status_string.c
 
index 3920c168d039af17d1cf565534c961e8bf774de0..ac28a61f60004a98094213c6ee53e0f6166a00db 100644 (file)
@@ -23,7 +23,7 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc -lcmocka
-build_libraries-individual -lf_compare -lf_conversion -lf_memory -lf_parse -lf_status_string -lf_string -lf_utf -lfl_status_string
+build_libraries-individual -lf_compare -lf_conversion -lf_memory -lf_parse -lf_status_string -lf_string -lf_type_array -lf_utf -lfl_status_string
 
 build_sources_program test-status_string-from.c
 build_sources_program test-status_string.c
index cd7677de0cb3eb6865927af4670209160143d089..32c31ca3ff6106f27a4f18073302b48e4f11ab39 100644 (file)
@@ -304,7 +304,6 @@ extern "C" {
         ++(*line);
       }
       else {
-        f_number_unsigned_t line_original = 0;
         f_number_unsigned_t j = 0;
         f_number_unsigned_t k = 0;
 
@@ -312,7 +311,6 @@ extern "C" {
 
           if (fss_read_signal_check(main)) return;
 
-          line_original = *line;
           main->setting.range = main->setting.contents.array[at].array[i];
           k = 0;
 
index 73c40fe40b449b2c19c679102214af0a31f8cf8a..b5bbb0b3c4508e726bf81d3571829113c732f364 100644 (file)
@@ -91,8 +91,9 @@ extern "C" {
                 fss_read_print_error(&main->program.error, macro_fss_read_f(f_string_dynamic_append));
               }
               else {
-                main->setting.objects.array[main->setting.objects.used++].stop = main->setting.objects.array[main->setting.objects.used].start + f_fss_payload_s.used - 1;
+                main->setting.objects.array[main->setting.objects.used].stop = main->setting.objects.array[main->setting.objects.used].start + f_fss_payload_s.used - 1;
                 main->setting.contents.array[main->setting.contents.used++].used = 0;
+                ++main->setting.objects.used;
 
                 main->setting.state.status = F_okay;
               }