]> Kevux Git Server - controller/commitdiff
Update: Finish migrating the project.
authorKevin Day <Kevin@kevux.org>
Tue, 16 Jul 2024 01:43:33 +0000 (20:43 -0500)
committerKevin Day <Kevin@kevux.org>
Tue, 16 Jul 2024 01:43:33 +0000 (20:43 -0500)
The project appears to work as far as basic testing and code reviewing goes.

I imagine that once I put this to regular use I will fine additional problems.
Commits after this point will be normal commits rather than migration progress commits.

15 files changed:
data/build/settings
data/data/controller/example/miscellaneous/rules/delay/long.rule
data/data/controller/example/miscellaneous/rules/environment/fake-nothing.rule
data/data/controller/example/miscellaneous/rules/environment/fake-something.rule
sources/c/main/common.c
sources/c/main/common/type/rule.c
sources/c/main/controller.h
sources/c/main/entry/process.c
sources/c/main/print/data.c [deleted file]
sources/c/main/print/data.h [deleted file]
sources/c/main/print/verbose.c [deleted file]
sources/c/main/print/verbose.h [deleted file]
sources/c/main/print/warning.c [deleted file]
sources/c/main/print/warning.h [deleted file]
sources/c/main/rule/parameter.c

index b5c1f441d35c371325d50647e0a4914be0b039a8..1c2296f4af997b6481682383fbe905ca5b91a26f 100644 (file)
@@ -48,7 +48,6 @@ build_sources_library entry.c entry/action.c entry/preprocess.c entry/process.c
 build_sources_library file.c lock.c path.c process.c
 build_sources_library rule.c rule/action.c rule/execute.c rule/expand.c rule/instance.c rule/is.c rule/item.c rule/parameter.c rule/read.c rule/setting.c rule/wait.c
 build_sources_library perform.c
-build_sources_library print/data.c
 build_sources_library print/debug.c print/debug/rule/action.c print/debug/rule/execute.c print/debug/rule/instance.c print/debug/perform/control.c print/debug/perform/pid.c
 build_sources_library print/error.c
 build_sources_library print/error/entry.c print/error/entry/action.c print/error/entry/item.c print/error/entry/setting.c
@@ -57,8 +56,7 @@ build_sources_library print/error/rule.c print/error/rule/action.c print/error/r
 build_sources_library print/lock.c print/error/lock.c
 build_sources_library print/output/entry/setting.c print/output/rule/execute.c print/output/rule/setting.c print/output/rule/validate.c
 build_sources_library print/message.c print/message/entry.c print/message/entry/action.c print/message/entry/item.c
-build_sources_library print/verbose.c
-build_sources_library print/warning.c print/warning/entry/action.c print/warning/entry/item.c print/warning/entry/setting.c print/warning/rule/action.c print/warning/rule/item.c print/warning/rule/setting.c
+build_sources_library print/warning/entry/action.c print/warning/entry/item.c print/warning/entry/setting.c print/warning/rule/action.c print/warning/rule/item.c print/warning/rule/setting.c
 build_sources_library signal.c status.c time.c
 build_sources_library thread.c thread/cleanup.c thread/control.c thread/entry.c thread/instance.c thread/is.c thread/rule.c thread/signal.c
 build_sources_library validate.c
@@ -73,7 +71,6 @@ build_sources_headers entry.h entry/action.h entry/preprocess.h entry/process.h
 build_sources_headers file.h lock.h path.h process.h
 build_sources_headers rule.h rule/action.h rule/execute.h rule/expand.h rule/instance.h rule/is.h rule/item.h rule/parameter.h rule/read.h rule/setting.h rule/wait.h
 build_sources_headers perform.h
-build_sources_headers print/data.h
 build_sources_headers print/debug.h print/debug/rule/action.h print/debug/rule/execute.h print/debug/rule/instance.h print/debug/perform/control.h print/debug/perform/pid.h
 build_sources_headers print/error.h
 build_sources_headers print/error/entry.h print/error/entry/action.h print/error/entry/item.h print/error/entry/setting.h
