From: Kevin Day Date: Sun, 6 Aug 2023 00:43:19 +0000 (-0500) Subject: Progress: Begin simplifying memory design, starting with f_number_unsigned_t array... X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=38e4397aa9645e13b79ac9bd6f7de649973fe769;p=fll Progress: Begin simplifying memory design, starting with f_number_unsigned_t array structures. I find that the use of custom per-type functions to simplify the usability of the library. I also find that this increases the complexity and size of the code base. I believe that over time this will become more complex and even harder to maintain. I have decided to start changing the design to go back to simple allocation methods that just require more variables. This simplifies the code and in theory will make it faster by having fewer function calls on the stack. This may even reduce the resulting binary size (and I hope it does). The down side is that the users of the library will once more have longer function call lines. This commit is the beginning of the redesign process. I also added the "append" and "append all" methods for f_memory_array calls. --- diff --git a/build/level_0/settings b/build/level_0/settings index fad50c3..4200861 100644 --- a/build/level_0/settings +++ b/build/level_0/settings @@ -77,7 +77,7 @@ 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_unsigned.c type_array/poll.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c -build_sources_library type_array/private-cell.c type_array/private-file.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-number_unsigned.c type_array/private-poll.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c +build_sources_library type_array/private-cell.c type_array/private-file.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-poll.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c build_sources_library utf.c private-utf.c 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 diff --git a/build/monolithic/settings b/build/monolithic/settings index cdf3334..4c2e7d0 100644 --- a/build/monolithic/settings +++ b/build/monolithic/settings @@ -77,7 +77,7 @@ build_sources_library level_0/string/static.c level_0/string/statics.c level_0/s 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_unsigned.c level_0/type_array/poll.c level_0/type_array/state.c level_0/type_array/status.c level_0/type_array/uint8.c level_0/type_array/uint16.c level_0/type_array/uint32.c level_0/type_array/uint64.c level_0/type_array/uint128.c -build_sources_library level_0/type_array/private-cell.c level_0/type_array/private-file.c level_0/type_array/private-fll_id.c level_0/type_array/private-int8.c level_0/type_array/private-int16.c level_0/type_array/private-int32.c level_0/type_array/private-int64.c level_0/type_array/private-int128.c level_0/type_array/private-number_unsigned.c level_0/type_array/private-poll.c level_0/type_array/private-state.c level_0/type_array/private-status.c level_0/type_array/private-uint8.c level_0/type_array/private-uint16.c level_0/type_array/private-uint32.c level_0/type_array/private-uint64.c level_0/type_array/private-uint128.c +build_sources_library level_0/type_array/private-cell.c level_0/type_array/private-file.c level_0/type_array/private-fll_id.c level_0/type_array/private-int8.c level_0/type_array/private-int16.c level_0/type_array/private-int32.c level_0/type_array/private-int64.c level_0/type_array/private-int128.c level_0/type_array/private-poll.c level_0/type_array/private-state.c level_0/type_array/private-status.c level_0/type_array/private-uint8.c level_0/type_array/private-uint16.c level_0/type_array/private-uint32.c level_0/type_array/private-uint64.c level_0/type_array/private-uint128.c build_sources_library level_0/utf.c level_0/private-utf.c level_0/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 diff --git a/build/stand_alone/byte_dump.settings b/build/stand_alone/byte_dump.settings index 6f92837..83e5983 100644 --- a/build/stand_alone/byte_dump.settings +++ b/build/stand_alone/byte_dump.settings @@ -33,7 +33,7 @@ build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_ build_sources_program fll/level_0/signal.c build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/private-dynamic.c fll/level_0/string/private-map.c fll/level_0/string/private-map_multi.c fll/level_0/string/private-quantity.c fll/level_0/string/private-range.c fll/level_0/string/private-triple.c fll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/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/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-number_unsigned.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c +build_sources_program fll/level_0/type_array/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-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 diff --git a/build/stand_alone/fake.settings b/build/stand_alone/fake.settings index 6eb23f9..b66de71 100644 --- a/build/stand_alone/fake.settings +++ b/build/stand_alone/fake.settings @@ -57,7 +57,7 @@ build_sources_program fll/level_0/signal.c build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/private-dynamic.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-dynamicss.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.c build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/range.c fll/level_0/string/ranges.c fll/level_0/string/rangess.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/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/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-number_unsigned.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c +build_sources_program fll/level_0/type_array/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-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-dynamic.c fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-dynamicss.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-mapss.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-map_multiss.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c fll/level_0/utf/private-tripless.c diff --git a/build/stand_alone/firewall.settings b/build/stand_alone/firewall.settings index b198f46..83238f9 100644 --- a/build/stand_alone/firewall.settings +++ b/build/stand_alone/firewall.settings @@ -43,7 +43,7 @@ build_sources_program fll/level_0/signal.c build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/dynamic.c fll/level_0/string/map.c fll/level_0/string/map_multi.c fll/level_0/string/private-dynamic.c fll/level_0/string/private-map.c fll/level_0/string/private-map_multi.c fll/level_0/string/private-quantity.c fll/level_0/string/private-range.c fll/level_0/string/private-triple.c fll/level_0/string/quantity.c fll/level_0/string/range.c fll/level_0/string/static.c fll/level_0/string/triple.c build_sources_program fll/level_0/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/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/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/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-number_unsigned.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c +build_sources_program fll/level_0/type_array/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-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 diff --git a/build/stand_alone/utf8.settings b/build/stand_alone/utf8.settings index 8f5c91b..dec6667 100644 --- a/build/stand_alone/utf8.settings +++ b/build/stand_alone/utf8.settings @@ -34,7 +34,7 @@ build_sources_program fll/level_0/signal.c build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c fll/level_0/string/private-dynamic.c fll/level_0/string/private-dynamics.c fll/level_0/string/private-dynamicss.c fll/level_0/string/private-maps.c fll/level_0/string/private-mapss.c fll/level_0/string/private-map_multis.c fll/level_0/string/private-map_multiss.c fll/level_0/string/private-quantitys.c fll/level_0/string/private-quantityss.c fll/level_0/string/private-ranges.c fll/level_0/string/private-rangess.c fll/level_0/string/private-triples.c fll/level_0/string/private-tripless.c build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/quantity.c fll/level_0/string/quantitys.c fll/level_0/string/quantityss.c fll/level_0/string/range.c fll/level_0/string/ranges.c fll/level_0/string/rangess.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/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/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-number_unsigned.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-uint128.c +build_sources_program fll/level_0/type_array/private-cell.c fll/level_0/type_array/private-fll_id.c fll/level_0/type_array/private-int8.c fll/level_0/type_array/private-int16.c fll/level_0/type_array/private-int32.c fll/level_0/type_array/private-int64.c fll/level_0/type_array/private-int128.c fll/level_0/type_array/private-state.c fll/level_0/type_array/private-status.c fll/level_0/type_array/private-uint8.c fll/level_0/type_array/private-uint16.c fll/level_0/type_array/private-uint32.c fll/level_0/type_array/private-uint64.c fll/level_0/type_array/private-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-dynamic.c fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-dynamicss.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-mapss.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-map_multiss.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c fll/level_0/utf/private-tripless.c diff --git a/level_0/f_console/c/console.c b/level_0/f_console/c/console.c index 161541b..97db647 100644 --- a/level_0/f_console/c/console.c +++ b/level_0/f_console/c/console.c @@ -669,7 +669,7 @@ extern "C" { } } - f_number_unsigneds_resize(0, &process.needs); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &process.needs.array, &process.needs.used, &process.needs.size); } #endif // _di_f_console_parameter_process_ diff --git a/level_0/f_console/c/console/common.c b/level_0/f_console/c/console/common.c index 6dfd769..52b78f1 100644 --- a/level_0/f_console/c/console/common.c +++ b/level_0/f_console/c/console/common.c @@ -150,7 +150,7 @@ extern "C" { if (!state) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - return f_number_unsigneds_resize(0, &state->needs); + return f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &state->needs.array, &state->needs.used, &state->needs.size); } #endif // _di_f_console_parameter_state_delete_ @@ -160,7 +160,7 @@ extern "C" { if (!state) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - return f_number_unsigneds_adjust(0, &state->needs); + return f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &state->needs.array, &state->needs.used, &state->needs.size); } #endif // _di_f_console_parameter_state_destroy_ @@ -174,20 +174,20 @@ extern "C" { for (f_number_unsigned_t i = 0; i < parameters->used; ++i) { - status = f_number_unsigneds_resize(0, ¶meters->array[i].locations); + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations.array, ¶meters->array[i].locations.used, ¶meters->array[i].locations.size); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_resize(0, ¶meters->array[i].locations_sub); + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations_sub.array, ¶meters->array[i].locations_sub.used, ¶meters->array[i].locations_sub.size); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_resize(0, ¶meters->array[i].values); + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].values.array, ¶meters->array[i].values.used, ¶meters->array[i].values.size); if (F_status_is_error(status)) return status; } // for status = f_string_dynamics_resize(0, ¶meters->arguments); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_resize(0, ¶meters->remaining); + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) ¶meters->remaining.array, ¶meters->remaining.used, ¶meters->remaining.size); if (F_status_is_error(status)) return status; return F_none; @@ -204,20 +204,21 @@ extern "C" { for (f_number_unsigned_t i = 0; i < parameters->used; ++i) { - status = f_number_unsigneds_adjust(0, ¶meters->array[i].locations); + status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations.array, ¶meters->array[i].locations.used, ¶meters->array[i].locations.size); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_adjust(0, ¶meters->array[i].locations_sub); + + status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].locations_sub.array, ¶meters->array[i].locations_sub.used, ¶meters->array[i].locations_sub.size); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_adjust(0, ¶meters->array[i].values); + status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->array[i].values.array, ¶meters->array[i].values.used, ¶meters->array[i].values.size); if (F_status_is_error(status)) return status; } // for status = f_string_dynamics_adjust(0, ¶meters->arguments); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_adjust(0, ¶meters->remaining); + status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) ¶meters->remaining.array, ¶meters->remaining.used, ¶meters->remaining.size); if (F_status_is_error(status)) return status; return F_none; diff --git a/level_0/f_console/c/console/common.h b/level_0/f_console/c/console/common.h index 21e9734..908a846 100644 --- a/level_0/f_console/c/console/common.h +++ b/level_0/f_console/c/console/common.h @@ -815,11 +815,9 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_string_dynamics_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_memory_array_resize(). * - * @see f_string_dynamics_resize() - * @see f_number_unsigneds_resize() + * @see f_memory_array_resize() */ #ifndef _di_f_console_parameter_state_delete_ extern f_status_t f_console_parameter_state_delete(f_console_parameter_state_t * const state); @@ -836,11 +834,9 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_string_dynamics_adjust(). - * Errors (with error bit) from: f_number_unsigneds_adjust(). + * Errors (with error bit) from: f_memory_array_adjust(). * - * @see f_string_dynamics_adjust() - * @see f_number_unsigneds_adjust() + * @see f_memory_array_adjust() */ #ifndef _di_f_console_parameter_state_destroy_ extern f_status_t f_console_parameter_state_destroy(f_console_parameter_state_t * const state); @@ -857,11 +853,11 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_string_dynamics_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_memory_array_resize(). + * Errors (with error bit) from: f_string_dynamics_adjust(). * - * @see f_string_dynamics_resize() - * @see f_number_unsigneds_resize() + * @see f_memory_array_resize() + * @see f_string_dynamics_adjust() */ #ifndef _di_f_console_parameters_delete_ extern f_status_t f_console_parameters_delete(f_console_parameters_t * const parameters); @@ -878,11 +874,11 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * + * Errors (with error bit) from: f_memory_array_resize(). * Errors (with error bit) from: f_string_dynamics_adjust(). - * Errors (with error bit) from: f_number_unsigneds_adjust(). * + * @see f_memory_array_resize() * @see f_string_dynamics_adjust() - * @see f_number_unsigneds_adjust() */ #ifndef _di_f_console_parameters_destroy_ extern f_status_t f_console_parameters_destroy(f_console_parameters_t * const parameters); diff --git a/level_0/f_file/c/file/stream.c b/level_0/f_file/c/file/stream.c index 25b7ce4..e96c7a7 100644 --- a/level_0/f_file/c/file/stream.c +++ b/level_0/f_file/c/file/stream.c @@ -282,7 +282,7 @@ extern "C" { funlockfile(file.stream); - return F_none; + return F_none_eof; } #endif // _di_f_file_stream_read_block_ diff --git a/level_0/f_iki/c/iki/common.h b/level_0/f_iki/c/iki/common.h index 34de16c..541ee4e 100644 --- a/level_0/f_iki/c/iki/common.h +++ b/level_0/f_iki/c/iki/common.h @@ -222,9 +222,6 @@ extern "C" { f_number_unsigneds_t_clear(data.delimits) \ f_string_ranges_t_clear(data.variable) \ f_string_ranges_t_clear(data.vocabulary) - - #define macro_f_iki_data_t_delete_simple(data) status = f_iki_data_delete(data); - #define macro_f_iki_data_t_destroy_simple(data) status = f_iki_data_destroy(data); #endif // _di_f_iki_data_t_ /** diff --git a/level_0/f_iki/c/iki/data.c b/level_0/f_iki/c/iki/data.c index 0c9fd00..f98df4d 100644 --- a/level_0/f_iki/c/iki/data.c +++ b/level_0/f_iki/c/iki/data.c @@ -15,7 +15,7 @@ extern "C" { f_status_t status = f_string_ranges_resize(0, &data->content); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_resize(0, &data->delimits); + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &data->delimits.array, &data->delimits.used, &data->delimits.size); if (F_status_is_error(status)) return status; status = f_string_ranges_resize(0, &data->variable); @@ -37,7 +37,7 @@ extern "C" { f_status_t status = f_string_ranges_adjust(0, &data->content); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_adjust(0, &data->delimits); + status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &data->delimits.array, &data->delimits.used, &data->delimits.size); if (F_status_is_error(status)) return status; status = f_string_ranges_adjust(0, &data->variable); diff --git a/level_0/f_iki/c/iki/data.h b/level_0/f_iki/c/iki/data.h index ae59c6a..939d509 100644 --- a/level_0/f_iki/c/iki/data.h +++ b/level_0/f_iki/c/iki/data.h @@ -27,10 +27,10 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_number_unsigneds_resize(). + * Errors (with error bit) from: f_memory_array_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * - * @see f_number_unsigneds_resize() + * @see f_memory_array_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_data_delete_ @@ -48,10 +48,10 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_number_unsigneds_adjust(). + * Errors (with error bit) from: f_memory_array_adjust(). * Errors (with error bit) from: f_string_ranges_adjust(). * - * @see f_number_unsigneds_adjust() + * @see f_memory_array_adjust() * @see f_string_ranges_adjust() */ #ifndef _di_f_iki_data_destroy_ @@ -72,11 +72,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_adjust(). - * Errors (with error bit) from: f_number_unsigneds_adjust(). * Errors (with error bit) from: f_string_ranges_adjust(). * * @see f_memory_array_adjust() - * @see f_number_unsigneds_adjust() * @see f_string_ranges_adjust() */ #ifndef _di_f_iki_datas_adjust_ @@ -154,11 +152,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_adjust(). - * Errors (with error bit) from: f_number_unsigneds_adjust(). * Errors (with error bit) from: f_string_ranges_adjust(). * * @see f_memory_array_adjust() - * @see f_number_unsigneds_adjust() * @see f_string_ranges_adjust() */ #ifndef _di_f_iki_datas_decimate_by_ @@ -184,11 +180,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datas_decrease_by_ @@ -215,11 +209,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datas_increase_ @@ -246,11 +238,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datas_increase_by_ @@ -271,11 +261,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datas_resize_ @@ -296,11 +284,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_adjust(). - * Errors (with error bit) from: f_number_unsigneds_adjust(). * Errors (with error bit) from: f_string_ranges_adjust(). * * @see f_memory_array_adjust() - * @see f_number_unsigneds_adjust() * @see f_string_ranges_adjust() */ #ifndef _di_f_iki_datass_adjust_ @@ -323,12 +309,10 @@ extern "C" { * * Errors (with error bit) from: f_memory_array_increase(). * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_increase() * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_append_ @@ -351,12 +335,10 @@ extern "C" { * * Errors (with error bit) from: f_memory_array_increase_by(). * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_increase_by() * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_append_all_ @@ -382,11 +364,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_adjust(). - * Errors (with error bit) from: f_number_unsigneds_adjust(). * Errors (with error bit) from: f_string_ranges_adjust(). * * @see f_memory_array_adjust() - * @see f_number_unsigneds_adjust() * @see f_string_ranges_adjust() */ #ifndef _di_f_iki_datass_decimate_by_ @@ -412,11 +392,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_decrease_by_ @@ -443,11 +421,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_increase_ @@ -474,11 +450,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_increase_by_ @@ -499,11 +473,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() */ #ifndef _di_f_iki_datass_resize_ diff --git a/level_0/f_iki/c/iki/private-data.c b/level_0/f_iki/c/iki/private-data.c index daaea95..a30d430 100644 --- a/level_0/f_iki/c/iki/private-data.c +++ b/level_0/f_iki/c/iki/private-data.c @@ -15,7 +15,7 @@ extern "C" { status = f_string_ranges_adjust(0, &structure->array[i].content); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_adjust(0, &structure->array[i].delimits); + status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].delimits.array, &structure->array[i].delimits.used, &structure->array[i].delimits.size); if (F_status_is_error(status)) return status; status = f_string_ranges_adjust(0, &structure->array[i].variable); @@ -114,7 +114,7 @@ extern "C" { status = f_string_ranges_resize(0, &structure->array[i].content); if (F_status_is_error(status)) return status; - status = f_number_unsigneds_resize(0, &structure->array[i].delimits); + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].delimits.array, &structure->array[i].delimits.used, &structure->array[i].delimits.size); if (F_status_is_error(status)) return status; status = f_string_ranges_resize(0, &structure->array[i].variable); diff --git a/level_0/f_iki/c/iki/private-data.h b/level_0/f_iki/c/iki/private-data.h index 2d04c64..b11ed4b 100644 --- a/level_0/f_iki/c/iki/private-data.h +++ b/level_0/f_iki/c/iki/private-data.h @@ -30,11 +30,9 @@ extern "C" { * F_data_not on success, but there is no reason to increase size (used + 1 <= size). * * Errors (with error bit) from: f_memory_array_adjust(). - * Errors (with error bit) from: f_number_unsigneds_adjust(). * Errors (with error bit) from: f_string_ranges_adjust(). * * @see f_memory_array_adjust() - * @see f_number_unsigneds_adjust() * @see f_string_ranges_adjust() * * @see f_iki_datas_adjust() @@ -115,11 +113,9 @@ extern "C" { * F_data_not on success, but there is no reason to increase size (used + 1 <= size). * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() * * @see f_iki_datas_resize() @@ -150,11 +146,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_adjust(). - * Errors (with error bit) from: f_number_unsigneds_adjust(). * Errors (with error bit) from: f_string_ranges_adjust(). * * @see f_memory_array_adjust() - * @see f_number_unsigneds_adjust() * @see f_string_ranges_adjust() * * @see f_iki_datass_adjust() @@ -183,11 +177,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_memory_array_resize(). - * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_string_ranges_resize(). * * @see f_memory_array_resize() - * @see f_number_unsigneds_resize() * @see f_string_ranges_resize() * * @see f_iki_datass_decrease_by() diff --git a/level_0/f_iki/c/private-iki.h b/level_0/f_iki/c/private-iki.h index bb63c1c..378e28c 100644 --- a/level_0/f_iki/c/private-iki.h +++ b/level_0/f_iki/c/private-iki.h @@ -57,11 +57,11 @@ extern "C" { * F_none on success. * F_data_not on success, but there is no reason to increase size (used + 1 <= size). * - * Errors (with error bit) from: f_number_unsigneds_adjust(). + * Errors (with error bit) from: f_number_unsigneds_resize(). * Errors (with error bit) from: f_memory_adjust(). * Errors (with error bit) from: f_string_ranges_adjust(). * - * @see f_number_unsigneds_adjust() + * @see f_number_unsigneds_resize() * @see f_memory_adjust() * @see f_string_ranges_adjust() */ diff --git a/level_0/f_type_array/c/type_array/common.h b/level_0/f_type_array/c/type_array/common.h index d97df8f..1a9bd28 100644 --- a/level_0/f_type_array/c/type_array/common.h +++ b/level_0/f_type_array/c/type_array/common.h @@ -163,24 +163,6 @@ extern "C" { /** * Macros for f_number_unsigneds_t, see type.h for typedefs. */ -#ifndef _di_f_number_unsigneds_t_ - #define macro_f_number_unsigneds_t_clear(lengths) macro_f_memory_structures_clear(lengths) - - #define macro_f_number_unsigneds_t_resize(status, lengths, length) status = f_number_unsigneds_resize(length, &lengths); - #define macro_f_number_unsigneds_t_adjust(status, lengths, length) status = f_number_unsigneds_adjust(length, &lengths); - - #define macro_f_number_unsigneds_t_delete_simple(lengths) f_number_unsigneds_resize(0, &lengths); - #define macro_f_number_unsigneds_t_destroy_simple(lengths) f_number_unsigneds_adjust(0, &lengths); - - #define macro_f_number_unsigneds_t_increase(status, step, lengths) status = f_number_unsigneds_increase(step, &lengths); - #define macro_f_number_unsigneds_t_increase_by(status, lengths, amount) status = f_number_unsigneds_increase_by(amount, &lengths); - #define macro_f_number_unsigneds_t_decrease_by(status, lengths, amount) status = f_number_unsigneds_decrease_by(amount, &lengths); - #define macro_f_number_unsigneds_t_decimate_by(status, lengths, amount) status = f_number_unsigneds_decimate_by(amount, &lengths); -#endif // _di_f_number_unsigneds_t_ - -/** - * Macros for f_number_unsigneds_t, see type.h for typedefs. - */ #ifndef _di_f_number_unsignedss_t_ #define macro_f_number_unsignedss_t_clear(lengthss) macro_f_memory_structures_clear(lengthss) diff --git a/level_0/f_type_array/c/type_array/number_unsigned.c b/level_0/f_type_array/c/type_array/number_unsigned.c index c2cb885..6e99ceb 100644 --- a/level_0/f_type_array/c/type_array/number_unsigned.c +++ b/level_0/f_type_array/c/type_array/number_unsigned.c @@ -1,28 +1,17 @@ #include "../type_array.h" #include "number_unsigned.h" -#include "private-number_unsigned.h" #ifdef __cplusplus extern "C" { #endif -#ifndef _di_f_number_unsigneds_adjust_ - f_status_t f_number_unsigneds_adjust(const f_number_unsigned_t length, f_number_unsigneds_t * const structure) { - #ifndef _di_level_0_parameter_checking_ - if (!structure) return F_status_set_error(F_parameter); - #endif // _di_level_0_parameter_checking_ - - return f_memory_array_adjust(length, sizeof(f_number_unsigned_t), (void **) &structure->array, &structure->used, &structure->size); - } -#endif // _di_f_number_unsigneds_adjust_ - #ifndef _di_f_number_unsigneds_append_ f_status_t f_number_unsigneds_append(const f_number_unsigned_t source, f_number_unsigneds_t * const destination) { #ifndef _di_level_0_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - return private_f_number_unsigneds_append(source, destination); + return f_memory_array_append((const void *) &source, sizeof(f_number_unsigned_t), (void **) &destination->array, &destination->used, &destination->size); } #endif // _di_f_number_unsigneds_append_ @@ -34,7 +23,7 @@ extern "C" { if (!source.used) return F_data_not; - return private_f_number_unsigneds_append_all(source, destination); + return f_memory_array_append_all((const void *) &source.array, source.used, sizeof(f_number_unsigned_t), (void **) &destination->array, &destination->used, &destination->size); } #endif // _di_f_number_unsigneds_append_all_ @@ -78,23 +67,21 @@ extern "C" { } #endif // _di_f_number_unsigneds_increase_by_ -#ifndef _di_f_number_unsigneds_resize_ - f_status_t f_number_unsigneds_resize(const f_number_unsigned_t length, f_number_unsigneds_t * const structure) { - #ifndef _di_level_0_parameter_checking_ - if (!structure) return F_status_set_error(F_parameter); - #endif // _di_level_0_parameter_checking_ - - return f_memory_array_resize(length, sizeof(f_number_unsigned_t), (void **) &structure->array, &structure->used, &structure->size); - } -#endif // _di_f_number_unsigneds_resize_ - #ifndef _di_f_number_unsignedss_adjust_ f_status_t f_number_unsignedss_adjust(const f_number_unsigned_t length, f_number_unsignedss_t * const structure) { #ifndef _di_level_0_parameter_checking_ if (!structure) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - return private_f_number_unsignedss_adjust(length, structure); + f_status_t status = F_none; + + for (f_number_unsigned_t i = length; i < structure->size; ++i) { + + status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size); + if (F_status_is_error(status)) return status; + } // for + + return f_memory_array_adjust(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size); } #endif // _di_f_number_unsignedss_adjust_ @@ -109,7 +96,7 @@ extern "C" { f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_number_unsigneds_t), (void **) &destination->array, &destination->used, &destination->size); if (F_status_is_error(status)) return status; - status = private_f_number_unsigneds_append_all(source, &destination->array[destination->used]); + status = f_memory_array_append_all((const void *) &source.array, source.used, sizeof(f_number_unsigned_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; ++destination->used; @@ -134,7 +121,7 @@ extern "C" { destination->array[destination->used].used = 0; if (source.array[i].used) { - status = private_f_number_unsigneds_append_all(source.array[i], &destination->array[destination->used]); + status = f_memory_array_append_all((const void *) &source.array[i].array, source.array[i].used, sizeof(f_number_unsigned_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 @@ -151,7 +138,19 @@ extern "C" { if (!amount) return F_data_not; - return private_f_number_unsignedss_adjust((structure->size - amount > 0) ? structure->size - amount : 0, structure); + const f_number_unsigned_t length = (structure->size - amount > 0) ? structure->size - amount : 0; + + { + f_status_t status = F_none; + + for (f_number_unsigned_t i = length; i < structure->size; ++i) { + + status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size); + if (F_status_is_error(status)) return status; + } // for + } + + return f_memory_array_adjust(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size); } #endif // _di_f_number_unsignedss_decimate_by_ @@ -163,7 +162,19 @@ extern "C" { if (!amount) return F_data_not; - return private_f_number_unsignedss_resize((structure->size - amount > 0) ? structure->size - amount : 0, structure); + const f_number_unsigned_t length = (structure->size - amount > 0) ? structure->size - amount : 0; + + { + f_status_t status = F_none; + + for (f_number_unsigned_t i = length; i < structure->size; ++i) { + + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size); + if (F_status_is_error(status)) return status; + } // for + } + + return f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size); } #endif // _di_f_number_unsignedss_decrease_by_ @@ -184,7 +195,17 @@ extern "C" { length = F_number_t_size_unsigned_d; } - return private_f_number_unsignedss_resize(length, structure); + { + f_status_t status = F_none; + + for (f_number_unsigned_t i = length; i < structure->size; ++i) { + + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size); + if (F_status_is_error(status)) return status; + } // for + } + + return f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size); } return F_data_not; @@ -205,7 +226,17 @@ extern "C" { if (length > structure->size) { if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large); - return private_f_number_unsignedss_resize(structure->used + amount, structure); + { + f_status_t status = F_none; + + for (f_number_unsigned_t i = length; i < structure->size; ++i) { + + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size); + if (F_status_is_error(status)) return status; + } // for + } + + return f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size); } } @@ -219,7 +250,17 @@ extern "C" { if (!structure) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - return private_f_number_unsignedss_resize(length, structure); + { + f_status_t status = F_none; + + for (f_number_unsigned_t i = length; i < structure->size; ++i) { + + status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size); + if (F_status_is_error(status)) return status; + } // for + } + + return f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size); } #endif // _di_f_number_unsignedss_resize_ diff --git a/level_0/f_type_array/c/type_array/number_unsigned.h b/level_0/f_type_array/c/type_array/number_unsigned.h index f74e72a..a93e8f8 100644 --- a/level_0/f_type_array/c/type_array/number_unsigned.h +++ b/level_0/f_type_array/c/type_array/number_unsigned.h @@ -17,27 +17,6 @@ extern "C" { #endif /** - * Resize the string number_unsigneds array. - * - * @param length - * The new size to use. - * @param structure - * The string number_unsigneds array to resize. - * - * @return - * F_none on success. - * - * F_parameter (with error bit) if a parameter is invalid. - * - * Errors (with error bit) from: f_memory_array_adjust(). - * - * @see f_memory_array_adjust() - */ -#ifndef _di_f_number_unsigneds_adjust_ - extern f_status_t f_number_unsigneds_adjust(const f_number_unsigned_t length, f_number_unsigneds_t * const structure); -#endif // _di_f_number_unsigneds_adjust_ - -/** * Append the single source number_unsigned onto the destination. * * @param source @@ -188,27 +167,6 @@ extern "C" { #endif // _di_f_number_unsigneds_increase_by_ /** - * Resize the string number_unsigneds array. - * - * @param length - * The new size to use. - * @param structure - * The string number_unsigneds array to adjust. - * - * @return - * F_none on success. - * - * F_parameter (with error bit) if a parameter is invalid. - * - * Errors (with error bit) from: f_memory_array_resize(). - * - * @see f_memory_array_resize() - */ -#ifndef _di_f_number_unsigneds_resize_ - extern f_status_t f_number_unsigneds_resize(const f_number_unsigned_t length, f_number_unsigneds_t * const structure); -#endif // _di_f_number_unsigneds_resize_ - -/** * Resize the string number_unsignedss array. * * @param length diff --git a/level_0/f_type_array/c/type_array/private-number_unsigned.c b/level_0/f_type_array/c/type_array/private-number_unsigned.c deleted file mode 100644 index 8f42ea7..0000000 --- a/level_0/f_type_array/c/type_array/private-number_unsigned.c +++ /dev/null @@ -1,70 +0,0 @@ -#include "../type_array.h" -#include "private-number_unsigned.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(_di_f_number_unsigneds_append_) || !defined(_di_f_number_unsignedss_append_) - extern f_status_t private_f_number_unsigneds_append(const f_number_unsigned_t source, f_number_unsigneds_t * const destination) { - - { - const f_status_t status = f_memory_array_increase(F_memory_default_allocation_small_d, sizeof(f_number_unsigned_t), (void **) &destination->array, &destination->used, &destination->size); - if (F_status_is_error(status)) return status; - } - - destination->array[destination->used++] = source; - - return F_none; - } -#endif // !defined(_di_f_number_unsigneds_append_) || !defined(_di_f_number_unsignedss_append_) - -#if !defined(_di_f_number_unsigneds_append_) || !defined(_di_f_number_unsigneds_append_all_) || !defined(_di_f_number_unsignedss_append_all_) - extern f_status_t private_f_number_unsigneds_append_all(const f_number_unsigneds_t source, f_number_unsigneds_t * const destination) { - - { - const f_status_t status = f_memory_array_increase_by(source.used, sizeof(f_number_unsigned_t), (void **) &destination->array, &destination->used, &destination->size); - if (F_status_is_error(status)) return status; - } - - for (f_number_unsigned_t i = 0; i < source.used; ++i) { - destination->array[destination->used++] = source.array[i]; - } // for - - return F_none; - } -#endif // !defined(_di_f_number_unsigneds_append_) || !defined(_di_f_number_unsigneds_append_all_) || !defined(_di_f_number_unsignedss_append_all_) - -#if !defined(_di_f_number_unsignedss_adjust_) || !defined(_di_f_number_unsignedss_decimate_by_) - f_status_t private_f_number_unsignedss_adjust(const f_number_unsigned_t length, f_number_unsignedss_t * const structure) { - - f_status_t status = F_none; - - for (f_number_unsigned_t i = length; i < structure->size; ++i) { - - status = f_memory_array_adjust(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size); - if (F_status_is_error(status)) return status; - } // for - - return f_memory_array_adjust(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size); - } -#endif // !defined(_di_f_number_unsignedss_adjust_) || !defined(_di_f_number_unsignedss_decimate_by_) - -#if !defined(_di_f_number_unsignedss_decrease_by_) || !defined(_di_f_number_unsignedss_increase_) || !defined(_di_f_number_unsignedss_increase_by_) || !defined(_di_f_number_unsignedss_resize_) - f_status_t private_f_number_unsignedss_resize(const f_number_unsigned_t length, f_number_unsignedss_t * const structure) { - - f_status_t status = F_none; - - for (f_number_unsigned_t i = length; i < structure->size; ++i) { - - status = f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &structure->array[i].array, &structure->array[i].used, &structure->array[i].size); - if (F_status_is_error(status)) return status; - } // for - - return f_memory_array_resize(length, sizeof(f_number_unsigneds_t), (void **) &structure->array, &structure->used, &structure->size); - } -#endif // !defined(_di_f_number_unsignedss_decrease_by_) || !defined(_di_f_number_unsignedss_increase_) || !defined(_di_f_number_unsignedss_increase_by_) || !defined(_di_f_number_unsignedss_resize_) - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/level_0/f_type_array/c/type_array/private-number_unsigned.h b/level_0/f_type_array/c/type_array/private-number_unsigned.h deleted file mode 100644 index 90f9483..0000000 --- a/level_0/f_type_array/c/type_array/private-number_unsigned.h +++ /dev/null @@ -1,131 +0,0 @@ -/** - * FLL - Level 0 - * - * Project: Type - * API Version: 0.7 - * Licenses: lgpl-2.1-or-later - * - * These are provided for internal reduction in redundant code. - * These should not be exposed/used outside of this project. - */ -#ifndef _PRIVATE_F_type_array_number_unsigned_h -#define _PRIVATE_F_type_array_number_unsigned_h - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Private implementation for appending the number_unsigned array. - * - * Intended to be shared to each of the different implementation variations. - * - * @param source - * The source number_unsigned to append. - * @param destination - * The destination lengths the source is appended onto. - * - * @return - * F_none on success. - * - * Errors (with error bit) from: f_memory_array_increase(). - * - * @see f_memory_array_increase() - * - * @see f_number_unsigneds_append() - * @see f_number_unsignedss_append() - */ -#if !defined(_di_f_number_unsigneds_append_) || !defined(_di_f_number_unsignedss_append_) - extern f_status_t private_f_number_unsigneds_append(const f_number_unsigned_t source, f_number_unsigneds_t * const destination) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_number_unsigneds_append_) || !defined(_di_f_number_unsignedss_append_) - -/** - * Private implementation for appending the number_unsigned array. - * - * Intended to be shared to each of the different implementation variations. - * - * @param source - * The source number_unsigneds to append. - * @param destination - * The destination lengths the source is appended onto. - * - * @return - * F_none on success. - * - * Errors (with error bit) from: f_memory_array_increase_by(). - * - * @see f_memory_array_increase_by() - * - * @see f_number_unsigneds_append_all() - * @see f_number_unsignedss_append() - * @see f_number_unsignedss_append_all() - */ -#if !defined(_di_f_number_unsigneds_append_) || !defined(_di_f_number_unsigneds_append_all_) || !defined(_di_f_number_unsignedss_append_all_) - extern f_status_t private_f_number_unsigneds_append_all(const f_number_unsigneds_t source, f_number_unsigneds_t * const destination) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_number_unsigneds_append_) || !defined(_di_f_number_unsigneds_append_all_) || !defined(_di_f_number_unsignedss_append_all_) - -/** - * Private implementation for resizing the number_unsignedss array. - * - * Intended to be shared to each of the different implementation variations. - * - * @param length - * The length to adjust to. - * @param structure - * The number_unsignedss array to adjust. - * - * @return - * F_none on success. - * F_data_not on success, but there is no reason to increase size (used + 1 <= size). - * - * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_not (with error bit) on out of memory. - * F_parameter (with error bit) if a parameter is invalid. - * - * Errors (with error bit) from: f_memory_array_adjust(). - * - * @see f_memory_array_adjust() - * - * @see f_number_unsignedss_adjust() - * @see f_number_unsignedss_decimate_by() - */ -#if !defined(_di_f_number_unsignedss_adjust_) || !defined(_di_f_number_unsignedss_decimate_by_) - extern f_status_t private_f_number_unsignedss_adjust(const f_number_unsigned_t length, f_number_unsignedss_t * const structure) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_number_unsignedss_adjust_) || !defined(_di_f_number_unsignedss_decimate_by_) - -/** - * Private implementation for resizing the number_unsignedss array. - * - * Intended to be shared to each of the different implementation variations. - * - * @param length - * The length to resize to. - * @param structure - * The number_unsignedss array to resize. - * - * @return - * F_none on success. - * F_data_not on success, but there is no reason to increase size (used + 1 <= size). - * - * F_array_too_large (with error bit) if new length is larger than max array length. - * F_memory_not (with error bit) on out of memory. - * F_parameter (with error bit) if a parameter is invalid. - * - * Errors (with error bit) from: f_memory_array_resize(). - * - * @see f_memory_array_resize() - * - * @see f_number_unsignedss_decrease_by() - * @see f_number_unsignedss_increase() - * @see f_number_unsignedss_increase_by() - * @see f_number_unsignedss_resize() - */ -#if !defined(_di_f_number_unsignedss_decrease_by_) || !defined(_di_f_number_unsignedss_increase_) || !defined(_di_f_number_unsignedss_increase_by_) || !defined(_di_f_number_unsignedss_resize_) - extern f_status_t private_f_number_unsignedss_resize(const f_number_unsigned_t length, f_number_unsignedss_t * const structure) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_number_unsignedss_decrease_by_) || !defined(_di_f_number_unsignedss_increase_) || !defined(_di_f_number_unsignedss_increase_by_) || !defined(_di_f_number_unsignedss_resize_) - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // _PRIVATE_F_type_array_number_unsigned_h diff --git a/level_0/f_type_array/data/build/settings b/level_0/f_type_array/data/build/settings index 1ea161f..7abfdaa 100644 --- a/level_0/f_type_array/data/build/settings +++ b/level_0/f_type_array/data/build/settings @@ -33,7 +33,7 @@ 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_unsigned.c type_array/poll.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c -build_sources_library type_array/private-cell.c type_array/private-file.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-number_unsigned.c type_array/private-poll.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c +build_sources_library type_array/private-cell.c type_array/private-file.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-poll.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c build_sources_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_unsigned.h type_array/poll.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 diff --git a/level_0/f_type_array/data/build/settings-mocks b/level_0/f_type_array/data/build/settings-mocks index be983b8..595f664 100644 --- a/level_0/f_type_array/data/build/settings-mocks +++ b/level_0/f_type_array/data/build/settings-mocks @@ -31,7 +31,7 @@ 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_unsigned.c type_array/poll.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c -build_sources_library type_array/private-cell.c type_array/private-file.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-number_unsigned.c type_array/private-poll.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c +build_sources_library type_array/private-cell.c type_array/private-file.c type_array/private-fll_id.c type_array/private-int8.c type_array/private-int16.c type_array/private-int32.c type_array/private-int64.c type_array/private-int128.c type_array/private-poll.c type_array/private-state.c type_array/private-status.c type_array/private-uint8.c type_array/private-uint16.c type_array/private-uint32.c type_array/private-uint64.c type_array/private-uint128.c build_sources_library ../../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_unsigned.h type_array/poll.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 diff --git a/level_1/fl_fss/c/fss/embedded_list.c b/level_1/fl_fss/c/fss/embedded_list.c index 0e3f2d4..b40a538 100644 --- a/level_1/fl_fss/c/fss/embedded_list.c +++ b/level_1/fl_fss/c/fss/embedded_list.c @@ -35,7 +35,7 @@ extern "C" { state->status = f_string_ranges_increase(state->step_small, &objects); if (F_status_is_error(state->status)) { - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); return; } @@ -45,7 +45,7 @@ extern "C" { state->status = f_number_unsigneds_increase(state->step_small, &slashes); if (F_status_is_error(state->status)) { - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); return; @@ -104,9 +104,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop; @@ -115,9 +115,9 @@ extern "C" { } else { if (range->start >= buffer.used || range->start > range->stop) { - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_none_eos : F_none_stop; @@ -163,9 +163,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop; @@ -177,9 +177,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop; @@ -259,9 +259,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop; @@ -273,9 +273,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop; @@ -400,9 +400,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop; @@ -414,9 +414,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop; @@ -505,9 +505,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop; @@ -519,9 +519,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop; @@ -563,9 +563,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop; @@ -577,9 +577,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop; @@ -638,9 +638,9 @@ extern "C" { state->status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(state->status)) break; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); if (range->start >= buffer.used) { state->status = F_none_eos; @@ -694,9 +694,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_end_not_nest_eos : F_end_not_nest_stop; @@ -708,9 +708,9 @@ extern "C" { delimits->used = delimits_used; comments->used = comments_used; - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); state->status = (range->start >= buffer.used) ? F_data_not_eos : F_data_not_stop; @@ -773,9 +773,9 @@ extern "C" { if (F_status_is_error(state->status)) break; } // while - f_number_unsigneds_resize(0, &positions_start); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &positions_start.array, &positions_start.used, &positions_start.size); f_string_ranges_resize(0, &objects); - f_number_unsigneds_resize(0, &slashes); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &slashes.array, &slashes.used, &slashes.size); delimits->used = delimits_used; comments->used = comments_used; diff --git a/level_2/fll_fss/c/fss.c b/level_2/fll_fss/c/fss.c index 1cb75a2..c1f2f0c 100644 --- a/level_2/fll_fss/c/fss.c +++ b/level_2/fll_fss/c/fss.c @@ -373,7 +373,7 @@ extern "C" { } if (indexs) { - macro_f_number_unsigneds_t_resize(status, (*indexs[j]), indexs[j]->used + 1); + status = f_memory_array_resize(indexs[j]->used + 1, sizeof(f_number_unsigned_t), (void **) &indexs[j]->array, &indexs[j]->used, &indexs[j]->size); if (F_status_is_error(status)) return status; } } @@ -387,7 +387,7 @@ extern "C" { } if (indexs) { - macro_f_number_unsigneds_t_resize(status, (*indexs[j]), indexs[j]->used + F_fss_default_allocation_step_d); + status = f_memory_array_increase(F_fss_default_allocation_step_d, sizeof(f_number_unsigned_t), (void **) &indexs[j]->array, &indexs[j]->used, &indexs[j]->size); if (F_status_is_error(status)) return status; } } @@ -465,7 +465,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (indexs) { - macro_f_number_unsigneds_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); + status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_number_unsigned_t), (void **) &indexs[j]->array, &indexs[j]->used, &indexs[j]->size); if (F_status_is_error(status)) return status; } @@ -539,7 +539,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (indexs) { - macro_f_number_unsigneds_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); + status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_number_unsigned_t), (void **) &indexs[j]->array, &indexs[j]->used, &indexs[j]->size); if (F_status_is_error(status)) return status; } @@ -646,7 +646,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (indexs) { - macro_f_number_unsigneds_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); + status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_number_unsigned_t), (void **) &indexs[j]->array, &indexs[j]->used, &indexs[j]->size); if (F_status_is_error(status)) return status; } @@ -762,7 +762,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (indexs) { - macro_f_number_unsigneds_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); + status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_number_unsigned_t), (void **) &indexs[j]->array, &indexs[j]->used, &indexs[j]->size); if (F_status_is_error(status)) return status; } @@ -890,7 +890,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (indexs) { - macro_f_number_unsigneds_t_increase(status, F_fss_default_allocation_step_small_d, (*indexs[j])); + status = f_memory_array_increase(F_fss_default_allocation_step_small_d, sizeof(f_number_unsigned_t), (void **) &indexs[j]->array, &indexs[j]->used, &indexs[j]->size); if (F_status_is_error(status)) return status; } diff --git a/level_3/control/c/main/common.c b/level_3/control/c/main/common.c index 10f1e9e..98730ad 100644 --- a/level_3/control/c/main/common.c +++ b/level_3/control/c/main/common.c @@ -387,7 +387,7 @@ extern "C" { f_string_ranges_resize(0, &main->cache.objects); f_string_rangess_resize(0, &main->cache.contents); - f_number_unsigneds_resize(0, &main->cache.delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &main->cache.delimits.array, &main->cache.delimits.used, &main->cache.delimits.size); { const uint8_t ids[] = { diff --git a/level_3/control/c/main/common/type.c b/level_3/control/c/main/common/type.c index 2193092..4c5d51d 100644 --- a/level_3/control/c/main/common/type.c +++ b/level_3/control/c/main/common/type.c @@ -25,7 +25,7 @@ extern "C" { f_string_ranges_resize(0, &main->cache.header_objects); f_string_rangess_resize(0, &main->cache.header_contents); - f_number_unsigneds_resize(0, &main->cache.delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &main->cache.delimits.array, &main->cache.delimits.used, &main->cache.delimits.size); } #endif // _di_control_main_delete_ diff --git a/level_3/control/c/main/common/type.h b/level_3/control/c/main/common/type.h index 63ae8ad..1730a0f 100644 --- a/level_3/control/c/main/common/type.h +++ b/level_3/control/c/main/common/type.h @@ -181,7 +181,7 @@ extern "C" { * * This does not alter main.setting.state.status. * - * @see f_number_unsigneds_resize() + * @see f_memory_array_resize() * @see f_string_dynamic_resize() * @see f_string_ranges_resize() * @see f_string_rangess_resize() diff --git a/level_3/controller/c/common/private-cache.c b/level_3/controller/c/common/private-cache.c index 3843645..017e7c4 100644 --- a/level_3/controller/c/common/private-cache.c +++ b/level_3/controller/c/common/private-cache.c @@ -24,9 +24,9 @@ extern "C" { f_string_dynamics_resize(0, &cache->expanded); - f_number_unsigneds_resize(0, &cache->ats); - f_number_unsigneds_resize(0, &cache->stack); - f_number_unsigneds_resize(0, &cache->delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &cache->ats.array, &cache->ats.used, &cache->ats.size); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &cache->stack.array, &cache->stack.used, &cache->stack.size); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &cache->delimits.array, &cache->delimits.used, &cache->delimits.size); f_string_ranges_resize(0, &cache->comments); f_string_ranges_resize(0, &cache->content_action); diff --git a/level_3/controller/c/common/private-cache.h b/level_3/controller/c/common/private-cache.h index 7df5c5e..5048a29 100644 --- a/level_3/controller/c/common/private-cache.h +++ b/level_3/controller/c/common/private-cache.h @@ -137,10 +137,9 @@ extern "C" { * @param cache * The cache to deallocate. * - * @see macro_f_number_unsigneds_t_delete_simple() - * @see macro_f_number_unsigneds_t_delete_simple() - * * @see controller_cache_action_delete_simple() + * + * @see f_memory_array_resize() * @see f_string_dynamic_resize() * @see f_string_ranges_resize() * @see f_string_rangess_resize() diff --git a/level_3/controller/c/common/private-process.c b/level_3/controller/c/common/private-process.c index 0406a6e..637f98e 100644 --- a/level_3/controller/c/common/private-process.c +++ b/level_3/controller/c/common/private-process.c @@ -64,7 +64,7 @@ extern "C" { f_string_dynamics_resize(0, &process->path_pids); - f_number_unsigneds_resize(0, &process->stack); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &process->stack.array, &process->stack.used, &process->stack.size); } #endif // _di_controller_process_delete_simple_ diff --git a/level_3/controller/c/rule/private-rule.c b/level_3/controller/c/rule/private-rule.c index 05bfbe8..67af86e 100644 --- a/level_3/controller/c/rule/private-rule.c +++ b/level_3/controller/c/rule/private-rule.c @@ -3240,11 +3240,11 @@ extern "C" { if (F_status_is_error_not(status) && stack.used) { if (process->stack.size < stack.used) { - status = f_number_unsigneds_resize(stack.used, &process->stack); + status = f_memory_array_resize(stack.used, sizeof(f_number_unsigned_t), (void **) &process->stack.array, &process->stack.used, &process->stack.size); } if (F_status_is_error(status)) { - controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_number_unsigneds_resize", F_true); + controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_memory_array_resize", F_true); } else { for (f_number_unsigned_t i = 0; i < stack.used; ++i) { diff --git a/level_3/controller/c/thread/private-thread.c b/level_3/controller/c/thread/private-thread.c index 5a0ffd3..85bbbe3 100644 --- a/level_3/controller/c/thread/private-thread.c +++ b/level_3/controller/c/thread/private-thread.c @@ -119,7 +119,7 @@ extern "C" { // Deallocate dynamic portions of the structure that are only ever needed while the process is running. controller_cache_delete_simple(&process->cache); - f_number_unsigneds_resize(0, &process->stack); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &process->stack.array, &process->stack.used, &process->stack.size); // Shrink the childs array. if (process->childs.used) { diff --git a/level_3/fake/c/main/build/load.c b/level_3/fake/c/main/build/load.c index 37f3a2c..5721406 100644 --- a/level_3/fake/c/main/build/load.c +++ b/level_3/fake/c/main/build/load.c @@ -169,7 +169,7 @@ extern "C" { } } - macro_f_number_unsigneds_t_delete_simple(delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size); } f_string_dynamic_resize(0, &buffer); diff --git a/level_3/fake/c/main/common.c b/level_3/fake/c/main/common.c index 38489e9..958453e 100644 --- a/level_3/fake/c/main/common.c +++ b/level_3/fake/c/main/common.c @@ -559,7 +559,7 @@ extern "C" { } if (iki_data->delimits.used > fake_max_over_array_d) { - f_number_unsigneds_resize(fake_allocation_large_d, &iki_data->delimits); + f_memory_array_resize(fake_allocation_large_d, sizeof(f_number_unsigned_t), (void **) &iki_data->delimits.array, &iki_data->delimits.used, &iki_data->delimits.size); } if (iki_data->variable.used > fake_max_over_array_d) { diff --git a/level_3/fake/c/main/common.h b/level_3/fake/c/main/common.h index d9ff36b..5933b33 100644 --- a/level_3/fake/c/main/common.h +++ b/level_3/fake/c/main/common.h @@ -116,7 +116,7 @@ extern "C" { * @param iki_data * The iki data to shrink. * - * @see f_number_unsigneds_resize() + * @see f_memory_array_resize() * @see f_string_ranges_resize() */ #ifndef _di_fake_iki_data_reset_ diff --git a/level_3/fake/c/main/make/load_fakefile.c b/level_3/fake/c/main/make/load_fakefile.c index d959540..b6f36e1 100644 --- a/level_3/fake/c/main/make/load_fakefile.c +++ b/level_3/fake/c/main/make/load_fakefile.c @@ -64,7 +64,7 @@ extern "C" { if (F_status_is_error(data_make->main->setting.state.status)) { f_string_ranges_resize(0, &list_objects); f_string_rangess_resize(0, &list_contents); - f_number_unsigneds_resize(0, &delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size); return; } @@ -86,7 +86,7 @@ extern "C" { f_fss_set_resize(0, &settings); f_string_ranges_resize(0, &list_objects); f_string_rangess_resize(0, &list_contents); - f_number_unsigneds_resize(0, &delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size); return; } @@ -172,7 +172,7 @@ extern "C" { f_string_ranges_resize(0, &list_objects); f_string_rangess_resize(0, &list_contents); - f_number_unsigneds_resize(0, &delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size); if (F_status_is_error(data_make->main->setting.state.status)) { f_fss_set_resize(0, &settings); diff --git a/level_3/fake/c/main/make/operate.c b/level_3/fake/c/main/make/operate.c index 8f5421f..d31aa1c 100644 --- a/level_3/fake/c/main/make/operate.c +++ b/level_3/fake/c/main/make/operate.c @@ -207,7 +207,7 @@ extern "C" { f_file_stream_flush(data_make.path.top); f_file_stream_close(&data_make.path.top); - f_number_unsigneds_resize(0, §ion_stack); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) §ion_stack.array, §ion_stack.used, §ion_stack.size); fake_make_data_delete(&data_make); if (F_status_is_error_not(main->setting.state.status)) { diff --git a/level_3/firewall/c/private-firewall.c b/level_3/firewall/c/private-firewall.c index 64e9815..50245f4 100644 --- a/level_3/firewall/c/private-firewall.c +++ b/level_3/firewall/c/private-firewall.c @@ -662,7 +662,7 @@ f_status_t firewall_perform_commands(firewall_data_t * const data, firewall_loca } if (F_status_is_error(status)) { - f_number_unsigneds_resize(0, &delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size); break; } @@ -684,7 +684,7 @@ f_status_t firewall_perform_commands(firewall_data_t * const data, firewall_loca status = fll_execute_program(current_tool, arguments, 0, 0, (void *) &return_code); if (status == F_child) { - f_number_unsigneds_resize(0, &delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size); f_string_dynamic_resize(0, &ip_list); f_string_dynamics_resize(0, &arguments); @@ -718,7 +718,7 @@ f_status_t firewall_perform_commands(firewall_data_t * const data, firewall_loca --arguments.used; } - f_number_unsigneds_resize(0, &delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size); } } @@ -1237,7 +1237,7 @@ f_status_t firewall_buffer_rules(firewall_data_t * const data, const f_string_st } } - macro_f_number_unsigneds_t_delete_simple(delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size); macro_f_string_range_t_delete_simple(comments); return status; @@ -1261,7 +1261,7 @@ f_status_t firewall_process_rules(firewall_data_t * const data, f_string_range_t } } - macro_f_number_unsigneds_t_delete_simple(delimits); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &delimits.array, &delimits.used, &delimits.size); if (F_status_is_error_not(status)) { status = firewall_perform_commands(data, local); @@ -1298,7 +1298,7 @@ f_status_t firewall_delete_local_data(firewall_local_data_t * const local) { local->chain = 0; f_string_dynamic_resize(0, &local->buffer); - f_number_unsigneds_resize(0, &local->chain_ids); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &local->chain_ids.array, &local->chain_ids.used, &local->chain_ids.size); f_string_ranges_resize(0, &local->chain_objects); f_string_rangess_resize(0, &local->chain_contents); diff --git a/level_3/fss_read/c/main/common/type.c b/level_3/fss_read/c/main/common/type.c index 45f0880..6f25ac5 100644 --- a/level_3/fss_read/c/main/common/type.c +++ b/level_3/fss_read/c/main/common/type.c @@ -83,8 +83,8 @@ extern "C" { f_fss_nest_resize(0, &setting->nest); - f_number_unsigneds_resize(0, &setting->delimits_object); - f_number_unsigneds_resize(0, &setting->delimits_content); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &setting->delimits_object.array, &setting->delimits_object.used, &setting->delimits_object.size); + f_memory_array_resize(0, sizeof(f_number_unsigned_t), (void **) &setting->delimits_content.array, &setting->delimits_content.used, &setting->delimits_content.size); f_uint8s_resize(0, &setting->quotes_object); f_uint8ss_resize(0, &setting->quotes_content);