From 3381bf2877c81c230daacb9314655bee2c60ddde Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 21 Oct 2021 21:44:22 -0500 Subject: [PATCH] Feature: Add support for F_terminal status codes. --- level_0/f_status/c/status.h | 13 +++++++++ level_1/fl_status/c/status.c | 33 +++++++++++++++++++++++ level_1/fl_status/c/status.h | 24 +++++++++++++++++ level_2/fll_status/c/status.c | 63 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 133 insertions(+) diff --git a/level_0/f_status/c/status.h b/level_0/f_status/c/status.h index 757cb4f..0df5d77 100644 --- a/level_0/f_status/c/status.h +++ b/level_0/f_status/c/status.h @@ -551,6 +551,19 @@ extern "C" { F_access_owner, #endif // _di_F_status_access_ + #ifndef _di_F_status_terminal_ + F_terminal, + F_terminal_access, + F_terminal_known, + F_terminal_known_not, + F_terminal_not, + F_terminal_prohibited, + F_terminal_read, + F_terminal_valid, + F_terminal_valid_not, + F_terminal_write, + #endif // _di_F_status_terminal_ + // Required. F_status_code_last, }; // enum diff --git a/level_1/fl_status/c/status.c b/level_1/fl_status/c/status.c index d0ecee3..a44ca3f 100644 --- a/level_1/fl_status/c/status.c +++ b/level_1/fl_status/c/status.c @@ -1355,6 +1355,39 @@ extern "C" { break; #endif // _di_F_status_access_ + #ifndef _di_F_status_terminal_ + case F_terminal: + *string = FL_status_string_terminal; + break; + case F_terminal_access: + *string = FL_status_string_terminal_access; + break; + case F_terminal_known: + *string = FL_status_string_terminal_known; + break; + case F_terminal_known_not: + *string = FL_status_string_terminal_known_not; + break; + case F_terminal_not: + *string = FL_status_string_terminal_not; + break; + case F_terminal_prohibited: + *string = FL_status_string_terminal_prohibited; + break; + case F_terminal_read: + *string = FL_status_string_terminal_read; + break; + case F_terminal_valid: + *string = FL_status_string_terminal_valid; + break; + case F_terminal_valid_not: + *string = FL_status_string_terminal_valid_not; + break; + case F_terminal_write: + *string = FL_status_string_terminal_write; + break; + #endif // _di_F_status_terminal_ + case F_status_code_last: *string = FL_status_string_status_code_last; break; diff --git a/level_1/fl_status/c/status.h b/level_1/fl_status/c/status.h index a58762d..354f45c 100644 --- a/level_1/fl_status/c/status.h +++ b/level_1/fl_status/c/status.h @@ -954,6 +954,30 @@ extern "C" { #define FL_status_string_access_owner_length 14 #endif // _di_F_status_access_ + #ifndef _di_F_status_terminal_ + #define FL_status_string_terminal "F_terminal" + #define FL_status_string_terminal_access "F_terminal_access" + #define FL_status_string_terminal_known "F_terminal_known" + #define FL_status_string_terminal_known_not "F_terminal_known_not" + #define FL_status_string_terminal_not "F_terminal_not" + #define FL_status_string_terminal_prohibited "F_terminal_prohibited" + #define FL_status_string_terminal_read "F_terminal_read" + #define FL_status_string_terminal_valid "F_terminal_valid" + #define FL_status_string_terminal_valid_not "F_terminal_valid_not" + #define FL_status_string_terminal_write "F_terminal_write" + + #define FL_status_string_terminal_length 10 + #define FL_status_string_terminal_access_length 17 + #define FL_status_string_terminal_known_length 16 + #define FL_status_string_terminal_known_not_length 20 + #define FL_status_string_terminal_not_length 14 + #define FL_status_string_terminal_prohibited_length 21 + #define FL_status_string_terminal_read_length 15 + #define FL_status_string_terminal_valid_length 16 + #define FL_status_string_terminal_valid_not_length 20 + #define FL_status_string_terminal_write_length 16 + #endif // _di_F_status_terminal_ + #define FL_status_string_status_code_last "F_status_code_last" #define FL_status_string_status_code_last_length 18 diff --git a/level_2/fll_status/c/status.c b/level_2/fll_status/c/status.c index 53284aa..4ded8b8 100644 --- a/level_2/fll_status/c/status.c +++ b/level_2/fll_status/c/status.c @@ -2660,8 +2660,71 @@ extern "C" { } #endif // _di_F_status_access_ + #ifndef _di_F_status_terminal_ + if (fl_string_compare(string, FL_status_string_terminal, length, FL_status_string_terminal_length) == F_equal_to) { + *code = F_terminal; + + return F_none; + } + + if (fl_string_compare(string, FL_status_string_terminal_access, length, FL_status_string_terminal_access_length) == F_equal_to) { + *code = F_terminal_access; + + return F_none; + } + + if (fl_string_compare(string, FL_status_string_terminal_known, length, FL_status_string_terminal_known_length) == F_equal_to) { + *code = F_terminal_known; + + return F_none; + } + + if (fl_string_compare(string, FL_status_string_terminal_known_not, length, FL_status_string_terminal_known_not_length) == F_equal_to) { + *code = F_terminal_known_not; + + return F_none; + } + + if (fl_string_compare(string, FL_status_string_terminal_not, length, FL_status_string_terminal_not_length) == F_equal_to) { + *code = F_terminal_not; + + return F_none; + } + + if (fl_string_compare(string, FL_status_string_terminal_prohibited, length, FL_status_string_terminal_prohibited_length) == F_equal_to) { + *code = F_terminal_prohibited; + + return F_none; + } + + if (fl_string_compare(string, FL_status_string_terminal_read, length, FL_status_string_terminal_read_length) == F_equal_to) { + *code = F_terminal_read; + + return F_none; + } + + if (fl_string_compare(string, FL_status_string_terminal_valid, length, FL_status_string_terminal_valid_length) == F_equal_to) { + *code = F_terminal_valid; + + return F_none; + } + + if (fl_string_compare(string, FL_status_string_terminal_valid_not, length, FL_status_string_terminal_valid_not_length) == F_equal_to) { + *code = F_terminal_valid_not; + + return F_none; + } + + if (fl_string_compare(string, FL_status_string_terminal_write, length, FL_status_string_terminal_write_length) == F_equal_to) { + *code = F_terminal_write; + + return F_none; + } + #endif // _di_F_status_terminal_ + if (fl_string_compare(string, FL_status_string_status_code_last, length, FL_status_string_status_code_last_length) == F_equal_to) { *code = F_status_code_last; + return F_none; } -- 1.8.3.1