From 807ad4f028a1a83182a0bbf9ba071e0bfe5c056c Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 28 Apr 2020 22:22:54 -0500 Subject: [PATCH] Refactor: fll_program_process_parameters to fll_program_parameter_process Pave the way for additional fll_program_parameter_* functions. --- level_2/fll_program/c/program.c | 6 +++--- level_2/fll_program/c/program.h | 6 +++--- level_3/byte_dump/c/byte_dump.c | 2 +- level_3/firewall/c/firewall.c | 2 +- level_3/fss_basic_list_read/c/fss_basic_list_read.c | 2 +- level_3/fss_basic_list_write/c/fss_basic_list_write.c | 2 +- level_3/fss_basic_read/c/fss_basic_read.c | 2 +- level_3/fss_basic_write/c/fss_basic_write.c | 2 +- level_3/fss_extended_list_read/c/fss_extended_list_read.c | 2 +- level_3/fss_extended_read/c/fss_extended_read.c | 2 +- level_3/fss_extended_write/c/fss_extended_write.c | 2 +- level_3/fss_status_code/c/fss_status_code.c | 2 +- level_3/init/c/init.c | 2 +- level_3/status_code/c/status_code.c | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/level_2/fll_program/c/program.c b/level_2/fll_program/c/program.c index d65ece3..3472228 100644 --- a/level_2/fll_program/c/program.c +++ b/level_2/fll_program/c/program.c @@ -89,8 +89,8 @@ extern "C" { } #endif // _di_fll_program_print_version_ -#ifndef _di_fll_program_process_parameters_ - f_return_status fll_program_process_parameters(const f_console_arguments arguments, f_console_parameters parameters, const f_console_parameter_ids choices, f_string_lengths *remaining, fl_color_context *context) { +#ifndef _di_fll_program_parameter_process_ + f_return_status fll_program_parameter_process(const f_console_arguments arguments, f_console_parameters parameters, const f_console_parameter_ids choices, f_string_lengths *remaining, fl_color_context *context) { f_status status = f_none; status = f_console_parameter_process(arguments, parameters, remaining); @@ -148,7 +148,7 @@ extern "C" { return status; } -#endif // _di_fll_program_process_parameters_ +#endif // _di_fll_program_parameter_process_ #ifdef __cplusplus } // extern "C" diff --git a/level_2/fll_program/c/program.h b/level_2/fll_program/c/program.h index e445d43..7d8b436 100644 --- a/level_2/fll_program/c/program.h +++ b/level_2/fll_program/c/program.h @@ -154,9 +154,9 @@ extern "C" { * f_invalid_parameter (with error bit) if a parameter is invalid. * f_error_reallocation (with error bit) on memory reallocation error. */ -#ifndef _di_fll_program_process_parameters_ - extern f_return_status fll_program_process_parameters(const f_console_arguments arguments, f_console_parameters parameters, const f_console_parameter_ids choices, f_string_lengths *remaining, fl_color_context *context); -#endif // _di_fll_program_process_parameters_ +#ifndef _di_fll_program_parameter_process_ + extern f_return_status fll_program_parameter_process(const f_console_arguments arguments, f_console_parameters parameters, const f_console_parameter_ids choices, f_string_lengths *remaining, fl_color_context *context); +#endif // _di_fll_program_parameter_process_ #ifdef __cplusplus } // extern "C" diff --git a/level_3/byte_dump/c/byte_dump.c b/level_3/byte_dump/c/byte_dump.c index 07af55c..952780a 100644 --- a/level_3/byte_dump/c/byte_dump.c +++ b/level_3/byte_dump/c/byte_dump.c @@ -82,7 +82,7 @@ extern "C" { choices.id = ids; choices.used = 3; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); if (f_status_is_error(status)) { byte_dump_delete_data(data); diff --git a/level_3/firewall/c/firewall.c b/level_3/firewall/c/firewall.c index d426b17..552ba4f 100644 --- a/level_3/firewall/c/firewall.c +++ b/level_3/firewall/c/firewall.c @@ -63,7 +63,7 @@ extern "C" { f_console_parameter_id ids[3] = { firewall_parameter_no_color, firewall_parameter_light, firewall_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); } if (f_status_is_error(status)) { 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 5fdc89d..cf0e6d6 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 @@ -130,7 +130,7 @@ extern "C" { f_console_parameter_id ids[3] = { fss_basic_list_read_parameter_no_color, fss_basic_list_read_parameter_light, fss_basic_list_read_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); if (f_status_is_error(status)) { fss_basic_list_read_delete_data(data); diff --git a/level_3/fss_basic_list_write/c/fss_basic_list_write.c b/level_3/fss_basic_list_write/c/fss_basic_list_write.c index fcb3f21..c81311c 100644 --- a/level_3/fss_basic_list_write/c/fss_basic_list_write.c +++ b/level_3/fss_basic_list_write/c/fss_basic_list_write.c @@ -35,7 +35,7 @@ extern "C" { f_console_parameter_id ids[3] = { fss_basic_list_write_parameter_no_color, fss_basic_list_write_parameter_light, fss_basic_list_write_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); } if (f_status_is_error(status)) { 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 4863db5..cce0c52 100644 --- a/level_3/fss_basic_read/c/fss_basic_read.c +++ b/level_3/fss_basic_read/c/fss_basic_read.c @@ -130,7 +130,7 @@ extern "C" { f_console_parameter_id ids[3] = { fss_basic_read_parameter_no_color, fss_basic_read_parameter_light, fss_basic_read_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); if (f_status_is_error(status)) { fss_basic_read_delete_data(data); diff --git a/level_3/fss_basic_write/c/fss_basic_write.c b/level_3/fss_basic_write/c/fss_basic_write.c index 1266f28..743bbfa 100644 --- a/level_3/fss_basic_write/c/fss_basic_write.c +++ b/level_3/fss_basic_write/c/fss_basic_write.c @@ -35,7 +35,7 @@ extern "C" { f_console_parameter_id ids[3] = { fss_basic_write_parameter_no_color, fss_basic_write_parameter_light, fss_basic_write_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); } if (f_status_is_error(status)) { 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 5eea8d6..a49d317 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 @@ -130,7 +130,7 @@ extern "C" { f_console_parameter_id ids[3] = { fss_extended_list_read_parameter_no_color, fss_extended_list_read_parameter_light, fss_extended_list_read_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); if (f_status_is_error(status)) { fss_extended_list_read_delete_data(data); 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 d12c398..1e9785c 100644 --- a/level_3/fss_extended_read/c/fss_extended_read.c +++ b/level_3/fss_extended_read/c/fss_extended_read.c @@ -130,7 +130,7 @@ extern "C" { f_console_parameter_id ids[3] = { fss_extended_read_parameter_no_color, fss_extended_read_parameter_light, fss_extended_read_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); if (f_status_is_error(status)) { fss_extended_read_delete_data(data); diff --git a/level_3/fss_extended_write/c/fss_extended_write.c b/level_3/fss_extended_write/c/fss_extended_write.c index 7456261..812d41a 100644 --- a/level_3/fss_extended_write/c/fss_extended_write.c +++ b/level_3/fss_extended_write/c/fss_extended_write.c @@ -36,7 +36,7 @@ extern "C" { f_console_parameter_id ids[3] = { fss_extended_write_parameter_no_color, fss_extended_write_parameter_light, fss_extended_write_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); } if (f_status_is_error(status)) { diff --git a/level_3/fss_status_code/c/fss_status_code.c b/level_3/fss_status_code/c/fss_status_code.c index 93c6a68..e1373ba 100644 --- a/level_3/fss_status_code/c/fss_status_code.c +++ b/level_3/fss_status_code/c/fss_status_code.c @@ -37,7 +37,7 @@ extern "C" { f_console_parameter_id ids[3] = { fss_status_code_parameter_no_color, fss_status_code_parameter_light, fss_status_code_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); } if (f_status_is_error(status)) { diff --git a/level_3/init/c/init.c b/level_3/init/c/init.c index e1f80cf..04d87c1 100644 --- a/level_3/init/c/init.c +++ b/level_3/init/c/init.c @@ -57,7 +57,7 @@ extern "C" { f_console_parameter_id ids[3] = { init_parameter_no_color, init_parameter_light, init_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); } if (f_status_is_error(status)) { diff --git a/level_3/status_code/c/status_code.c b/level_3/status_code/c/status_code.c index 64008a2..99c60c5 100644 --- a/level_3/status_code/c/status_code.c +++ b/level_3/status_code/c/status_code.c @@ -37,7 +37,7 @@ extern "C" { f_console_parameter_id ids[3] = { status_code_parameter_no_color, status_code_parameter_light, status_code_parameter_dark }; f_console_parameter_ids choices = { ids, 3 }; - status = fll_program_process_parameters(arguments, parameters, choices, &data->remaining, &data->context); + status = fll_program_parameter_process(arguments, parameters, choices, &data->remaining, &data->context); } if (f_status_is_error(status)) { -- 1.8.3.1