]> Kevux Git Server - fll/commitdiff
Feature: Add F_success and F_success_not status codes.
authorKevin Day <thekevinday@gmail.com>
Sun, 2 May 2021 23:36:48 +0000 (18:36 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 2 May 2021 23:36:48 +0000 (18:36 -0500)
After some consideration I have decided to support the compliment of F_failure and F_failure_not.

level_0/f_status/c/status.h
level_1/fl_status/c/status.c
level_1/fl_status/c/status.h
level_2/fll_status/c/status.c

index 1f77a2c..f5b33a3 100644 (file)
@@ -289,6 +289,8 @@ extern "C" {
       F_string_not,
       F_string_too_large,
       F_string_too_small,
+      F_success,
+      F_success_not,
       F_supported,
       F_supported_not,
       F_syntax,
index 09e52fb..e35feff 100644 (file)
@@ -669,6 +669,12 @@ extern "C" {
         case F_known_not:
           *string = FL_status_string_known_not;
           break;
+        case F_success:
+          *string = FL_status_string_success;
+          break;
+        case F_success_not:
+          *string = FL_status_string_success_not;
+          break;
         case F_supported:
           *string = FL_status_string_supported;
           break;
index 55578a6..69839ff 100644 (file)
@@ -315,6 +315,8 @@ extern "C" {
     #define FL_status_string_thread_not        "F_thread_not"
     #define FL_status_string_time              "F_time"
     #define FL_status_string_time_not          "F_time_not"
+    #define FL_status_string_success           "F_success"
+    #define FL_status_string_success_not       "F_success_not"
     #define FL_status_string_supported         "F_supported"
     #define FL_status_string_supported_not     "F_supported_not"
     #define FL_status_string_user              "F_user"
@@ -480,6 +482,8 @@ extern "C" {
     #define FL_status_string_string_not_length        12
     #define FL_status_string_string_too_large_length  18
     #define FL_status_string_string_too_small_length  18
+    #define FL_status_string_success_length           9
+    #define FL_status_string_success_not_length       13
     #define FL_status_string_supported_length         11
     #define FL_status_string_supported_not_length     15
     #define FL_status_string_syntax_length            8
index 5a8f874..ca38ce0 100644 (file)
@@ -1297,6 +1297,18 @@ extern "C" {
         return F_none;
       }
 
+      if (fl_string_compare(string, FL_status_string_success, length, FL_status_string_success_length) == F_equal_to) {
+        *code = F_success;
+
+        return F_none;
+      }
+
+      if (fl_string_compare(string, FL_status_string_success_not, length, FL_status_string_success_not_length) == F_equal_to) {
+        *code = F_success_not;
+
+        return F_none;
+      }
+
       if (fl_string_compare(string, FL_status_string_supported, length, FL_status_string_supported_length) == F_equal_to) {
         *code = F_supported;