]> Kevux Git Server - fll/commitdiff
Feature: Add F_add and F_remove status codes.
authorKevin Day <Kevin@kevux.org>
Wed, 19 Feb 2025 02:38:08 +0000 (20:38 -0600)
committerKevin Day <Kevin@kevux.org>
Wed, 19 Feb 2025 02:38:08 +0000 (20:38 -0600)
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 bee0fa98794aea808c9c2cd8da9e7c2f985afa07..e129cb8b1a710483f630393420f41c22c1f1f1ad 100644 (file)
@@ -215,6 +215,8 @@ extern "C" {
     F_abort_not,
     F_absolute,
     F_absolute_not,
+    F_add,
+    F_add_not,
     F_address,
     F_address_not,
     F_again,
@@ -465,6 +467,8 @@ extern "C" {
     F_relative_not,
     F_remote,
     F_remote_not,
+    F_remove,
+    F_remove_not,
     F_repeat,
     F_repeat_not,
     F_require,
index 7e670b2d908c7af4a13fb9096d47c5758a78c849..a0955ed0c35526db004caee464a41d2083ec6479 100644 (file)
@@ -83,6 +83,8 @@ extern "C" {
   const f_string_static_t f_status_abort_not_s = macro_f_string_static_t_initialize_1(F_status_abort_not_s, 0, F_status_abort_not_s_length);
   const f_string_static_t f_status_absolute_s = macro_f_string_static_t_initialize_1(F_status_absolute_s, 0, F_status_absolute_s_length);
   const f_string_static_t f_status_absolute_not_s = macro_f_string_static_t_initialize_1(F_status_absolute_not_s, 0, F_status_absolute_not_s_length);
+  const f_string_static_t f_status_add_s = macro_f_string_static_t_initialize_1(F_status_add_s, 0, F_status_add_s_length);
+  const f_string_static_t f_status_add_not_s = macro_f_string_static_t_initialize_1(F_status_add_not_s, 0, F_status_add_not_s_length);
   const f_string_static_t f_status_address_s = macro_f_string_static_t_initialize_1(F_status_address_s, 0, F_status_address_s_length);
   const f_string_static_t f_status_address_not_s = macro_f_string_static_t_initialize_1(F_status_address_not_s, 0, F_status_address_not_s_length);
   const f_string_static_t f_status_again_s = macro_f_string_static_t_initialize_1(F_status_again_s, 0, F_status_again_s_length);
@@ -333,6 +335,8 @@ extern "C" {
   const f_string_static_t f_status_relative_not_s = macro_f_string_static_t_initialize_1(F_status_relative_not_s, 0, F_status_relative_not_s_length);
   const f_string_static_t f_status_remote_s = macro_f_string_static_t_initialize_1(F_status_remote_s, 0, F_status_remote_s_length);
   const f_string_static_t f_status_remote_not_s = macro_f_string_static_t_initialize_1(F_status_remote_not_s, 0, F_status_remote_not_s_length);
+  const f_string_static_t f_status_remove_s = macro_f_string_static_t_initialize_1(F_status_remove_s, 0, F_status_remove_s_length);
+  const f_string_static_t f_status_remove_not_s = macro_f_string_static_t_initialize_1(F_status_remove_not_s, 0, F_status_remove_not_s_length);
   const f_string_static_t f_status_repeat_s = macro_f_string_static_t_initialize_1(F_status_repeat_s, 0, F_status_repeat_s_length);
   const f_string_static_t f_status_repeat_not_s = macro_f_string_static_t_initialize_1(F_status_repeat_not_s, 0, F_status_repeat_not_s_length);
   const f_string_static_t f_status_require_s = macro_f_string_static_t_initialize_1(F_status_require_s, 0, F_status_require_s_length);
@@ -1100,6 +1104,16 @@ extern "C" {
 
         break;
 
+      case F_add:
+        *name = f_status_add_s;
+
+        break;
+
+      case F_add_not:
+        *name = f_status_add_not_s;
+
+        break;
+
       case F_address:
         *name = f_status_address_s;
 
@@ -2340,6 +2354,16 @@ extern "C" {
 
         break;
 
+      case F_remove:
+        *name = f_status_remove_s;
+
+        break;
+
+      case F_remove_not:
+        *name = f_status_remove_not_s;
+
+        break;
+
       case F_repeat:
         *name = f_status_repeat_s;
 
index d724c7e7f7b017f075e06583014da1b32dedd20b..90c3db972c2121dfc37fba2936c290b47c56e3fb 100644 (file)
@@ -243,6 +243,8 @@ extern "C" {
   #define F_status_abort_not_s             "F_abort_not"
   #define F_status_absolute_s              "F_absolute"
   #define F_status_absolute_not_s          "F_absolute_not"
+  #define F_status_add_s                   "F_add"
+  #define F_status_add_not_s               "F_add_not"
   #define F_status_address_s               "F_address"
   #define F_status_address_not_s           "F_address_not"
   #define F_status_again_s                 "F_again"
@@ -493,6 +495,8 @@ extern "C" {
   #define F_status_relative_not_s          "F_relative_not"
   #define F_status_remote_s                "F_remote"
   #define F_status_remote_not_s            "F_remote_not"
+  #define F_status_remove_s                "F_remove"
+  #define F_status_remove_not_s            "F_remove_not"
   #define F_status_repeat_s                "F_repeat"
   #define F_status_repeat_not_s            "F_repeat_not"
   #define F_status_require_s               "F_require"
@@ -591,6 +595,8 @@ extern "C" {
   #define F_status_abort_not_s_length             11
   #define F_status_absolute_s_length              10
   #define F_status_absolute_not_s_length          14
+  #define F_status_add_s_length                   5
+  #define F_status_add_not_s_length               9
   #define F_status_address_s_length               9
   #define F_status_address_not_s_length           13
   #define F_status_again_s_length                 7
@@ -841,6 +847,8 @@ extern "C" {
   #define F_status_relative_not_s_length          14
   #define F_status_remote_s_length                8
   #define F_status_remote_not_s_length            12
+  #define F_status_remove_s_length                8
+  #define F_status_remove_not_s_length            12
   #define F_status_repeat_s_length                8
   #define F_status_repeat_not_s_length            12
   #define F_status_require_s_length               9
@@ -939,6 +947,8 @@ extern "C" {
   extern const f_string_static_t f_status_abort_not_s;
   extern const f_string_static_t f_status_absolute_s;
   extern const f_string_static_t f_status_absolute_not_s;
+  extern const f_string_static_t f_status_add_s;
+  extern const f_string_static_t f_status_add_not_s;
   extern const f_string_static_t f_status_address_s;
   extern const f_string_static_t f_status_address_not_s;
   extern const f_string_static_t f_status_again_s;
@@ -1191,6 +1201,8 @@ extern "C" {
   extern const f_string_static_t f_status_relative_not_s;
   extern const f_string_static_t f_status_remote_s;
   extern const f_string_static_t f_status_remote_not_s;
+  extern const f_string_static_t f_status_remove_s;
+  extern const f_string_static_t f_status_remove_not_s;
   extern const f_string_static_t f_status_repeat_s;
   extern const f_string_static_t f_status_repeat_not_s;
   extern const f_string_static_t f_status_require_s;
index dd6ba4186d45e2ace6cafcafa7809360af019fa7..95a7081e9952475f1bf76230ffcabbc51db50a92 100644 (file)
@@ -109,6 +109,8 @@ void test__f_status_string_to__works(void **state) {
     F_abort_not,
     F_absolute,
     F_absolute_not,
+    F_add,
+    F_add_not,
     F_address,
     F_address_not,
     F_again,
@@ -359,6 +361,8 @@ void test__f_status_string_to__works(void **state) {
     F_relative_not,
     F_remote,
     F_remote_not,
+    F_remove,
+    F_remove_not,
     F_repeat,
     F_repeat_not,
     F_require,
@@ -762,6 +766,8 @@ void test__f_status_string_to__works(void **state) {
     f_status_abort_not_s,
     f_status_absolute_s,
     f_status_absolute_not_s,
+    f_status_add_s,
+    f_status_add_not_s,
     f_status_address_s,
     f_status_address_not_s,
     f_status_again_s,
@@ -1012,6 +1018,8 @@ void test__f_status_string_to__works(void **state) {
     f_status_relative_not_s,
     f_status_remote_s,
     f_status_remote_not_s,
+    f_status_remove_s,
+    f_status_remove_not_s,
     f_status_repeat_s,
     f_status_repeat_not_s,
     f_status_require_s,
@@ -1335,7 +1343,7 @@ void test__f_status_string_to__works(void **state) {
     f_status_status_code_last_s,
   };
 
-  for (uint16_t i = 0; i < 646; ++i) {
+  for (uint16_t i = 0; i < 650; ++i) {
 
     f_string_static_t result = f_string_static_t_initialize;
 
index 77accebf0adf7e15486e235c9dea83c5f02ba4da..cdc8b65b6f3eabcb96bfcd5836a28688192a8c36 100644 (file)
@@ -495,6 +495,18 @@ extern "C" {
       return F_okay;
     }
 
+    if (f_compare_dynamic(name, f_status_add_s) == F_equal_to) {
+      *code = F_add;
+
+      return F_okay;
+    }
+
+    if (f_compare_dynamic(name, f_status_add_not_s) == F_equal_to) {
+      *code = F_add_not;
+
+      return F_okay;
+    }
+
     if (f_compare_dynamic(name, f_status_address_s) == F_equal_to) {
       *code = F_address;
 
@@ -1995,6 +2007,18 @@ extern "C" {
       return F_okay;
     }
 
+    if (f_compare_dynamic(name, f_status_remove_s) == F_equal_to) {
+      *code = F_remove;
+
+      return F_okay;
+    }
+
+    if (f_compare_dynamic(name, f_status_remove_not_s) == F_equal_to) {
+      *code = F_remove_not;
+
+      return F_okay;
+    }
+
     if (f_compare_dynamic(name, f_status_repeat_s) == F_equal_to) {
       *code = F_repeat;
 
index b9ed9d97bd3e203ae4eee353480d7c521f3d34d2..dc8132617c89ec99af1a526444b9d39adaa5ca82 100644 (file)
@@ -125,6 +125,8 @@ void test__fl_status_string_from__works(void **state) {
     F_abort_not,
     F_absolute,
     F_absolute_not,
+    F_add,
+    F_add_not,
     F_address,
     F_address_not,
     F_again,
@@ -375,6 +377,8 @@ void test__fl_status_string_from__works(void **state) {
     F_relative_not,
     F_remote,
     F_remote_not,
+    F_remove,
+    F_remove_not,
     F_repeat,
     F_repeat_not,
     F_require,
@@ -778,6 +782,8 @@ void test__fl_status_string_from__works(void **state) {
     f_status_abort_not_s,
     f_status_absolute_s,
     f_status_absolute_not_s,
+    f_status_add_s,
+    f_status_add_not_s,
     f_status_address_s,
     f_status_address_not_s,
     f_status_again_s,
@@ -1028,6 +1034,8 @@ void test__fl_status_string_from__works(void **state) {
     f_status_relative_not_s,
     f_status_remote_s,
     f_status_remote_not_s,
+    f_status_remove_s,
+    f_status_remove_not_s,
     f_status_repeat_s,
     f_status_repeat_not_s,
     f_status_require_s,
@@ -1351,7 +1359,7 @@ void test__fl_status_string_from__works(void **state) {
     f_status_status_code_last_s,
   };
 
-  for (uint16_t i = 0; i < 646; ++i) {
+  for (uint16_t i = 0; i < 650; ++i) {
 
     f_status_t result = F_okay;