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.
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
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
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
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
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
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
}
}
- 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_
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_
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_
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;
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;
*
* 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);
*
* 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);
*
* 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);
*
* 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);
funlockfile(file.stream);
- return F_none;
+ return F_none_eof;
}
#endif // _di_f_file_stream_read_block_
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_
/**
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);
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);
*
* 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_
*
* 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_
* 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_
* 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_
* 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_
* 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_
* 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_
* 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_
* 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_
*
* 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_
*
* 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_
* 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_
* 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_
* 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_
* 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_
* 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_
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);
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);
* 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()
* 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()
* 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()
* 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()
* 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()
*/
/**
* 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)
#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_
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_
}
#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_
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;
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
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_
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_
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;
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);
}
}
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_
#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
#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
+++ /dev/null
-#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
+++ /dev/null
-/**
- * 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
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
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
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;
}
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;
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;
}
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
}
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;
}
}
}
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;
}
}
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;
}
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;
}
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;
}
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;
}
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;
}
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[] = {
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_
*
* 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()
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);
* @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()
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_
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) {
// 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) {
}
}
- 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);
}
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) {
* @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_
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;
}
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;
}
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);
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)) {
}
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;
}
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);
--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);
}
}
}
}
- 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;
}
}
- 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);
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);
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);