]> Kevux Git Server - fll/commitdiff
Update: Add additional F_enter and F_enter_not status codes to act as the opposite...
authorKevin Day <Kevin@kevux.org>
Fri, 12 Jul 2024 03:23:57 +0000 (22:23 -0500)
committerKevin Day <Kevin@kevux.org>
Fri, 12 Jul 2024 03:31:25 +0000 (22:31 -0500)
level_0/f_status/c/status.h
level_0/f_status_string/c/status_string.c
level_0/f_status_string/c/status_string.h
level_0/f_status_string/tests/unit/c/test-status_string-to.c
level_1/fl_status_string/c/status_string.c
level_1/fl_status_string/tests/unit/c/test-status_string-from.c

index 14debba46daab9715ff16f10c5cd35a7b2b98e55..4f023e3fcf52b13ff882fd57bea13cf774b23b65 100644 (file)
@@ -297,6 +297,8 @@ extern "C" {
     F_endian_big,
     F_endian_little,
     F_endian_not,
+    F_enter,
+    F_enter_not,
     F_eoa,
     F_eoa_not,
     F_eof,
index 97c3d7a1cf1bec37aecf85c8d22625b973471698..ca210ffeb7a074cdfe42666b907c748923807bf3 100644 (file)
@@ -165,6 +165,8 @@ extern "C" {
   const f_string_static_t f_status_endian_big_s = macro_f_string_static_t_initialize_1(F_status_endian_big_s, 0, F_status_endian_big_s_length);
   const f_string_static_t f_status_endian_little_s = macro_f_string_static_t_initialize_1(F_status_endian_little_s, 0, F_status_endian_little_s_length);
   const f_string_static_t f_status_endian_not_s = macro_f_string_static_t_initialize_1(F_status_endian_not_s, 0, F_status_endian_not_s_length);
+  const f_string_static_t f_status_enter_s = macro_f_string_static_t_initialize_1(F_status_enter_s, 0, F_status_enter_s_length);
+  const f_string_static_t f_status_enter_not_s = macro_f_string_static_t_initialize_1(F_status_enter_not_s, 0, F_status_enter_not_s_length);
   const f_string_static_t f_status_eoa_s = macro_f_string_static_t_initialize_1(F_status_eoa_s, 0, F_status_eoa_s_length);
   const f_string_static_t f_status_eoa_not_s = macro_f_string_static_t_initialize_1(F_status_eoa_not_s, 0, F_status_eoa_not_s_length);
   const f_string_static_t f_status_eof_s = macro_f_string_static_t_initialize_1(F_status_eof_s, 0, F_status_eof_s_length);
@@ -1502,6 +1504,16 @@ extern "C" {
 
         break;
 
+      case F_enter:
+        *name = f_status_enter_s;
+
+        break;
+
+      case F_enter_not:
+        *name = f_status_enter_not_s;
+
+        break;
+
       case F_eoa:
         *name = f_status_eoa_s;
 
index 39aa28b957ea6ea18435b9a1b367b711fcc9de6f..4d82018414f6b6114c548c45cdead9cf66d14589 100644 (file)
@@ -325,6 +325,8 @@ extern "C" {
   #define F_status_endian_big_s            "F_endian_big"
   #define F_status_endian_little_s         "F_endian_little"
   #define F_status_endian_not_s            "F_endian_not"
+  #define F_status_enter_s                 "F_enter"
+  #define F_status_enter_not_s             "F_enter_not"
   #define F_status_eoa_s                   "F_eoa"
   #define F_status_eoa_not_s               "F_eoa_not"
   #define F_status_eof_s                   "F_eof"
@@ -665,6 +667,8 @@ extern "C" {
   #define F_status_endian_big_s_length            12
   #define F_status_endian_little_s_length         19
   #define F_status_endian_not_s_length            12
+  #define F_status_enter_s_length                 7
+  #define F_status_enter_not_s_length             11
   #define F_status_eoa_s_length                   5
   #define F_status_eoa_not_s_length               9
   #define F_status_eof_s_length                   5
@@ -1007,6 +1011,8 @@ extern "C" {
   extern const f_string_static_t f_status_endian_big_s;
   extern const f_string_static_t f_status_endian_little_s;
   extern const f_string_static_t f_status_endian_not_s;
+  extern const f_string_static_t f_status_enter_s;
+  extern const f_string_static_t f_status_enter_not_s;
   extern const f_string_static_t f_status_eoa_s;
   extern const f_string_static_t f_status_eoa_not_s;
   extern const f_string_static_t f_status_eof_s;
index 5a1ff4603b1a4067f9349956b4ec4bd2d9703e6b..69bb7adee40d04fe26c361f477d13b93b58f3a3c 100644 (file)
@@ -191,6 +191,8 @@ void test__f_status_string_to__works(void **state) {
     F_endian_big,
     F_endian_little,
     F_endian_not,
+    F_enter,
+    F_enter_not,
     F_eoa,
     F_eoa_not,
     F_eof,
@@ -836,6 +838,8 @@ void test__f_status_string_to__works(void **state) {
     f_status_endian_big_s,
     f_status_endian_little_s,
     f_status_endian_not_s,
+    f_status_enter_s,
+    f_status_enter_not_s,
     f_status_eoa_s,
     f_status_eoa_not_s,
     f_status_eof_s,
@@ -1319,7 +1323,7 @@ void test__f_status_string_to__works(void **state) {
     f_status_status_code_last_s,
   };
 
-  for (uint16_t i = 0; i < 642; ++i) {
+  for (uint16_t i = 0; i < 644; ++i) {
 
     f_string_static_t result = f_string_static_t_initialize;
 
index c5dfdf42b662665d5775b796591278f7da0c80bd..feef49fee190bffa5b5672d3e14e1f31ec6bc852 100644 (file)
@@ -987,6 +987,18 @@ extern "C" {
       return F_okay;
     }
 
+    if (f_compare_dynamic(name, f_status_enter_s) == F_equal_to) {
+      *code = F_enter;
+
+      return F_okay;
+    }
+
+    if (f_compare_dynamic(name, f_status_enter_not_s) == F_equal_to) {
+      *code = F_enter_not;
+
+      return F_okay;
+    }
+
     if (f_compare_dynamic(name, f_status_eoa_s) == F_equal_to) {
       *code = F_eoa;
 
index d8b0ff03f5e31c573ad3acd8504212bd21b9ef75..3b6a224b9eae50ac3802aa81c0933e5b6ecfe2e0 100644 (file)
@@ -207,6 +207,8 @@ void test__fl_status_string_from__works(void **state) {
     F_endian_big,
     F_endian_little,
     F_endian_not,
+    F_enter,
+    F_enter_not,
     F_eoa,
     F_eoa_not,
     F_eof,
@@ -852,6 +854,8 @@ void test__fl_status_string_from__works(void **state) {
     f_status_endian_big_s,
     f_status_endian_little_s,
     f_status_endian_not_s,
+    f_status_enter_s,
+    f_status_enter_not_s,
     f_status_eoa_s,
     f_status_eoa_not_s,
     f_status_eof_s,