From 54b5e8f1a9dd62f7717dbff255ffdc29698735c0 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 15 Dec 2020 22:14:34 -0600 Subject: [PATCH] Feature: add F_optional, F_optional_not, F_require, and F_require_not. --- level_0/f_status/c/status.h | 4 ++++ level_1/fl_status/c/status.c | 12 ++++++++++++ level_1/fl_status/c/status.h | 12 ++++++++++-- level_2/fll_status/c/status.c | 20 ++++++++++++++++++++ 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/level_0/f_status/c/status.h b/level_0/f_status/c/status.h index 4320da8..055413d 100644 --- a/level_0/f_status/c/status.h +++ b/level_0/f_status/c/status.h @@ -208,6 +208,8 @@ extern "C" { F_mount_not, F_name, F_name_not, + F_optional, + F_optional_not, F_output, F_output_not, F_parameter, @@ -231,6 +233,8 @@ extern "C" { F_recurse_not, F_relative, F_relative_not, + F_require, + F_require_not, F_resource, F_resource_not, F_search, diff --git a/level_1/fl_status/c/status.c b/level_1/fl_status/c/status.c index 195d670..3eb1a23 100644 --- a/level_1/fl_status/c/status.c +++ b/level_1/fl_status/c/status.c @@ -407,6 +407,12 @@ extern "C" { case F_name_not: *string = FL_status_string_name_not; break; + case F_optional: + *string = FL_status_string_optional; + break; + case F_optional_not: + *string = FL_status_string_optional_not; + break; case F_output: *string = FL_status_string_output; break; @@ -476,6 +482,12 @@ extern "C" { case F_relative_not: *string = FL_status_string_relative_not; break; + case F_require: + *string = FL_status_string_require; + break; + case F_require_not: + *string = FL_status_string_require_not; + break; case F_resource: *string = FL_status_string_resource; break; diff --git a/level_1/fl_status/c/status.h b/level_1/fl_status/c/status.h index 0c64a48..0f09466 100644 --- a/level_1/fl_status/c/status.h +++ b/level_1/fl_status/c/status.h @@ -227,6 +227,8 @@ extern "C" { #define FL_status_string_mount_not "F_mount_not" #define FL_status_string_name "F_name" #define FL_status_string_name_not "F_name_not" + #define FL_status_string_optional "F_optional" + #define FL_status_string_optional_not "F_optional_not" #define FL_status_string_output "F_output" #define FL_status_string_output_not "F_output_not" #define FL_status_string_parameter "F_parameter" @@ -244,12 +246,14 @@ extern "C" { #define FL_status_string_read "F_read" #define FL_status_string_read_not "F_read_not" #define FL_status_string_read_only "F_read_only" - #define FL_status_string_ready "F_ready" - #define FL_status_string_ready_not "F_ready_not" + #define FL_status_string_ready "F_ready" + #define FL_status_string_ready_not "F_ready_not" #define FL_status_string_recurse "F_recurse" #define FL_status_string_recurse_not "F_recurse_not" #define FL_status_string_relative "F_relative" #define FL_status_string_relative_not "F_relative_not" + #define FL_status_string_require "F_require" + #define FL_status_string_require_not "F_require_not" #define FL_status_string_resource "F_resource" #define FL_status_string_resource_not "F_resource_not" #define FL_status_string_search "F_search" @@ -346,6 +350,8 @@ extern "C" { #define FL_status_string_mount_not_length 11 #define FL_status_string_name_length 6 #define FL_status_string_name_not_length 10 + #define FL_status_string_optional_length 10 + #define FL_status_string_optional_not_length 14 #define FL_status_string_output_length 8 #define FL_status_string_output_not_length 12 #define FL_status_string_parameter_length 11 @@ -369,6 +375,8 @@ extern "C" { #define FL_status_string_recurse_not_length 13 #define FL_status_string_relative_length 10 #define FL_status_string_relative_not_length 14 + #define FL_status_string_require_length 9 + #define FL_status_string_require_not_length 13 #define FL_status_string_resource_length 10 #define FL_status_string_resource_not_length 14 #define FL_status_string_search_length 8 diff --git a/level_2/fll_status/c/status.c b/level_2/fll_status/c/status.c index a539418..f2c459f 100644 --- a/level_2/fll_status/c/status.c +++ b/level_2/fll_status/c/status.c @@ -681,6 +681,16 @@ extern "C" { return F_none; } + if (fl_string_compare(string, FL_status_string_optional, length, FL_status_string_optional_length) == F_equal_to) { + *code = F_optional; + return F_none; + } + + if (fl_string_compare(string, FL_status_string_optional_not, length, FL_status_string_optional_not_length) == F_equal_to) { + *code = F_optional_not; + return F_none; + } + if (fl_string_compare(string, FL_status_string_output, length, FL_status_string_output_length) == F_equal_to) { *code = F_output; return F_none; @@ -796,6 +806,16 @@ extern "C" { return F_none; } + if (fl_string_compare(string, FL_status_string_require, length, FL_status_string_require_length) == F_equal_to) { + *code = F_require; + return F_none; + } + + if (fl_string_compare(string, FL_status_string_require_not, length, FL_status_string_require_not_length) == F_equal_to) { + *code = F_require_not; + return F_none; + } + if (fl_string_compare(string, FL_status_string_resource, length, FL_status_string_resource_length) == F_equal_to) { *code = F_resource; return F_none; -- 1.8.3.1