]> Kevux Git Server - fll/commitdiff
Update: Remove unnecessary program_name and program_name_long variables.
authorKevin Day <thekevinday@gmail.com>
Sat, 10 Dec 2022 23:41:35 +0000 (17:41 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 10 Dec 2022 23:41:35 +0000 (17:41 -0600)
The help printing functions are already per-sub-program-specific.

14 files changed:
level_3/fss_write/c/basic/main.c
level_3/fss_write/c/basic/print.c
level_3/fss_write/c/basic_list/main.c
level_3/fss_write/c/basic_list/print.c
level_3/fss_write/c/embedded_list/main.c
level_3/fss_write/c/embedded_list/print.c
level_3/fss_write/c/extended/main.c
level_3/fss_write/c/extended/print.c
level_3/fss_write/c/extended_list/main.c
level_3/fss_write/c/extended_list/print.c
level_3/fss_write/c/main/common.h
level_3/fss_write/c/main/main.c
level_3/fss_write/c/payload/main.c
level_3/fss_write/c/payload/print.c

index 2037ba2952508f4b9ddc8cd82b32f3a4641c05c7..362b7d5fb609a0b36248ae62e297aab30a35da68 100644 (file)
@@ -7,8 +7,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
   setting.standard = fss_write_basic_standard_s;
-  setting.program_name = &fss_write_basic_program_name_s;
-  setting.program_name_long = &fss_write_basic_program_name_long_s;
   setting.process_content = &fss_write_basic_process_content;
   setting.process_help = &fss_write_basic_process_help;
   setting.process_normal = &fss_write_process_normal;
index d34c78b00f8f72619f8fa9e2db6c6223b23fbd94..09d3e5583e2ae2776919d82c25426e9c5b078164 100644 (file)
@@ -11,13 +11,13 @@ extern "C" {
 
     f_print_dynamic_raw(setting->line_first, print.to);
 
-    fll_program_print_help_header(print, setting->program_name_long ? *setting->program_name_long : fss_write_program_name_long_s, fss_write_program_version_s);
+    fll_program_print_help_header(print, fss_write_basic_program_name_long_s, fss_write_program_version_s);
 
     fss_write_print_help(setting, print);
 
     f_print_dynamic_raw(f_string_eol_s, print.to);
 
-    fll_program_print_help_usage(print, setting->program_name ? *setting->program_name : fss_write_program_name_s, f_string_empty_s);
+    fll_program_print_help_usage(print, fss_write_basic_program_name_s, f_string_empty_s);
 
     fss_write_print_help_pipe(setting, print);
 
index 31017867894a4858b450441f7703f4160cc6b5ab..cb51dc0843720f791ef531c7c078ac3630c25415 100644 (file)
@@ -7,8 +7,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
   setting.standard = fss_write_basic_list_standard_s;
-  setting.program_name = &fss_write_basic_list_program_name_s;
-  setting.program_name_long = &fss_write_basic_list_program_name_long_s;
   setting.process_content = &fss_write_basic_list_process_content;
   setting.process_help = &fss_write_basic_list_process_help;
   setting.process_normal = &fss_write_process_normal;
index 2ee5e26deef82740c3ace8b6a60f56f2b445bf3c..00f0e3bbce3d1a67f41c5febee3662f47720b851 100644 (file)
@@ -11,13 +11,13 @@ extern "C" {
 
     f_print_dynamic_raw(setting->line_first, print.to);
 
-    fll_program_print_help_header(print, setting->program_name_long ? *setting->program_name_long : fss_write_program_name_long_s, fss_write_program_version_s);
+    fll_program_print_help_header(print, fss_write_basic_list_program_name_long_s, fss_write_program_version_s);
 
     fss_write_print_help(setting, print);
 
     f_print_dynamic_raw(f_string_eol_s, print.to);
 
-    fll_program_print_help_usage(print, setting->program_name ? *setting->program_name : fss_write_program_name_s, f_string_empty_s);
+    fll_program_print_help_usage(print, fss_write_basic_list_program_name_s, f_string_empty_s);
 
     fss_write_print_help_pipe(setting, print);
 
index bde0b1950bfa2f3bb0c81e9e67c9ca1a5c29caca..60dcd371e9c86d4de8c5fbfca8029b522279f096 100644 (file)
@@ -7,8 +7,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
   setting.standard = fss_write_embedded_list_standard_s;
-  setting.program_name = &fss_write_embedded_list_program_name_s;
-  setting.program_name_long = &fss_write_embedded_list_program_name_long_s;
   setting.process_content = &fss_write_embedded_list_process_content;
   setting.process_help = &fss_write_embedded_list_process_help;
   setting.process_normal = &fss_write_process_normal;
index a5c338a729212a4f50fe26b8d043b39c16f4862f..d76789966b872574d0a4a8cd18ff8d6b9a90beed 100644 (file)
@@ -11,13 +11,13 @@ extern "C" {
 
     f_print_dynamic_raw(setting->line_first, print.to);
 
-    fll_program_print_help_header(print, setting->program_name_long ? *setting->program_name_long : fss_write_program_name_long_s, fss_write_program_version_s);
+    fll_program_print_help_header(print, fss_write_embedded_list_program_name_long_s, fss_write_program_version_s);
 
     fss_write_print_help(setting, print);
 
     f_print_dynamic_raw(f_string_eol_s, print.to);
 
-    fll_program_print_help_usage(print, setting->program_name ? *setting->program_name : fss_write_program_name_s, f_string_empty_s);
+    fll_program_print_help_usage(print, fss_write_embedded_list_program_name_s, f_string_empty_s);
 
     fss_write_print_help_pipe(setting, print);
 
index 37bfa076ca50f6f0fa66828da29f341295f78764..5af6874fab4b88d1616423191826c5520b90642a 100644 (file)
@@ -7,8 +7,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
   setting.standard = fss_write_extended_standard_s;
-  setting.program_name = &fss_write_extended_program_name_s;
-  setting.program_name_long = &fss_write_extended_program_name_long_s;
   setting.process_content = &fss_write_extended_process_content;
   setting.process_help = &fss_write_extended_process_help;
   setting.process_normal = &fss_write_process_normal;
index 887bd3a254bbda70cc5c415626b129157473226b..428370aabc7aa2af394b761393d01040d8665603 100644 (file)
@@ -11,13 +11,13 @@ extern "C" {
 
     f_print_dynamic_raw(setting->line_first, print.to);
 
-    fll_program_print_help_header(print, setting->program_name_long ? *setting->program_name_long : fss_write_program_name_long_s, fss_write_program_version_s);
+    fll_program_print_help_header(print, fss_write_extended_program_name_long_s, fss_write_program_version_s);
 
     fss_write_print_help(setting, print);
 
     f_print_dynamic_raw(f_string_eol_s, print.to);
 
-    fll_program_print_help_usage(print, setting->program_name ? *setting->program_name : fss_write_program_name_s, f_string_empty_s);
+    fll_program_print_help_usage(print, fss_write_extended_program_name_s, f_string_empty_s);
 
     fss_write_print_help_pipe(setting, print);
 
index 33dad7b3019c0e7b094abc8b79ee1eedcf853fe1..b77b74b9b6fdca8f5f21669fade025d2c779dde5 100644 (file)
@@ -7,8 +7,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
   setting.standard = fss_write_extended_list_standard_s;
-  setting.program_name = &fss_write_extended_list_program_name_s;
-  setting.program_name_long = &fss_write_extended_list_program_name_long_s;
   setting.process_content = &fss_write_extended_list_process_content;
   setting.process_help = &fss_write_extended_list_process_help;
   setting.process_normal = &fss_write_process_normal;
index 8622e55f97d49e9f9fe07ba7054f735a45cef9c1..f24c56b216e3c0db4e488369d6acbeaa24fb6495 100644 (file)
@@ -11,13 +11,13 @@ extern "C" {
 
     f_print_dynamic_raw(setting->line_first, print.to);
 
-    fll_program_print_help_header(print, setting->program_name_long ? *setting->program_name_long : fss_write_program_name_long_s, fss_write_program_version_s);
+    fll_program_print_help_header(print, fss_write_extended_list_program_name_long_s, fss_write_program_version_s);
 
     fss_write_print_help(setting, print);
 
     f_print_dynamic_raw(f_string_eol_s, print.to);
 
-    fll_program_print_help_usage(print, setting->program_name ? *setting->program_name : fss_write_program_name_s, f_string_empty_s);
+    fll_program_print_help_usage(print, fss_write_extended_list_program_name_s, f_string_empty_s);
 
     fss_write_print_help_pipe(setting, print);
 
index 03cbe4e1c8aeeda5c9f8fae424dae0986d384f46..fcccbed9b5854f801dc080a5339bcc1cb1d27d25 100644 (file)
@@ -362,9 +362,6 @@ extern "C" {
     f_string_static_t *content;
     f_string_statics_t *contents;
 
-    const f_string_static_t *program_name;
-    const f_string_static_t *program_name_long;
-
     void (*process_content)(fll_program_data_t * const main, void * const setting, const bool last);
     void (*process_help)(fll_program_data_t * const main, void * const setting);
     void (*process_normal)(fll_program_data_t * const main, void * const setting);
@@ -399,8 +396,6 @@ extern "C" {
       0, \
       0, \
       0, \
-      0, \
-      0, \
     }
 #endif // _di_fss_write_setting_t_
 
index ed9d4ae60227d9f29172de8864e11015765d4ab4..367f2cd2fd098aa241e893d54683091cc9a25362 100644 (file)
@@ -13,8 +13,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   fll_program_data_t data = fll_program_data_t_initialize;
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
-  setting.program_name = &fss_write_program_name_s;
-  setting.program_name_long = &fss_write_program_name_long_s;
 
   f_console_parameter_t parameters[] = fss_write_console_parameter_t_initialize;
   data.parameters.array = parameters;
@@ -57,8 +55,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
     if (!main || !setting || F_status_is_error(setting->status) || (setting->flag & fss_write_flag_version_e)) return;
 
     setting->standard = fss_write_basic_standard_s;
-    setting->program_name = &fss_write_program_name_s;
-    setting->program_name_long = &fss_write_program_name_long_s;
     setting->process_content = &fss_write_basic_process_content;
     setting->process_help = &fss_write_main_process_help;
     setting->process_normal = &fss_write_process_normal;
@@ -80,8 +76,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
             fl_string_dynamic_compare(argv[index], fss_write_format_code_human_0000_s) == F_equal_to) {
 
           setting->standard = fss_write_basic_standard_s;
-          setting->program_name = &fss_write_basic_program_name_s;
-          setting->program_name_long = &fss_write_basic_program_name_long_s;
           setting->process_content = &fss_write_basic_process_content;
           setting->process_help = &fss_write_basic_process_help;
           setting->process_object = &fss_write_basic_process_object;
@@ -96,8 +90,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
                  fl_string_dynamic_compare(argv[index], fss_write_format_code_human_0001_s) == F_equal_to) {
 
           setting->standard = fss_write_extended_standard_s;
-          setting->program_name = &fss_write_extended_program_name_s;
-          setting->program_name_long = &fss_write_extended_program_name_long_s;
           setting->process_content = &fss_write_extended_process_content;
           setting->process_help = &fss_write_extended_process_help;
           setting->process_object = &fss_write_extended_process_object;
@@ -112,8 +104,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
                  fl_string_dynamic_compare(argv[index], fss_write_format_code_human_0002_s) == F_equal_to) {
 
           setting->standard = fss_write_basic_list_standard_s;
-          setting->program_name = &fss_write_basic_list_program_name_s;
-          setting->program_name_long = &fss_write_basic_list_program_name_long_s;
           setting->process_content = &fss_write_basic_list_process_content;
           setting->process_help = &fss_write_basic_list_process_help;
           setting->process_object = &fss_write_basic_list_process_object;
@@ -128,8 +118,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
                  fl_string_dynamic_compare(argv[index], fss_write_format_code_human_0003_s) == F_equal_to) {
 
           setting->standard = fss_write_extended_list_standard_s;
-          setting->program_name = &fss_write_extended_list_program_name_s;
-          setting->program_name_long = &fss_write_extended_list_program_name_long_s;
           setting->process_content = &fss_write_extended_list_process_content;
           setting->process_help = &fss_write_extended_list_process_help;
           setting->process_object = &fss_write_extended_list_process_object;
@@ -144,8 +132,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
                  fl_string_dynamic_compare(argv[index], fss_write_format_code_human_0008_s) == F_equal_to) {
 
           setting->standard = fss_write_embedded_list_standard_s;
-          setting->program_name = &fss_write_embedded_list_program_name_s;
-          setting->program_name_long = &fss_write_embedded_list_program_name_long_s;
           setting->process_content = &fss_write_embedded_list_process_content;
           setting->process_help = &fss_write_embedded_list_process_help;
           setting->process_object = &fss_write_embedded_list_process_object;
@@ -160,8 +146,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
                  fl_string_dynamic_compare(argv[index], fss_write_format_code_human_000e_s) == F_equal_to) {
 
           setting->standard = fss_write_payload_standard_s;
-          setting->program_name = &fss_write_payload_program_name_s;
-          setting->program_name_long = &fss_write_payload_program_name_long_s;
           setting->process_content = 0; // Not used by payload.
           setting->process_help = &fss_write_payload_process_help;
           setting->process_normal = &fss_write_process_normal;
index 7dcb8d4a48dfbeaf836a5dc3067e364b4282e091..a6795d5c31843b33be4dcc60f4da3750f6dd803c 100644 (file)
@@ -7,8 +7,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   fss_write_setting_t setting = fss_write_setting_t_initialize;
   setting.state.data = (void *) &data;
   setting.standard = fss_write_payload_standard_s;
-  setting.program_name = &fss_write_payload_program_name_s;
-  setting.program_name_long = &fss_write_payload_program_name_long_s;
   setting.process_content = 0; // Not used by payload.
   setting.process_help = &fss_write_payload_process_help;
   setting.process_normal = &fss_write_process_normal;
index 1d1e4d2f05e1774da54cd6103d8dee269f2e2a08..925bd0581ee3b9a5943e77a40007b8719c4fad0a 100644 (file)
@@ -28,13 +28,13 @@ extern "C" {
 
     f_print_dynamic_raw(setting->line_first, print.to);
 
-    fll_program_print_help_header(print, setting->program_name_long ? *setting->program_name_long : fss_write_program_name_long_s, fss_write_program_version_s);
+    fll_program_print_help_header(print, fss_write_payload_program_name_long_s, fss_write_program_version_s);
 
     fss_write_print_help(setting, print);
 
     f_print_dynamic_raw(f_string_eol_s, print.to);
 
-    fll_program_print_help_usage(print, setting->program_name ? *setting->program_name : fss_write_program_name_s, f_string_empty_s);
+    fll_program_print_help_usage(print, fss_write_payload_program_name_s, f_string_empty_s);
 
     fss_write_print_help_pipe(setting, print);