From ac94a779982ead8ee0d2d8ffe41cb5ae373d251e Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 11 Apr 2021 19:42:02 -0500 Subject: [PATCH] Cleanup: fix parameter order of fl_conversion_* functions. --- level_1/fl_conversion/c/conversion.c | 68 ++++++++-------- level_1/fl_conversion/c/conversion.h | 94 ++++++++++++---------- level_2/fll_fss/c/private-fss.c | 4 +- level_3/byte_dump/c/byte_dump.c | 6 +- level_3/controller/c/private-controller.c | 6 +- level_3/controller/c/private-entry.c | 2 +- level_3/controller/c/private-rule.c | 8 +- level_3/fake/c/private-make.c | 10 +-- .../fss_basic_list_read/c/fss_basic_list_read.c | 2 +- .../c/private-fss_basic_list_read.c | 8 +- level_3/fss_basic_read/c/fss_basic_read.c | 2 +- level_3/fss_basic_read/c/private-fss_basic_read.c | 8 +- .../c/fss_embedded_list_read.c | 2 +- .../c/private-fss_embedded_list_read.c | 6 +- .../c/private-fss_embedded_list_write.c | 4 +- .../c/fss_extended_list_read.c | 2 +- .../c/private-fss_extended_list_read.c | 8 +- .../c/private-fss_extended_list_write.c | 4 +- level_3/fss_extended_read/c/fss_extended_read.c | 2 +- .../c/private-fss_extended_read.c | 8 +- .../fss_status_code/c/private-fss_status_code.c | 4 +- level_3/iki_read/c/iki_read.c | 4 +- level_3/status_code/c/private-status_code.c | 4 +- 23 files changed, 139 insertions(+), 127 deletions(-) diff --git a/level_1/fl_conversion/c/conversion.c b/level_1/fl_conversion/c/conversion.c index aafe145..dad9308 100644 --- a/level_1/fl_conversion/c/conversion.c +++ b/level_1/fl_conversion/c/conversion.c @@ -5,11 +5,11 @@ extern "C" { #endif #ifndef _di_fl_conversion_string_to_binary_signed_ - f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) { + f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -65,11 +65,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_binary_signed_ #ifndef _di_fl_conversion_string_to_binary_unsigned_ - f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) { + f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -109,11 +109,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_binary_unsigned_ #ifndef _di_fl_conversion_string_to_decimal_signed_ - f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) { + f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -174,11 +174,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_decimal_signed_ #ifndef _di_fl_conversion_string_to_decimal_unsigned_ - f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) { + f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -221,11 +221,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_decimal_unsigned_ #ifndef _di_fl_conversion_string_to_duodecimal_signed_ - f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) { + f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -286,11 +286,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_duodecimal_signed_ #ifndef _di_fl_conversion_string_to_duodecimal_unsigned_ - f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) { + f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -333,11 +333,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_duodecimal_unsigned_ #ifndef _di_fl_conversion_string_to_hexidecimal_signed_ - f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) { + f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -398,11 +398,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_hexidecimal_signed_ #ifndef _di_fl_conversion_string_to_hexidecimal_unsigned_ - f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) { + f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -445,11 +445,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_hexidecimal_unsigned_ #ifndef _di_fl_conversion_string_to_octal_signed_ - f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) { + f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -510,11 +510,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_octal_signed_ #ifndef _di_fl_conversion_string_to_octal_unsigned_ - f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) { + f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -557,11 +557,11 @@ extern "C" { #endif // _di_fl_conversion_string_to_octal_unsigned_ #ifndef _di_fl_conversion_string_to_number_signed_ - f_status_t fl_conversion_string_to_number_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range) { + f_status_t fl_conversion_string_to_number_signed(const f_string_t string, const f_string_range_t range, f_number_signed_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -693,31 +693,31 @@ extern "C" { } if (mode == 10) { - return fl_conversion_string_to_decimal_signed(string, number, location_offset, vector == -1); + return fl_conversion_string_to_decimal_signed(string, location_offset, vector == -1, number); } if (mode == 16) { - return fl_conversion_string_to_hexidecimal_signed(string, number, location_offset, vector == -1); + return fl_conversion_string_to_hexidecimal_signed(string, location_offset, vector == -1, number); } if (mode == 12) { - return fl_conversion_string_to_duodecimal_signed(string, number, location_offset, vector == -1); + return fl_conversion_string_to_duodecimal_signed(string, location_offset, vector == -1, number); } if (mode == 8) { - return fl_conversion_string_to_octal_signed(string, number, location_offset, vector == -1); + return fl_conversion_string_to_octal_signed(string, location_offset, vector == -1, number); } - return fl_conversion_string_to_binary_signed(string, number, location_offset, vector == -1); + return fl_conversion_string_to_binary_signed(string, location_offset, vector == -1, number); } #endif // _di_fl_conversion_string_to_number_signed_ #ifndef _di_fl_conversion_string_to_number_unsigned_ - f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) { + f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); - if (!number) return F_status_set_error(F_parameter); if (range.start > range.stop) return F_status_set_error(F_parameter); + if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (!string[0]) { @@ -837,19 +837,19 @@ extern "C" { } if (mode == 10) { - status = fl_conversion_string_to_decimal_unsigned(string, number, location_offset); + status = fl_conversion_string_to_decimal_unsigned(string, location_offset, number); } else if (mode == 16) { - status = fl_conversion_string_to_hexidecimal_unsigned(string, number, location_offset); + status = fl_conversion_string_to_hexidecimal_unsigned(string, location_offset, number); } else if (mode == 12) { - status = fl_conversion_string_to_duodecimal_unsigned(string, number, location_offset); + status = fl_conversion_string_to_duodecimal_unsigned(string, location_offset, number); } else if (mode == 8) { - status = fl_conversion_string_to_octal_unsigned(string, number, location_offset); + status = fl_conversion_string_to_octal_unsigned(string, location_offset, number); } else { - status = fl_conversion_string_to_binary_unsigned(string, number, location_offset); + status = fl_conversion_string_to_binary_unsigned(string, location_offset, number); } // +/- signs are not allowed. diff --git a/level_1/fl_conversion/c/conversion.h b/level_1/fl_conversion/c/conversion.h index d9aa28d..884b9d3 100644 --- a/level_1/fl_conversion/c/conversion.h +++ b/level_1/fl_conversion/c/conversion.h @@ -35,24 +35,25 @@ extern "C" { * * @param string * The string to convert. - * @param number - * This will store the value of the converted string. - * This value is only changed on success. * @param location * The start/stop range to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. + * @param number + * This will store the value of the converted string. + * This value is only changed on success. * * @return * F_none if the binary string was converted to an signed long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-binary values being found. * F_number_overflow (with error bit) on integer overflow. * F_number_underflow (with error bit) on integer underflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_binary_signed_ - extern f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative); + extern f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number); #endif // _di_fl_conversion_string_to_binary_signed_ /** @@ -64,21 +65,22 @@ extern "C" { * * @param string * The string to convert. + * @param range + * The start/stop range to convert. * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param range - * The start/stop range to convert. * * @return * F_none if the binary string was converted to an unsigned long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-binary values being found. * F_number_overflow (with error bit) on integer overflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_binary_unsigned_ - extern f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range); + extern f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number); #endif // _di_fl_conversion_string_to_binary_unsigned_ /** @@ -90,24 +92,25 @@ extern "C" { * * @param string * The string to convert. - * @param number - * This will store the value of the converted string. - * This value is only changed on success. * @param range * The start/stop range to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. + * @param number + * This will store the value of the converted string. + * This value is only changed on success. * * @return * F_none if the decimal string was converted to an signed long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-decimal values being found. * F_number_overflow (with error bit) on integer overflow. * F_number_underflow (with error bit) on integer underflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_decimal_signed_ - extern f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative); + extern f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number); #endif // _di_fl_conversion_string_to_decimal_signed_ /** @@ -119,21 +122,22 @@ extern "C" { * * @param string * The string to convert. + * @param range + * The start/stop range to convert. * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param range - * The start/stop range to convert. * * @return * F_none if the decimal string was converted to an unsigned long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-decimal values being found. * F_number_overflow (with error bit) on integer overflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_decimal_unsigned_ - extern f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range); + extern f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number); #endif // _di_fl_conversion_string_to_decimal_unsigned_ /** @@ -145,24 +149,25 @@ extern "C" { * * @param string * The string to convert. - * @param number - * This will store the value of the converted string. - * This value is only changed on success. * @param range * The start/stop range to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. + * @param number + * This will store the value of the converted string. + * This value is only changed on success. * * @return * F_none if the duodecimal string was converted to an signed long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-duodecimal values being found. * F_number_overflow (with error bit) on integer overflow. * F_number_underflow (with error bit) on integer underflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_duodecimal_signed_ - extern f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative); + extern f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number); #endif // _di_fl_conversion_string_to_duodecimal_signed_ /** @@ -174,21 +179,22 @@ extern "C" { * * @param string * The string to convert. + * @param range + * The start/stop range to convert. * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param range - * The start/stop range to convert. * * @return * F_none if the duodecimal string was converted to an unsigned long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-duodecimal values being found. * F_number_overflow (with error bit) on integer overflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_duodecimal_unsigned_ - extern f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range); + extern f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number); #endif // _di_fl_conversion_string_to_duodecimal_unsigned_ /** @@ -200,24 +206,25 @@ extern "C" { * * @param string * The string to convert. - * @param number - * This will store the value of the converted string. - * This value is only changed on success. * @param range * The start/stop range to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. + * @param number + * This will store the value of the converted string. + * This value is only changed on success. * * @return * F_none if the hexidecimal string was converted to an signed long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-hexidecimal values being found. * F_number_overflow (with error bit) on integer overflow. * F_number_underflow (with error bit) on integer underflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_hexidecimal_signed_ - extern f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative); + extern f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number); #endif // _di_fl_conversion_string_to_hexidecimal_signed_ /** @@ -229,21 +236,22 @@ extern "C" { * * @param string * The string to convert. + * @param range + * The start/stop range to convert. * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param range - * The start/stop range to convert. * * @return * F_none if the hexidecimal string was converted to an unsigned long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-hexidecimal values being found. * F_number_overflow (with error bit) on integer overflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_hexidecimal_unsigned_ - extern f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range); + extern f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number); #endif // _di_fl_conversion_string_to_hexidecimal_unsigned_ /** @@ -255,23 +263,24 @@ extern "C" { * * @param string * The string to convert. - * @param number - * This will store the value of the converted string. - * This value is only changed on success. * @param range * The start/stop range to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. + * @param number + * This will store the value of the converted string. + * This value is only changed on success. * * @return * F_none if the octal string was converted to an signed long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-octal values being found. * F_number_overflow (with error bit) on integer overflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_octal_signed_ - extern f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative); + extern f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number); #endif // _di_fl_conversion_string_to_octal_signed_ /** @@ -283,21 +292,22 @@ extern "C" { * * @param string * The string to convert. + * @param range + * The start/stop range to convert. * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param range - * The start/stop range to convert. * * @return * F_none if the octal string was converted to an unsigned long. * F_data_not if string starts with a null (length is 0). + * * F_number (with error bit) if no conversion was made due to non-octal values being found. * F_number_overflow (with error bit) on integer overflow. * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_string_to_octal_unsigned_ - extern f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range); + extern f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number); #endif // _di_fl_conversion_string_to_octal_unsigned_ /** @@ -321,15 +331,16 @@ extern "C" { * * @param string * The string to convert. + * @param range + * The start/stop range to convert. * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param range - * The start/stop range to convert. * * @return * F_none on success. * F_data_not if string starts with a null (length is 0). + * * F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment is found. * F_number (with error bit) if parameter is not a number. * F_number_overflow (with error bit) on integer overflow. @@ -339,7 +350,7 @@ extern "C" { * @see strtoll() */ #ifndef _di_fl_conversion_string_to_number_signed_ - extern f_status_t fl_conversion_string_to_number_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range); + extern f_status_t fl_conversion_string_to_number_signed(const f_string_t string, const f_string_range_t range, f_number_signed_t *number); #endif // _di_fl_conversion_string_to_number_signed_ /** @@ -364,15 +375,16 @@ extern "C" { * * @param string * The string to convert. + * @param range + * The start/stop range to convert. * @param number * This will store the value of the converted string. * This value is only changed on success. - * @param range - * The start/stop range to convert. * * @return * F_none on success. * F_data_not if string starts with a null (length is 0). + * * F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment is found. * F_number (with error bit) if parameter is not a number. * F_number_negative (with error bit) on negative value. @@ -383,7 +395,7 @@ extern "C" { * @see strtoull() */ #ifndef _di_fl_conversion_string_to_number_unsigned_ - extern f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range); + extern f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number); #endif // _di_fl_conversion_string_to_number_unsigned_ #ifdef __cplusplus diff --git a/level_2/fll_fss/c/private-fss.c b/level_2/fll_fss/c/private-fss.c index 7802e9e..addc98c 100644 --- a/level_2/fll_fss/c/private-fss.c +++ b/level_2/fll_fss/c/private-fss.c @@ -52,7 +52,7 @@ extern "C" { range.stop = i; // 1: A possibly valid header type was found, now convert it into its proper format and save the header type. - const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range); + const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, range, &header->type); if (F_status_is_error(status)) return status; if (status == F_none) { @@ -110,7 +110,7 @@ extern "C" { range.start = i - 4; range.stop = i; - const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range); + const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, range, &header->type); if (F_status_is_error(status)) return status; header->length = i + 1; diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index 9356eaa..1fe2f61 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -234,7 +234,7 @@ extern "C" { f_number_unsigned_t number = 0; - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status) || number < 1 || number >= 0xfb) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); @@ -266,7 +266,7 @@ extern "C" { f_number_unsigned_t number = 0; - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status) || number > f_number_t_size_unsigned) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); @@ -298,7 +298,7 @@ extern "C" { f_number_unsigned_t number = 0; - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status) || number < 0 || number > f_number_t_size_unsigned) { fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error); diff --git a/level_3/controller/c/private-controller.c b/level_3/controller/c/private-controller.c index 851f948..8250911 100644 --- a/level_3/controller/c/private-controller.c +++ b/level_3/controller/c/private-controller.c @@ -228,7 +228,7 @@ extern "C" { if (!isspace(pid_buffer.string[range.stop])) break; } // for - status = fl_conversion_string_to_decimal_unsigned(pid_buffer.string, &number, range); + status = fl_conversion_string_to_decimal_unsigned(pid_buffer.string, range, &number); if (F_status_is_error_not(status) && number == data.pid) { status = f_file_remove(path_pid.string); @@ -266,7 +266,7 @@ extern "C" { f_number_unsigned_t number = 0; // @todo fix argument ordering in fl_conversion_string_to_number_unsigned(). - f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range); + f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number); if (F_status_is_error(status)) { status = F_status_set_fine(status); @@ -308,7 +308,7 @@ extern "C" { f_number_unsigned_t number = 0; // @todo fix argument ordering in fl_conversion_string_to_number_unsigned(). - f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range); + f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number); if (F_status_is_error(status)) { status = F_status_set_fine(status); diff --git a/level_3/controller/c/private-entry.c b/level_3/controller/c/private-entry.c index 7720c06..3c4534e 100644 --- a/level_3/controller/c/private-entry.c +++ b/level_3/controller/c/private-entry.c @@ -498,7 +498,7 @@ extern "C" { if (action->status == F_none) { const f_string_range_t range = f_macro_string_range_t_initialize(action->parameters.array[1].used); - status = fl_conversion_string_to_number_unsigned(action->parameters.array[1].string, &action->number, range); + status = fl_conversion_string_to_number_unsigned(action->parameters.array[1].string, range, &action->number); if (F_status_is_error(status) || status == F_data_not) { action->number = 0; diff --git a/level_3/controller/c/private-rule.c b/level_3/controller/c/private-rule.c index 32e8bd0..804e188 100644 --- a/level_3/controller/c/private-rule.c +++ b/level_3/controller/c/private-rule.c @@ -3057,7 +3057,7 @@ extern "C" { break; } - status = fl_conversion_string_to_number_signed(cache->buffer_item.string, &number, cache->content_actions.array[i].array[j]); + status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[j], &number); if (F_status_is_error(status)) { status = F_status_set_fine(status); @@ -3538,7 +3538,7 @@ extern "C" { for (j = 1; j < 3; ++j, number = 0) { - status = fl_conversion_string_to_number_signed(cache->buffer_item.string, &number, cache->content_actions.array[i].array[j]); + status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[j], &number); if (F_status_is_error(status)) { status = F_status_set_fine(status); @@ -3854,7 +3854,7 @@ extern "C" { f_number_signed_t number = 0; - status = fl_conversion_string_to_number_signed(cache->buffer_item.string, &number, cache->content_actions.array[i].array[1]); + status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[1], &number); if (F_status_is_error(status) || (zero_only && number) || (!zero_only && (number < 1 || number > 99))) { status = F_status_set_fine(status); @@ -4053,7 +4053,7 @@ extern "C" { else if (type == controller_rule_setting_type_nice) { f_number_signed_t number = 0; - status = fl_conversion_string_to_number_signed(cache->buffer_item.string, &number, cache->content_actions.array[i].array[0]); + status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[0], &number); if (F_status_is_error(status) || number < -20 || number > 19) { status = F_status_set_fine(status); diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index 72bd3b6..24c4c92 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -49,7 +49,7 @@ extern "C" { f_number_unsigned_t number = 0; - f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range); + f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number); if (F_status_is_error(status)) { status = F_status_set_fine(status); @@ -127,7 +127,7 @@ extern "C" { f_number_unsigned_t number = 0; - f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range); + f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number); if (F_status_is_error(status)) { status = F_status_set_fine(status); @@ -3169,7 +3169,7 @@ extern "C" { status_number = F_status_set_error(F_failure); } else { - status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, &number_left, range); + status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, range, &number_left); } if (F_status_is_error_not(status_number)) { @@ -3193,7 +3193,7 @@ extern "C" { status_number = F_status_set_error(F_failure); } else { - status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, &number_right, range); + status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, range, &number_right); } } else { @@ -4842,7 +4842,7 @@ extern "C" { status_number = F_status_set_error(F_failure); } else { - status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, &number, range); + status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, range, &number); } } else { diff --git a/level_3/fss_basic_list_read/c/fss_basic_list_read.c b/level_3/fss_basic_list_read/c/fss_basic_list_read.c index 901e41c..0754284 100644 --- a/level_3/fss_basic_list_read/c/fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/fss_basic_list_read.c @@ -388,7 +388,7 @@ extern "C" { range.start++; } - status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_delimit, arguments.argv[location]); diff --git a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c index d63c8d0..f1e2e6f 100644 --- a/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c +++ b/level_3/fss_basic_list_read/c/private-fss_basic_list_read.c @@ -46,7 +46,7 @@ extern "C" { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[position_depth])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], range, &depths->array[i].depth); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_depth, arguments.argv[position_depth]); @@ -69,7 +69,7 @@ extern "C" { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[depths->array[i].index_at])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], range, &depths->array[i].value_at); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_at, arguments.argv[depths->array[i].index_at]); @@ -231,7 +231,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_basic_list_read_parameter_select].values.array[data->parameters[fss_basic_list_read_parameter_select].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_select, arguments.argv[index]); @@ -250,7 +250,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_basic_list_read_parameter_line].values.array[data->parameters[fss_basic_list_read_parameter_line].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_line, arguments.argv[index]); diff --git a/level_3/fss_basic_read/c/fss_basic_read.c b/level_3/fss_basic_read/c/fss_basic_read.c index 41d70dc..9452edc 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -388,7 +388,7 @@ extern "C" { range.start++; } - status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_delimit, arguments.argv[location]); diff --git a/level_3/fss_basic_read/c/private-fss_basic_read.c b/level_3/fss_basic_read/c/private-fss_basic_read.c index 6948a1e..bcbc39d 100644 --- a/level_3/fss_basic_read/c/private-fss_basic_read.c +++ b/level_3/fss_basic_read/c/private-fss_basic_read.c @@ -46,7 +46,7 @@ extern "C" { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[position_depth])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], range, &depths->array[i].depth); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_depth, arguments.argv[position_depth]); @@ -69,7 +69,7 @@ extern "C" { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[depths->array[i].index_at])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], range, &depths->array[i].value_at); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_at, arguments.argv[depths->array[i].index_at]); @@ -220,7 +220,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_basic_read_parameter_select].values.array[data->parameters[fss_basic_read_parameter_select].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_select, arguments.argv[index]); @@ -239,7 +239,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_basic_read_parameter_line].values.array[data->parameters[fss_basic_read_parameter_line].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_line, arguments.argv[index]); diff --git a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c index c0cf809..f47e50a 100644 --- a/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/fss_embedded_list_read.c @@ -388,7 +388,7 @@ extern "C" { range.start++; } - status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_delimit, arguments.argv[location]); diff --git a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c index 7d786fe..93d3cad 100644 --- a/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c +++ b/level_3/fss_embedded_list_read/c/private-fss_embedded_list_read.c @@ -125,7 +125,7 @@ extern "C" { if (values_type[i] == fss_embedded_list_read_parameter_depth || values_type[i] == fss_embedded_list_read_parameter_at) { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[values_order[i]])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[values_order[i]], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[values_order[i]], range, &number); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_depth, arguments.argv[values_order[i]]); @@ -279,7 +279,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_embedded_list_read_parameter_select].values.array[data->parameters[fss_embedded_list_read_parameter_select].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_select, arguments.argv[index]); @@ -299,7 +299,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_embedded_list_read_parameter_line].values.array[data->parameters[fss_embedded_list_read_parameter_line].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_line, arguments.argv[index]); diff --git a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c index f9809a3..62ff1ee 100644 --- a/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c +++ b/level_3/fss_embedded_list_write/c/private-fss_embedded_list_write.c @@ -371,7 +371,7 @@ extern "C" { range.start = 1; } - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore, arguments.argv[index]); @@ -390,7 +390,7 @@ extern "C" { range.start = 1; } - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore, arguments.argv[index]); diff --git a/level_3/fss_extended_list_read/c/fss_extended_list_read.c b/level_3/fss_extended_list_read/c/fss_extended_list_read.c index 82cdbee..22c616a 100644 --- a/level_3/fss_extended_list_read/c/fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/fss_extended_list_read.c @@ -388,7 +388,7 @@ extern "C" { range.start++; } - status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_delimit, arguments.argv[location]); diff --git a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c index 30f8971..fde8513 100644 --- a/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c +++ b/level_3/fss_extended_list_read/c/private-fss_extended_list_read.c @@ -46,7 +46,7 @@ extern "C" { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[position_depth])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], range, &depths->array[i].depth); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_depth, arguments.argv[position_depth]); @@ -69,7 +69,7 @@ extern "C" { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[depths->array[i].index_at])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], range, &depths->array[i].value_at); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_at, arguments.argv[depths->array[i].index_at]); @@ -231,7 +231,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_extended_list_read_parameter_select].values.array[data->parameters[fss_extended_list_read_parameter_select].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_select, arguments.argv[index]); @@ -250,7 +250,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_extended_list_read_parameter_line].values.array[data->parameters[fss_extended_list_read_parameter_line].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_line, arguments.argv[index]); diff --git a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c index 8d3ca8c..587b61e 100644 --- a/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c +++ b/level_3/fss_extended_list_write/c/private-fss_extended_list_write.c @@ -371,7 +371,7 @@ extern "C" { range.start = 1; } - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore, arguments.argv[index]); @@ -390,7 +390,7 @@ extern "C" { range.start = 1; } - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore, arguments.argv[index]); diff --git a/level_3/fss_extended_read/c/fss_extended_read.c b/level_3/fss_extended_read/c/fss_extended_read.c index 9e270b7..1090cdd 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -388,7 +388,7 @@ extern "C" { range.start++; } - status = fl_conversion_string_to_number_unsigned(arguments.argv[location], &data->delimit_depth, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[location], range, &data->delimit_depth); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_delimit, arguments.argv[location]); diff --git a/level_3/fss_extended_read/c/private-fss_extended_read.c b/level_3/fss_extended_read/c/private-fss_extended_read.c index 36f7db4..bad7a57 100644 --- a/level_3/fss_extended_read/c/private-fss_extended_read.c +++ b/level_3/fss_extended_read/c/private-fss_extended_read.c @@ -73,7 +73,7 @@ extern "C" { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[position_depth])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], range, &depths->array[i].depth); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_depth, arguments.argv[position_depth]); @@ -96,7 +96,7 @@ extern "C" { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[depths->array[i].index_at])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], range, &depths->array[i].value_at); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data.error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_at, arguments.argv[depths->array[i].index_at]); @@ -248,7 +248,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_extended_read_parameter_select].values.array[data->parameters[fss_extended_read_parameter_select].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &select); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_select, arguments.argv[index]); @@ -262,7 +262,7 @@ extern "C" { const f_array_length_t index = data->parameters[fss_extended_read_parameter_line].values.array[data->parameters[fss_extended_read_parameter_line].values.used - 1]; const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index])); - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &line); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_line, arguments.argv[index]); diff --git a/level_3/fss_status_code/c/private-fss_status_code.c b/level_3/fss_status_code/c/private-fss_status_code.c index 81feda2..40fa405 100644 --- a/level_3/fss_status_code/c/private-fss_status_code.c +++ b/level_3/fss_status_code/c/private-fss_status_code.c @@ -50,7 +50,7 @@ extern "C" { f_number_unsigned_t number = 0; - status = fl_conversion_string_to_number_unsigned(value, &number, range); + status = fl_conversion_string_to_number_unsigned(value, range, &number); if (status == F_none) { fl_color_print(data.output.stream, data.context.set.error, "invalid name%c", f_string_eol_s[0]); @@ -131,7 +131,7 @@ extern "C" { f_status_t fss_status_code_convert_number(const fss_status_code_data_t data, const f_string_t value, f_number_unsigned_t *number) { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(value)); - f_status_t status = fl_conversion_string_to_number_unsigned(value, number, range); + f_status_t status = fl_conversion_string_to_number_unsigned(value, range, number); if (*number > F_status_size_max_with_signal) { fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol_s[0]); diff --git a/level_3/iki_read/c/iki_read.c b/level_3/iki_read/c/iki_read.c index 573cca1..52c8347 100644 --- a/level_3/iki_read/c/iki_read.c +++ b/level_3/iki_read/c/iki_read.c @@ -194,7 +194,7 @@ extern "C" { f_number_unsigned_t number = 0; - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, iki_read_long_at, arguments.argv[index]); @@ -234,7 +234,7 @@ extern "C" { f_number_unsigned_t number = 0; - status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range); + status = fl_conversion_string_to_number_unsigned(arguments.argv[index], range, &number); if (F_status_is_error(status)) { fll_error_parameter_integer_print(data->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, iki_read_long_line, arguments.argv[index]); diff --git a/level_3/status_code/c/private-status_code.c b/level_3/status_code/c/private-status_code.c index 1cff4c8..e8b18e0 100644 --- a/level_3/status_code/c/private-status_code.c +++ b/level_3/status_code/c/private-status_code.c @@ -52,7 +52,7 @@ extern "C" { f_number_unsigned_t number = 0; - status = fl_conversion_string_to_number_unsigned(value, &number, range); + status = fl_conversion_string_to_number_unsigned(value, range, &number); if (status == F_none) { fl_color_print(data.output.stream, data.context.set.error, "invalid name%c", f_string_eol_s[0]); @@ -129,7 +129,7 @@ extern "C" { f_status_t status_code_convert_number(const status_code_data_t data, const f_string_t value, f_number_unsigned_t *number) { const f_string_range_t range = f_macro_string_range_t_initialize(strlen(value)); - f_status_t status = fl_conversion_string_to_number_unsigned(value, number, range); + f_status_t status = fl_conversion_string_to_number_unsigned(value, range, number); if (*number > F_status_size_max_with_signal) { fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol_s[0]); -- 1.8.3.1