From: Kevin Day Date: Sun, 5 Mar 2023 02:15:40 +0000 (-0600) Subject: Update: Use the signal check counter more consistently in Featureless Make. X-Git-Tag: 0.6.4~27 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=80bc1da4ed714cc5a10f703e837c75b91a923678;p=fll Update: Use the signal check counter more consistently in Featureless Make. There are areas in the code where the signal is being checked without utilizing the counter. --- diff --git a/level_3/fake/c/private-build-load.c b/level_3/fake/c/private-build-load.c index 9172b8e..9c93826 100644 --- a/level_3/fake/c/private-build-load.c +++ b/level_3/fake/c/private-build-load.c @@ -74,12 +74,14 @@ extern "C" { if (F_status_is_error(*status)) return; - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - *status = F_status_set_error(F_interrupt); + *status = F_status_set_error(F_interrupt); - return; + return; + } } // Strip the build settings name from the build arguments to generate a list of modes. @@ -230,12 +232,14 @@ extern "C" { if (F_status_is_error(*status) && buffer.used) return; - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - *status = F_status_set_error(F_interrupt); + *status = F_status_set_error(F_interrupt); - return; + return; + } } bool error_printed = F_false; @@ -1478,12 +1482,14 @@ extern "C" { if (F_status_is_error(*status)) return; - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - *status = F_status_set_error(F_interrupt); + *status = F_status_set_error(F_interrupt); - return; + return; + } } const f_string_static_t names[] = { diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index 8139a7c..b364a23 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -348,12 +348,14 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static if (F_status_is_error(*status)|| *status == F_child || f_file_exists(file_stage, F_true) == F_true) return; - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - *status = F_status_set_error(F_interrupt); + *status = F_status_set_error(F_interrupt); - return; + return; + } } f_directory_statuss_t failures = f_directory_statuss_t_initialize; @@ -393,7 +395,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static for (f_array_length_t i = 0; i < files.used; ++i) { - if (!(i % fake_signal_check_short_d)) { + if (!((++data->main->signal_check) % fake_signal_check_short_d)) { if (fll_program_standard_signal_received(data->main)) { fake_print_signal_received(data); @@ -714,7 +716,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static f_string_dynamics_resize(0, &arguments); - if (fll_program_standard_signal_received(data->main)) { + if (!((++data->main->signal_check) % fake_signal_check_d) && fll_program_standard_signal_received(data->main)) { fake_print_signal_received(data); *status = F_status_set_error(F_interrupt); @@ -818,10 +820,12 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static #ifndef _di_fake_build_operate_ f_status_t fake_build_operate(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe) { - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - return F_status_set_error(F_interrupt); + return F_status_set_error(F_interrupt); + } } f_status_t status = F_none; @@ -1134,12 +1138,14 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static if (F_status_is_error(*status)) return; - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - *status = F_status_set_error(F_interrupt); + *status = F_status_set_error(F_interrupt); - return; + return; + } } f_mode_t mode = f_mode_t_initialize; diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index 09b19b7..ddf2906 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -45,12 +45,14 @@ extern "C" { *status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code); - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - *status = F_status_set_error(F_interrupt); + *status = F_status_set_error(F_interrupt); - return 0; + return 0; + } } if (*status == F_child) return return_code; @@ -88,10 +90,12 @@ extern "C" { #ifndef _di_fake_file_buffer_ f_status_t fake_file_buffer(fake_data_t * const data, const f_string_static_t path_file, const bool required, f_string_dynamic_t * const buffer) { - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - return F_status_set_error(F_interrupt); + return F_status_set_error(F_interrupt); + } } f_file_t file = f_file_t_initialize; @@ -171,10 +175,12 @@ extern "C" { clearerr(F_type_input_d); do { - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - return F_status_set_error(F_interrupt); + return F_status_set_error(F_interrupt); + } } status = f_file_stream_read_block(file, buffer); @@ -552,10 +558,12 @@ extern "C" { #ifndef _di_fake_validate_parameter_paths_ f_status_t fake_validate_parameter_paths(fake_data_t * const data) { - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - return F_status_set_error(F_interrupt); + return F_status_set_error(F_interrupt); + } } const f_string_static_t names[] = { diff --git a/level_3/fake/c/private-make-operate.c b/level_3/fake/c/private-make-operate.c index bf789cc..6feafad 100644 --- a/level_3/fake/c/private-make-operate.c +++ b/level_3/fake/c/private-make-operate.c @@ -16,10 +16,12 @@ extern "C" { #ifndef _di_fake_make_operate_ f_status_t fake_make_operate(fake_data_t * const data) { - if (fll_program_standard_signal_received(data->main)) { - fake_print_signal_received(data); + if (!((++data->main->signal_check) % fake_signal_check_d)) { + if (fll_program_standard_signal_received(data->main)) { + fake_print_signal_received(data); - return F_status_set_error(F_interrupt); + return F_status_set_error(F_interrupt); + } } if (data->main->output.verbosity != f_console_verbosity_quiet_e && data->main->output.verbosity != f_console_verbosity_error_e) {