There already are signal check programs here.
Use those instead of manually performing the signal check actions.
for (f_number_unsigned_t i = 0; i < main->setting.files.used; ++i) {
- if (!((++main->program.signal_check) % iki_read_signal_check_d)) {
- if (fll_program_standard_signal_received(&main->program)) {
- fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
-
- main->setting.state.status = F_status_set_error(F_interrupt);
-
- break;
- }
-
- main->program.signal_check = 0;
- }
+ if (iki_read_signal_check(main)) return;
file.stream = 0;
file.id = -1;
for (i = 0; i < main->program.parameters.array[iki_read_parameter_name_e].values.used; ++i) {
- if (!((++main->program.signal_check) % iki_read_signal_check_d)) {
- if (fll_program_standard_signal_received(&main->program)) {
- fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
-
- f_string_dynamic_resize(0, &name);
-
- main->setting.state.status = F_status_set_error(F_interrupt);
-
- return;
- }
-
- main->program.signal_check = 0;
- }
+ if (iki_read_signal_check(main)) return;
index = main->program.parameters.array[iki_read_parameter_name_e].values.array[i];
name.used = 0;
for (i = 0; F_status_is_error_not(main->setting.state.status) && i < main->setting.buffer.used; ) {
- if (!((++main->program.signal_check) % utf8_signal_check_d)) {
- if (fll_program_standard_signal_received(&main->program)) {
- fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
-
- main->setting.state.status = F_interrupt;
-
- break;
- }
-
- main->program.signal_check = 0;
- }
+ if (utf8_signal_check(main)) return;
main->setting.state.status = F_none;
for (i = 0; F_status_is_error_not(main->setting.state.status) && i < main->setting.buffer.used; ) {
- if (!((++main->program.signal_check) % utf8_signal_check_d)) {
- if (fll_program_standard_signal_received(&main->program)) {
- fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
-
- main->setting.state.status = F_status_set_error(F_interrupt);
-
- break;
- }
-
- main->program.signal_check = 0;
- }
+ if (utf8_signal_check(main)) return;
main->setting.state.status = F_none;
for (; text.string[0] && F_status_is_error_not(main->setting.state.status); ) {
- if (!((++main->program.signal_check) % utf8_signal_check_d)) {
- if (fll_program_standard_signal_received(&main->program)) {
- fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
-
- main->setting.state.status = F_status_set_error(F_interrupt);
-
- break;
- }
-
- main->program.signal_check = 0;
- }
+ if (utf8_signal_check(main)) return;
main->setting.state.status = F_none;
for (f_number_unsigned_t i = 0; i < main->setting.path_files_from.used && F_status_is_error_not(main->setting.state.status); ++i) {
- if (!((++main->program.signal_check) % utf8_signal_check_d)) {
- if (fll_program_standard_signal_received(&main->program)) {
- main->setting.state.status = F_status_set_error(F_interrupt);
-
- break;
- }
-
- main->program.signal_check = 0;
- }
+ if (utf8_signal_check(main)) return;
utf8_print_data_section_header_file(&main->program.output, main->setting.path_files_from.array[i], i);
if (F_status_is_error_not(main->setting.state.status) && main->setting.remaining.used) {
for (f_number_unsigned_t i = 0; F_status_is_error_not(main->setting.state.status) && i < main->setting.remaining.used; ++i) {
- if (!((++main->program.signal_check) % utf8_signal_check_d)) {
- if (fll_program_standard_signal_received(&main->program)) {
- main->setting.state.status = F_status_set_error(F_interrupt);
-
- break;
- }
-
- main->program.signal_check = 0;
- }
+ if (utf8_signal_check(main)) return;
utf8_print_data_section_header_parameter(&main->program.output, i);