]> 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 1f77a2c3672c6fcdca87ab4e5a441dc92e82faaa..f5b33a3075ffa622f230b807d7c98b27c927bd67 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 09e52fb17ea4f2f2a057af1becd4439048ba112c..e35feffe5f82ba88cb183bb4b2c5d129e6b83abb 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 55578a63aed98a119dd0e00214852404632f0fca..69839ff8c77e5281a382fd857725b4fd2e313da3 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 5a8f8743c9838e44a4556c4a4a32991ca6f67105..ca38ce0111aa870619410f9f1332a5a3976144e1 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;