]> Kevux Git Server - fll/commitdiff
Update: Relocate fll_status_string to fl_status_string, fix failing tests, and update...
authorKevin Day <kevin@kevux.org>
Fri, 31 Mar 2023 22:57:17 +0000 (17:57 -0500)
committerKevin Day <kevin@kevux.org>
Sat, 1 Apr 2023 01:34:36 +0000 (20:34 -0500)
Now the f_compare exists the fll_status_string only depends on level 0 projects.
This can now be moved from a level 2 project into a level 1 project.

The fll_fss_status_code can now call fl_status_code.

38 files changed:
build/disable/level_2/fll_status_string.h
build/level_1/settings
build/level_2/settings
build/monolithic/settings
build/scripts/bootstrap-example.sh
build/scripts/test.sh
level_1/fl_status_string/c/status_string.c [moved from level_2/fll_status_string/c/status_string.c with 98% similarity]
level_1/fl_status_string/c/status_string.h [moved from level_2/fll_status_string/c/status_string.h with 80% similarity]
level_1/fl_status_string/data/build/defines [moved from level_2/fll_status_string/data/build/defines with 100% similarity]
level_1/fl_status_string/data/build/dependencies [moved from level_2/fll_status_string/data/build/dependencies with 100% similarity]
level_1/fl_status_string/data/build/dependencies-tests [moved from level_2/fll_status_string/data/build/dependencies-tests with 100% similarity]
level_1/fl_status_string/data/build/fakefile [moved from level_2/fll_status_string/data/build/fakefile with 100% similarity]
level_1/fl_status_string/data/build/settings [moved from level_2/fll_status_string/data/build/settings with 96% similarity]
level_1/fl_status_string/data/build/settings-tests [moved from level_2/fll_status_string/data/build/settings-tests with 92% similarity]
level_1/fl_status_string/data/build/testfile [moved from level_2/fll_status_string/data/build/testfile with 100% similarity]
level_1/fl_status_string/tests/unit/c/test-status_string-from.c [moved from level_2/fll_status_string/tests/unit/c/test-status_string-from.c with 94% similarity]
level_1/fl_status_string/tests/unit/c/test-status_string-from.h [new file with mode: 0644]
level_1/fl_status_string/tests/unit/c/test-status_string.c [moved from level_2/fll_status_string/tests/unit/c/test-status_string.c with 62% similarity]
level_1/fl_status_string/tests/unit/c/test-status_string.h [moved from level_2/fll_status_string/tests/unit/c/test-status_string.h with 83% similarity]
level_2/fll_fss_status_string/c/fss_status_string.c
level_2/fll_fss_status_string/c/fss_status_string.h
level_2/fll_fss_status_string/data/build/dependencies
level_2/fll_fss_status_string/data/build/settings
level_2/fll_status_string/tests/unit/c/test-status_string-from.h [deleted file]
level_3/control/c/control.h
level_3/control/c/private-control.c
level_3/control/c/private-control.h
level_3/control/data/build/settings
level_3/controller/c/controller.h
level_3/status_code/c/main/common/type.h
level_3/status_code/c/main/main.c
level_3/status_code/c/main/process.h
level_3/status_code/c/main/status_code.h
level_3/status_code/data/build/dependencies
level_3/status_code/data/build/dependencies.fss
level_3/status_code/data/build/settings
level_3/status_code/data/build/settings.fss
level_3/status_code/data/build/settings.main

index 75805963e6cae8ca66058d5e9499148a9f94e922..371f7fdd2f57e0c20ba520c8f38466d1d7d3a6f8 100644 (file)
@@ -1,4 +1,4 @@
-#define _di_fll_status_string_from_
+#define _di_fl_status_string_from_
 #define _di_f_status_access_s_
 #define _di_f_status_array_s_
 #define _di_f_status_available_s_
index 9e99410179280f654eb732bf0824c2df2a4ee4aa..d61f45b72549c3731add4353ad73321520ee38fd 100644 (file)
@@ -30,6 +30,7 @@ build_sources_library iki.c
 build_sources_library path.c
 build_sources_library print.c private-print.c print/common.c
 build_sources_library signal.c
+build_sources_library status_string.c
 build_sources_library utf_file.c private-utf_file.c
 
 build_sources_headers control_group.h
@@ -42,6 +43,7 @@ build_sources_headers iki.h
 build_sources_headers path.h
 build_sources_headers print.h print/common.h
 build_sources_headers signal.h signal/common.h
+build_sources_headers status_string.h
 build_sources_headers utf_file.h
 
 build_script yes
index 08692211844ff30cd6be49d31e5cf707ddd8bbc6..606cb6b9e682a840c4f085f91d9b33ce3187edb2 100644 (file)
@@ -30,7 +30,6 @@ build_sources_library fss_status_string.c
 build_sources_library iki.c private-iki.c
 build_sources_library print.c
 build_sources_library program.c program/common.c program/print.c private-program.c
-build_sources_library status_string.c
 
 build_sources_headers control_group.h
 build_sources_headers error.h error/common.h
@@ -41,7 +40,6 @@ build_sources_headers fss_status_string.h
 build_sources_headers iki.h
 build_sources_headers print.h
 build_sources_headers program.h program/common.h program/print.h
-build_sources_headers status_string.h
 
 build_script yes
 build_shared yes
index 59671b50487d06c3c1eb8646c892c19ac4e8ab7b..25aff4a1f5e1822899e1f63fe44bfe75a30381bb 100644 (file)
@@ -73,6 +73,7 @@ build_sources_library level_1/iki.c
 build_sources_library level_1/path.c
 build_sources_library level_1/print.c level_1/private-print.c level_1/print/common.c
 build_sources_library level_1/signal.c
