From: Kevin Day Date: Sun, 2 May 2021 23:36:48 +0000 (-0500) Subject: Feature: Add F_success and F_success_not status codes. X-Git-Tag: 0.5.4~67 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=76d07062026ae844fd6d69008d2bf9ecb9a1d084;p=fll Feature: Add F_success and F_success_not status codes. After some consideration I have decided to support the compliment of F_failure and F_failure_not. --- diff --git a/level_0/f_status/c/status.h b/level_0/f_status/c/status.h index 1f77a2c..f5b33a3 100644 --- a/level_0/f_status/c/status.h +++ b/level_0/f_status/c/status.h @@ -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, diff --git a/level_1/fl_status/c/status.c b/level_1/fl_status/c/status.c index 09e52fb..e35feff 100644 --- a/level_1/fl_status/c/status.c +++ b/level_1/fl_status/c/status.c @@ -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; diff --git a/level_1/fl_status/c/status.h b/level_1/fl_status/c/status.h index 55578a6..69839ff 100644 --- a/level_1/fl_status/c/status.h +++ b/level_1/fl_status/c/status.h @@ -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 diff --git a/level_2/fll_status/c/status.c b/level_2/fll_status/c/status.c index 5a8f874..ca38ce0 100644 --- a/level_2/fll_status/c/status.c +++ b/level_2/fll_status/c/status.c @@ -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;