From aa9a0e53ca40f0af098a73d020364043ee7695e4 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 12 Jul 2023 22:24:07 -0500 Subject: [PATCH] Update: Use status_signal instead of status_thread. The status_thread is being used specifically for the signal thread. Change the standard practice to have this renamed to status_signal. This then helps make other status names make more sense. Rather than have status_thread, status_thread_a, and status_thread_b, instead have status_signal, status_a, and status_b. --- level_3/fake/c/main/common/type.h | 4 ++-- level_3/fake/c/main/signal.c | 12 ++++++------ level_3/fss_identify/c/main/common/type.h | 4 ++-- level_3/fss_identify/c/main/signal.c | 12 ++++++------ level_3/fss_read/c/main/common/type.h | 4 ++-- level_3/fss_read/c/main/signal.c | 12 ++++++------ level_3/fss_write/c/main/common/type.h | 4 ++-- level_3/fss_write/c/main/signal.c | 12 ++++++------ level_3/iki_read/c/main/common/type.h | 4 ++-- level_3/iki_read/c/main/signal.c | 12 ++++++------ level_3/iki_write/c/main/common/type.h | 4 ++-- level_3/iki_write/c/main/signal.c | 12 ++++++------ level_3/status_code/c/main/common/type.h | 4 ++-- level_3/status_code/c/main/signal.c | 12 ++++++------ level_3/utf8/c/main/common/type.h | 4 ++-- level_3/utf8/c/main/signal.c | 12 ++++++------ 16 files changed, 64 insertions(+), 64 deletions(-) diff --git a/level_3/fake/c/main/common/type.h b/level_3/fake/c/main/common/type.h index 5b046b7..dd2531f 100644 --- a/level_3/fake/c/main/common/type.h +++ b/level_3/fake/c/main/common/type.h @@ -60,7 +60,7 @@ extern "C" { * * flag: Flags passed to the main function. * - * status_thread: A status used eclusively by the threaded signal handler. + * status_signal: A status used eclusively by the threaded signal handler. * state: The state data used when processing the FSS data. * * build: The build directory. @@ -80,7 +80,7 @@ extern "C" { typedef struct { uint32_t flag; - f_status_t status_thread; + f_status_t status_signal; f_state_t state; f_string_dynamic_t build; diff --git a/level_3/fake/c/main/signal.c b/level_3/fake/c/main/signal.c index 5b15ab6..1d774c3 100644 --- a/level_3/fake/c/main/signal.c +++ b/level_3/fake/c/main/signal.c @@ -65,9 +65,9 @@ extern "C" { f_signal_set_add(F_signal_termination, &main->program.signal.set); if (main->program.signal.id == -1) { - main->setting.status_thread = f_signal_open(&main->program.signal); + main->setting.status_signal = f_signal_open(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; return; @@ -77,9 +77,9 @@ extern "C" { do { memset(&information, 0, sizeof(siginfo_t)); - main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information); + main->setting.status_signal = f_signal_wait(&main->program.signal.set, &information); - if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) { + if (F_status_is_error(main->setting.status_signal) && F_status_set_fine(main->setting.status_signal) != F_interrupt) { if (++failsafe >= fake_signal_check_failsafe_d) break; } @@ -96,13 +96,13 @@ extern "C" { } failsafe = 0; - main->setting.status_thread = F_none; + main->setting.status_signal = F_none; } while (!main->program.signal_received); f_signal_close(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; } } diff --git a/level_3/fss_identify/c/main/common/type.h b/level_3/fss_identify/c/main/common/type.h index 814cfe9..d936bbd 100644 --- a/level_3/fss_identify/c/main/common/type.h +++ b/level_3/fss_identify/c/main/common/type.h @@ -30,7 +30,7 @@ extern "C" { * * range: A range used for processing as needed. * - * status_thread: A status used eclusively by the threaded signal handler. + * status_signal: A status used eclusively by the threaded signal handler. * state: The state information. * * buffer:A buffer used for processing files. @@ -48,7 +48,7 @@ extern "C" { f_string_range_t range; - f_status_t status_thread; + f_status_t status_signal; f_state_t state; f_file_t file; diff --git a/level_3/fss_identify/c/main/signal.c b/level_3/fss_identify/c/main/signal.c index 4272b3a..34774ee 100644 --- a/level_3/fss_identify/c/main/signal.c +++ b/level_3/fss_identify/c/main/signal.c @@ -65,9 +65,9 @@ extern "C" { f_signal_set_add(F_signal_termination, &main->program.signal.set); if (main->program.signal.id == -1) { - main->setting.status_thread = f_signal_open(&main->program.signal); + main->setting.status_signal = f_signal_open(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; return; @@ -77,9 +77,9 @@ extern "C" { do { memset(&information, 0, sizeof(siginfo_t)); - main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information); + main->setting.status_signal = f_signal_wait(&main->program.signal.set, &information); - if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) { + if (F_status_is_error(main->setting.status_signal) && F_status_set_fine(main->setting.status_signal) != F_interrupt) { if (++failsafe >= fss_identify_signal_check_failsafe_d) break; } @@ -96,13 +96,13 @@ extern "C" { } failsafe = 0; - main->setting.status_thread = F_none; + main->setting.status_signal = F_none; } while (!main->program.signal_received); f_signal_close(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; } } diff --git a/level_3/fss_read/c/main/common/type.h b/level_3/fss_read/c/main/common/type.h index 7464660..d0d97b9 100644 --- a/level_3/fss_read/c/main/common/type.h +++ b/level_3/fss_read/c/main/common/type.h @@ -192,7 +192,7 @@ extern "C" { * flag: Flags passed to the main function. * delimit_mode: The delimit mode. * - * status_thread: A status used eclusively by the threaded signal handler. + * status_signal: A status used eclusively by the threaded signal handler. * state: The state data used when processing the FSS data. * * delimit_depth: The delimit depth. @@ -221,7 +221,7 @@ extern "C" { uint32_t flag; uint8_t delimit_mode; - f_status_t status_thread; + f_status_t status_signal; f_state_t state; f_number_unsigned_t delimit_depth; diff --git a/level_3/fss_read/c/main/signal.c b/level_3/fss_read/c/main/signal.c index 28866d3..c4fa721 100644 --- a/level_3/fss_read/c/main/signal.c +++ b/level_3/fss_read/c/main/signal.c @@ -65,9 +65,9 @@ extern "C" { f_signal_set_add(F_signal_termination, &main->program.signal.set); if (main->program.signal.id == -1) { - main->setting.status_thread = f_signal_open(&main->program.signal); + main->setting.status_signal = f_signal_open(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; return; @@ -77,9 +77,9 @@ extern "C" { do { memset(&information, 0, sizeof(siginfo_t)); - main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information); + main->setting.status_signal = f_signal_wait(&main->program.signal.set, &information); - if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) { + if (F_status_is_error(main->setting.status_signal) && F_status_set_fine(main->setting.status_signal) != F_interrupt) { if (++failsafe >= fss_read_signal_check_failsafe_d) break; } @@ -96,13 +96,13 @@ extern "C" { } failsafe = 0; - main->setting.status_thread = F_none; + main->setting.status_signal = F_none; } while (!main->program.signal_received); f_signal_close(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; } } diff --git a/level_3/fss_write/c/main/common/type.h b/level_3/fss_write/c/main/common/type.h index ecdfb3e..e2142a9 100644 --- a/level_3/fss_write/c/main/common/type.h +++ b/level_3/fss_write/c/main/common/type.h @@ -57,7 +57,7 @@ extern "C" { * * flag: Flags passed to the main function. * - * status_thread: A status used eclusively by the threaded signal handler. + * status_signal: A status used eclusively by the threaded signal handler. * state: The state data used when processing the FSS data. * * range: A range used in conjunction with some buffer during processing. @@ -82,7 +82,7 @@ extern "C" { typedef struct { uint16_t flag; - f_status_t status_thread; + f_status_t status_signal; f_state_t state; f_string_range_t range; diff --git a/level_3/fss_write/c/main/signal.c b/level_3/fss_write/c/main/signal.c index 7b559fe..f04c28f 100644 --- a/level_3/fss_write/c/main/signal.c +++ b/level_3/fss_write/c/main/signal.c @@ -65,9 +65,9 @@ extern "C" { f_signal_set_add(F_signal_termination, &main->program.signal.set); if (main->program.signal.id == -1) { - main->setting.status_thread = f_signal_open(&main->program.signal); + main->setting.status_signal = f_signal_open(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; return; @@ -77,9 +77,9 @@ extern "C" { do { memset(&information, 0, sizeof(siginfo_t)); - main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information); + main->setting.status_signal = f_signal_wait(&main->program.signal.set, &information); - if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) { + if (F_status_is_error(main->setting.status_signal) && F_status_set_fine(main->setting.status_signal) != F_interrupt) { if (++failsafe >= fss_write_signal_check_failsafe_d) break; } @@ -96,13 +96,13 @@ extern "C" { } failsafe = 0; - main->setting.status_thread = F_none; + main->setting.status_signal = F_none; } while (!main->program.signal_received); f_signal_close(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; } } diff --git a/level_3/iki_read/c/main/common/type.h b/level_3/iki_read/c/main/common/type.h index 8ffdee4..97322bf 100644 --- a/level_3/iki_read/c/main/common/type.h +++ b/level_3/iki_read/c/main/common/type.h @@ -24,7 +24,7 @@ extern "C" { * * flag: Flags passed to the main function. * - * status_thread: A status used eclusively by the threaded signal handler. + * status_signal: A status used eclusively by the threaded signal handler. * state: The state data used when processing the FSS data. * * at: The position representing the "at" index. @@ -48,7 +48,7 @@ extern "C" { typedef struct { uint16_t flag; - f_status_t status_thread; + f_status_t status_signal; f_state_t state; f_number_unsigned_t at; diff --git a/level_3/iki_read/c/main/signal.c b/level_3/iki_read/c/main/signal.c index 1466235..f5b2bb3 100644 --- a/level_3/iki_read/c/main/signal.c +++ b/level_3/iki_read/c/main/signal.c @@ -65,9 +65,9 @@ extern "C" { f_signal_set_add(F_signal_termination, &main->program.signal.set); if (main->program.signal.id == -1) { - main->setting.status_thread = f_signal_open(&main->program.signal); + main->setting.status_signal = f_signal_open(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; return; @@ -77,9 +77,9 @@ extern "C" { do { memset(&information, 0, sizeof(siginfo_t)); - main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information); + main->setting.status_signal = f_signal_wait(&main->program.signal.set, &information); - if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) { + if (F_status_is_error(main->setting.status_signal) && F_status_set_fine(main->setting.status_signal) != F_interrupt) { if (++failsafe >= iki_read_signal_check_failsafe_d) break; } @@ -96,13 +96,13 @@ extern "C" { } failsafe = 0; - main->setting.status_thread = F_none; + main->setting.status_signal = F_none; } while (!main->program.signal_received); f_signal_close(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; } } diff --git a/level_3/iki_write/c/main/common/type.h b/level_3/iki_write/c/main/common/type.h index 09c62ad..45c12b8 100644 --- a/level_3/iki_write/c/main/common/type.h +++ b/level_3/iki_write/c/main/common/type.h @@ -24,7 +24,7 @@ extern "C" { * * flag: Flags passed to the main function. * - * status_thread: A status used eclusively by the threaded signal handler. + * status_signal: A status used eclusively by the threaded signal handler. * state: The state data used when processing the FSS data. * * quote: This holds the quote used during processing. @@ -41,7 +41,7 @@ extern "C" { typedef struct { uint16_t flag; - f_status_t status_thread; + f_status_t status_signal; f_state_t state; f_string_static_t quote; diff --git a/level_3/iki_write/c/main/signal.c b/level_3/iki_write/c/main/signal.c index 36db0a8..1c91ca4 100644 --- a/level_3/iki_write/c/main/signal.c +++ b/level_3/iki_write/c/main/signal.c @@ -65,9 +65,9 @@ extern "C" { f_signal_set_add(F_signal_termination, &main->program.signal.set); if (main->program.signal.id == -1) { - main->setting.status_thread = f_signal_open(&main->program.signal); + main->setting.status_signal = f_signal_open(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; return; @@ -77,9 +77,9 @@ extern "C" { do { memset(&information, 0, sizeof(siginfo_t)); - main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information); + main->setting.status_signal = f_signal_wait(&main->program.signal.set, &information); - if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) { + if (F_status_is_error(main->setting.status_signal) && F_status_set_fine(main->setting.status_signal) != F_interrupt) { if (++failsafe >= iki_write_signal_check_failsafe_d) break; } @@ -96,13 +96,13 @@ extern "C" { } failsafe = 0; - main->setting.status_thread = F_none; + main->setting.status_signal = F_none; } while (!main->program.signal_received); f_signal_close(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; } } diff --git a/level_3/status_code/c/main/common/type.h b/level_3/status_code/c/main/common/type.h index 5c7c8f9..93be680 100644 --- a/level_3/status_code/c/main/common/type.h +++ b/level_3/status_code/c/main/common/type.h @@ -24,7 +24,7 @@ extern "C" { * * flag: Flags passed to the main function. * - * status_thread: A status used eclusively by the threaded signal handler. + * status_signal: A status used eclusively by the threaded signal handler. * state: The state data used when processing the FSS data. * * status_string_from: A pointer to the status string function (usually either fl_status_string_from() or fll_fss_status_string_from()). @@ -35,7 +35,7 @@ extern "C" { typedef struct { uint16_t flag; - f_status_t status_thread; + f_status_t status_signal; f_state_t state; const f_string_static_t *program_name; diff --git a/level_3/status_code/c/main/signal.c b/level_3/status_code/c/main/signal.c index 4d14be9..3a15462 100644 --- a/level_3/status_code/c/main/signal.c +++ b/level_3/status_code/c/main/signal.c @@ -65,9 +65,9 @@ extern "C" { f_signal_set_add(F_signal_termination, &main->program.signal.set); if (main->program.signal.id == -1) { - main->setting.status_thread = f_signal_open(&main->program.signal); + main->setting.status_signal = f_signal_open(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; return; @@ -77,9 +77,9 @@ extern "C" { do { memset(&information, 0, sizeof(siginfo_t)); - main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information); + main->setting.status_signal = f_signal_wait(&main->program.signal.set, &information); - if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) { + if (F_status_is_error(main->setting.status_signal) && F_status_set_fine(main->setting.status_signal) != F_interrupt) { if (++failsafe >= status_code_signal_check_failsafe_d) break; } @@ -96,13 +96,13 @@ extern "C" { } failsafe = 0; - main->setting.status_thread = F_none; + main->setting.status_signal = F_none; } while (!main->program.signal_received); f_signal_close(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; } } diff --git a/level_3/utf8/c/main/common/type.h b/level_3/utf8/c/main/common/type.h index 6263cd7..e4c08e4 100644 --- a/level_3/utf8/c/main/common/type.h +++ b/level_3/utf8/c/main/common/type.h @@ -25,7 +25,7 @@ extern "C" { * mode: The input/output mode (see utf8_modes_e). * flag: Flags passed to the main function. * - * status_thread: A status used eclusively by the threaded signal handler. + * status_signal: A status used eclusively by the threaded signal handler. * state: The state data used when processing the FSS data. * * valid: Designate the output context set for valid characters. @@ -46,7 +46,7 @@ extern "C" { uint8_t mode; uint16_t flag; - f_status_t status_thread; + f_status_t status_signal; f_state_t state; f_color_set_t valid; diff --git a/level_3/utf8/c/main/signal.c b/level_3/utf8/c/main/signal.c index 9ab459a..d71cab1 100644 --- a/level_3/utf8/c/main/signal.c +++ b/level_3/utf8/c/main/signal.c @@ -65,9 +65,9 @@ extern "C" { f_signal_set_add(F_signal_termination, &main->program.signal.set); if (main->program.signal.id == -1) { - main->setting.status_thread = f_signal_open(&main->program.signal); + main->setting.status_signal = f_signal_open(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; return; @@ -77,9 +77,9 @@ extern "C" { do { memset(&information, 0, sizeof(siginfo_t)); - main->setting.status_thread = f_signal_wait(&main->program.signal.set, &information); + main->setting.status_signal = f_signal_wait(&main->program.signal.set, &information); - if (F_status_is_error(main->setting.status_thread) && F_status_set_fine(main->setting.status_thread) != F_interrupt) { + if (F_status_is_error(main->setting.status_signal) && F_status_set_fine(main->setting.status_signal) != F_interrupt) { if (++failsafe >= utf8_signal_check_failsafe_d) break; } @@ -96,13 +96,13 @@ extern "C" { } failsafe = 0; - main->setting.status_thread = F_none; + main->setting.status_signal = F_none; } while (!main->program.signal_received); f_signal_close(&main->program.signal); - if (F_status_is_error(main->setting.status_thread)) { + if (F_status_is_error(main->setting.status_signal)) { main->program.signal_received = F_signal_abort; } } -- 1.8.3.1