+build_sources_library level_1/status_string.c
 build_sources_library level_1/utf_file.c level_1/private-utf_file.c
 
 build_sources_library level_2/control_group.c
@@ -84,7 +85,6 @@ build_sources_library level_2/fss_status_string.c
 build_sources_library level_2/iki.c level_2/private-iki.c
 build_sources_library level_2/print.c
 build_sources_library level_2/program.c level_2/program/common.c level_2/program/print.c level_2/private-program.c
-build_sources_library level_2/status_string.c
 
 build_sources_library-monolithic level_0/thread.c level_0/private-thread.c level_0/thread/attribute.c level_0/thread/barrier.c level_0/thread/barrier_attribute.c level_0/thread/condition.c level_0/thread/condition_attribute.c level_0/thread/id.c level_0/thread/key.c level_0/thread/lock.c level_0/thread/lock_attribute.c level_0/thread/mutex.c level_0/thread/mutex_attribute.c level_0/thread/once.c level_0/thread/semaphore.c level_0/thread/set.c level_0/thread/spin.c
 
@@ -136,6 +136,7 @@ build_sources_headers level_1/iki.h
 build_sources_headers level_1/path.h
 build_sources_headers level_1/print.h level_1/print/common.h
 build_sources_headers level_1/signal.h level_1/signal/common.h
+build_sources_headers level_1/status_string.h
 build_sources_headers level_1/utf_file.h
 
 build_sources_headers level_2/control_group.h
@@ -147,7 +148,6 @@ build_sources_headers level_2/fss_status_string.h
 build_sources_headers level_2/iki.h
 build_sources_headers level_2/print.h
 build_sources_headers level_2/program.h level_2/program/common.h level_2/program/print.h
-build_sources_headers level_2/status_string.h
 
 build_sources_headers-monolithic level_0/thread.h level_0/thread/attribute.h level_0/thread/barrier.h level_0/thread/barrier_attribute.h level_0/thread/condition.h level_0/thread/condition_attribute.h level_0/thread/id.h level_0/thread/key.h level_0/thread/lock.h level_0/thread/lock_attribute.h level_0/thread/mutex.h level_0/thread/mutex_attribute.h level_0/thread/once.h level_0/thread/semaphore.h level_0/thread/set.h level_0/thread/spin.h
 
index 65c85186a6433f95d6f57488ae6cdf318adbca8b..8e1703b91400955a8274b483e1d2cf180bc3be44 100644 (file)
@@ -125,7 +125,7 @@ if [[ $1 == "individual" ]] ; then
   $shell_command build/scripts/package.sh $verbose $color rebuild -i
 
   if [[ $? -eq 0 ]] ; then
-    for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_parse f_path f_pipe f_print f_rip f_status_string f_serialize f_signal f_socket f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_signal fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program fll_status_string ; do
+    for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_parse f_path f_pipe f_print f_rip f_status_string f_serialize f_signal f_socket f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_signal fl_status_string fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program ; do
       echo && echo "Processing $i." &&
 
       cd package/individual/$i-$version/ &&
