]> Kevux Git Server - fll/commitdiff
Feature: Add F_maximum and F_minimum status codes.
authorKevin Day <Kevin@kevux.org>
Thu, 23 Jan 2025 05:36:01 +0000 (23:36 -0600)
committerKevin Day <Kevin@kevux.org>
Thu, 23 Jan 2025 05:54:22 +0000 (23:54 -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 e8a37c45600a8d1066e6e5e12667342f701e4d1b..bee0fa98794aea808c9c2cd8da9e7c2f985afa07 100644 (file)
@@ -374,6 +374,8 @@ extern "C" {
     F_lock_write_not,
     F_loop,
     F_loop_not,
+    F_maximum,
+    F_maximum_not,
     F_maybe,
     F_maybe_not,
     F_memory,
@@ -382,6 +384,8 @@ extern "C" {
     F_message_not,
     F_middle,
     F_middle_not,
+    F_minimum,
+    F_minimum_not,
     F_minor,
     F_minor_not,
     F_moderate,
index b69b10091c633f052bcae03fcc1f49ce5ccd5833..7e670b2d908c7af4a13fb9096d47c5758a78c849 100644 (file)
@@ -242,6 +242,8 @@ extern "C" {
   const f_string_static_t f_status_lock_write_not_s = macro_f_string_static_t_initialize_1(F_status_lock_write_not_s, 0, F_status_lock_write_not_s_length);
   const f_string_static_t f_status_loop_s = macro_f_string_static_t_initialize_1(F_status_loop_s, 0, F_status_loop_s_length);
   const f_string_static_t f_status_loop_not_s = macro_f_string_static_t_initialize_1(F_status_loop_not_s, 0, F_status_loop_not_s_length);
+  const f_string_static_t f_status_maximum_s = macro_f_string_static_t_initialize_1(F_status_maximum_s, 0, F_status_maximum_s_length);
+  const f_string_static_t f_status_maximum_not_s = macro_f_string_static_t_initialize_1(F_status_maximum_not_s, 0, F_status_maximum_not_s_length);
   const f_string_static_t f_status_maybe_s = macro_f_string_static_t_initialize_1(F_status_maybe_s, 0, F_status_maybe_s_length);
   const f_string_static_t f_status_maybe_not_s = macro_f_string_static_t_initialize_1(F_status_maybe_not_s, 0, F_status_maybe_not_s_length);
   const f_string_static_t f_status_memory_s = macro_f_string_static_t_initialize_1(F_status_memory_s, 0, F_status_memory_s_length);
@@ -250,6 +252,8 @@ extern "C" {
   const f_string_static_t f_status_message_not_s = macro_f_string_static_t_initialize_1(F_status_message_not_s, 0, F_status_message_not_s_length);
   const f_string_static_t f_status_middle_s = macro_f_string_static_t_initialize_1(F_status_middle_s, 0, F_status_middle_s_length);
   const f_string_static_t f_status_middle_not_s = macro_f_string_static_t_initialize_1(F_status_middle_not_s, 0, F_status_middle_not_s_length);
+  const f_string_static_t f_status_minimum_s = macro_f_string_static_t_initialize_1(F_status_minimum_s, 0, F_status_minimum_s_length);
+  const f_string_static_t f_status_minimum_not_s = macro_f_string_static_t_initialize_1(F_status_minimum_not_s, 0, F_status_minimum_not_s_length);
   const f_string_static_t f_status_minor_s = macro_f_string_static_t_initialize_1(F_status_minor_s, 0, F_status_minor_s_length);
   const f_string_static_t f_status_minor_not_s = macro_f_string_static_t_initialize_1(F_status_minor_not_s, 0, F_status_minor_not_s_length);
   const f_string_static_t f_status_moderate_s = macro_f_string_static_t_initialize_1(F_status_moderate_s, 0, F_status_moderate_s_length);
@@ -1881,6 +1885,16 @@ extern "C" {
 
         break;
 
+      case F_maximum:
+        *name = f_status_maximum_s;
+
+        break;
+
+      case F_maximum_not:
+        *name = f_status_maximum_not_s;
+
+        break;
+
       case F_maybe:
         *name = f_status_maybe_s;
 
@@ -1921,6 +1935,16 @@ extern "C" {
 
         break;
 
+      case F_minimum:
+        *name = f_status_minimum_s;
+
+        break;
+
+      case F_minimum_not:
+        *name = f_status_minimum_not_s;
+
+        break;
+
       case F_minor:
         *name = f_status_minor_s;
 
index 9dbf5b831e9ac0ef23b962a0b7e57cf0efb54619..d724c7e7f7b017f075e06583014da1b32dedd20b 100644 (file)
@@ -402,6 +402,8 @@ extern "C" {
   #define F_status_lock_write_not_s        "F_lock_write_not"
   #define F_status_loop_s                  "F_loop"
   #define F_status_loop_not_s              "F_loop_not"
+  #define F_status_maximum_s               "F_maximum"
+  #define F_status_maximum_not_s           "F_maximum_not"
   #define F_status_maybe_s                 "F_maybe"
   #define F_status_maybe_not_s             "F_maybe_not"
   #define F_status_memory_s                "F_memory"
@@ -410,6 +412,8 @@ extern "C" {
   #define F_status_message_not_s           "F_message_not"
   #define F_status_middle_s                "F_middle"
   #define F_status_middle_not_s            "F_middle_not"
+  #define F_status_minimum_s               "F_minimum"
+  #define F_status_minimum_not_s           "F_minimum_not"
   #define F_status_minor_s                 "F_minor"
   #define F_status_minor_not_s             "F_minor_not"
   #define F_status_moderate_s              "F_moderate"
@@ -746,6 +750,8 @@ extern "C" {
   #define F_status_lock_write_not_s_length        16
   #define F_status_loop_s_length                  6
   #define F_status_loop_not_s_length              10
+  #define F_status_maximum_s_length               9
+  #define F_status_maximum_not_s_length           13
   #define F_status_maybe_s_length                 7
   #define F_status_maybe_not_s_length             11
   #define F_status_memory_s_length                8
@@ -754,6 +760,8 @@ extern "C" {
   #define F_status_message_not_s_length           13
   #define F_status_middle_s_length                8
   #define F_status_middle_not_s_length            12
+  #define F_status_minimum_s_length               9
+  #define F_status_minimum_not_s_length           13
   #define F_status_minor_s_length                 7
   #define F_status_minor_not_s_length             11
   #define F_status_moderate_s_length              10
@@ -1092,6 +1100,8 @@ extern "C" {
   extern const f_string_static_t f_status_lock_write_not_s;
   extern const f_string_static_t f_status_loop_s;
   extern const f_string_static_t f_status_loop_not_s;
+  extern const f_string_static_t f_status_maximum_s;
+  extern const f_string_static_t f_status_maximum_not_s;
   extern const f_string_static_t f_status_maybe_s;
   extern const f_string_static_t f_status_maybe_not_s;
   extern const f_string_static_t f_status_memory_s;
@@ -1100,6 +1110,8 @@ extern "C" {
   extern const f_string_static_t f_status_message_not_s;
   extern const f_string_static_t f_status_middle_s;
   extern const f_string_static_t f_status_middle_not_s;
+  extern const f_string_static_t f_status_minimum_s;
+  extern const f_string_static_t f_status_minimum_not_s;
   extern const f_string_static_t f_status_minor_s;
   extern const f_string_static_t f_status_minor_not_s;
   extern const f_string_static_t f_status_moderate_s;
index 194b0f484c5768b907c5b16761d58af7a8a654d7..dd6ba4186d45e2ace6cafcafa7809360af019fa7 100644 (file)
@@ -268,6 +268,8 @@ void test__f_status_string_to__works(void **state) {
     F_lock_write_not,
     F_loop,
     F_loop_not,
+    F_maximum,
+    F_maximum_not,
     F_maybe,
     F_maybe_not,
     F_memory,
@@ -276,6 +278,8 @@ void test__f_status_string_to__works(void **state) {
     F_message_not,
     F_middle,
     F_middle_not,
+    F_minimum,
+    F_minimum_not,
     F_minor,
     F_minor_not,
     F_moderate,
@@ -917,6 +921,8 @@ void test__f_status_string_to__works(void **state) {
     f_status_lock_write_not_s,
     f_status_loop_s,
     f_status_loop_not_s,
+    f_status_maximum_s,
+    f_status_maximum_not_s,
     f_status_maybe_s,
     f_status_maybe_not_s,
     f_status_memory_s,
@@ -925,6 +931,8 @@ void test__f_status_string_to__works(void **state) {
     f_status_message_not_s,
     f_status_middle_s,
     f_status_middle_not_s,
+    f_status_minimum_s,
+    f_status_minimum_not_s,
     f_status_minor_s,
     f_status_minor_not_s,
     f_status_moderate_s,
index 4756c2b733ec5f2099a7c1bb230266f679e55eb5..77accebf0adf7e15486e235c9dea83c5f02ba4da 100644 (file)
@@ -1449,6 +1449,18 @@ extern "C" {
       return F_okay;
     }
 
+    if (f_compare_dynamic(name, f_status_maximum_s) == F_equal_to) {
+      *code = F_maximum;
+
+      return F_okay;
+    }
+
+    if (f_compare_dynamic(name, f_status_maximum_not_s) == F_equal_to) {
+      *code = F_maximum_not;
+
+      return F_okay;
+    }
+
     if (f_compare_dynamic(name, f_status_maybe_s) == F_equal_to) {
       *code = F_maybe;
 
@@ -1497,6 +1509,18 @@ extern "C" {
       return F_okay;
     }
 
+    if (f_compare_dynamic(name, f_status_minimum_s) == F_equal_to) {
+      *code = F_minimum;
+
+      return F_okay;
+    }
+
+    if (f_compare_dynamic(name, f_status_minimum_not_s) == F_equal_to) {
+      *code = F_minimum_not;
+
+      return F_okay;
+    }
+
     if (f_compare_dynamic(name, f_status_minor_s) == F_equal_to) {
       *code = F_minor;
 
index ad0cd4074392484d0cadedfaae9591a177d6cd69..b9ed9d97bd3e203ae4eee353480d7c521f3d34d2 100644 (file)
@@ -284,6 +284,8 @@ void test__fl_status_string_from__works(void **state) {
     F_lock_write_not,
     F_loop,
     F_loop_not,
+    F_maximum,
+    F_maximum_not,
     F_maybe,
     F_maybe_not,
     F_memory,
@@ -292,6 +294,8 @@ void test__fl_status_string_from__works(void **state) {
     F_message_not,
     F_middle,
     F_middle_not,
+    F_minimum,
+    F_minimum_not,
     F_minor,
     F_minor_not,
     F_moderate,
@@ -933,6 +937,8 @@ void test__fl_status_string_from__works(void **state) {
     f_status_lock_write_not_s,
     f_status_loop_s,
     f_status_loop_not_s,
+    f_status_maximum_s,
+    f_status_maximum_not_s,
     f_status_maybe_s,
     f_status_maybe_not_s,
     f_status_memory_s,
@@ -941,6 +947,8 @@ void test__fl_status_string_from__works(void **state) {
     f_status_message_not_s,
     f_status_middle_s,
     f_status_middle_not_s,
+    f_status_minimum_s,
+    f_status_minimum_not_s,
     f_status_minor_s,
     f_status_minor_not_s,
     f_status_moderate_s,
@@ -1343,7 +1351,7 @@ void test__fl_status_string_from__works(void **state) {
     f_status_status_code_last_s,
   };
 
-  for (uint16_t i = 0; i < 642; ++i) {
+  for (uint16_t i = 0; i < 646; ++i) {
 
     f_status_t result = F_okay;