@@ -82,8 +79,7 @@ build_sources_headers print/error/rule.h print/error/rule/action.h print/error/r
 build_sources_headers print/lock.h print/error/lock.h
 build_sources_headers print/output/entry/setting.h print/output/rule/execute.h print/output/rule/setting.h print/output/rule/validate.h
 build_sources_headers print/message.h print/message/entry.h print/message/entry/action.h print/message/entry/item.h
-build_sources_headers print/verbose.h
-build_sources_headers print/warning.h print/warning/entry/action.h print/warning/entry/item.h print/warning/entry/setting.h print/warning/rule/action.h print/warning/rule/item.h print/warning/rule/setting.h
+build_sources_headers print/warning/entry/action.h print/warning/entry/item.h print/warning/entry/setting.h print/warning/rule/action.h print/warning/rule/item.h print/warning/rule/setting.h
 build_sources_headers signal.h status.h time.h
 build_sources_headers thread.h thread/cleanup.h thread/control.h thread/entry.h thread/instance.h thread/is.h thread/rule.h thread/signal.h
 build_sources_headers validate.h
index 19ebc2aa05d4c33caa6858966b98e778a4b7ef7a..7e77bb7cfea57b47f36cd6185adc4d42cb109f78 100644 (file)
@@ -4,7 +4,7 @@
 #
 
 settings:
-  name "Delay for 3 minutes."
+  name "Delay for 10 seconds."
 
 script:
-  start sleep 3m
+  start sleep 10s
index b0e596acfa3681b1a03e1a4ca49bddf13533264e..cfdfb9c74be575786255661156b2c634397652a9 100644 (file)
@@ -4,8 +4,9 @@ settings:
   name "Environment using fake as an engine"
   engine fake ++quiet
 
+  # LD_LIBRARY_PATH might be required in certain circumstances.
   # PATH must be expoted so that "run env" works.