index 8f38cb4d8872592517ad1cd785b1dd432ec96b8c..b24e799a8c0f95d2c5ef6701e3d96c2990e79711 100644 (file)
@@ -67,7 +67,7 @@ test_main() {
   local verbose=
   local verbose_common=
 
-  local projects="f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_parse f_path f_pipe f_print f_rip f_serialize f_signal f_socket f_status_string f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_signal fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program fll_status_string"
+  local projects="f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_parse f_path f_pipe f_print f_rip f_serialize f_signal f_socket f_status_string f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_signal fl_status_string fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program"
   local projects_no_tests="f_type"
 
   if [[ $# -gt 0 ]] ; then
similarity index 98%
rename from level_2/fll_status_string/c/status_string.c
rename to level_1/fl_status_string/c/status_string.c
index 56f6f32e1c994daf7ff4c2a63d7d8583ec42b3e9..185626f44bc0838661fdf4d04b82fd9d928a0886 100644 (file)
@@ -4,26 +4,19 @@
 extern "C" {
 #endif
 
-#ifndef _di_fll_status_string_from_
-  f_status_t fll_status_string_from(const f_string_static_t name, f_status_t * const code) {
+#ifndef _di_fl_status_string_from_
+  f_status_t fl_status_string_from(const f_string_static_t name, f_status_t * const code) {
     #ifndef _di_level_2_parameter_checking_
       if (!code) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = F_none;
 
-    if (!name.used) {
-      return F_data_not;
-    }
+    if (!name.used) return F_data_not;
 
     // Numbers are not valid status code strings.
-    if ((status = f_conversion_character_is_decimal(name.string[0])) == F_true) {
-      return F_status_set_error(F_data);
-    }
-
-    if (F_status_is_error(status)) {
-      return status;
-    }
+    if ((status = f_conversion_character_is_decimal(name.string[0])) == F_true) return F_status_set_error(F_data);
+    if (F_status_is_error(status)) return status;
 
     #ifndef _di_f_status_boolean_s_
       if (f_compare_dynamic(name, f_status_false_s) == F_equal_to) {
@@ -1482,6 +1475,18 @@ extern "C" {
         return F_none;
       }
 
+      if (f_compare_dynamic(name, f_status_okay_s) == F_equal_to) {
+        *code = F_okay;
+
+        return F_none;
+      }
+
+      if (f_compare_dynamic(name, f_status_okay_not_s) == F_equal_to) {
+        *code = F_okay_not;
+
+        return F_none;
+      }
+
       if (f_compare_dynamic(name, f_status_once_s) == F_equal_to) {
         *code = F_once;
 
@@ -2768,6 +2773,12 @@ extern "C" {
         return F_none;
       }
 
+      if (f_compare_dynamic(name, f_status_complete_not_utf_start_s) == F_equal_to) {
+        *code = F_complete_not_utf_start;
+
+        return F_none;
+      }
+
       if (f_compare_dynamic(name, f_status_complete_not_utf_stop_s) == F_equal_to) {
         *code = F_complete_not_utf_stop;
 
@@ -2804,6 +2815,12 @@ extern "C" {
         return F_none;
       }
 
+      if (f_compare_dynamic(name, f_status_none_start_s) == F_equal_to) {
+        *code = F_none_start;
+
+        return F_none;
+      }
+
       if (f_compare_dynamic(name, f_status_none_stop_s) == F_equal_to) {
         *code = F_none_stop;
 
@@ -2852,6 +2869,12 @@ extern "C" {
         return F_none;
       }
 
+      if (f_compare_dynamic(name, f_status_data_not_start_s) == F_equal_to) {
+        *code = F_data_not_start;
+
+        return F_none;
+      }
+
       if (f_compare_dynamic(name, f_status_data_not_stop_s) == F_equal_to) {
         *code = F_data_not_stop;
 
@@ -2938,6 +2961,12 @@ extern "C" {
         return F_none;
       }
 
+      if (f_compare_dynamic(name, f_status_end_not_group_start_s) == F_equal_to) {
+        *code = F_end_not_group_start;
+
+        return F_none;
+      }
+
       if (f_compare_dynamic(name, f_status_end_not_group_stop_s) == F_equal_to) {
         *code = F_end_not_group_stop;
 
@@ -2980,12 +3009,24 @@ extern "C" {
         return F_none;
       }
 
+      if (f_compare_dynamic(name, f_status_end_not_nest_start_s) == F_equal_to) {
+        *code = F_end_not_nest_start;
+
+        return F_none;
+      }
+
       if (f_compare_dynamic(name, f_status_end_not_nest_stop_s) == F_equal_to) {
         *code = F_end_not_nest_stop;
 
         return F_none;
       }
 
+      if (f_compare_dynamic(name, f_status_end_not_start_s) == F_equal_to) {
+        *code = F_end_not_start;
+
+        return F_none;
+      }
+
       if (f_compare_dynamic(name, f_status_end_not_stop_s) == F_equal_to) {
         *code = F_end_not_stop;
 
@@ -3701,7 +3742,7 @@ extern "C" {
 
     return F_status_set_error(F_data);
   }
-#endif // _di_fll_status_string_from_
+#endif // _di_fl_status_string_from_
 
 #ifdef __cplusplus
 } // extern "C"
similarity index 80%
rename from level_2/fll_status_string/c/status_string.h
rename to level_1/fl_status_string/c/status_string.h
index 87a3c1be55be00a96b1b954302024285a6996cad..ba9f50e48424ee0ffa7fb7d701d4fc77471515b6 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * FLL - Level 2
+ * FLL - Level 1
  *
  * Project: Status
  * API Version: 0.7
@@ -7,8 +7,8 @@
  *
  * Provides status code functions, such as those that translate status codes into strings.
  */
-#ifndef _FLL_status_string_h
-#define _FLL_status_string_h
+#ifndef _FL_status_string_h
+#define _FL_status_string_h
 
 // FLL-0 includes.
 #include <fll/level_0/type.h>
@@ -46,12 +46,12 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_conversion_character_is_decimal().
  */
-#ifndef _di_fll_status_string_from_
-  extern f_status_t fll_status_string_from(const f_string_static_t name, f_status_t * const code);
-#endif // _di_fll_status_string_to_
+#ifndef _di_fl_status_string_from_
+  extern f_status_t fl_status_string_from(const f_string_static_t name, f_status_t * const code);
+#endif // _di_fl_status_string_to_
 
 #ifdef __cplusplus
 } // extern "C"
 #endif
 
-#endif // _FLL_status_string_h
+#endif // _FL_status_string_h
similarity index 96%
rename from level_2/fll_status_string/data/build/settings
rename to level_1/fl_status_string/data/build/settings
index a912a718a4c7a67001386e3fb87cf3806c0fe39f..d5852348e1093524ba07791e51ae72696f41fc48 100644 (file)
@@ -1,6 +1,6 @@
 # fss-0001
 
-build_name fll_status_string
+build_name fl_status_string
 
 version_major 0
 version_minor 7
@@ -28,7 +28,7 @@ build_script yes
 build_shared yes
 build_static no
 
-path_headers fll/level_2
+path_headers fll/level_1
 path_library_script script
 path_library_shared shared
 path_library_static static
similarity index 92%
rename from level_2/fll_status_string/data/build/settings-tests
rename to level_1/fl_status_string/data/build/settings-tests
index b2b01205f85b3a619bff82460dfc548ae6c31297..297dd1e7d3f8d1cd8117c06248258606feff61d0 100644 (file)
@@ -5,7 +5,7 @@
 # Memory leaks in the test program can be checked for by running valgrind with this executable.
 #
 
-build_name test-fll_status_string
+build_name test-fl_status_string
 
 version_major 0
 version_minor 7
@@ -23,7 +23,7 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc -lcmocka
-build_libraries-individual -lf_compare -lf_conversion -lf_memory -lf_parse -lf_status_string -lf_string -lf_utf -lfll_status_string
+build_libraries-individual -lf_compare -lf_conversion -lf_memory -lf_parse -lf_status_string -lf_string -lf_utf -lfl_status_string
 
 build_sources_program test-status_string-from.c
 build_sources_program test-status_string.c
similarity index 94%
rename from level_2/fll_status_string/tests/unit/c/test-status_string-from.c
rename to level_1/fl_status_string/tests/unit/c/test-status_string-from.c
index 6607be48b867c4b74ae64d203efd1ea813fadb1a..976a91de9d14d293e0d5ed302fa448795f417bf1 100644 (file)
@@ -5,7 +5,7 @@
 extern "C" {
 #endif
 
-void test__fll_status_string_from__fails(void **state) {
+void test__fl_status_string_from__fails(void **state) {
 
   f_string_static_t invalids[] = {
     macro_f_string_static_t_initialize("X&87-", 0, 5),
@@ -17,33 +17,33 @@ void test__fll_status_string_from__fails(void **state) {
 
     f_status_t result = F_none;
 
-    const f_status_t status = fll_status_string_from(invalids[i], &result);
+    const f_status_t status = fl_status_string_from(invalids[i], &result);
 
     assert_int_equal(status, F_status_set_error(F_data));
   } // for
 }
 
-void test__fll_status_string_from__parameter_checking(void **state) {
+void test__fl_status_string_from__parameter_checking(void **state) {
 
   {
-    const f_status_t status = fll_status_string_from(f_string_empty_s, 0);
+    const f_status_t status = fl_status_string_from(f_string_empty_s, 0);
 
     assert_int_equal(F_status_set_fine(status), F_parameter);
   }
 }
 
-void test__fll_status_string_from__returns_data_not(void **state) {
+void test__fl_status_string_from__returns_data_not(void **state) {
 
   {
     f_status_t result = F_none;
 
-    const f_status_t status = fll_status_string_from(f_string_empty_s, &result);
+    const f_status_t status = fl_status_string_from(f_string_empty_s, &result);
 
     assert_int_equal(status, F_data_not);
   }
 }
 
-void test__fll_status_string_from__works(void **state) {
+void test__fl_status_string_from__works(void **state) {
 
   const f_status_t statuss[] = {
     F_false,
@@ -123,12 +123,16 @@ void test__fll_status_string_from__works(void **state) {
     F_ascii_not,
     F_atomic,
     F_atomic_not,
+    F_base,
+    F_base_not,
     F_begin,
     F_begin_not,
     F_block,
     F_block_not,
     F_body,
     F_body_not,
+    F_bottom,
+    F_bottom_not,
     F_bound,
     F_bound_not,
     F_break,
@@ -137,6 +141,8 @@ void test__fll_status_string_from__works(void **state) {
     F_call_not,
     F_capability,
     F_capability_not,
+    F_character,
+    F_character_not,
     F_child,
     F_child_not,
     F_complete,
@@ -207,6 +213,8 @@ void test__fll_status_string_from__works(void **state) {
     F_failure_not,
     F_family,
     F_family_not,
+    F_fifo,
+    F_fifo_not,
     F_first,
     F_first_not,
     F_footer,
@@ -260,6 +268,8 @@ void test__fll_status_string_from__works(void **state) {
     F_memory_not,
     F_message,
     F_message_not,
+    F_middle,
+    F_middle_not,
     F_minor,
     F_minor_not,
     F_moderate,
@@ -323,6 +333,8 @@ void test__fll_status_string_from__works(void **state) {
     F_recover_not,
     F_recurse,
     F_recurse_not,
+    F_regular,
+    F_regular_not,
     F_relative,
     F_relative_not,
     F_remote,
@@ -369,7 +381,7 @@ void test__fll_status_string_from__works(void **state) {
     F_string_too_small,
     F_success,
     F_success_not,
-    F_supported,
+    F_support,
     F_support_not,
     F_syntax,
     F_syntax_not,
@@ -382,6 +394,8 @@ void test__fll_status_string_from__works(void **state) {
     F_time_out,
     F_too_large,
     F_too_small,
+    F_top,
+    F_top_not,
     F_type,
     F_type_not,
     F_user,
@@ -488,12 +502,14 @@ void test__fll_status_string_from__works(void **state) {
     F_complete_not_utf_eof,
     F_complete_not_utf_eol,
     F_complete_not_utf_eos,
+    F_complete_not_utf_start,
     F_complete_not_utf_stop,
     F_none_block,
     F_none_eoa,
     F_none_eof,
     F_none_eol,
     F_none_eos,
+    F_none_start,
     F_none_stop,
     F_data,
     F_data_not,
@@ -502,6 +518,7 @@ void test__fll_status_string_from__works(void **state) {
     F_data_not_eof,
     F_data_not_eol,
     F_data_not_eos,
+    F_data_not_start,
     F_data_not_stop,
     F_end,
     F_end_not,
@@ -516,6 +533,7 @@ void test__fll_status_string_from__works(void **state) {
     F_end_not_group_eof,
     F_end_not_group_eol,
     F_end_not_group_eos,
+    F_end_not_group_start,
     F_end_not_group_stop,
     F_end_not_nest,
     F_end_not_nest_block,
@@ -523,7 +541,9 @@ void test__fll_status_string_from__works(void **state) {
     F_end_not_nest_eof,
     F_end_not_nest_eol,
     F_end_not_nest_eos,
+    F_end_not_nest_start,
     F_end_not_nest_stop,
+    F_end_not_start,
     F_end_not_stop,
     F_process,
     F_process_not,
@@ -590,7 +610,7 @@ void test__fll_status_string_from__works(void **state) {
     F_directory_purge,
     F_directory_read,
     F_directory_stream,
-    F_directory_supported_not,
+    F_directory_support_not,
     F_directory_synchronize,
     F_directory_utf,
     F_directory_utf_not,
@@ -717,12 +737,16 @@ void test__fll_status_string_from__works(void **state) {
     f_status_ascii_not_s,
     f_status_atomic_s,
     f_status_atomic_not_s,
+    f_status_base_s,
+    f_status_base_not_s,
     f_status_begin_s,
     f_status_begin_not_s,
     f_status_block_s,
     f_status_block_not_s,
     f_status_body_s,
     f_status_body_not_s,
+    f_status_bottom_s,
+    f_status_bottom_not_s,
     f_status_bound_s,
     f_status_bound_not_s,
     f_status_break_s,
@@ -731,6 +755,8 @@ void test__fll_status_string_from__works(void **state) {
     f_status_call_not_s,
     f_status_capability_s,
     f_status_capability_not_s,
+    f_status_character_s,
+    f_status_character_not_s,
     f_status_child_s,
     f_status_child_not_s,
     f_status_complete_s,
@@ -801,6 +827,8 @@ void test__fll_status_string_from__works(void **state) {
     f_status_failure_not_s,
     f_status_family_s,
     f_status_family_not_s,
+    f_status_fifo_s,
+    f_status_fifo_not_s,
     f_status_first_s,
     f_status_first_not_s,
     f_status_footer_s,
@@ -854,6 +882,8 @@ void test__fll_status_string_from__works(void **state) {
     f_status_memory_not_s,
     f_status_message_s,
     f_status_message_not_s,
+    f_status_middle_s,
+    f_status_middle_not_s,
     f_status_minor_s,
     f_status_minor_not_s,
     f_status_moderate_s,
@@ -917,6 +947,8 @@ void test__fll_status_string_from__works(void **state) {
     f_status_recover_not_s,
     f_status_recurse_s,
     f_status_recurse_not_s,
+    f_status_regular_s,
+    f_status_regular_not_s,
     f_status_relative_s,
     f_status_relative_not_s,
     f_status_remote_s,
@@ -963,8 +995,8 @@ void test__fll_status_string_from__works(void **state) {
     f_status_string_too_small_s,
     f_status_success_s,
     f_status_success_not_s,
-    f_status_supported_s,
-    f_status_supported_not_s,
+    f_status_support_s,
+    f_status_support_not_s,
     f_status_syntax_s,
     f_status_syntax_not_s,
     f_status_terminate_s,
@@ -976,6 +1008,8 @@ void test__fll_status_string_from__works(void **state) {
     f_status_time_out_s,
     f_status_too_large_s,
     f_status_too_small_s,
+    f_status_top_s,
+    f_status_top_not_s,
     f_status_type_s,
     f_status_type_not_s,
     f_status_user_s,
@@ -1082,12 +1116,14 @@ void test__fll_status_string_from__works(void **state) {
     f_status_complete_not_utf_eof_s,
     f_status_complete_not_utf_eol_s,
     f_status_complete_not_utf_eos_s,
+    f_status_complete_not_utf_start_s,
     f_status_complete_not_utf_stop_s,
     f_status_none_block_s,
     f_status_none_eoa_s,
     f_status_none_eof_s,
     f_status_none_eol_s,
     f_status_none_eos_s,
+    f_status_none_start_s,
     f_status_none_stop_s,
     f_status_data_s,
     f_status_data_not_s,
@@ -1096,6 +1132,7 @@ void test__fll_status_string_from__works(void **state) {
     f_status_data_not_eof_s,
     f_status_data_not_eol_s,
     f_status_data_not_eos_s,
+    f_status_data_not_start_s,
     f_status_data_not_stop_s,
     f_status_end_s,
     f_status_end_not_s,
@@ -1110,6 +1147,7 @@ void test__fll_status_string_from__works(void **state) {
     f_status_end_not_group_eof_s,
     f_status_end_not_group_eol_s,
     f_status_end_not_group_eos_s,
+    f_status_end_not_group_start_s,
     f_status_end_not_group_stop_s,
     f_status_end_not_nest_s,
     f_status_end_not_nest_block_s,
@@ -1117,7 +1155,9 @@ void test__fll_status_string_from__works(void **state) {
     f_status_end_not_nest_eof_s,
     f_status_end_not_nest_eol_s,
     f_status_end_not_nest_eos_s,
+    f_status_end_not_nest_start_s,
     f_status_end_not_nest_stop_s,
+    f_status_end_not_start_s,
     f_status_end_not_stop_s,
     f_status_process_s,
     f_status_process_not_s,
@@ -1184,7 +1224,7 @@ void test__fll_status_string_from__works(void **state) {
     f_status_directory_purge_s,
     f_status_directory_read_s,
     f_status_directory_stream_s,
-    f_status_directory_supported_not_s,
+    f_status_directory_support_not_s,
     f_status_directory_synchronize_s,
     f_status_directory_utf_s,
     f_status_directory_utf_not_s,
@@ -1233,11 +1273,11 @@ void test__fll_status_string_from__works(void **state) {
     f_status_status_code_last_s,
   };
 
-  for (uint16_t i = 0; i < 591; ++i) {
+  for (uint16_t i = 0; i < 611; ++i) {
 
     f_status_t result = F_none;
 
-    const f_status_t status = fll_status_string_from(status_strings[i], &result);
+    const f_status_t status = fl_status_string_from(status_strings[i], &result);
 
     assert_int_equal(status, F_none);
     assert_int_equal(result, statuss[i]);
diff --git a/level_1/fl_status_string/tests/unit/c/test-status_string-from.h b/level_1/fl_status_string/tests/unit/c/test-status_string-from.h
new file mode 100644 (file)
index 0000000..4574f7e
--- /dev/null
@@ -0,0 +1,41 @@
+/**
+ * FLL - Level 1
+ *
+ * Project: Status
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the status_string project.
+ */
+#ifndef _TEST__FL_status_string_from_h
+#define _TEST__FL_status_string_from_h
+
+/**
+ * Test that function fails.
+ *
+ * @see fl_status_string_from()
+ */
+extern void test__fl_status_string_from__fails(void **state);
+
+/**
+ * Test that parameter checking works as expected.
+ *
+ * @see fl_status_string_from()
+ */
+extern void test__fl_status_string_from__parameter_checking(void **state);
+
+/**
+ * Test that function returns F_data_not.
+ *
+ * @see fl_status_string_from()
+ */
+extern void test__fl_status_string_from__returns_data_not(void **state);
+
+/**
+ * Test that function works.
+ *
+ * @see fl_status_string_from()
+ */
+extern void test__fl_status_string_from__works(void **state);
+
+#endif // _TEST__FL_status_string_from_h
similarity index 62%
rename from level_2/fll_status_string/tests/unit/c/test-status_string.c
rename to level_1/fl_status_string/tests/unit/c/test-status_string.c
index c92ea1f1f376076a0437eb269a7cab88d4cd6db8..c1fdf2b5c0cdf38a07131a82b9e73a4abe70456b 100644 (file)
@@ -20,12 +20,12 @@ int main(void) {
 
   const struct CMUnitTest tests[] = {
 
-    cmocka_unit_test(test__fll_status_string_from__fails),
-    cmocka_unit_test(test__fll_status_string_from__returns_data_not),
-    cmocka_unit_test(test__fll_status_string_from__works),
+    cmocka_unit_test(test__fl_status_string_from__fails),
+    cmocka_unit_test(test__fl_status_string_from__returns_data_not),
+    cmocka_unit_test(test__fl_status_string_from__works),
 
     #ifndef _di_level_0_parameter_checking_
-      cmocka_unit_test(test__fll_status_string_from__parameter_checking),
+      cmocka_unit_test(test__fl_status_string_from__parameter_checking),
     #endif // _di_level_0_parameter_checking_
   };
 
similarity index 83%
rename from level_2/fll_status_string/tests/unit/c/test-status_string.h
rename to level_1/fl_status_string/tests/unit/c/test-status_string.h
index a46716d38fad3fb6ba844912d86f436ac0a4448b..69a7005f9032c2aa4ceaed469a3de6b9a82eab0a 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * FLL - Level 2
+ * FLL - Level 1
  *
  * Project: Status
  * API Version: 0.7
@@ -7,8 +7,8 @@
  *
  * Test the status_string project.
  */
-#ifndef _TEST__FLL_status_string_h
-#define _TEST__FLL_status_string_h
+#ifndef _TEST__FL_status_string_h
+#define _TEST__FL_status_string_h
 
 // Libc includes.
 #include <stdarg.h>
@@ -19,8 +19,8 @@
 // cmocka includes.
 #include <cmocka.h>
 
-// FLL-2 includes.
-#include <fll/level_2/status_string.h>
+// FLL-1 includes.
+#include <fll/level_1/status_string.h>
 
 // Mock includes.
 
@@ -68,4 +68,4 @@ extern int main(void);
 } // extern "C"
 #endif
 
-#endif // _TEST__FLL_status_string_h
+#endif // _TEST__FL_status_string_h
index d882ff3bec7c55b9a74690791340094575bfac4d..1613fe8d597f4c4a49271e481d228e499315c21e 100644 (file)
@@ -39,20 +39,13 @@ extern "C" {
 
     f_status_t status = F_none;
 
-    if (!name.used) {
-      return F_data_not;
-    }
+    if (!name.used) return F_data_not;
 
     // Numbers are not valid status code strings.
     status = f_conversion_character_is_decimal(name.string[0]);
 
-    if (status == F_true) {
-      return F_status_set_error(F_data);
-    }
-
-    if (F_status_is_error(status)) {
-      return status;
-    }
+    if (status == F_true) return F_status_set_error(F_data);
+    if (F_status_is_error(status)) return status;
 
     #ifndef _di_fll_fss_status_error_
       if (f_compare_dynamic(name, fll_fss_status_format_s) == F_equal_to) {
@@ -134,7 +127,7 @@ extern "C" {
       return F_none;
     }
 
-    return F_status_set_error(F_data);
+    return fl_status_string_from(name, code);
   }
 #endif // _di_fll_fss_status_string_from_
 
@@ -209,7 +202,7 @@ extern "C" {
 
     return F_none;
   }
-#endif // _di_fll_status_string_to_
+#endif // _di_fl_status_string_to_
 
 #ifdef __cplusplus
 } // extern "C"
index 99cc815f3def7e5404ec26b8cc74f884bbf7e9f3..34585a4e2f66aefe520da1743e8a1b4107817e57 100644 (file)
@@ -22,6 +22,9 @@
 #include <fll/level_0/parse.h>
 #include <fll/level_0/status_string.h>
 
+// FLL-1 includes.
+#include <fll/level_1/status_string.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -107,6 +110,9 @@ extern "C" {
  *   F_parameter (with error bit) if a parameter is invalid.
  *
  *   Errors (with error bit) from: f_conversion_character_is_decimal().
+ *   Errors (with error bit) from: fl_status_string_from().
+ *
+ * @see fl_status_string_from()
  */
 #ifndef _di_fll_fss_status_string_from_
   extern f_status_t fll_fss_status_string_from(const f_string_static_t name, f_status_t * const code);
index 3b80ae10d0a43571497a93611b5b2a6d12bb4a62..08085bc2ea73a21d1273b411b08c0f325a5b4efa 100644 (file)
@@ -10,3 +10,4 @@ f_conversion
 f_fss
 f_parse
 f_status_string
+fl_status_string
index 9f5b892ce085d44ca9ae37234accac67ba2db645..93fe52c78b26c12d74951375501c27c8aa401750 100644 (file)
@@ -18,7 +18,7 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc
-build_libraries-individual -lf_compare -lf_conversion -lf_fss -lf_parse -lf_memory -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual -lfl_status_string -lf_compare -lf_conversion -lf_fss -lf_parse -lf_memory -lf_status_string -lf_string -lf_type_array -lf_utf
 
 build_sources_library fss_status_string.c
 
diff --git a/level_2/fll_status_string/tests/unit/c/test-status_string-from.h b/level_2/fll_status_string/tests/unit/c/test-status_string-from.h
deleted file mode 100644 (file)
index f071e85..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * FLL - Level 2
- *
- * Project: Status
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Test the status_string project.
- */
-#ifndef _TEST__FLL_status_string_from_h
-#define _TEST__FLL_status_string_from_h
-
-/**
- * Test that function fails.
- *
- * @see fll_status_string_from()
- */
-extern void test__fll_status_string_from__fails(void **state);
-
-/**
- * Test that parameter checking works as expected.
- *
- * @see fll_status_string_from()
- */
-extern void test__fll_status_string_from__parameter_checking(void **state);
-
-/**
- * Test that function returns F_data_not.
- *
- * @see fll_status_string_from()
- */
-extern void test__fll_status_string_from__returns_data_not(void **state);
-
-/**
- * Test that function works.
- *
- * @see fll_status_string_from()
- */
-extern void test__fll_status_string_from__works(void **state);
-
-#endif // _TEST__FLL_status_string_from_h
index 19c7fff25ba6df5b6d28041c4b0bc57c362b2154..ec77cc73074c90b0141e1a4f285d64b4bf45c4ce 100644 (file)
@@ -41,6 +41,7 @@
 #include <fll/level_1/conversion.h>
 #include <fll/level_1/fss.h>
 #include <fll/level_1/print.h>
+#include <fll/level_1/status_string.h>
 
 // FLL-2 includes.
 #include <fll/level_2/error.h>
@@ -49,7 +50,6 @@
 #include <fll/level_2/fss/payload.h>
 #include <fll/level_2/print.h>
 #include <fll/level_2/program.h>
-#include <fll/level_2/status_string.h>
 
 // Control includes.
 #include <program/control/common.h>
index b4ff763cfc4f0c5d1f36858534b397a1ac68b277..ee72d497e3188a5350d6e6e18bd2f627496910be 100644 (file)
@@ -501,7 +501,7 @@ extern "C" {
                 memcpy(name_string, data->cache.large.string + data->cache.header_contents.array[i].array[0].start, name_length);
                 name_string[name_length] = 0;
 
-                status = fll_status_string_from(name, &header->status);
+                status = fl_status_string_from(name, &header->status);
 
                 if (F_status_is_error(status)) {
                   control_print_debug_packet_message(main, "Failed to process %[" CONTROL_status_s "%] in the response packet, Content is:", &data->cache.large, &data->cache.header_contents.array[i].array[0], &status);
index c5fd00671590c912ee56d7144fc3bdd2200973d6..b663dc9cf69fb277624e83f53fa89995bfa6bd84 100644 (file)
@@ -119,9 +119,9 @@ extern "C" {
  * @see f_string_dynamic_increase_by()
  * @see fl_conversion_dynamic_partial_to_unsigned_detect()
  * @see f_fss_apply_delimit()
+ * @see fl_status_string_from()
  * @see fll_fss_extended_read()
  * @see fll_fss_basic_list_read()
- * @see fll_status_string_from()
  */
 #ifndef _di_control_packet_receive_
   extern f_status_t control_packet_receive(const fll_program_data_t * const main, control_data_t * const data, control_payload_header_t * const header) F_attribute_visibility_internal_d;
index 9cb90d70e53d41f98a617c4d68d5723e1fb3786b..0d949798b2531d9c46172a65e27c887f0ec4b52c 100644 (file)
@@ -18,7 +18,7 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc
-build_libraries-individual -lfll_error -lfll_fss -lfll_print -lfll_program -lfll_status_string -lfl_conversion -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_socket -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual -lfll_error -lfll_fss -lfll_print -lfll_program -lfl_conversion -lfl_fss -lfl_print -lfl_status_string -lf_color -lf_compare -lf_console -lf_conversion -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_socket -lf_status_string -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
index 0faa89f1d45c789b5c7d0d646668191c5ccad845..ba50e7d57530308337faefed7bc37e7883757f49 100644 (file)
@@ -63,6 +63,7 @@
 #include <fll/level_1/iki.h>
 #include <fll/level_1/path.h>
 #include <fll/level_1/print.h>
+#include <fll/level_1/status_string.h>
 
 // FLL-2 includes.
 #include <fll/level_2/control_group.h>
@@ -75,7 +76,6 @@
 #include <fll/level_2/fss/payload.h>
 #include <fll/level_2/print.h>
 #include <fll/level_2/program.h>
-#include <fll/level_2/status_string.h>
 
 // Controller includes.
 #include <program/controller/common.h>
index ee2bbfff00085e495639c3ebf89dc5a882f80771..36cdd045c92f48ec81233cadd5ea321d0e4c853e 100644 (file)
@@ -26,7 +26,7 @@ extern "C" {
  *
  * state: The state information.
  *
- * status_string_from:        A pointer to the status string function (usually either fll_status_string_from() or fll_fss_status_string_from()).
+ * status_string_from:        A pointer to the status string function (usually either fl_status_string_from() or fll_fss_status_string_from()).
  * status_string_to:          A pointer to the status string function (usually either f_status_string_to() or fll_fss_status_string_to()).
  * status_string_help_detail: Print additional, more detailed help, in the help page.
  */
index 6bfd98595d90b295c05687afd3aad147c5df23b3..f620de6a80e00ac4e22ba4ca24513c60dd693ee2 100644 (file)
@@ -17,7 +17,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   data.setting.program_name = &status_code_program_name_s;
   data.setting.program_name_long = &status_code_program_name_long_s;
-  data.setting.status_string_from = &fll_status_string_from;
+  data.setting.status_string_from = &fl_status_string_from;
   data.setting.status_string_to = &f_status_string_to;
   data.setting.status_string_help_detail = &status_code_print_message_help_detail;
 
index de1a0003be7f407b7816ba6085e6e0a177195766..c441bcbe4cea6481945ade124a152235d7569d8f 100644 (file)
@@ -54,12 +54,12 @@ extern "C" {
  *     F_data_not if string is empty.
  *
  *     Errors (with error bit) from: fl_console_parameter_to_number_unsigned().
+ *     Errors (with error bit) from: fl_status_string_from().
  *     Errors (with error bit) from: fll_fss_status_string_to().
- *     Errors (with error bit) from: fll_status_string_from().
  *
  * @see fl_console_parameter_to_number_unsigned()
+ * @see fl_status_string_from()
  * @see fll_fss_status_string_from()
- * @see fll_status_string_from()
  */
 #ifndef _di_status_code_process_number_
   extern void status_code_process_number(status_code_main_t * const main, const f_string_static_t value);
index 80c88327d82b0482f45debd8b8f6d7ed5548c2dd..6b178e89f7e6597f94c65f2d9824f72738f62787 100644 (file)
 // FLL-1 includes.
 #include <fll/level_1/conversion.h>
 #include <fll/level_1/print.h>
+#include <fll/level_1/status_string.h>
 
 // FLL-2 includes.
 #include <fll/level_2/error.h>
 #include <fll/level_2/print.h>
 #include <fll/level_2/program.h>
-#include <fll/level_2/status_string.h>
 
 // Status Code includes.
 #include <program/status_code/main/common/define.h>
index 92785d8c75d39fe70af0d0e97786645992b5bc2e..fdefc9c240d97875d58c1c92a4642fb454c2bb30 100644 (file)
@@ -26,6 +26,7 @@ f_status_string
 fl_conversion
 fl_directory
 fl_print
+fl_status_string
 
 fll_error
 fll_print
index c352f86f7c2e8c6828108ca389242c40cfd5f425..229b424ae035405e55013b5dc18661acd0f4bb52 100644 (file)
@@ -28,6 +28,7 @@ fl_conversion
 fl_directory
 fl_fss
 fl_print
+fl_status_string
 
 fll_error
 fll_fss_status_string
index 0196f1a06e143349ee9e7efd858b7aa77c9b4d75..45c8e9b4bcbffd70e4dff372426c6d8a452906f5 100644 (file)
@@ -21,7 +21,7 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc
-build_libraries-individual -lfll_error -lfll_print -lfll_program -lfll_status_string -lfl_conversion -lfl_directory -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_file -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_print -lfl_status_string -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_file -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
index 4c8935d3337450de30104acf810aa1a2e5296c38..657f19284b83dd80aa62301091055ca47aaeb416 100644 (file)
@@ -22,7 +22,7 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc -lstatus_code
-build_libraries-individual -lfll_error -lfll_fss_status_string -lfll_print -lfll_program -lfll_status_string -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual -lfll_error -lfll_fss_status_string -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_fss -lfl_print -lfl_status_string -lf_color -lf_compare -lf_console -lf_conversion -lf_directory -lf_file -lf_fss -lf_memory -lf_parse -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
index 68e49c3c34f5a9403de48c60af9d3f599a02ead6..d9b5768a3e53fa688680abd9c1252053daed9a3a 100644 (file)
@@ -22,7 +22,7 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc -lstatus_code
-build_libraries-individual -lfll_error -lfll_print -lfll_program -lfll_status_string -lfl_conversion -lfl_directory -lfl_print -lf_color -lf_console -lf_conversion -lf_directory -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
+build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_directory -lfl_print -lfl_status_string -lf_color -lf_console -lf_conversion -lf_directory -lf_file -lf_memory -lf_path -lf_pipe -lf_print -lf_rip -lf_signal -lf_status_string -lf_string -lf_type_array -lf_utf
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll