From ef678ab49e3423bd11ec67f4a8cf8fa09c5fce35 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 8 May 2020 22:42:35 -0500 Subject: [PATCH] Revert: f_array_too_large already existed, its just called f_buffer_too_large --- level_0/f_status/c/status.h | 4 ---- level_1/fl_status/c/status.c | 6 ------ level_1/fl_status/c/status.h | 5 ----- level_2/fll_execute/c/execute.h | 16 ++++++++-------- level_2/fll_execute/c/private-execute.c | 4 ++-- level_2/fll_execute/c/private-execute.h | 4 ++-- level_2/fll_status/c/status.c | 7 ------- 7 files changed, 12 insertions(+), 34 deletions(-) diff --git a/level_0/f_status/c/status.h b/level_0/f_status/c/status.h index bca64ac..e3b57d4 100644 --- a/level_0/f_status/c/status.h +++ b/level_0/f_status/c/status.h @@ -328,10 +328,6 @@ extern "C" { f_access_denied_write, #endif // _di_f_status_access_denied_ - #ifndef _di_f_status_array_ - f_array_too_large, - #endif // _di_f_status_array_ - // Required. f_status_code_last }; // enum diff --git a/level_1/fl_status/c/status.c b/level_1/fl_status/c/status.c index a457912..5aef397 100644 --- a/level_1/fl_status/c/status.c +++ b/level_1/fl_status/c/status.c @@ -722,12 +722,6 @@ extern "C" { break; #endif // _di_fl_status_access_denied_ - #ifndef _di_fl_status_array_ - case f_array_too_large: - *string = fl_status_string_array_too_large; - break; - #endif // _di_fl_status_array_ - case f_status_code_last: *string = fl_status_string_status_code_last; break; diff --git a/level_1/fl_status/c/status.h b/level_1/fl_status/c/status.h index 232ffeb..a99fed8 100644 --- a/level_1/fl_status/c/status.h +++ b/level_1/fl_status/c/status.h @@ -717,11 +717,6 @@ extern "C" { #define fl_status_string_access_denied_super_length 21 #endif // _di_fl_status_access_denied_ - #ifndef _di_fl_status_array_ - #define fl_status_string_array_too_large "f_array_too_large" - #define fl_status_string_array_too_large_length 17 - #endif // _di_fl_status_array_ - #define fl_status_string_status_code_last "f_status_code_last" #define fl_status_string_status_code_last_length 17 #endif // _di_fl_status_string_ diff --git a/level_2/fll_execute/c/execute.h b/level_2/fll_execute/c/execute.h index cc8dcde..67bf232 100644 --- a/level_2/fll_execute/c/execute.h +++ b/level_2/fll_execute/c/execute.h @@ -50,7 +50,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. */ #ifndef _di_fll_execute_arguments_add_ extern f_return_status fll_execute_arguments_add(const f_string source, const f_string_length length, f_string_dynamics *arguments); @@ -88,7 +88,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. */ #ifndef _di_fll_execute_arguments_add_parameter_ extern f_return_status fll_execute_arguments_add_parameter(const f_string prefix, const f_string_length prefix_length, const f_string name, const f_string_length name_length, const f_string value, const f_string_length value_length, f_string_dynamics *arguments); @@ -129,7 +129,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. */ #ifndef _di_fll_execute_arguments_add_parameter_set_ extern f_return_status fll_execute_arguments_add_parameter_set(const f_string prefix[], const f_string_length prefix_length[], const f_string name[], const f_string_length name_length[], const f_string value[], const f_string_length value_length[], const f_array_length size, f_string_dynamics *arguments); @@ -156,7 +156,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. */ #ifndef _di_fll_execute_arguments_add_set_ extern f_return_status fll_execute_arguments_add_set(const f_string source[], const f_string_length length[], const f_array_length size, f_string_dynamics *arguments); @@ -179,7 +179,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. */ #ifndef _di_fll_execute_arguments_dynamic_add_ extern f_return_status fll_execute_arguments_dynamic_add(const f_string_dynamic source, f_string_dynamics *arguments); @@ -212,7 +212,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. */ #ifndef _di_fll_execute_arguments_dynamic_add_parameter_ extern f_return_status fll_execute_arguments_dynamic_add_parameter(const f_string_dynamic prefix, const f_string_dynamic name, const f_string_dynamic value, f_string_dynamics *arguments); @@ -247,7 +247,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. */ #ifndef _di_fll_execute_arguments_dynamic_add_parameter_set_ extern f_return_status fll_execute_arguments_dynamic_add_parameter_set(const f_string_dynamic prefix[], const f_string_dynamic name[], const f_string_dynamic value[], const f_array_length size, f_string_dynamics *arguments); @@ -272,7 +272,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. */ #ifndef _di_fll_execute_arguments_dynamic_add_set_ extern f_return_status fll_execute_arguments_dynamic_add_set(const f_string_dynamic source[], const f_array_length size, f_string_dynamics *arguments); diff --git a/level_2/fll_execute/c/private-execute.c b/level_2/fll_execute/c/private-execute.c index e1314ca..6f87b7f 100644 --- a/level_2/fll_execute/c/private-execute.c +++ b/level_2/fll_execute/c/private-execute.c @@ -11,7 +11,7 @@ extern "C" { if (arguments->used >= arguments->size) { if (arguments->size + f_memory_default_allocation_step > f_array_length_size) { - if (arguments->size + 1 > f_array_length_size) return f_array_too_large; + if (arguments->size + 1 > f_array_length_size) return f_buffer_too_large; f_macro_string_dynamics_resize(status, (*arguments), arguments->size + 1); } else { @@ -50,7 +50,7 @@ extern "C" { if (arguments->used + 1 >= arguments->size) { if (arguments->size + f_memory_default_allocation_step > f_array_length_size) { - if (arguments->size + 2 > f_array_length_size) return f_array_too_large; + if (arguments->size + 2 > f_array_length_size) return f_buffer_too_large; f_macro_string_dynamics_resize(status, (*arguments), arguments->size + 2); } else { diff --git a/level_2/fll_execute/c/private-execute.h b/level_2/fll_execute/c/private-execute.h index 0c0af7b..1d959a3 100644 --- a/level_2/fll_execute/c/private-execute.h +++ b/level_2/fll_execute/c/private-execute.h @@ -49,7 +49,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. * * @see fll_execute_arguments_add() * @see fll_execute_arguments_add_set() @@ -86,7 +86,7 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_allocation (with error bit) on allocation error. * f_error_reallocation (with error bit) on reallocation error. - * f_array_too_large (with error bit) if arguments array is too larger for further allocation. + * f_buffer_too_large (with error bit) if arguments array is too larger for further allocation. * * @see fll_execute_arguments_add_parameter() * @see fll_execute_arguments_add_parameter_set() diff --git a/level_2/fll_status/c/status.c b/level_2/fll_status/c/status.c index c18c28e..2a7b8e9 100644 --- a/level_2/fll_status/c/status.c +++ b/level_2/fll_status/c/status.c @@ -1166,13 +1166,6 @@ extern "C" { } #endif // _di_fll_status_access_denied_ - #ifndef _di_fll_status_array_ - if (fl_string_compare(string, fl_status_string_array_too_large, length, fl_status_string_array_too_large_length) == f_equal_to) { - *code = f_array_too_large; - return f_none; - } - #endif // _di_fll_status_array_ - if (fl_string_compare(string, fl_status_string_status_code_last, length, fl_status_string_status_code_last_length) == f_equal_to) { *code = f_status_code_last; return f_none; -- 1.8.3.1