]> Kevux Git Server - fll/commitdiff
Update: Replace static strings with extern defined in common file.
authorKevin Day <thekevinday@gmail.com>
Wed, 28 Apr 2021 23:57:36 +0000 (18:57 -0500)
committerKevin Day <thekevinday@gmail.com>
Wed, 28 Apr 2021 23:57:36 +0000 (18:57 -0500)
This makes the controller program more consistent with the FLL projects.
This should make it easier to use the controller program as a library as well.

level_3/controller/c/private-common.c
level_3/controller/c/private-common.h

index b60a8bfedef161afa91802b83f3423626b054f78..8af66f2c43371d1b0a644fea66246cb293e5e4cc 100644 (file)
@@ -7,6 +7,103 @@
 extern "C" {
 #endif
 
+#ifndef _di_controller_string_s_
+  const f_string_t controller_string_action_s = controller_string_action;
+  const f_string_t controller_string_actions_s = controller_string_actions;
+  const f_string_t controller_string_affinity_s = controller_string_affinity;
+  const f_string_t controller_string_as_s = controller_string_as;
+  const f_string_t controller_string_asynchronous_s = controller_string_asynchronous;
+  const f_string_t controller_string_bash_s = controller_string_bash;
+  const f_string_t controller_string_batch_s = controller_string_batch;
+  const f_string_t controller_string_capability_s = controller_string_capability;
+  const f_string_t controller_string_create_s = controller_string_create;
+  const f_string_t controller_string_command_s = controller_string_command;
+  const f_string_t controller_string_consider_s = controller_string_consider;
+  const f_string_t controller_string_control_s = controller_string_control;
+  const f_string_t controller_string_control_group_s = controller_string_control_group;
+  const f_string_t controller_string_cpu_s = controller_string_cpu;
+  const f_string_t controller_string_core_s = controller_string_core;
+  const f_string_t controller_string_data_s = controller_string_data;
+  const f_string_t controller_string_deadline_s = controller_string_deadline;
+  const f_string_t controller_string_default_s = controller_string_default;
+  const f_string_t controller_string_define_s = controller_string_define;
+  const f_string_t controller_string_entry_s = controller_string_entry;
+  const f_string_t controller_string_entries_s = controller_string_entries;
+  const f_string_t controller_string_environment_s = controller_string_environment;
+  const f_string_t controller_string_existing_s = controller_string_existing;
+  const f_string_t controller_string_execute_s = controller_string_execute;
+  const f_string_t controller_string_exit_s = controller_string_exit;
+  const f_string_t controller_string_exits_s = controller_string_exits;
+  const f_string_t controller_string_fail_s = controller_string_fail;
+  const f_string_t controller_string_failsafe_s = controller_string_failsafe;
+  const f_string_t controller_string_fifo_s = controller_string_fifo;
+  const f_string_t controller_string_freeze_s = controller_string_freeze;
+  const f_string_t controller_string_fsize_s = controller_string_fsize;
+  const f_string_t controller_string_full_path_s = controller_string_full_path;
+  const f_string_t controller_string_group_s = controller_string_group;
+  const f_string_t controller_string_groups_s = controller_string_groups;
+  const f_string_t controller_string_how_s = controller_string_how;
+  const f_string_t controller_string_idle_s = controller_string_idle;
+  const f_string_t controller_string_item_s = controller_string_item;
+  const f_string_t controller_string_kill_s = controller_string_kill;
+  const f_string_t controller_string_limit_s = controller_string_limit;
+  const f_string_t controller_string_locks_s = controller_string_locks;
+  const f_string_t controller_string_main_s = controller_string_main;
+  const f_string_t controller_string_memlock_s = controller_string_memlock;
+  const f_string_t controller_string_method_s = controller_string_method;
+  const f_string_t controller_string_mode_s = controller_string_mode;
+  const f_string_t controller_string_msgqueue_s = controller_string_msgqueue;
+  const f_string_t controller_string_name_s = controller_string_name;
+  const f_string_t controller_string_need_s = controller_string_need;
+  const f_string_t controller_string_new_s = controller_string_new;
+  const f_string_t controller_string_nice_s = controller_string_nice;
+  const f_string_t controller_string_no_s = controller_string_no;
+  const f_string_t controller_string_nofile_s = controller_string_nofile;
+  const f_string_t controller_string_nproc_s = controller_string_nproc;
+  const f_string_t controller_string_on_s = controller_string_on;
+  const f_string_t controller_string_optional_s = controller_string_optional;
+  const f_string_t controller_string_other_s = controller_string_other;
+  const f_string_t controller_string_parameter_s = controller_string_parameter;
+  const f_string_t controller_string_path_s = controller_string_path;
+  const f_string_t controller_string_pause_s = controller_string_pause;
+  const f_string_t controller_string_pid_file_s = controller_string_pid_file;
+  const f_string_t controller_string_processor_s = controller_string_processor;
+  const f_string_t controller_string_program_s = controller_string_program;
+  const f_string_t controller_string_ready_s = controller_string_ready;
+  const f_string_t controller_string_reload_s = controller_string_reload;
+  const f_string_t controller_string_require_s = controller_string_require;
+  const f_string_t controller_string_required_s = controller_string_required;
+  const f_string_t controller_string_restart_s = controller_string_restart;
+  const f_string_t controller_string_resume_s = controller_string_resume;
+  const f_string_t controller_string_round_robin_s = controller_string_round_robin;
+  const f_string_t controller_string_rss_s = controller_string_rss;
+  const f_string_t controller_string_rtprio_s = controller_string_rtprio;
+  const f_string_t controller_string_rttime_s = controller_string_rttime;
+  const f_string_t controller_string_rule_s = controller_string_rule;
+  const f_string_t controller_string_rules_s = controller_string_rules;
+  const f_string_t controller_string_scheduler_s = controller_string_scheduler;
+  const f_string_t controller_string_script_s = controller_string_script;
+  const f_string_t controller_string_service_s = controller_string_service;
+  const f_string_t controller_string_setting_s = controller_string_setting;
+  const f_string_t controller_string_sigpending_s = controller_string_sigpending;
+  const f_string_t controller_string_stack_s = controller_string_stack;
+  const f_string_t controller_string_start_s = controller_string_start;
+  const f_string_t controller_string_stop_s = controller_string_stop;
+  const f_string_t controller_string_succeed_s = controller_string_succeed;
+  const f_string_t controller_string_synchronous_s = controller_string_synchronous;
+  const f_string_t controller_string_thaw_s = controller_string_thaw;
+  const f_string_t controller_string_timeout_s = controller_string_timeout;
+  const f_string_t controller_string_type_s = controller_string_type;
+  const f_string_t controller_string_use_s = controller_string_use;
+  const f_string_t controller_string_user_s = controller_string_user;
+  const f_string_t controller_string_utility_s = controller_string_utility;
+  const f_string_t controller_string_wait_s = controller_string_wait;
+  const f_string_t controller_string_want_s = controller_string_want;
+  const f_string_t controller_string_wish_s = controller_string_wish;
+  const f_string_t controller_string_with_s = controller_string_with;
+  const f_string_t controller_string_yes_s = controller_string_yes;
+#endif // _di_controller_string_s_
+
 #ifndef _di_controller_cache_action_delete_simple_
   void controller_cache_action_delete_simple(controller_cache_action_t *cache) {
 
index 9791fe317126fc78c2997f69224e2562f4b0f845..a216220a68ca6bd1f66bde5b6b900a0f210b8ed2 100644 (file)
@@ -17,7 +17,7 @@ extern "C" {
  *
  * These are generally the names to match, representing some action or setting.
  */
-#ifndef _di_controller_string_
+#ifndef _di_controller_string_s_
   #define controller_string_action        "action"
   #define controller_string_actions       "actions"
   #define controller_string_affinity      "affinity"
@@ -207,101 +207,101 @@ extern "C" {
   #define controller_string_with_length          4
   #define controller_string_yes_length           3
 
-  const static f_string_t controller_string_action_s = controller_string_action;
-  const static f_string_t controller_string_actions_s = controller_string_actions;
-  const static f_string_t controller_string_affinity_s = controller_string_affinity;
-  const static f_string_t controller_string_as_s = controller_string_as;
-  const static f_string_t controller_string_asynchronous_s = controller_string_asynchronous;
-  const static f_string_t controller_string_bash_s = controller_string_bash;
-  const static f_string_t controller_string_batch_s = controller_string_batch;
-  const static f_string_t controller_string_capability_s = controller_string_capability;
-  const static f_string_t controller_string_create_s = controller_string_create;
-  const static f_string_t controller_string_command_s = controller_string_command;
-  const static f_string_t controller_string_consider_s = controller_string_consider;
-  const static f_string_t controller_string_control_s = controller_string_control;
-  const static f_string_t controller_string_control_group_s = controller_string_control_group;
-  const static f_string_t controller_string_cpu_s = controller_string_cpu;
-  const static f_string_t controller_string_core_s = controller_string_core;
-  const static f_string_t controller_string_data_s = controller_string_data;
-  const static f_string_t controller_string_deadline_s = controller_string_deadline;
-  const static f_string_t controller_string_default_s = controller_string_default;
-  const static f_string_t controller_string_define_s = controller_string_define;
-  const static f_string_t controller_string_entry_s = controller_string_entry;
-  const static f_string_t controller_string_entries_s = controller_string_entries;
-  const static f_string_t controller_string_environment_s = controller_string_environment;
-  const static f_string_t controller_string_existing_s = controller_string_existing;
-  const static f_string_t controller_string_execute_s = controller_string_execute;
-  const static f_string_t controller_string_exit_s = controller_string_exit;
-  const static f_string_t controller_string_exits_s = controller_string_exits;
-  const static f_string_t controller_string_fail_s = controller_string_fail;
-  const static f_string_t controller_string_failsafe_s = controller_string_failsafe;
-  const static f_string_t controller_string_fifo_s = controller_string_fifo;
-  const static f_string_t controller_string_freeze_s = controller_string_freeze;
-  const static f_string_t controller_string_fsize_s = controller_string_fsize;
-  const static f_string_t controller_string_full_path_s = controller_string_full_path;
-  const static f_string_t controller_string_group_s = controller_string_group;
-  const static f_string_t controller_string_groups_s = controller_string_groups;
-  const static f_string_t controller_string_how_s = controller_string_how;
-  const static f_string_t controller_string_idle_s = controller_string_idle;
-  const static f_string_t controller_string_item_s = controller_string_item;
-  const static f_string_t controller_string_kill_s = controller_string_kill;
-  const static f_string_t controller_string_limit_s = controller_string_limit;
-  const static f_string_t controller_string_locks_s = controller_string_locks;
-  const static f_string_t controller_string_main_s = controller_string_main;
-  const static f_string_t controller_string_memlock_s = controller_string_memlock;
-  const static f_string_t controller_string_method_s = controller_string_method;
-  const static f_string_t controller_string_mode_s = controller_string_mode;
-  const static f_string_t controller_string_msgqueue_s = controller_string_msgqueue;
-  const static f_string_t controller_string_name_s = controller_string_name;
-  const static f_string_t controller_string_need_s = controller_string_need;
-  const static f_string_t controller_string_new_s = controller_string_new;
-  const static f_string_t controller_string_nice_s = controller_string_nice;
-  const static f_string_t controller_string_no_s = controller_string_no;
-  const static f_string_t controller_string_nofile_s = controller_string_nofile;
-  const static f_string_t controller_string_nproc_s = controller_string_nproc;
-  const static f_string_t controller_string_on_s = controller_string_on;
-  const static f_string_t controller_string_optional_s = controller_string_optional;
-  const static f_string_t controller_string_other_s = controller_string_other;
-  const static f_string_t controller_string_parameter_s = controller_string_parameter;
-  const static f_string_t controller_string_path_s = controller_string_path;
-  const static f_string_t controller_string_pause_s = controller_string_pause;
-  const static f_string_t controller_string_pid_file_s = controller_string_pid_file;
-  const static f_string_t controller_string_processor_s = controller_string_processor;
-  const static f_string_t controller_string_program_s = controller_string_program;
-  const static f_string_t controller_string_ready_s = controller_string_ready;
-  const static f_string_t controller_string_reload_s = controller_string_reload;
-  const static f_string_t controller_string_require_s = controller_string_require;
-  const static f_string_t controller_string_required_s = controller_string_required;
-  const static f_string_t controller_string_restart_s = controller_string_restart;
-  const static f_string_t controller_string_resume_s = controller_string_resume;
-  const static f_string_t controller_string_round_robin_s = controller_string_round_robin;
-  const static f_string_t controller_string_rss_s = controller_string_rss;
-  const static f_string_t controller_string_rtprio_s = controller_string_rtprio;
-  const static f_string_t controller_string_rttime_s = controller_string_rttime;
-  const static f_string_t controller_string_rule_s = controller_string_rule;
-  const static f_string_t controller_string_rules_s = controller_string_rules;
-  const static f_string_t controller_string_scheduler_s = controller_string_scheduler;
-  const static f_string_t controller_string_script_s = controller_string_script;
-  const static f_string_t controller_string_service_s = controller_string_service;
-  const static f_string_t controller_string_setting_s = controller_string_setting;
-  const static f_string_t controller_string_sigpending_s = controller_string_sigpending;
-  const static f_string_t controller_string_stack_s = controller_string_stack;
-  const static f_string_t controller_string_start_s = controller_string_start;
-  const static f_string_t controller_string_stop_s = controller_string_stop;
-  const static f_string_t controller_string_succeed_s = controller_string_succeed;
-  const static f_string_t controller_string_synchronous_s = controller_string_synchronous;
-  const static f_string_t controller_string_thaw_s = controller_string_thaw;
-  const static f_string_t controller_string_timeout_s = controller_string_timeout;
-  const static f_string_t controller_string_type_s = controller_string_type;
-  const static f_string_t controller_string_use_s = controller_string_use;
-  const static f_string_t controller_string_user_s = controller_string_user;
-  const static f_string_t controller_string_utility_s = controller_string_utility;
-  const static f_string_t controller_string_wait_s = controller_string_wait;
-  const static f_string_t controller_string_want_s = controller_string_want;
-  const static f_string_t controller_string_wish_s = controller_string_wish;
-  const static f_string_t controller_string_with_s = controller_string_with;
-  const static f_string_t controller_string_yes_s = controller_string_yes;
-#endif // _di_controller_string_
+  extern const f_string_t controller_string_action_s;
+  extern const f_string_t controller_string_actions_s;
+  extern const f_string_t controller_string_affinity_s;
+  extern const f_string_t controller_string_as_s;
+  extern const f_string_t controller_string_asynchronous_s;
+  extern const f_string_t controller_string_bash_s;
+  extern const f_string_t controller_string_batch_s;
+  extern const f_string_t controller_string_capability_s;
+  extern const f_string_t controller_string_create_s;
+  extern const f_string_t controller_string_command_s;
+  extern const f_string_t controller_string_consider_s;
+  extern const f_string_t controller_string_control_s;
+  extern const f_string_t controller_string_control_group_s;
+  extern const f_string_t controller_string_cpu_s;
+  extern const f_string_t controller_string_core_s;
+  extern const f_string_t controller_string_data_s;
+  extern const f_string_t controller_string_deadline_s;
+  extern const f_string_t controller_string_default_s;
+  extern const f_string_t controller_string_define_s;
+  extern const f_string_t controller_string_entry_s;
+  extern const f_string_t controller_string_entries_s;
+  extern const f_string_t controller_string_environment_s;
+  extern const f_string_t controller_string_existing_s;
+  extern const f_string_t controller_string_execute_s;
+  extern const f_string_t controller_string_exit_s;
+  extern const f_string_t controller_string_exits_s;
+  extern const f_string_t controller_string_fail_s;
+  extern const f_string_t controller_string_failsafe_s;
+  extern const f_string_t controller_string_fifo_s;
+  extern const f_string_t controller_string_freeze_s;
+  extern const f_string_t controller_string_fsize_s;
+  extern const f_string_t controller_string_full_path_s;
+  extern const f_string_t controller_string_group_s;
+  extern const f_string_t controller_string_groups_s;
+  extern const f_string_t controller_string_how_s;
+  extern const f_string_t controller_string_idle_s;
+  extern const f_string_t controller_string_item_s;
+  extern const f_string_t controller_string_kill_s;
+  extern const f_string_t controller_string_limit_s;
+  extern const f_string_t controller_string_locks_s;
+  extern const f_string_t controller_string_main_s;
+  extern const f_string_t controller_string_memlock_s;
+  extern const f_string_t controller_string_method_s;
+  extern const f_string_t controller_string_mode_s;
+  extern const f_string_t controller_string_msgqueue_s;
+  extern const f_string_t controller_string_name_s;
+  extern const f_string_t controller_string_need_s;
+  extern const f_string_t controller_string_new_s;
+  extern const f_string_t controller_string_nice_s;
+  extern const f_string_t controller_string_no_s;
+  extern const f_string_t controller_string_nofile_s;
+  extern const f_string_t controller_string_nproc_s;
+  extern const f_string_t controller_string_on_s;
+  extern const f_string_t controller_string_optional_s;
+  extern const f_string_t controller_string_other_s;
+  extern const f_string_t controller_string_parameter_s;
+  extern const f_string_t controller_string_path_s;
+  extern const f_string_t controller_string_pause_s;
+  extern const f_string_t controller_string_pid_file_s;
+  extern const f_string_t controller_string_processor_s;
+  extern const f_string_t controller_string_program_s;
+  extern const f_string_t controller_string_ready_s;
+  extern const f_string_t controller_string_reload_s;
+  extern const f_string_t controller_string_require_s;
+  extern const f_string_t controller_string_required_s;
+  extern const f_string_t controller_string_restart_s;
+  extern const f_string_t controller_string_resume_s;
+  extern const f_string_t controller_string_round_robin_s;
+  extern const f_string_t controller_string_rss_s;
+  extern const f_string_t controller_string_rtprio_s;
+  extern const f_string_t controller_string_rttime_s;
+  extern const f_string_t controller_string_rule_s;
+  extern const f_string_t controller_string_rules_s;
+  extern const f_string_t controller_string_scheduler_s;
+  extern const f_string_t controller_string_script_s;
+  extern const f_string_t controller_string_service_s;
+  extern const f_string_t controller_string_setting_s;
+  extern const f_string_t controller_string_sigpending_s;
+  extern const f_string_t controller_string_stack_s;
+  extern const f_string_t controller_string_start_s;
+  extern const f_string_t controller_string_stop_s;
+  extern const f_string_t controller_string_succeed_s;
+  extern const f_string_t controller_string_synchronous_s;
+  extern const f_string_t controller_string_thaw_s;
+  extern const f_string_t controller_string_timeout_s;
+  extern const f_string_t controller_string_type_s;
+  extern const f_string_t controller_string_use_s;
+  extern const f_string_t controller_string_user_s;
+  extern const f_string_t controller_string_utility_s;
+  extern const f_string_t controller_string_wait_s;
+  extern const f_string_t controller_string_want_s;
+  extern const f_string_t controller_string_wish_s;
+  extern const f_string_t controller_string_with_s;
+  extern const f_string_t controller_string_yes_s;
+#endif // _di_controller_string_s_
 
 /**
  * A set of codes for resource limitations.