From ee3e0ad2601d4fce6312d05d5744151bc10366b2 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 11 Mar 2021 22:50:22 -0600 Subject: [PATCH] Update: add done, empty, and full status codes. Include the respective "not" codes as well. --- level_0/f_status/c/status.h | 6 ++++++ level_1/fl_status/c/status.c | 18 ++++++++++++++++++ level_1/fl_status/c/status.h | 12 ++++++++++++ level_2/fll_status/c/status.c | 30 ++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+) diff --git a/level_0/f_status/c/status.h b/level_0/f_status/c/status.h index 279a3c6..23ae3af 100644 --- a/level_0/f_status/c/status.h +++ b/level_0/f_status/c/status.h @@ -175,8 +175,12 @@ extern "C" { F_descriptor_not, F_device, F_device_not, + F_done, + F_done_not, F_dummy, F_dummy_not, + F_empty, + F_empty_not, F_encoding, F_encoding_not, F_eof, @@ -193,6 +197,8 @@ extern "C" { F_fork_not, F_found, F_found_not, + F_full, + F_full_not, F_group, F_group_not, F_ignore, diff --git a/level_1/fl_status/c/status.c b/level_1/fl_status/c/status.c index 2731bf8..0e25485 100644 --- a/level_1/fl_status/c/status.c +++ b/level_1/fl_status/c/status.c @@ -308,12 +308,24 @@ extern "C" { case F_device_not: *string = FL_status_string_device_not; break; + case F_done: + *string = FL_status_string_done; + break; + case F_done_not: + *string = FL_status_string_done_not; + break; case F_dummy: *string = FL_status_string_dummy; break; case F_dummy_not: *string = FL_status_string_dummy_not; break; + case F_empty: + *string = FL_status_string_empty; + break; + case F_empty_not: + *string = FL_status_string_empty_not; + break; case F_encoding: *string = FL_status_string_encoding; break; @@ -362,6 +374,12 @@ extern "C" { case F_found_not: *string = FL_status_string_found_not; break; + case F_full: + *string = FL_status_string_full; + break; + case F_full_not: + *string = FL_status_string_full_not; + break; case F_group: *string = FL_status_string_group; break; diff --git a/level_1/fl_status/c/status.h b/level_1/fl_status/c/status.h index 98b8c15..d971e33 100644 --- a/level_1/fl_status/c/status.h +++ b/level_1/fl_status/c/status.h @@ -195,8 +195,12 @@ extern "C" { #define FL_status_string_descriptor_not "F_descriptor_not" #define FL_status_string_device "F_device" #define FL_status_string_device_not "F_device_not" + #define FL_status_string_done "F_done" + #define FL_status_string_done_not "F_done_not" #define FL_status_string_dummy "F_dummy" #define FL_status_string_dummy_not "F_dummy_not" + #define FL_status_string_empty "F_empty" + #define FL_status_string_empty_not "F_empty_not" #define FL_status_string_encoding "F_encoding" #define FL_status_string_encoding_not "F_encoding_not" #define FL_status_string_eof "F_eof" @@ -213,6 +217,8 @@ extern "C" { #define FL_status_string_fork_not "F_fork_not" #define FL_status_string_found "F_found" #define FL_status_string_found_not "F_found_not" + #define FL_status_string_full "F_full" + #define FL_status_string_full_not "F_full_not" #define FL_status_string_group "F_group" #define FL_status_string_group_not "F_group_not" #define FL_status_string_ignore "F_ignore" @@ -350,8 +356,12 @@ extern "C" { #define FL_status_string_descriptor_not_length 16 #define FL_status_string_device_length 8 #define FL_status_string_device_not_length 12 + #define FL_status_string_done_length 6 + #define FL_status_string_done_not_length 10 #define FL_status_string_dummy_length 7 #define FL_status_string_dummy_not_length 11 + #define FL_status_string_empty_length 7 + #define FL_status_string_empty_not_length 11 #define FL_status_string_encoding_length 10 #define FL_status_string_encoding_not_length 14 #define FL_status_string_eof_length 5 @@ -368,6 +378,8 @@ extern "C" { #define FL_status_string_fork_not_length 10 #define FL_status_string_found_length 7 #define FL_status_string_found_not_length 11 + #define FL_status_string_full_length 6 + #define FL_status_string_full_not_length 10 #define FL_status_string_group_length 7 #define FL_status_string_group_not_length 11 #define FL_status_string_ignore_length 8 diff --git a/level_2/fll_status/c/status.c b/level_2/fll_status/c/status.c index 066a5b0..b5bb518 100644 --- a/level_2/fll_status/c/status.c +++ b/level_2/fll_status/c/status.c @@ -516,6 +516,16 @@ extern "C" { return F_none; } + if (fl_string_compare(string, FL_status_string_done, length, FL_status_string_done_length) == F_equal_to) { + *code = F_done; + return F_none; + } + + if (fl_string_compare(string, FL_status_string_done_not, length, FL_status_string_done_not_length) == F_equal_to) { + *code = F_done_not; + return F_none; + } + if (fl_string_compare(string, FL_status_string_dummy, length, FL_status_string_dummy_length) == F_equal_to) { *code = F_dummy; return F_none; @@ -526,6 +536,16 @@ extern "C" { return F_none; } + if (fl_string_compare(string, FL_status_string_empty, length, FL_status_string_empty_length) == F_equal_to) { + *code = F_empty; + return F_none; + } + + if (fl_string_compare(string, FL_status_string_empty_not, length, FL_status_string_empty_not_length) == F_equal_to) { + *code = F_empty_not; + return F_none; + } + if (fl_string_compare(string, FL_status_string_encoding, length, FL_status_string_encoding_length) == F_equal_to) { *code = F_encoding; return F_none; @@ -606,6 +626,16 @@ extern "C" { return F_none; } + if (fl_string_compare(string, FL_status_string_full, length, FL_status_string_full_length) == F_equal_to) { + *code = F_full; + return F_none; + } + + if (fl_string_compare(string, FL_status_string_full_not, length, FL_status_string_full_not_length) == F_equal_to) { + *code = F_full_not; + return F_none; + } + if (fl_string_compare(string, FL_status_string_group, length, FL_status_string_group_length) == F_equal_to) { *code = F_group; return F_none; -- 1.8.3.1