From: Kevin Day Date: Fri, 4 Dec 2020 05:07:46 +0000 (-0600) Subject: Feature: add fl_type project to provide increase() and increase_by() functions. X-Git-Tag: 0.5.2~41 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=b77b1acc9d28af20bd2d3ab6f26f91f9ebaa01bd;p=fll Feature: add fl_type project to provide increase() and increase_by() functions. There will likely be additions to this project in the future to provide decrease() and decrease_by() functions. --- diff --git a/build/level_0/settings b/build/level_0/settings index 00f7d65..d3abb0a 100644 --- a/build/level_0/settings +++ b/build/level_0/settings @@ -20,9 +20,9 @@ build_indexer ar build_language c build_libraries -lc build_libraries-level -build_sources_library account.c console.c conversion.c directory.c private-directory.c environment.c private-environment.c file.c private-file.c fss.c iki.c private-iki.c memory.c path.c private-path.c pipe.c print.c private-print.c serialize.c private-serialize.c signal.c socket.c utf.c private-utf.c +build_sources_library account.c console.c conversion.c directory.c private-directory.c environment.c private-environment.c file.c private-file.c fss.c iki.c private-iki.c memory.c path.c private-path.c pipe.c print.c private-print.c process.c serialize.c private-serialize.c signal.c socket.c utf.c private-utf.c build_sources_program -build_sources_headers account.h account-common.h color.h console.h console-common.h conversion.h conversion-common.h directory.h directory_type.h directory-common.h environment.h environment-common.h file.h file-common.h fss.h fss-common.h fss_comment.h fss_delimit.h fss_named.h fss_nest.h fss_quote.h fss_set.h iki.h iki-common.h memory.h memory_structure.h path.h path-common.h pipe.h print.h serialize.h serialize-common.h signal.h signal-common.h socket.h socket-common.h status.h status_array.h string.h string-common.h string_dynamic.h string_map.h string_quantity.h string_range.h type.h type_array.h utf.h utf-common.h +build_sources_headers account.h account-common.h color.h console.h console-common.h conversion.h conversion-common.h directory.h directory_type.h directory-common.h environment.h environment-common.h file.h file-common.h fss.h fss-common.h fss_comment.h fss_delimit.h fss_named.h fss_nest.h fss_quote.h fss_set.h iki.h iki-common.h memory.h memory_structure.h path.h path-common.h pipe.h print.h process.h process-common.h serialize.h serialize-common.h signal.h signal-common.h socket.h socket-common.h status.h status_array.h string.h string-common.h string_dynamic.h string_map.h string_quantity.h string_range.h type.h type_array.h utf.h utf-common.h build_sources_script build_sources_setting build_script yes diff --git a/build/level_1/settings b/build/level_1/settings index 3f4a43a..1506718 100644 --- a/build/level_1/settings +++ b/build/level_1/settings @@ -20,9 +20,9 @@ build_indexer ar build_language c build_libraries -lc build_libraries-level -lfll_0 -build_sources_library color.c console.c conversion.c directory.c private-directory.c environment.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c iki.c print.c private-print.c status.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c +build_sources_library color.c console.c conversion.c directory.c private-directory.c environment.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c iki.c print.c private-print.c status.c string.c private-string.c type.c utf.c private-utf.c utf_file.c private-utf_file.c build_sources_program -build_sources_headers color.h console.h conversion.h directory.h environment.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_macro.h fss_status.h iki.h print.h status.h string.h utf.h utf_file.h +build_sources_headers color.h console.h conversion.h directory.h environment.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h fss_macro.h fss_status.h iki.h print.h status.h string.h type.h utf.h utf_file.h build_sources_script build_sources_setting build_script yes diff --git a/build/monolithic/settings b/build/monolithic/settings index 5425292..60966d5 100644 --- a/build/monolithic/settings +++ b/build/monolithic/settings @@ -20,9 +20,9 @@ build_indexer ar build_language c build_libraries -lc build_libraries-monolithic -build_sources_library level_0/account.c level_0/console.c level_0/conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/file.c level_0/private-file.c level_0/fss.c level_0/iki.c level_0/private-iki.c level_0/memory.c level_0/path.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/private-print.c level_0/serialize.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/utf.c level_0/private-utf.c level_1/color.c level_1/console.c level_1/conversion.c level_1/directory.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/private-print.c level_1/status.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/error.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/program.c level_2/status.c +build_sources_library level_0/account.c level_0/console.c level_0/conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/file.c level_0/private-file.c level_0/fss.c level_0/iki.c level_0/private-iki.c level_0/memory.c level_0/path.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/private-print.c level_0/process.c level_0/serialize.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/utf.c level_0/private-utf.c level_1/color.c level_1/console.c level_1/conversion.c level_1/directory.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/private-print.c level_1/status.c level_1/string.c level_1/private-string.c level_1/type.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/error.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/program.c level_2/status.c build_sources_program -build_sources_headers level_0/account.h level_0/account-common.h level_0/color.h level_0/console.h level_0/console-common.h level_0/conversion.h level_0/conversion-common.h level_0/directory.h level_0/directory_type.h level_0/directory-common.h level_0/environment.h level_0/environment-common.h level_0/file.h level_0/file-common.h level_0/fss.h level_0/fss-common.h level_0/fss_comment.h level_0/fss_delimit.h level_0/fss_named.h level_0/fss_nest.h level_0/fss_quote.h level_0/fss_set.h level_0/iki.h level_0/iki-common.h level_0/memory.h level_0/memory_structure.h level_0/path.h level_0/path-common.h level_0/pipe.h level_0/print.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/status_array.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/type.h level_0/type_array.h level_0/utf.h level_0/utf-common.h level_1/color.h level_1/console.h level_1/conversion.h level_1/directory.h level_1/environment.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_embedded_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/fss_macro.h level_1/fss_status.h level_1/iki.h level_1/print.h level_1/status.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status.h level_2/iki.h level_2/path.h level_2/program.h level_2/status.h +build_sources_headers level_0/account.h level_0/account-common.h level_0/color.h level_0/console.h level_0/console-common.h level_0/conversion.h level_0/conversion-common.h level_0/directory.h level_0/directory_type.h level_0/directory-common.h level_0/environment.h level_0/environment-common.h level_0/file.h level_0/file-common.h level_0/fss.h level_0/fss-common.h level_0/fss_comment.h level_0/fss_delimit.h level_0/fss_named.h level_0/fss_nest.h level_0/fss_quote.h level_0/fss_set.h level_0/iki.h level_0/iki-common.h level_0/memory.h level_0/memory_structure.h level_0/path.h level_0/path-common.h level_0/pipe.h level_0/print.h level_0/process.h level_0/process-common.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/status_array.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/type.h level_0/type_array.h level_0/utf.h level_0/utf-common.h level_1/color.h level_1/console.h level_1/conversion.h level_1/directory.h level_1/environment.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_embedded_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/fss_macro.h level_1/fss_status.h level_1/iki.h level_1/print.h level_1/status.h level_1/string.h level_1/type.h level_1/utf.h level_1/utf_file.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status.h level_2/iki.h level_2/path.h level_2/program.h level_2/status.h build_sources_script build_sources_setting build_script yes diff --git a/build/scripts/bootstrap-example.sh b/build/scripts/bootstrap-example.sh index 5a8f6ef..f0ad295 100644 --- a/build/scripts/bootstrap-example.sh +++ b/build/scripts/bootstrap-example.sh @@ -41,7 +41,7 @@ if [[ $1 == "individual" ]] ; then bash build/scripts/package.sh $verbose $color build -i if [[ $? -eq 0 ]] ; then - for i in f_type f_status f_memory f_string f_utf f_account f_color f_console f_conversion f_directory f_environment f_file f_fss f_iki f_path f_pipe f_print f_serialize f_signal f_socket fl_color fl_console fl_conversion fl_directory fl_environment fl_fss fl_iki fl_print fl_status fl_string fl_utf fl_utf_file fll_error fll_execute fll_file fll_fss fll_iki fll_path fll_program fll_status ; do + for i in f_type f_status f_memory f_string f_utf f_account f_color f_console f_conversion f_directory f_environment f_file f_fss f_iki f_path f_pipe f_print f_serialize f_signal f_socket fl_color fl_console fl_conversion fl_directory fl_environment fl_fss fl_iki fl_print fl_status fl_string fl_type fl_utf fl_utf_file fll_error fll_execute fll_file fll_fss fll_iki fll_path fll_program fll_status ; do echo && echo "Processing $i." && cd package/individual/$i-$2/ && diff --git a/level_1/fl_type/c/type.c b/level_1/fl_type/c/type.c new file mode 100644 index 0000000..114df51 --- /dev/null +++ b/level_1/fl_type/c/type.c @@ -0,0 +1,1065 @@ +#include "type.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fl_cells_increase_ + f_return_status fl_cells_increase(f_cells_t *cells) { + + if (cells->used + 1 > cells->size) { + f_array_length_t size = cells->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (cells->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_cells_t_resize(status, (*cells), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_cells_increase_ + +#ifndef _di_fl_cells_increase_by_ + f_return_status fl_cells_increase_by(const f_array_length_t amount, f_cells_t *cells) { + + if (cells->used + amount > cells->size) { + if (cells->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_cells_t_resize(status, (*cells), cells->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_cells_increase_by_ + +#ifndef _di_fl_cellss_increase_ + f_return_status fl_cellss_increase(f_cellss_t *cellss) { + + if (cellss->used + 1 > cellss->size) { + f_array_length_t size = cellss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (cellss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_cellss_t_resize(status, (*cellss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_cellss_increase_ + +#ifndef _di_fl_cellss_increase_by_ + f_return_status fl_cellss_increase_by(const f_array_length_t amount, f_cellss_t *cellss) { + + if (cellss->used + amount > cellss->size) { + if (cellss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_cellss_t_resize(status, (*cellss), cellss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_cellss_increase_by_ + +#ifndef _di_fl_array_lengths_increase_ + f_return_status fl_array_lengths_increase(f_array_lengths_t *lengths) { + + if (lengths->used + 1 > lengths->size) { + f_array_length_t size = lengths->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (lengths->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_array_lengths_t_resize(status, (*lengths), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_array_lengths_increase_ + +#ifndef _di_fl_array_lengths_increase_by_ + f_return_status fl_array_lengths_increase_by(const f_array_length_t amount, f_array_lengths_t *lengths) { + + if (lengths->used + amount > lengths->size) { + if (lengths->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_array_lengths_t_resize(status, (*lengths), lengths->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_array_lengths_increase_by_ + +#ifndef _di_fl_array_lengthss_increase_ + f_return_status fl_array_lengthss_increase(f_array_lengthss_t *lengthss) { + + if (lengthss->used + 1 > lengthss->size) { + f_array_length_t size = lengthss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (lengthss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_array_lengthss_t_resize(status, (*lengthss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_array_lengthss_increase_ + +#ifndef _di_fl_array_lengthss_increase_by_ + f_return_status fl_array_lengthss_increase_by(const f_array_length_t amount, f_array_lengthss_t *lengthss) { + + if (lengthss->used + amount > lengthss->size) { + if (lengthss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_array_lengthss_t_resize(status, (*lengthss), lengthss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_array_lengthss_increase_by_ + +#ifndef _di_fl_int8s_increase_ + f_return_status fl_int8s_increase(f_int8s_t *int8s) { + + if (int8s->used + 1 > int8s->size) { + f_array_length_t size = int8s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int8s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int8s_t_resize(status, (*int8s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int8s_increase_ + +#ifndef _di_fl_int8s_increase_by_ + f_return_status fl_int8s_increase_by(const f_array_length_t amount, f_int8s_t *int8s) { + + if (int8s->used + amount > int8s->size) { + if (int8s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int8s_t_resize(status, (*int8s), int8s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int8s_increase_by_ + +#ifndef _di_fl_int8ss_increase_ + f_return_status fl_int8ss_increase(f_int8ss_t *int8ss) { + + if (int8ss->used + 1 > int8ss->size) { + f_array_length_t size = int8ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int8ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int8ss_t_resize(status, (*int8ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int8ss_increase_ + +#ifndef _di_fl_int8ss_increase_by_ + f_return_status fl_int8ss_increase_by(const f_array_length_t amount, f_int8ss_t *int8ss) { + + if (int8ss->used + amount > int8ss->size) { + if (int8ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int8ss_t_resize(status, (*int8ss), int8ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int8ss_increase_by_ + +#ifndef _di_fl_uint8s_increase_ + f_return_status fl_uint8s_increase(f_uint8s_t *uint8s) { + + if (uint8s->used + 1 > uint8s->size) { + f_array_length_t size = uint8s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint8s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint8s_t_resize(status, (*uint8s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint8s_increase_ + +#ifndef _di_fl_uint8s_increase_by_ + f_return_status fl_uint8s_increase_by(const f_array_length_t amount, f_uint8s_t *uint8s) { + + if (uint8s->used + amount > uint8s->size) { + if (uint8s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint8s_t_resize(status, (*uint8s), uint8s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint8s_increase_by_ + +#ifndef _di_fl_uint8ss_increase_ + f_return_status fl_uint8ss_increase(f_uint8ss_t *uint8ss) { + + if (uint8ss->used + 1 > uint8ss->size) { + f_array_length_t size = uint8ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint8ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint8ss_t_resize(status, (*uint8ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint8ss_increase_ + +#ifndef _di_fl_uint8ss_increase_by_ + f_return_status fl_uint8ss_increase_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) { + + if (uint8ss->used + amount > uint8ss->size) { + if (uint8ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint8ss_t_resize(status, (*uint8ss), uint8ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint8ss_increase_by_ + +#ifndef _di_fl_int16s_increase_ + f_return_status fl_int16s_increase(f_int16s_t *int16s) { + + if (int16s->used + 1 > int16s->size) { + f_array_length_t size = int16s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int16s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int16s_t_resize(status, (*int16s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int16s_increase_ + +#ifndef _di_fl_int16s_increase_by_ + f_return_status fl_int16s_increase_by(const f_array_length_t amount, f_int16s_t *int16s) { + + if (int16s->used + amount > int16s->size) { + if (int16s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int16s_t_resize(status, (*int16s), int16s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int16s_increase_by_ + +#ifndef _di_fl_int16ss_increase_ + f_return_status fl_int16ss_increase(f_int16ss_t *int16ss) { + + if (int16ss->used + 1 > int16ss->size) { + f_array_length_t size = int16ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int16ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int16ss_t_resize(status, (*int16ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int16ss_increase_ + +#ifndef _di_fl_int16ss_increase_by_ + f_return_status fl_int16ss_increase_by(const f_array_length_t amount, f_int16ss_t *int16ss) { + + if (int16ss->used + amount > int16ss->size) { + if (int16ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int16ss_t_resize(status, (*int16ss), int16ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int16ss_increase_by_ + +#ifndef _di_fl_uint16s_increase_ + f_return_status fl_uint16s_increase(f_uint16s_t *uint16s) { + + if (uint16s->used + 1 > uint16s->size) { + f_array_length_t size = uint16s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint16s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint16s_t_resize(status, (*uint16s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint16s_increase_ + +#ifndef _di_fl_uint16s_increase_by_ + f_return_status fl_uint16s_increase_by(const f_array_length_t amount, f_uint16s_t *uint16s) { + + if (uint16s->used + amount > uint16s->size) { + if (uint16s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint16s_t_resize(status, (*uint16s), uint16s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint16s_increase_by_ + +#ifndef _di_fl_uint16ss_increase_ + f_return_status fl_uint16ss_increase(f_uint16ss_t *uint16ss) { + + if (uint16ss->used + 1 > uint16ss->size) { + f_array_length_t size = uint16ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint16ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint16ss_t_resize(status, (*uint16ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint16ss_increase_ + +#ifndef _di_fl_uint16ss_increase_by_ + f_return_status fl_uint16ss_increase_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) { + + if (uint16ss->used + amount > uint16ss->size) { + if (uint16ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint16ss_t_resize(status, (*uint16ss), uint16ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint16ss_increase_by_ + +#ifndef _di_fl_int32s_increase_ + f_return_status fl_int32s_increase(f_int32s_t *int32s) { + + if (int32s->used + 1 > int32s->size) { + f_array_length_t size = int32s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int32s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int32s_t_resize(status, (*int32s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int32s_increase_ + +#ifndef _di_fl_int32s_increase_by_ + f_return_status fl_int32s_increase_by(const f_array_length_t amount, f_int32s_t *int32s) { + + if (int32s->used + amount > int32s->size) { + if (int32s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int32s_t_resize(status, (*int32s), int32s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int32s_increase_by_ + +#ifndef _di_fl_int32ss_increase_ + f_return_status fl_int32ss_increase(f_int32ss_t *int32ss) { + + if (int32ss->used + 1 > int32ss->size) { + f_array_length_t size = int32ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int32ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int32ss_t_resize(status, (*int32ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int32ss_increase_ + +#ifndef _di_fl_int32ss_increase_by_ + f_return_status fl_int32ss_increase_by(const f_array_length_t amount, f_int32ss_t *int32ss) { + + if (int32ss->used + amount > int32ss->size) { + if (int32ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int32ss_t_resize(status, (*int32ss), int32ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int32ss_increase_by_ + +#ifndef _di_fl_uint32s_increase_ + f_return_status fl_uint32s_increase(f_uint32s_t *uint32s) { + + if (uint32s->used + 1 > uint32s->size) { + f_array_length_t size = uint32s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint32s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint32s_t_resize(status, (*uint32s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint32s_increase_ + +#ifndef _di_fl_uint32s_increase_by_ + f_return_status fl_uint32s_increase_by(const f_array_length_t amount, f_uint32s_t *uint32s) { + + if (uint32s->used + amount > uint32s->size) { + if (uint32s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint32s_t_resize(status, (*uint32s), uint32s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint32s_increase_by_ + +#ifndef _di_fl_uint32ss_increase_ + f_return_status fl_uint32ss_increase(f_uint32ss_t *uint32ss) { + + if (uint32ss->used + 1 > uint32ss->size) { + f_array_length_t size = uint32ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint32ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint32ss_t_resize(status, (*uint32ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint32ss_increase_ + +#ifndef _di_fl_uint32ss_increase_by_ + f_return_status fl_uint32ss_increase_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) { + + if (uint32ss->used + amount > uint32ss->size) { + if (uint32ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint32ss_t_resize(status, (*uint32ss), uint32ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint32ss_increase_by_ + +#ifndef _di_fl_int64s_increase_ + f_return_status fl_int64s_increase(f_int64s_t *int64s) { + + if (int64s->used + 1 > int64s->size) { + f_array_length_t size = int64s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int64s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int64s_t_resize(status, (*int64s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int64s_increase_ + +#ifndef _di_fl_int64s_increase_by_ + f_return_status fl_int64s_increase_by(const f_array_length_t amount, f_int64s_t *int64s) { + + if (int64s->used + amount > int64s->size) { + if (int64s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int64s_t_resize(status, (*int64s), int64s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int64s_increase_by_ + +#ifndef _di_fl_int64ss_increase_ + f_return_status fl_int64ss_increase(f_int64ss_t *int64ss) { + + if (int64ss->used + 1 > int64ss->size) { + f_array_length_t size = int64ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int64ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int64ss_t_resize(status, (*int64ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int64ss_increase_ + +#ifndef _di_fl_int64ss_increase_by_ + f_return_status fl_int64ss_increase_by(const f_array_length_t amount, f_int64ss_t *int64ss) { + + if (int64ss->used + amount > int64ss->size) { + if (int64ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int64ss_t_resize(status, (*int64ss), int64ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int64ss_increase_by_ + +#ifndef _di_fl_uint64s_increase_ + f_return_status fl_uint64s_increase(f_uint64s_t *uint64s) { + + if (uint64s->used + 1 > uint64s->size) { + f_array_length_t size = uint64s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint64s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint64s_t_resize(status, (*uint64s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint64s_increase_ + +#ifndef _di_fl_uint64s_increase_by_ + f_return_status fl_uint64s_increase_by(const f_array_length_t amount, f_uint64s_t *uint64s) { + + if (uint64s->used + amount > uint64s->size) { + if (uint64s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint64s_t_resize(status, (*uint64s), uint64s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint64s_increase_by_ + +#ifndef _di_fl_uint64ss_increase_ + f_return_status fl_uint64ss_increase(f_uint64ss_t *uint64ss) { + + if (uint64ss->used + 1 > uint64ss->size) { + f_array_length_t size = uint64ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint64ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint64ss_t_resize(status, (*uint64ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint64ss_increase_ + +#ifndef _di_fl_uint64ss_increase_by_ + f_return_status fl_uint64ss_increase_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) { + + if (uint64ss->used + amount > uint64ss->size) { + if (uint64ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint64ss_t_resize(status, (*uint64ss), uint64ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint64ss_increase_by_ + +#ifndef _di_fl_int128s_increase_ + f_return_status fl_int128s_increase(f_int128s_t *int128s) { + + if (int128s->used + 1 > int128s->size) { + f_array_length_t size = int128s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int128s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int128s_t_resize(status, (*int128s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int128s_increase_ + +#ifndef _di_fl_int128s_increase_by_ + f_return_status fl_int128s_increase_by(const f_array_length_t amount, f_int128s_t *int128s) { + + if (int128s->used + amount > int128s->size) { + if (int128s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int128s_t_resize(status, (*int128s), int128s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int128s_increase_by_ + +#ifndef _di_fl_int128ss_increase_ + f_return_status fl_int128ss_increase(f_int128ss_t *int128ss) { + + if (int128ss->used + 1 > int128ss->size) { + f_array_length_t size = int128ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (int128ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_int128ss_t_resize(status, (*int128ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_int128ss_increase_ + +#ifndef _di_fl_int128ss_increase_by_ + f_return_status fl_int128ss_increase_by(const f_array_length_t amount, f_int128ss_t *int128ss) { + + if (int128ss->used + amount > int128ss->size) { + if (int128ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_int128ss_t_resize(status, (*int128ss), int128ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_int128ss_increase_by_ + +#ifndef _di_fl_uint128s_increase_ + f_return_status fl_uint128s_increase(f_uint128s_t *uint128s) { + + if (uint128s->used + 1 > uint128s->size) { + f_array_length_t size = uint128s->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint128s->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint128s_t_resize(status, (*uint128s), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint128s_increase_ + +#ifndef _di_fl_uint128s_increase_by_ + f_return_status fl_uint128s_increase_by(const f_array_length_t amount, f_uint128s_t *uint128s) { + + if (uint128s->used + amount > uint128s->size) { + if (uint128s->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint128s_t_resize(status, (*uint128s), uint128s->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint128s_increase_by_ + +#ifndef _di_fl_uint128ss_increase_ + f_return_status fl_uint128ss_increase(f_uint128ss_t *uint128ss) { + + if (uint128ss->used + 1 > uint128ss->size) { + f_array_length_t size = uint128ss->used + f_memory_default_allocation_step; + + if (size > f_array_length_t_size) { + if (uint128ss->used + 1 > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + size = f_array_length_t_size; + } + + f_status_t status = F_none; + + f_macro_uint128ss_t_resize(status, (*uint128ss), size); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint128ss_increase_ + +#ifndef _di_fl_uint128ss_increase_by_ + f_return_status fl_uint128ss_increase_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) { + + if (uint128ss->used + amount > uint128ss->size) { + if (uint128ss->used + amount > f_array_length_t_size) { + return F_status_set_error(F_array_too_large); + } + + f_status_t status = F_none; + + f_macro_uint128ss_t_resize(status, (*uint128ss), uint128ss->used + amount); + + return status; + } + + return F_none; + } +#endif // _di_fl_uint128ss_increase_by_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_1/fl_type/c/type.h b/level_1/fl_type/c/type.h new file mode 100644 index 0000000..dcfcc81 --- /dev/null +++ b/level_1/fl_type/c/type.h @@ -0,0 +1,797 @@ +/** + * FLL - Level 1 + * + * Project: Type + * API Version: 0.5 + * Licenses: lgplv2.1 + * + * Provides type management functions. + */ +#ifndef _FL_type_h +#define _FL_type_h + +// libc includes + +// fll-0 includes +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Increase the size of cells array, but only if necessary. + * + * @param cells + * The cells array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_cells_increase_ + extern f_return_status fl_cells_increase(f_cells_t *cells) ; +#endif // _di_fl_cells_increase_ + +/** + * Increase the size of cells array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param cells + * The cells array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_cells_increase_by_ + extern f_return_status fl_cells_increase_by(const f_array_length_t amount, f_cells_t *cells); +#endif // _di_fl_cells_increase_by_ + +/** + * Increase the size of cells array, but only if necessary. + * + * @param cells + * The cells array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_cellss_increase_ + extern f_return_status fl_cellss_increase(f_cellss_t *cellss); +#endif // _di_fl_cellss_increase_ + +/** + * Increase the size of cellss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param cellss + * The cellss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_cellss_increase_by_ + extern f_return_status fl_cellss_increase_by(const f_array_length_t amount, f_cellss_t *cellss); +#endif // _di_fl_cellss_increase_by_ + +/** + * Increase the size of array_lengths array, but only if necessary. + * + * @param array_lengths + * The array_lengths array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_array_lengths_increase_ + extern f_return_status fl_array_lengths_increase(f_array_lengths_t *array_lengths) ; +#endif // _di_fl_array_lengths_increase_ + +/** + * Increase the size of array_lengths array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param array_lengths + * The array_lengths array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_array_lengths_increase_by_ + extern f_return_status fl_array_lengths_increase_by(const f_array_length_t amount, f_array_lengths_t *array_lengths); +#endif // _di_fl_array_lengths_increase_by_ + +/** + * Increase the size of array_lengths array, but only if necessary. + * + * @param array_lengths + * The array_lengths array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_array_lengthss_increase_ + extern f_return_status fl_array_lengthss_increase(f_array_lengthss_t *array_lengthss); +#endif // _di_fl_array_lengthss_increase_ + +/** + * Increase the size of array_lengthss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param array_lengthss + * The array_lengthss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_array_lengthss_increase_by_ + extern f_return_status fl_array_lengthss_increase_by(const f_array_length_t amount, f_array_lengthss_t *array_lengthss); +#endif // _di_fl_array_lengthss_increase_by_ + +/** + * Increase the size of int8s array, but only if necessary. + * + * @param int8s + * The int8s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int8s_increase_ + extern f_return_status fl_int8s_increase(f_int8s_t *int8s) ; +#endif // _di_fl_int8s_increase_ + +/** + * Increase the size of int8s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int8s + * The int8s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int8s_increase_by_ + extern f_return_status fl_int8s_increase_by(const f_array_length_t amount, f_int8s_t *int8s); +#endif // _di_fl_int8s_increase_by_ + +/** + * Increase the size of int8s array, but only if necessary. + * + * @param int8s + * The int8s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int8ss_increase_ + extern f_return_status fl_int8ss_increase(f_int8ss_t *int8ss); +#endif // _di_fl_int8ss_increase_ + +/** + * Increase the size of int8ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int8ss + * The int8ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int8ss_increase_by_ + extern f_return_status fl_int8ss_increase_by(const f_array_length_t amount, f_int8ss_t *int8ss); +#endif // _di_fl_int8ss_increase_by_ + +/** + * Increase the size of uint8s array, but only if necessary. + * + * @param uint8s + * The uint8s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint8s_increase_ + extern f_return_status fl_uint8s_increase(f_uint8s_t *uint8s) ; +#endif // _di_fl_uint8s_increase_ + +/** + * Increase the size of uint8s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint8s + * The uint8s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint8s_increase_by_ + extern f_return_status fl_uint8s_increase_by(const f_array_length_t amount, f_uint8s_t *uint8s); +#endif // _di_fl_uint8s_increase_by_ + +/** + * Increase the size of uint8s array, but only if necessary. + * + * @param uint8s + * The uint8s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint8ss_increase_ + extern f_return_status fl_uint8ss_increase(f_uint8ss_t *uint8ss); +#endif // _di_fl_uint8ss_increase_ + +/** + * Increase the size of uint8ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint8ss + * The uint8ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint8ss_increase_by_ + extern f_return_status fl_uint8ss_increase_by(const f_array_length_t amount, f_uint8ss_t *uint8ss); +#endif // _di_fl_uint8ss_increase_by_ + +/** + * Increase the size of int16s array, but only if necessary. + * + * @param int16s + * The int16s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int16s_increase_ + extern f_return_status fl_int16s_increase(f_int16s_t *int16s) ; +#endif // _di_fl_int16s_increase_ + +/** + * Increase the size of int16s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int16s + * The int16s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int16s_increase_by_ + extern f_return_status fl_int16s_increase_by(const f_array_length_t amount, f_int16s_t *int16s); +#endif // _di_fl_int16s_increase_by_ + +/** + * Increase the size of int16s array, but only if necessary. + * + * @param int16s + * The int16s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int16ss_increase_ + extern f_return_status fl_int16ss_increase(f_int16ss_t *int16ss); +#endif // _di_fl_int16ss_increase_ + +/** + * Increase the size of int16ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int16ss + * The int16ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int16ss_increase_by_ + extern f_return_status fl_int16ss_increase_by(const f_array_length_t amount, f_int16ss_t *int16ss); +#endif // _di_fl_int16ss_increase_by_ + +/** + * Increase the size of uint16s array, but only if necessary. + * + * @param uint16s + * The uint16s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint16s_increase_ + extern f_return_status fl_uint16s_increase(f_uint16s_t *uint16s) ; +#endif // _di_fl_uint16s_increase_ + +/** + * Increase the size of uint16s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint16s + * The uint16s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint16s_increase_by_ + extern f_return_status fl_uint16s_increase_by(const f_array_length_t amount, f_uint16s_t *uint16s); +#endif // _di_fl_uint16s_increase_by_ + +/** + * Increase the size of uint16s array, but only if necessary. + * + * @param uint16s + * The uint16s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint16ss_increase_ + extern f_return_status fl_uint16ss_increase(f_uint16ss_t *uint16ss); +#endif // _di_fl_uint16ss_increase_ + +/** + * Increase the size of uint16ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint16ss + * The uint16ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint16ss_increase_by_ + extern f_return_status fl_uint16ss_increase_by(const f_array_length_t amount, f_uint16ss_t *uint16ss); +#endif // _di_fl_uint16ss_increase_by_ + +/** + * Increase the size of int32s array, but only if necessary. + * + * @param int32s + * The int32s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int32s_increase_ + extern f_return_status fl_int32s_increase(f_int32s_t *int32s) ; +#endif // _di_fl_int32s_increase_ + +/** + * Increase the size of int32s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int32s + * The int32s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int32s_increase_by_ + extern f_return_status fl_int32s_increase_by(const f_array_length_t amount, f_int32s_t *int32s); +#endif // _di_fl_int32s_increase_by_ + +/** + * Increase the size of int32s array, but only if necessary. + * + * @param int32s + * The int32s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int32ss_increase_ + extern f_return_status fl_int32ss_increase(f_int32ss_t *int32ss); +#endif // _di_fl_int32ss_increase_ + +/** + * Increase the size of int32ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int32ss + * The int32ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int32ss_increase_by_ + extern f_return_status fl_int32ss_increase_by(const f_array_length_t amount, f_int32ss_t *int32ss); +#endif // _di_fl_int32ss_increase_by_ + +/** + * Increase the size of uint32s array, but only if necessary. + * + * @param uint32s + * The uint32s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint32s_increase_ + extern f_return_status fl_uint32s_increase(f_uint32s_t *uint32s) ; +#endif // _di_fl_uint32s_increase_ + +/** + * Increase the size of uint32s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint32s + * The uint32s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint32s_increase_by_ + extern f_return_status fl_uint32s_increase_by(const f_array_length_t amount, f_uint32s_t *uint32s); +#endif // _di_fl_uint32s_increase_by_ + +/** + * Increase the size of uint32s array, but only if necessary. + * + * @param uint32s + * The uint32s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint32ss_increase_ + extern f_return_status fl_uint32ss_increase(f_uint32ss_t *uint32ss); +#endif // _di_fl_uint32ss_increase_ + +/** + * Increase the size of uint32ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint32ss + * The uint32ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint32ss_increase_by_ + extern f_return_status fl_uint32ss_increase_by(const f_array_length_t amount, f_uint32ss_t *uint32ss); +#endif // _di_fl_uint32ss_increase_by_ + +/** + * Increase the size of int64s array, but only if necessary. + * + * @param int64s + * The int64s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int64s_increase_ + extern f_return_status fl_int64s_increase(f_int64s_t *int64s) ; +#endif // _di_fl_int64s_increase_ + +/** + * Increase the size of int64s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int64s + * The int64s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int64s_increase_by_ + extern f_return_status fl_int64s_increase_by(const f_array_length_t amount, f_int64s_t *int64s); +#endif // _di_fl_int64s_increase_by_ + +/** + * Increase the size of int64s array, but only if necessary. + * + * @param int64s + * The int64s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int64ss_increase_ + extern f_return_status fl_int64ss_increase(f_int64ss_t *int64ss); +#endif // _di_fl_int64ss_increase_ + +/** + * Increase the size of int64ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int64ss + * The int64ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int64ss_increase_by_ + extern f_return_status fl_int64ss_increase_by(const f_array_length_t amount, f_int64ss_t *int64ss); +#endif // _di_fl_int64ss_increase_by_ + +/** + * Increase the size of uint64s array, but only if necessary. + * + * @param uint64s + * The uint64s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint64s_increase_ + extern f_return_status fl_uint64s_increase(f_uint64s_t *uint64s) ; +#endif // _di_fl_uint64s_increase_ + +/** + * Increase the size of uint64s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint64s + * The uint64s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint64s_increase_by_ + extern f_return_status fl_uint64s_increase_by(const f_array_length_t amount, f_uint64s_t *uint64s); +#endif // _di_fl_uint64s_increase_by_ + +/** + * Increase the size of uint64s array, but only if necessary. + * + * @param uint64s + * The uint64s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint64ss_increase_ + extern f_return_status fl_uint64ss_increase(f_uint64ss_t *uint64ss); +#endif // _di_fl_uint64ss_increase_ + +/** + * Increase the size of uint64ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint64ss + * The uint64ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint64ss_increase_by_ + extern f_return_status fl_uint64ss_increase_by(const f_array_length_t amount, f_uint64ss_t *uint64ss); +#endif // _di_fl_uint64ss_increase_by_ + +/** + * Increase the size of int128s array, but only if necessary. + * + * @param int128s + * The int128s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int128s_increase_ + extern f_return_status fl_int128s_increase(f_int128s_t *int128s) ; +#endif // _di_fl_int128s_increase_ + +/** + * Increase the size of int128s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int128s + * The int128s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int128s_increase_by_ + extern f_return_status fl_int128s_increase_by(const f_array_length_t amount, f_int128s_t *int128s); +#endif // _di_fl_int128s_increase_by_ + +/** + * Increase the size of int128s array, but only if necessary. + * + * @param int128s + * The int128s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int128ss_increase_ + extern f_return_status fl_int128ss_increase(f_int128ss_t *int128ss); +#endif // _di_fl_int128ss_increase_ + +/** + * Increase the size of int128ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param int128ss + * The int128ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_int128ss_increase_by_ + extern f_return_status fl_int128ss_increase_by(const f_array_length_t amount, f_int128ss_t *int128ss); +#endif // _di_fl_int128ss_increase_by_ + +/** + * Increase the size of uint128s array, but only if necessary. + * + * @param uint128s + * The uint128s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint128s_increase_ + extern f_return_status fl_uint128s_increase(f_uint128s_t *uint128s) ; +#endif // _di_fl_uint128s_increase_ + +/** + * Increase the size of uint128s array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint128s + * The uint128s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint128s_increase_by_ + extern f_return_status fl_uint128s_increase_by(const f_array_length_t amount, f_uint128s_t *uint128s); +#endif // _di_fl_uint128s_increase_by_ + +/** + * Increase the size of uint128s array, but only if necessary. + * + * @param uint128s + * The uint128s array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint128ss_increase_ + extern f_return_status fl_uint128ss_increase(f_uint128ss_t *uint128ss); +#endif // _di_fl_uint128ss_increase_ + +/** + * Increase the size of uint128ss array by the given amount, but only if necessary. + * + * @param amount + * The amount to increase by. + * @param uint128ss + * The uint128ss array to increase. + * + * @return + * F_none on success. + * F_memory_reallocation (with error bit) on reallocation error. + * F_array_too_large (with error bit) if new length is larger than max array length. + */ +#ifndef _di_fl_uint128ss_increase_by_ + extern f_return_status fl_uint128ss_increase_by(const f_array_length_t amount, f_uint128ss_t *uint128ss); +#endif // _di_fl_uint128ss_increase_by_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _FL_type_h diff --git a/level_1/fl_type/data/build/defines b/level_1/fl_type/data/build/defines new file mode 100644 index 0000000..c665317 --- /dev/null +++ b/level_1/fl_type/data/build/defines @@ -0,0 +1,2 @@ +# fss-0000 + diff --git a/level_1/fl_type/data/build/dependencies b/level_1/fl_type/data/build/dependencies new file mode 100644 index 0000000..66dca29 --- /dev/null +++ b/level_1/fl_type/data/build/dependencies @@ -0,0 +1,5 @@ +# fss-0000 + +f_type +f_status +f_memory diff --git a/level_1/fl_type/data/build/settings b/level_1/fl_type/data/build/settings new file mode 100644 index 0000000..7e2ead4 --- /dev/null +++ b/level_1/fl_type/data/build/settings @@ -0,0 +1,55 @@ +# fss-0001 + +project_name fl_type + +version_major 0 +version_minor 5 +version_micro 2 +version_target major + +environment + +process_pre +process_post + +modes individual +modes_default individual + +build_compiler gcc +build_indexer ar +build_language c +build_libraries -lc +build_libraries-individual -lf_memory +build_sources_library type.c +build_sources_program +build_sources_headers type.h +build_sources_script +build_sources_setting +build_script yes +build_shared yes +build_static yes + +path_headers level_1 +path_headers_preserve no +path_library_script script +path_library_shared shared +path_library_static static +path_program_script script +path_program_shared shared +path_program_static static +path_sources +path_standard yes + +search_exclusive yes +search_shared yes +search_static yes + +defines_all +defines_static +defines_shared + +flags_all -z now -g -fdiagnostics-color=always +flags_shared +flags_static +flags_library -fPIC +flags_program -fPIE