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.
#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_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_
#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_
#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_
--- /dev/null
+#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_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_
#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_
#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_
#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_
+#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_
#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_
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
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
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
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
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
//#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_
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
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
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
* - 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.
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;
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;
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;
#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>
+++ /dev/null
-#include "../string.h"
-#include "../private-string.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
+++ /dev/null
-/**
- * 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
+++ /dev/null
-/**
- * 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
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_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_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
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_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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
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),
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),
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),
// 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.
#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"
#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>
--- /dev/null
+/**
+ * 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
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
#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>
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
-#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;
}
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_
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"
--- /dev/null
+/**
+ * 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
-#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_
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) {
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_
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) {
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) {
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
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
return F_okay;
}
-#endif // _di_f_string_quantityss_destroy_callback_
+#endif // _di_f_quantityss_destroy_callback_
+
#ifdef __cplusplus
} // extern "C"
#endif
/**
* 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
*
* 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.
*
* 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.
*
*
* @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.
*
*
* @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
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
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
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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
--- /dev/null
+#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
--- /dev/null
+/**
+ * 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
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),
// 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),
#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"
f_memory
f_string
f_utf
+f_type_array
f_compare
f_conversion
f_parse
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
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
++(*line);
}
else {
- f_number_unsigned_t line_original = 0;
f_number_unsigned_t j = 0;
f_number_unsigned_t k = 0;
if (fss_read_signal_check(main)) return;
- line_original = *line;
main->setting.range = main->setting.contents.array[at].array[i];
k = 0;
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;
}