-  environment PATH
+  environment LD_LIBRARY_PATH PATH
 
 script:
   start {
index bfe6851ee30b6300e3b6e9a303de53ca54ae5d40..77c22f1726e465e4dff13639b25bc61dc99efcca 100644 (file)
@@ -4,7 +4,7 @@ settings:
   name "Environment using fake as an engine"
   engine fake ++quiet
 
-  environment PATH PWD
+  environment LD_LIBRARY_PATH PATH PWD
 
 script:
   start {
index 907efdd44ece1d63f2556c57889fed9d93925479..d1c2f1e7d78c89f57418380f98ebd63f7f8aa234 100644 (file)
@@ -208,7 +208,7 @@ extern "C" {
       };
 
       for (index = 0; index < 3; ++index) {
-        if (main->program.parameters.array[codes[index]].result & f_console_result_value_e) main->setting.flag |= flags[index];
+        if (main->program.parameters.array[codes[index]].result & f_console_result_found_e) main->setting.flag |= flags[index];
       } // for
     }
 
index 81388b92312c1ec2b69d52102c6d9964d0d3e568..2f3bf6565def8d1acc55041888cfee606d28bd98 100644 (file)
@@ -41,8 +41,7 @@ extern "C" {
     if (!action) return;
 
     f_memory_arrays_resize(0, sizeof(f_string_dynamic_t), (void **) &action->parameters.array, &action->parameters.used, &action->parameters.size, &f_string_dynamics_delete_callback);
-
-    f_memory_array_resize(0, sizeof(f_iki_data_t), (void **) &action->ikis.array, &action->ikis.used, &action->ikis.size);
+    f_memory_arrays_resize(0, sizeof(f_iki_data_t), (void **) &action->ikis.array, &action->ikis.used, &action->ikis.size, &f_iki_datas_delete_callback);
   }
 #endif // _di_controller_rule_action_delete_
 
index 848db826c7e9a7bf9c80f1dabc3aca3f7a11ace3..4023b00a04590f8b1c7693e27d41f017e5179abd 100644 (file)
 #include <program/controller/main/lock.h>
 #include <program/controller/main/path.h>
 #include <program/controller/main/perform.h>
-#include <program/controller/main/print/data.h>
 #include <program/controller/main/print/debug.h>
 #include <program/controller/main/print/debug/perform/control.h>
 #include <program/controller/main/print/debug/perform/pid.h>
 #include <program/controller/main/print/output/rule/execute.h>
 #include <program/controller/main/print/output/rule/setting.h>
 #include <program/controller/main/print/output/rule/validate.h>
-#include <program/controller/main/print/verbose.h>
-#include <program/controller/main/print/warning.h>
 #include <program/controller/main/print/warning/entry/action.h>
 #include <program/controller/main/print/warning/entry/item.h>
 #include <program/controller/main/print/warning/entry/setting.h>
index 4bd84de9faee178663d874b6caddf720b1c3e57e..c0ef3aec7e37c04c8979fc1fcdaf6a1f90cf34d4 100644 (file)
@@ -298,9 +298,7 @@ extern "C" {
               if (!(main->setting.flag & controller_main_flag_simulate_e)) {
                 f_thread_unlock(&main->thread.lock.rule);
 
-                if (entry_action->code & controller_entry_rule_code_require_d) {
-                  return F_status_set_error(F_require);
-                }
+                if (entry_action->code & controller_entry_rule_code_require_d) return F_status_set_error(F_require);
 
                 ++cache->ats.array[at_j];
 
@@ -475,7 +473,7 @@ extern "C" {
       if (status_wait == F_require) return F_status_set_error(F_require);
     }
 
-    if ((main->setting.flag & controller_main_flag_simulate_e && main->program.error.verbosity > f_console_verbosity_error_e) || main->program.error.verbosity > f_console_verbosity_normal_e) {
+    if (((main->setting.flag & controller_main_flag_simulate_e) && main->program.error.verbosity > f_console_verbosity_error_e) || main->program.error.verbosity > f_console_verbosity_normal_e) {
       controller_print_message_entry_item_done(&main->program.message, is_entry, failsafe, controller_main_s);
     }
 
diff --git a/sources/c/main/print/data.c b/sources/c/main/print/data.c
deleted file mode 100644 (file)
index 61f0547..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "../controller.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/sources/c/main/print/data.h b/sources/c/main/print/data.h
deleted file mode 100644 (file)
index 17ef811..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * FLL - Level 3
- *
- * Project: Controller
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Provides the print data functionality.
- *
- * This is auto-included and should not need to be explicitly included.
- */
-#ifndef _controller_main_print_data_h
-#define _controller_main_print_data_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _controller_main_print_data_h
diff --git a/sources/c/main/print/verbose.c b/sources/c/main/print/verbose.c
deleted file mode 100644 (file)
index 61f0547..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "../controller.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/sources/c/main/print/verbose.h b/sources/c/main/print/verbose.h
deleted file mode 100644 (file)
index 0cab65e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * FLL - Level 3
- *
- * Project: Controller
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Provides the print verbose functionality.
- *
- * This is auto-included and should not need to be explicitly included.
- */
-#ifndef _controller_main_print_verbose_h
-#define _controller_main_print_verbose_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _controller_main_print_verbose_h
diff --git a/sources/c/main/print/warning.c b/sources/c/main/print/warning.c
deleted file mode 100644 (file)
index 61f0547..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "../controller.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/sources/c/main/print/warning.h b/sources/c/main/print/warning.h
deleted file mode 100644 (file)
index 654e77f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * FLL - Level 3
- *
- * Project: Controller
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Provides the print warning functionality.
- *
- * This is auto-included and should not need to be explicitly included.
- */
-#ifndef _controller_main_print_warning_h
-#define _controller_main_print_warning_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _controller_main_print_warning_h
index 925d1e47b0066e6e880730df40b22fbd0e9b9047..5df6afc24f823069e1cb02895d7dc0d85ef255f0 100644 (file)
@@ -28,7 +28,7 @@ extern "C" {
 
       if (F_status_is_error_not(state->status)) {
         state->status = content
-          ? f_memory_array_increase_by(content->used + 1, sizeof(f_iki_data_t), (void **) &action->ikis.array, &action->ikis.used, &action->ikis.size);
+          ? f_memory_array_increase_by(content->used + 1, sizeof(f_iki_data_t), (void **) &action->ikis.array, &action->ikis.used, &action->ikis.size)
           : f_memory_array_increase(controller_allocation_small_d, sizeof(f_iki_data_t), (void **) &action->ikis.array, &action->ikis.used, &action->ikis.size);
       }