From: Kevin Day Date: Sun, 18 Aug 2024 04:56:18 +0000 (-0500) Subject: Update: Add additional signal checks in loops. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=4f7dd5c6f3571fb7c2d87b896163fd9fd1d234f2;p=fll Update: Add additional signal checks in loops. --- diff --git a/level_3/fss_read/c/main/print/data.c b/level_3/fss_read/c/main/print/data.c index 7f8cf20..c9e2c84 100644 --- a/level_3/fss_read/c/main/print/data.c +++ b/level_3/fss_read/c/main/print/data.c @@ -57,6 +57,8 @@ extern "C" { // Loop through with conditionals only when necessary for performance reasons. for (print_state |= 0x8; i < main->setting.contents.array[at].used; ++i) { + if (fss_read_signal_check(main)) return F_status_set_error(F_interrupt); + if (main->setting.contents.array[at].array[i].start <= main->setting.contents.array[at].array[i].stop) { print_state &= ~0x8; @@ -78,6 +80,8 @@ extern "C" { for (; i < main->setting.contents.array[at].used; ++i) { + if (fss_read_signal_check(main)) return F_status_set_error(F_interrupt); + if (main->setting.contents.array[at].array[i].start <= main->setting.contents.array[at].array[i].stop) { if (main->callback.print_content_next) { main->callback.print_content_next(&main->program.output); diff --git a/level_3/fss_read/c/main/process_normal.c b/level_3/fss_read/c/main/process_normal.c index 6f6561b..157aa9e 100644 --- a/level_3/fss_read/c/main/process_normal.c +++ b/level_3/fss_read/c/main/process_normal.c @@ -410,6 +410,9 @@ extern "C" { current = 0; for (i = 0; i < main->setting.contents.array[at].used; ++i) { + + if (fss_read_signal_check(main)) return; + if (main->setting.contents.array[at].array[i].start <= main->setting.contents.array[at].array[i].stop) ++current; } // for @@ -582,6 +585,8 @@ extern "C" { for (i = 0; i < main->setting.contents.array[at].used; ++i) { + if (fss_read_signal_check(main)) return; + range.start = main->setting.contents.array[at].array[i].start; range.stop = main->setting.contents.array[at].array[i].stop;