From: Kevin Day Date: Fri, 18 Aug 2023 00:27:50 +0000 (-0500) Subject: Update: Switch F_none to F_okay to be consistent with recent FLL status code changes. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=fbb6fbcd894fd45c48a42b905c61443e756906e0;p=kevux-tools Update: Switch F_none to F_okay to be consistent with recent FLL status code changes. --- diff --git a/sources/c/remove/main/common.c b/sources/c/remove/main/common.c index dca8aec..f6f9cd1 100644 --- a/sources/c/remove/main/common.c +++ b/sources/c/remove/main/common.c @@ -20,7 +20,7 @@ extern "C" { dates->used = length; } - return F_none; + return F_okay; } #endif // _di_kt_remove_dates_resize_ @@ -40,7 +40,7 @@ extern "C" { modes->used = length; } - return F_none; + return F_okay; } #endif // _di_kt_remove_modes_resize_ diff --git a/sources/c/remove/main/common.h b/sources/c/remove/main/common.h index 252367f..d92ffbc 100644 --- a/sources/c/remove/main/common.h +++ b/sources/c/remove/main/common.h @@ -25,7 +25,7 @@ extern "C" { * The Date Comparison array to resize. * * @return - * F_none on success. + * F_okay on success. * * F_array_too_large (with error bit) if the combined array is too large. * F_parameter (with error bit) if a parameter is invalid. @@ -45,7 +45,7 @@ extern "C" { * The Date Comparison array to resize. * * @return - * F_none on success. + * F_okay on success. * * F_array_too_large (with error bit) if the combined array is too large. * F_parameter (with error bit) if a parameter is invalid. @@ -71,7 +71,7 @@ extern "C" { * The setting.flag has kt_remove_flag_option_used_e forcibly cleared on the start of this function. * * This alters setting.status: - * F_none on success. + * F_okay on success. * F_data_not on success but nothing was provided to operate with. * * F_parameter (with error bit) on parameter error. diff --git a/sources/c/remove/main/common/type.c b/sources/c/remove/main/common/type.c index 51ec0eb..cf1285c 100644 --- a/sources/c/remove/main/common/type.c +++ b/sources/c/remove/main/common/type.c @@ -32,7 +32,7 @@ extern "C" { f_directory_recurse_do_delete(&setting->recurse); - return F_none; + return F_okay; } #endif // _di_kt_remove_setting_delete_ diff --git a/sources/c/remove/main/common/type.h b/sources/c/remove/main/common/type.h index 25f17d9..3e2f841 100644 --- a/sources/c/remove/main/common/type.h +++ b/sources/c/remove/main/common/type.h @@ -154,7 +154,7 @@ extern "C" { * * process_help: Process help (generally printing help). * process_normal: Process normally (data from parameters and files). - * process_operate_file: Process an individual file, returning F_done to designate handled, and F_none for letting parent continue handling. + * process_operate_file: Process an individual file, returning F_done to designate handled, and F_okay for letting parent continue handling. */ #ifndef _di_kt_remove_setting_t_ typedef struct { @@ -186,8 +186,8 @@ extern "C" { #define kt_remove_setting_t_initialize \ { \ kt_remove_main_flag_none_e, \ - F_none, \ - macro_f_state_t_initialize_1(kt_remove_allocation_large_d, kt_remove_allocation_small_d, F_none, 0, 0, &fll_program_standard_signal_handle, 0, 0, 0, 0), \ + F_okay, \ + macro_f_state_t_initialize_1(kt_remove_allocation_large_d, kt_remove_allocation_small_d, F_okay, 0, 0, &fll_program_standard_signal_handle, 0, 0, 0, 0), \ f_string_dynamic_t_initialize, \ f_string_dynamics_t_initialize, \ kt_remove_dates_t_initialize, \ @@ -245,7 +245,7 @@ extern "C" { * This does not alter setting.state.status. * * @return - * F_none on success. + * F_okay on success. * * F_parameter (with error bit) if a parameter is invalid. */ diff --git a/sources/c/remove/main/convert.c b/sources/c/remove/main/convert.c index ecaca9b..1f73d7b 100644 --- a/sources/c/remove/main/convert.c +++ b/sources/c/remove/main/convert.c @@ -185,7 +185,7 @@ extern "C" { } } // for - main->setting.state.status = F_none; + main->setting.state.status = F_okay; } // If the first and possibly the second digit matches. @@ -366,7 +366,7 @@ extern "C" { } // for } - main->setting.state.status = matches ? F_none : F_status_set_error(F_known_not); + main->setting.state.status = matches ? F_okay : F_status_set_error(F_known_not); } #endif // _di_kt_remove_convert_date_ @@ -419,7 +419,7 @@ extern "C" { if (F_status_is_error(main->setting.state.status)) return; } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; return; } @@ -444,7 +444,7 @@ extern "C" { date->stop_second = date->start_second; } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; } #endif // _di_kt_remove_convert_date_relative_ @@ -475,7 +475,7 @@ extern "C" { return 0; } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; return (uint32_t) gid; } @@ -489,7 +489,7 @@ extern "C" { return 0; } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; return (uint32_t) number; } @@ -522,7 +522,7 @@ extern "C" { return 0; } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; return (uint32_t) uid; } @@ -536,7 +536,7 @@ extern "C" { return 0; } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; return (uint32_t) number; } @@ -568,7 +568,7 @@ extern "C" { return 0; } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; return mode; } @@ -616,7 +616,7 @@ extern "C" { } } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; } #endif // _di_kt_remove_convert_timezone_ diff --git a/sources/c/remove/main/convert.h b/sources/c/remove/main/convert.h index d76d8fd..d3aef9c 100644 --- a/sources/c/remove/main/convert.h +++ b/sources/c/remove/main/convert.h @@ -33,7 +33,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * F_data_not on success, but buffer is empty and there is no data to process. * * F_buffer (with error bit) if the buffer is invalid. @@ -82,7 +82,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * F_data_not on success, but buffer is empty or there is no data to process. * * F_buffer (with error bit) if the buffer is invalid. @@ -111,7 +111,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * * F_number_too_large (with error bit) if the given ID is too large. * @@ -136,7 +136,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * * F_number_too_large (with error bit) if the given ID is too large. * @@ -161,7 +161,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * * Errors (with error bit) from: f_file_mode_from_string(). * Errors (with error bit) from: f_file_mode_to_mode(). @@ -185,7 +185,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * * F_number_overflow (with error bit) if the date after applying the timezone is too large. * F_number_underflow (with error bit) if the date after applying the timezone is too small. diff --git a/sources/c/remove/main/operate.c b/sources/c/remove/main/operate.c index 74dc72c..7188d9d 100644 --- a/sources/c/remove/main/operate.c +++ b/sources/c/remove/main/operate.c @@ -31,7 +31,7 @@ extern "C" { } } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; } #endif // _di_kt_remove_operate_file_ @@ -365,19 +365,19 @@ extern "C" { // Trigger the callback to make any modifications before simulating or performing the removal. if (main->setting.process_operate_file) { - main->setting.state.status = F_none; + main->setting.state.status = F_okay; main->setting.process_operate_file((void *) main, path, statistics, &flag); if (F_status_is_error(main->setting.state.status)) return flag; if (main->setting.state.status == F_done) { - main->setting.state.status = F_none; + main->setting.state.status = F_okay; return flag; } } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; } if (main->setting.flag & kt_remove_main_flag_force_e) { @@ -411,7 +411,7 @@ extern "C" { kt_remove_print_simulate_operate_boolean(&main->program.output, kt_remove_remove_s, flag & kt_remove_flag_file_operate_remove_e); - main->setting.state.status = F_none; + main->setting.state.status = F_okay; return flag; } diff --git a/sources/c/remove/main/operate.h b/sources/c/remove/main/operate.h index 963b523..23084a6 100644 --- a/sources/c/remove/main/operate.h +++ b/sources/c/remove/main/operate.h @@ -19,7 +19,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * F_data_not on success but file is an empty string. * * Errors (with error bit) from: f_string_dynamic_append(). @@ -141,7 +141,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * F_data_not on success but file is an empty string. * * Errors (with error bit) from: f_file_link_read(). diff --git a/sources/c/remove/main/print/error.c b/sources/c/remove/main/print/error.c index ef8fbff..67d836e 100644 --- a/sources/c/remove/main/print/error.c +++ b/sources/c/remove/main/print/error.c @@ -12,7 +12,7 @@ extern "C" { fll_error_print(print, F_status_set_fine(((kt_remove_main_t *) print->custom)->setting.state.status), function, F_true); - return F_none; + return F_okay; } #endif // _di_kt_remove_print_error_ @@ -24,7 +24,7 @@ extern "C" { fll_error_file_print(print, F_status_set_fine(((kt_remove_main_t *) print->custom)->setting.state.status), function, F_true, name, operation, type); - return F_none; + return F_okay; } #endif // _di_kt_remove_print_error_file_ @@ -44,7 +44,7 @@ extern "C" { f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_kt_remove_print_error_parameter_missing_value_requires_amount_ @@ -56,7 +56,7 @@ extern "C" { fll_print_format("%[%QNo files have been specified to be removed.%]%r", print->to, print->set->error, print->prefix, print->set->error, f_string_eol_s); - return F_none; + return F_okay; } #endif // _di_kt_remove_print_error_parameter_no_files_ @@ -76,7 +76,7 @@ extern "C" { f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_kt_remove_print_error_recursion_max_ @@ -96,7 +96,7 @@ extern "C" { f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_kt_remove_print_error_parameter_unknown_value_ diff --git a/sources/c/remove/main/print/error.h b/sources/c/remove/main/print/error.h index cc7c1eb..0761588 100644 --- a/sources/c/remove/main/print/error.h +++ b/sources/c/remove/main/print/error.h @@ -25,7 +25,7 @@ extern "C" { * This does not alter print.custom.setting.state.status. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -54,7 +54,7 @@ extern "C" { * A valid file type code from the fll_error_file_type enum. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -91,7 +91,7 @@ extern "C" { * The number representing the amount of missing parameters. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -122,7 +122,7 @@ extern "C" { * This does not alter print.custom.setting.state.status. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -153,7 +153,7 @@ extern "C" { * The path in which the recursion max is reached. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -190,7 +190,7 @@ extern "C" { * The unknown value. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. diff --git a/sources/c/remove/main/print/message.c b/sources/c/remove/main/print/message.c index 3161cdd..3534120 100644 --- a/sources/c/remove/main/print/message.c +++ b/sources/c/remove/main/print/message.c @@ -169,7 +169,7 @@ extern "C" { f_file_stream_flush(print->to); f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_kt_remove_print_message_help_ diff --git a/sources/c/remove/main/print/message.h b/sources/c/remove/main/print/message.h index e4bc8ea..33da9b2 100644 --- a/sources/c/remove/main/print/message.h +++ b/sources/c/remove/main/print/message.h @@ -29,7 +29,7 @@ extern "C" { * The color context settings. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. diff --git a/sources/c/remove/main/print/simulate.c b/sources/c/remove/main/print/simulate.c index fb700c8..f275509 100644 --- a/sources/c/remove/main/print/simulate.c +++ b/sources/c/remove/main/print/simulate.c @@ -227,7 +227,7 @@ extern "C" { }; uint8_t p = 0; - f_status_t result = F_none; + f_status_t result = F_okay; f_string_static_t name_type = f_string_empty_s; f_number_unsigned_t match_year = 0; f_number_unsigned_t match_second = 0; @@ -249,7 +249,7 @@ extern "C" { start_second = dates[p]->array[i].start_second % kt_remove_time_seconds_in_year_d; name_type = f_string_empty_s; - result = F_none; + result = F_okay; if (dates[p]->array[i].type == kt_remove_flag_date_today_e || dates[p]->array[i].type == kt_remove_flag_date_tomorrow_e || dates[p]->array[i].type == kt_remove_flag_date_yesterday_e) { stop_year = dates[p]->array[i].stop_year + (dates[p]->array[i].stop_second / kt_remove_time_seconds_in_year_d); diff --git a/sources/c/remove/main/print/warning.c b/sources/c/remove/main/print/warning.c index 38cea8e..cb01137 100644 --- a/sources/c/remove/main/print/warning.c +++ b/sources/c/remove/main/print/warning.c @@ -21,7 +21,7 @@ extern "C" { f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_kt_remove_print_warning_file_reason_ diff --git a/sources/c/remove/main/print/warning.h b/sources/c/remove/main/print/warning.h index cbfa299..7317250 100644 --- a/sources/c/remove/main/print/warning.h +++ b/sources/c/remove/main/print/warning.h @@ -40,7 +40,7 @@ extern "C" { * The reason for the failure. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. */ #ifndef _di_kt_remove_print_warning_file_reason_ diff --git a/sources/c/remove/main/remove.c b/sources/c/remove/main/remove.c index 3d4f757..dd1adef 100644 --- a/sources/c/remove/main/remove.c +++ b/sources/c/remove/main/remove.c @@ -21,7 +21,7 @@ extern "C" { fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; if (main->setting.flag & (kt_remove_main_flag_help_e | kt_remove_main_flag_version_e | kt_remove_main_flag_copyright_e)) { if (main->setting.flag & kt_remove_main_flag_help_e) { @@ -100,7 +100,7 @@ extern "C" { kt_remove_print_simulate_operate(&main->program.output); - main->setting.state.status = F_none; + main->setting.state.status = F_okay; for (f_number_unsigned_t i = 0; i < main->setting.files.used; ++i) { diff --git a/sources/c/remove/main/remove.h b/sources/c/remove/main/remove.h index 77091e5..c39668b 100644 --- a/sources/c/remove/main/remove.h +++ b/sources/c/remove/main/remove.h @@ -83,7 +83,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * F_true on success when performing verification and verify passed. * F_false on success when performing verification and verify failed. * @@ -106,7 +106,7 @@ extern "C" { * This does not alter main.setting.state.status. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. */ #ifndef _di_kt_remove_process_help_ @@ -122,7 +122,7 @@ extern "C" { * This must be of type kt_remove_main_t. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * * Errors with (error bit set) from: kt_remove_process_normal_operate() * @@ -139,7 +139,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. */ #ifndef _di_kt_remove_process_normal_operate_ extern void kt_remove_process_normal_operate(kt_remove_main_t * const main); diff --git a/sources/c/remove/main/signal.c b/sources/c/remove/main/signal.c index 3ebe03f..dc8aaa7 100644 --- a/sources/c/remove/main/signal.c +++ b/sources/c/remove/main/signal.c @@ -83,7 +83,7 @@ extern "C" { } failsafe = 0; - main->setting.status_thread = F_none; + main->setting.status_thread = F_okay; } while (!main->program.signal_received); diff --git a/sources/c/tacocat/main/common.c b/sources/c/tacocat/main/common.c index 9bed1c2..2425f8b 100644 --- a/sources/c/tacocat/main/common.c +++ b/sources/c/tacocat/main/common.c @@ -179,7 +179,7 @@ extern "C" { } if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = F_none; + main->setting.state.status = F_okay; } } #endif // _di_kt_tacocat_setting_load_ @@ -220,7 +220,7 @@ extern "C" { f_number_unsigned_t k = 0; f_number_unsigned_t index = 0; f_number_unsigned_t length = 0; - f_status_t failed = F_none; + f_status_t failed = F_okay; struct hostent host; f_network_family_ip_t family = f_network_family_ip_t_initialize; f_number_unsigned_t port = 0; @@ -259,9 +259,9 @@ extern "C" { total = main->program.parameters.array[parameters[i]].values.used / 2; - main->setting.state.status = f_uint16s_increase_by(total, &sets[i]->flags); + main->setting.state.status = f_memory_array_increase_by(total, sizeof(uint16_t), (void **) &sets[i]->flags.array, &sets[i]->flags.used, &sets[i]->flags.size); - macro_setting_load_handle_send_receive_error_continue_1(f_uint16s_increase_by); + macro_setting_load_handle_send_receive_error_continue_1(f_memory_array_increase_by); main->setting.state.status = f_string_dynamics_increase_by(total, &sets[i]->names); @@ -275,9 +275,9 @@ extern "C" { macro_setting_load_handle_send_receive_error_continue_1(f_fss_simple_packet_ranges_increase_by); - main->setting.state.status = f_files_increase_by(total, &sets[i]->files); + main->setting.state.status = f_memory_array_increase_by(total, sizeof(f_file_t), (void **) &sets[i]->files.array, &sets[i]->files.used, &sets[i]->files.size); - macro_setting_load_handle_send_receive_error_continue_1(f_files_increase_by); + macro_setting_load_handle_send_receive_error_continue_1(f_memory_array_increase_by); main->setting.state.status = f_sockets_increase_by(total, &sets[i]->sockets); @@ -295,7 +295,7 @@ extern "C" { // First parameter value represents the network address or the socket file path. index = main->program.parameters.array[parameters[i]].values.array[j]; - sets[i]->statuss.array[j] = F_none; + sets[i]->statuss.array[j] = F_okay; sets[i]->flags.array[j] = kt_tacocat_socket_flag_none_e; sets[i]->names.array[j].used = 0; sets[i]->buffers.array[j].used = 0; @@ -600,7 +600,7 @@ extern "C" { while (address->used && address->string[address->used] != f_string_ascii_colon_s.string[0]) --address->used; } - main->setting.state.status = F_none; + main->setting.state.status = F_okay; return; } @@ -620,7 +620,7 @@ extern "C" { address->string[i] = 0; address->used = i; - main->setting.state.status = F_none; + main->setting.state.status = F_okay; } else { main->setting.state.status = F_number_not; diff --git a/sources/c/tacocat/main/common.h b/sources/c/tacocat/main/common.h index 80fa7e1..ed1cbc0 100644 --- a/sources/c/tacocat/main/common.h +++ b/sources/c/tacocat/main/common.h @@ -29,7 +29,7 @@ extern "C" { * The main program and settings data. * * This alters setting.state.status: - * F_none on success. + * F_okay on success. * * F_parameter (with error bit) if a parameter is invalid. * @@ -68,13 +68,13 @@ extern "C" { * This must be of type kt_tacocat_main_t. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * * F_parameter (with error bit) if a parameter is invalid. * * Errors (with error bit) from: f_file_exists(). * Errors (with error bit) from: f_file_open(). - * Errors (with error bit) from: f_files_increase_by(). + * Errors (with error bit) from: f_memory_array_increase_by(). * Errors (with error bit) from: f_network_from_ip_name(). * Errors (with error bit) from: f_string_dynamic_append_nulless(). * Errors (with error bit) from: f_string_dynamic_increase_by(). @@ -84,7 +84,7 @@ extern "C" { * * @see f_file_exists() * @see f_file_open() - * @see f_files_increase_by() + * @see f_memory_array_increase_by() * @see f_network_from_ip_name() * @see f_string_dynamic_append_nulless() * @see f_string_dynamic_increase_by() @@ -107,7 +107,7 @@ extern "C" { * The main.setting.state.status can be set to either F_network_version_four or F_network_version_six when calling this function to bypass IP type detection. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * F_data_not on success but there is nothing in the address string (address.used is 0). * F_number_not on success but there is no port number. * diff --git a/sources/c/tacocat/main/common/print.c b/sources/c/tacocat/main/common/print.c index 1fbe012..bcf521d 100644 --- a/sources/c/tacocat/main/common/print.c +++ b/sources/c/tacocat/main/common/print.c @@ -8,8 +8,9 @@ extern "C" { const f_string_t kt_tacocat_f_a[] = { "f_console_parameter_process", "f_file_open", - "f_files_increase_by", - "f_fss_simple_packet_ranges_increase_by", + "f_fss_simple_packet_identify", + "f_fss_simple_packet_increase_by", + "f_memory_array_increase_by", "f_network_from_ip_name", "f_network_is_ip_address", "f_polls_increase_by", @@ -30,7 +31,6 @@ extern "C" { "f_string_dynamic_increase_by", "f_string_dynamics_increase_by", "f_thread_create", - "f_uint16s_increase_by", "fl_conversion_dynamic_to_unsigned_detect", "fll_program_parameter_process_context", "fll_program_parameter_process_verbosity", diff --git a/sources/c/tacocat/main/common/print.h b/sources/c/tacocat/main/common/print.h index 1ddc816..e5e92d4 100644 --- a/sources/c/tacocat/main/common/print.h +++ b/sources/c/tacocat/main/common/print.h @@ -41,8 +41,9 @@ extern "C" { enum { kt_tacocat_f_f_console_parameter_process_e, kt_tacocat_f_f_file_open_e, - kt_tacocat_f_f_files_increase_by_e, + kt_tacocat_f_f_fss_simple_packet_identify_e, kt_tacocat_f_f_fss_simple_packet_ranges_increase_by_e, + kt_tacocat_f_f_memory_array_increase_by_e, kt_tacocat_f_f_network_from_ip_name_e, kt_tacocat_f_f_network_is_ip_address_e, kt_tacocat_f_f_polls_increase_by_e, @@ -63,7 +64,6 @@ extern "C" { kt_tacocat_f_f_string_dynamic_increase_by_e, kt_tacocat_f_f_string_dynamics_increase_by_e, kt_tacocat_f_f_thread_create_e, - kt_tacocat_f_f_uint16s_increase_by_e, kt_tacocat_f_fl_conversion_dynamic_to_unsigned_detect_e, kt_tacocat_f_fll_program_parameter_process_context_e, kt_tacocat_f_fll_program_parameter_process_verbosity_e, diff --git a/sources/c/tacocat/main/common/type.c b/sources/c/tacocat/main/common/type.c index a020603..5334b06 100644 --- a/sources/c/tacocat/main/common/type.c +++ b/sources/c/tacocat/main/common/type.c @@ -38,8 +38,8 @@ extern "C" { f_socket_disconnect(&sets[i]->sockets.array[j], program.signal_received ? f_socket_close_fast_e : f_socket_close_read_write_e); } // for - f_uint16s_resize(0, &sets[i]->flags); - f_files_resize(0, &sets[i]->files); + f_memory_array_resize(0, sizeof(uint16_t), (void **) &sets[i]->flags.array, &sets[i]->flags.used, &sets[i]->flags.size); + f_memory_array_resize(0, sizeof(f_file_t), (void **) &sets[i]->files.array, &sets[i]->files.used, &sets[i]->files.size); f_polls_resize(0, &sets[i]->polls); f_sockets_resize(0, &sets[i]->sockets); f_statuss_resize(0, &sets[i]->statuss); @@ -52,7 +52,7 @@ extern "C" { f_string_dynamic_resize(0, &setting->buffer); - return F_none; + return F_okay; } #endif // _di_kt_tacocat_setting_delete_ @@ -61,7 +61,7 @@ extern "C" { if (!thread) return F_status_set_error(F_parameter); - return F_none; + return F_okay; } #endif // _di_kt_tacocat_thread_delete_ diff --git a/sources/c/tacocat/main/common/type.h b/sources/c/tacocat/main/common/type.h index 6f012d7..4b18912 100644 --- a/sources/c/tacocat/main/common/type.h +++ b/sources/c/tacocat/main/common/type.h @@ -114,10 +114,10 @@ extern "C" { { \ kt_tacocat_main_flag_none_e, \ kt_tacocat_interval_poll_d, \ - F_none, \ - F_none, \ - F_none, \ - macro_f_state_t_initialize_1(kt_tacocat_allocation_large_d, kt_tacocat_allocation_small_d, F_none, 0, 0, &fll_program_standard_signal_handle, 0, 0, 0, 0), \ + F_okay, \ + F_okay, \ + F_okay, \ + macro_f_state_t_initialize_1(kt_tacocat_allocation_large_d, kt_tacocat_allocation_small_d, F_okay, 0, 0, &fll_program_standard_signal_handle, 0, 0, 0, 0), \ macro_kt_tacocat_setting_t_initialize_1(kt_tacocat_block_size_receive_d), \ macro_kt_tacocat_setting_t_initialize_1(kt_tacocat_block_size_send_d), \ f_string_dynamic_t_initialize, \ @@ -204,7 +204,7 @@ extern "C" { * This does not alter setting.state.status. * * @return - * F_none on success. + * F_okay on success. * * F_parameter (with error bit) if a parameter is invalid. */ @@ -221,7 +221,7 @@ extern "C" { * The program main thread data. * * @return - * F_none on success. + * F_okay on success. * * F_parameter (with error bit) if a parameter is invalid. */ diff --git a/sources/c/tacocat/main/print/error.c b/sources/c/tacocat/main/print/error.c index 66b6f02..414f542 100644 --- a/sources/c/tacocat/main/print/error.c +++ b/sources/c/tacocat/main/print/error.c @@ -12,7 +12,7 @@ extern "C" { fll_error_print(print, F_status_set_fine(((kt_tacocat_main_t *) print->custom)->setting.state.status), function, F_true); - return F_none; + return F_okay; } #endif // _di_kt_tacocat_print_error_ @@ -24,7 +24,7 @@ extern "C" { fll_error_file_print(print, F_status_set_fine(((kt_tacocat_main_t *) print->custom)->setting.state.status), function, F_true, name, operation, type); - return F_none; + return F_okay; } #endif // _di_kt_tacocat_print_error_file_ @@ -46,7 +46,7 @@ extern "C" { fll_error_print(print, F_status_set_fine(status), function, F_true); - return F_none; + return F_okay; } #endif // _di_kt_tacocat_print_error_ @@ -70,7 +70,7 @@ extern "C" { f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_kt_tacocat_print_error_parameter_value_resolve_unknown_ @@ -98,7 +98,7 @@ extern "C" { f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_kt_tacocat_print_error_setting_socket_lengths_must_match_ @@ -118,7 +118,7 @@ extern "C" { f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_kt_tacocat_print_error_socket_protocol_unsupported_ diff --git a/sources/c/tacocat/main/print/error.h b/sources/c/tacocat/main/print/error.h index 840e457..3d883a6 100644 --- a/sources/c/tacocat/main/print/error.h +++ b/sources/c/tacocat/main/print/error.h @@ -25,7 +25,7 @@ extern "C" { * This does not alter print.custom.setting.state.status. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -54,7 +54,7 @@ extern "C" { * A valid file type code from the fll_error_file_type enum. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -83,7 +83,7 @@ extern "C" { * The status code representing the error. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -105,7 +105,7 @@ extern "C" { * The string representing the unknown value passed to the resolve parameter. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -129,7 +129,7 @@ extern "C" { * The socket set. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. @@ -153,7 +153,7 @@ extern "C" { * The protocol number representing the unsupported protocol * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. diff --git a/sources/c/tacocat/main/print/message.c b/sources/c/tacocat/main/print/message.c index d56bf3c..8a92e70 100644 --- a/sources/c/tacocat/main/print/message.c +++ b/sources/c/tacocat/main/print/message.c @@ -51,7 +51,7 @@ extern "C" { f_file_stream_flush(print->to); f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_kt_tacocat_print_message_help_ diff --git a/sources/c/tacocat/main/print/message.h b/sources/c/tacocat/main/print/message.h index d8e2ebf..2dd2f49 100644 --- a/sources/c/tacocat/main/print/message.h +++ b/sources/c/tacocat/main/print/message.h @@ -29,7 +29,7 @@ extern "C" { * The color context settings. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. diff --git a/sources/c/tacocat/main/print/warning.c b/sources/c/tacocat/main/print/warning.c index e8207e3..cdcf3cb 100644 --- a/sources/c/tacocat/main/print/warning.c +++ b/sources/c/tacocat/main/print/warning.c @@ -19,7 +19,7 @@ extern "C" { f_file_stream_unlock(print->to); - return F_none; + return F_okay; } #endif // _di_fake_build_print_warning_setting_boolean_may_only_be_ diff --git a/sources/c/tacocat/main/print/warning.h b/sources/c/tacocat/main/print/warning.h index b6d40f0..00d0b94 100644 --- a/sources/c/tacocat/main/print/warning.h +++ b/sources/c/tacocat/main/print/warning.h @@ -31,7 +31,7 @@ extern "C" { * The out of range port. * * @return - * F_none on success. + * F_okay on success. * F_output_not on success, but no printing is performed. * * F_output_not (with error bit) if setting is NULL. diff --git a/sources/c/tacocat/main/process.c b/sources/c/tacocat/main/process.c index 9b1c8c3..f513117 100644 --- a/sources/c/tacocat/main/process.c +++ b/sources/c/tacocat/main/process.c @@ -56,7 +56,7 @@ extern "C" { #endif // _di_thread_support_ if (F_status_is_error_not(main->setting.state.status)) { - main->setting.state.status = F_none; + main->setting.state.status = F_okay; } } #endif // _di_kt_tacocat_process_main_ @@ -66,7 +66,7 @@ extern "C" { if (!main || !set) return F_status_set_error(F_parameter); - f_status_t status = F_none; + f_status_t status = F_okay; for (f_number_unsigned_t i = 0; i < set->sockets.used; ++i) { @@ -81,7 +81,7 @@ extern "C" { } } // for - return F_none; + return F_okay; } #endif // _di_kt_tacocat_process_socket_set_disconnect_ @@ -91,7 +91,7 @@ extern "C" { if (!main || !status) return; if (F_status_is_error(*status)) return; - *status = F_none; + *status = F_okay; for (f_number_unsigned_t i = 0; i < set.statuss.used; ++i) { @@ -127,7 +127,7 @@ extern "C" { return *status; } - return F_none; + return F_okay; } #endif // _di_kt_tacocat_process_socket_set_error_has_ @@ -204,7 +204,7 @@ extern "C" { } // for if (F_status_is_error_not(main->setting.status_receive)) { - main->setting.status_receive = F_none; + main->setting.status_receive = F_okay; } } #endif // _di_kt_tacocat_process_socket_set_receive_ @@ -233,7 +233,7 @@ extern "C" { } // for if (F_status_is_error_not(main->setting.status_send)) { - main->setting.status_send = F_none; + main->setting.status_send = F_okay; } } #endif // _di_kt_tacocat_process_socket_set_send_ diff --git a/sources/c/tacocat/main/process.h b/sources/c/tacocat/main/process.h index 167533f..f668cc7 100644 --- a/sources/c/tacocat/main/process.h +++ b/sources/c/tacocat/main/process.h @@ -19,7 +19,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. */ #ifndef _di_kt_tacocat_process_main_ extern void kt_tacocat_process_main(kt_tacocat_main_t * const main); @@ -41,7 +41,7 @@ extern "C" { * The socket set to disconnect all sockets of. * * @return - * F_none on success. + * F_okay on success. * * F_parameter (with error bit) on invalid parameter. */ @@ -58,7 +58,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success and no error is found. + * F_okay on success and no error is found. * * An status with error bit set from any socket that has a status failure. * @@ -90,7 +90,7 @@ extern "C" { * The status to update with the status code from the given set. * * @return - * F_none on no error. + * F_okay on no error. * * F_interrupt (with error bit) if interrupt was received. * F_parameter (with error bit) if a parameter is invalid. @@ -106,7 +106,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. */ #ifndef _di_kt_tacocat_process_socket_set_receive_ extern void kt_tacocat_process_socket_set_receive(kt_tacocat_main_t * const main); @@ -119,7 +119,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. */ #ifndef _di_kt_tacocat_process_socket_set_send_ extern void kt_tacocat_process_socket_set_send(kt_tacocat_main_t * const main); diff --git a/sources/c/tacocat/main/receive.c b/sources/c/tacocat/main/receive.c index 88010f7..34e50b7 100644 --- a/sources/c/tacocat/main/receive.c +++ b/sources/c/tacocat/main/receive.c @@ -27,7 +27,7 @@ extern "C" { } // Skip if status is an error or is F_time_out. - if (main->setting.status_receive == F_none) { + if (main->setting.status_receive == F_okay) { for (i = 0; i < main->setting.receive.polls.used; ++i) { @@ -58,7 +58,7 @@ extern "C" { kt_tacocat_process_socket_set_error_handle(main, main->setting.receive, &main->setting.status_receive); if (F_status_is_error_not(main->setting.status_receive)) { - main->setting.status_receive = F_none; + main->setting.status_receive = F_okay; } return 0; @@ -131,7 +131,13 @@ extern "C" { *status = f_fss_simple_packet_identify(*buffer, packet); - return; + if (F_status_is_error(*status)) { + kt_tacocat_print_error_on(&main->program.error, macro_kt_tacocat_f(f_fss_simple_packet_identify), kt_tacocat_receive_s, *name, *status); + + f_file_close_id(&socket->id_data); + + return; + } } socket->size_read = kt_tacocat_packet_read_d; diff --git a/sources/c/tacocat/main/receive.h b/sources/c/tacocat/main/receive.h index 7662b11..1ab90d1 100644 --- a/sources/c/tacocat/main/receive.h +++ b/sources/c/tacocat/main/receive.h @@ -21,7 +21,7 @@ extern "C" { * Must be of type kt_tacocat_main_t. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * F_child on child process exiting. * * @return @@ -38,7 +38,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * @param index * The position within the receive arrays to process. * diff --git a/sources/c/tacocat/main/send.c b/sources/c/tacocat/main/send.c index d7efc05..adb524c 100644 --- a/sources/c/tacocat/main/send.c +++ b/sources/c/tacocat/main/send.c @@ -24,7 +24,7 @@ extern "C" { kt_tacocat_process_socket_set_error_handle(main, main->setting.send, &main->setting.status_send); if (F_status_is_error_not(main->setting.status_send)) { - main->setting.status_send = F_none; + main->setting.status_send = F_okay; } return 0; diff --git a/sources/c/tacocat/main/send.h b/sources/c/tacocat/main/send.h index 55c4260..5dfd0af 100644 --- a/sources/c/tacocat/main/send.h +++ b/sources/c/tacocat/main/send.h @@ -21,7 +21,7 @@ extern "C" { * Must be of type kt_tacocat_main_t. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * F_child on child process exiting. * * @return diff --git a/sources/c/tacocat/main/signal.c b/sources/c/tacocat/main/signal.c index 026691a..a345ec7 100644 --- a/sources/c/tacocat/main/signal.c +++ b/sources/c/tacocat/main/signal.c @@ -83,7 +83,7 @@ extern "C" { } failsafe = 0; - main->setting.status_signal = F_none; + main->setting.status_signal = F_okay; } while (!main->program.signal_received); diff --git a/sources/c/tacocat/main/tacocat.c b/sources/c/tacocat/main/tacocat.c index c43a958..d8056bc 100644 --- a/sources/c/tacocat/main/tacocat.c +++ b/sources/c/tacocat/main/tacocat.c @@ -19,7 +19,7 @@ extern "C" { macro_setting_load_print_first(); - main->setting.state.status = F_none; + main->setting.state.status = F_okay; if (main->setting.flag & (kt_tacocat_main_flag_help_e | kt_tacocat_main_flag_version_e | kt_tacocat_main_flag_copyright_e)) { if (main->setting.flag & kt_tacocat_main_flag_help_e) { diff --git a/sources/c/tacocat/main/tacocat.h b/sources/c/tacocat/main/tacocat.h index dc2777b..8331c78 100644 --- a/sources/c/tacocat/main/tacocat.h +++ b/sources/c/tacocat/main/tacocat.h @@ -82,7 +82,7 @@ extern "C" { * The main program and settings data. * * This alters main.setting.state.status: - * F_none on success. + * F_okay on success. * F_true on success when performing verification and verify passed. * F_false on success when performing verification and verify failed. *