From: Kevin Day Date: Sat, 25 Jun 2022 05:00:37 +0000 (-0500) Subject: Update: Use "decimal" instead of "digit". X-Git-Tag: 0.5.10~18 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=1953251538f1f74d861cb610491d0948de1d2ab5;p=fll Update: Use "decimal" instead of "digit". The unit tests are failing because the function no longer exists. The use if "digit" is probably the result of an over zealous refactor. Rename the affected functions back to "decimal". --- diff --git a/level_0/f_conversion/c/conversion.c b/level_0/f_conversion/c/conversion.c index 9de40ad..562be90 100644 --- a/level_0/f_conversion/c/conversion.c +++ b/level_0/f_conversion/c/conversion.c @@ -16,8 +16,8 @@ extern "C" { } #endif // _di_f_conversion_character_is_binary_ -#ifndef _di_f_conversion_character_is_digit_ - f_status_t f_conversion_character_is_digit(const f_char_t character) { +#ifndef _di_f_conversion_character_is_decimal_ + f_status_t f_conversion_character_is_decimal(const f_char_t character) { if (character > 0x2f && character < 0x3a) { return F_true; @@ -25,7 +25,7 @@ extern "C" { return F_false; } -#endif // _di_f_conversion_character_is_digit_ +#endif // _di_f_conversion_character_is_decimal_ #ifndef _di_f_conversion_character_is_duodecimal_ f_status_t f_conversion_character_is_duodecimal(const f_char_t character) { diff --git a/level_0/f_conversion/c/conversion.h b/level_0/f_conversion/c/conversion.h index 813610c..2111006 100644 --- a/level_0/f_conversion/c/conversion.h +++ b/level_0/f_conversion/c/conversion.h @@ -61,9 +61,9 @@ extern "C" { * F_true if character is a decimal. * F_false if character is not a decimal. */ -#ifndef _di_f_conversion_character_is_digit_ - extern f_status_t f_conversion_character_is_digit(const f_char_t character); -#endif // _di_f_conversion_character_is_digit_ +#ifndef _di_f_conversion_character_is_decimal_ + extern f_status_t f_conversion_character_is_decimal(const f_char_t character); +#endif // _di_f_conversion_character_is_decimal_ /** * Identify whether or not the given 1-byte character represents a duodecimal digit. diff --git a/level_1/fl_conversion/c/private-conversion.c b/level_1/fl_conversion/c/private-conversion.c index fc01555..7fa6642 100644 --- a/level_1/fl_conversion/c/private-conversion.c +++ b/level_1/fl_conversion/c/private-conversion.c @@ -433,7 +433,7 @@ extern "C" { } } - if (f_conversion_character_is_digit(string[i]) == F_true) { + if (f_conversion_character_is_decimal(string[i]) == F_true) { mode = 10; break; @@ -577,7 +577,7 @@ extern "C" { sign_found = -1; } - if (f_conversion_character_is_digit(string[i]) == F_true) { + if (f_conversion_character_is_decimal(string[i]) == F_true) { mode = 10; break; diff --git a/level_2/fll_fss_status_string/c/fss_status_string.c b/level_2/fll_fss_status_string/c/fss_status_string.c index f603f3a..8db8904 100644 --- a/level_2/fll_fss_status_string/c/fss_status_string.c +++ b/level_2/fll_fss_status_string/c/fss_status_string.c @@ -44,7 +44,7 @@ extern "C" { } // Numbers are not valid status code strings. - status = f_conversion_character_is_digit(name.string[0]); + status = f_conversion_character_is_decimal(name.string[0]); if (status == F_true) { return F_status_set_error(F_data); diff --git a/level_2/fll_fss_status_string/c/fss_status_string.h b/level_2/fll_fss_status_string/c/fss_status_string.h index bfa5809..d117d99 100644 --- a/level_2/fll_fss_status_string/c/fss_status_string.h +++ b/level_2/fll_fss_status_string/c/fss_status_string.h @@ -107,7 +107,7 @@ extern "C" { * F_data (with error bit) if not found. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_conversion_character_is_digit(). + * Errors (with error bit) from: f_conversion_character_is_decimal(). */ #ifndef _di_fll_fss_status_string_from_ extern f_status_t fll_fss_status_string_from(const f_string_static_t name, f_status_t * const code); diff --git a/level_2/fll_status_string/c/status_string.c b/level_2/fll_status_string/c/status_string.c index 5f2cdf5..8b7a1bc 100644 --- a/level_2/fll_status_string/c/status_string.c +++ b/level_2/fll_status_string/c/status_string.c @@ -17,7 +17,7 @@ extern "C" { } // Numbers are not valid status code strings. - if ((status = f_conversion_character_is_digit(name.string[0])) == F_true) { + if ((status = f_conversion_character_is_decimal(name.string[0])) == F_true) { return F_status_set_error(F_data); } diff --git a/level_2/fll_status_string/c/status_string.h b/level_2/fll_status_string/c/status_string.h index 86480e0..af96ed2 100644 --- a/level_2/fll_status_string/c/status_string.h +++ b/level_2/fll_status_string/c/status_string.h @@ -45,7 +45,7 @@ extern "C" { * F_data (with error bit) if not found. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_conversion_character_is_digit(). + * Errors (with error bit) from: f_conversion_character_is_decimal(). */ #ifndef _di_fll_status_string_from_ extern f_status_t fll_status_string_from(const f_string_static_t name, f_status_t * const code);