]> Kevux Git Server - fll/commitdiff
Update: Use f_console_parameters_t as a pointer and document fll_program_parameter_pr...
authorKevin Day <Kevin@kevux.org>
Fri, 14 Feb 2025 04:01:26 +0000 (22:01 -0600)
committerKevin Day <Kevin@kevux.org>
Fri, 14 Feb 2025 04:03:25 +0000 (22:03 -0600)
Make the use of `f_console_parameters_t` as a pointer for consistency purposes.

Some programs did this whereas other programs repeatedly called `main->program.parameters`.
This should no longer be the case.

The documentation comments should be referencing `fll_program_parameter_process_context_standard()` and now do.

24 files changed:
level_3/byte_dump/c/main/common.c
level_3/example/c/main/common.c
level_3/example/c/main/common.h
level_3/fake/c/main/common.h
level_3/firewall/c/main/common.c
level_3/firewall/c/main/common.h
level_3/fss_identify/c/main/common.c
level_3/fss_identify/c/main/common.h
level_3/fss_read/c/main/common.c
level_3/fss_read/c/main/common.h
level_3/fss_read/c/main/main.c
level_3/fss_read/c/main/main.h
level_3/fss_write/c/main/common.c
level_3/fss_write/c/main/common.h
level_3/fss_write/c/main/main.h
level_3/iki_read/c/iki/main.c
level_3/iki_read/c/main/common.c
level_3/iki_read/c/main/common.h
level_3/iki_write/c/main/common.c
level_3/iki_write/c/main/common.h
level_3/status_code/c/main/common.c
level_3/status_code/c/main/common.h
level_3/utf8/c/main/common.c
level_3/utf8/c/main/common.h

index 95d261d08e15efb7506e21ee4316ee47beebc6ef..28cc60b4a459edd3e135befe777d54660eec5b9e 100644 (file)
@@ -9,9 +9,11 @@ extern "C" {
 
     if (!main) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     main->setting.state.step_small = byte_dump_allocation_console_d;
 
-    f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
+    f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
 
     main->setting.state.step_small = byte_dump_allocation_small_d;
 
@@ -123,19 +125,19 @@ extern "C" {
       }
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_help_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_version_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_copyright_d;
 
       return;
@@ -151,10 +153,10 @@ extern "C" {
       main->setting.flag &= ~byte_dump_main_flag_pipe_d;
     }
 
-    if (main->program.parameters.array[byte_dump_parameter_width_e].result & f_console_result_value_e) {
-      index = main->program.parameters.array[byte_dump_parameter_width_e].values.array[main->program.parameters.array[byte_dump_parameter_width_e].values.used - 1];
+    if (parameters->array[byte_dump_parameter_width_e].result & f_console_result_value_e) {
+      index = parameters->array[byte_dump_parameter_width_e].values.array[parameters->array[byte_dump_parameter_width_e].values.used - 1];
 
-      main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &number);
+      main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[index], &number);
 
       // Negative numbers are not supported.
       if (main->setting.state.status == F_number_negative) {
@@ -162,14 +164,14 @@ extern "C" {
       }
 
       if (F_status_is_error(main->setting.state.status) || number < 0x1 || number >= 0xfb) {
-        byte_dump_print_error_parameter_range_out(&main->program.error, byte_dump_long_width_s, 1, 250, main->program.parameters.arguments.array[index]);
+        byte_dump_print_error_parameter_range_out(&main->program.error, byte_dump_long_width_s, 1, 250, parameters->arguments.array[index]);
 
         return;
       }
 
       main->setting.width = (uint8_t) number;
     }
-    else if (main->program.parameters.array[byte_dump_parameter_width_e].result & f_console_result_found_e) {
+    else if (parameters->array[byte_dump_parameter_width_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, byte_dump_long_width_s);
@@ -200,10 +202,10 @@ extern "C" {
 
       for (uint8_t i = 0; i < 2; ++i) {
 
-        if (main->program.parameters.array[indexs[i]].result & f_console_result_value_e) {
-          index = main->program.parameters.array[indexs[i]].values.array[main->program.parameters.array[indexs[i]].values.used - 1];
+        if (parameters->array[indexs[i]].result & f_console_result_value_e) {
+          index = parameters->array[indexs[i]].values.array[parameters->array[indexs[i]].values.used - 1];
 
-          main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &number);
+          main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[index], &number);
 
           // Negative numbers are not supported.
           if (main->setting.state.status == F_number_negative) {
@@ -211,7 +213,7 @@ extern "C" {
           }
 
           if (F_status_is_error(main->setting.state.status)) {
-            byte_dump_print_error_parameter_range_out(&main->program.error, names[i], 0, F_number_t_size_unsigned_d, main->program.parameters.arguments.array[index]);
+            byte_dump_print_error_parameter_range_out(&main->program.error, names[i], 0, F_number_t_size_unsigned_d, parameters->arguments.array[index]);
 
             return;
           }
@@ -219,7 +221,7 @@ extern "C" {
           *values[i] = number;
           main->setting.flag |= flags[i];
         }
-        else if (main->program.parameters.array[indexs[i]].result & f_console_result_found_e) {
+        else if (parameters->array[indexs[i]].result & f_console_result_found_e) {
           main->setting.state.status = F_status_set_error(F_parameter);
 
           fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, names[i]);
@@ -245,36 +247,36 @@ extern "C" {
       }
     }
 
-    if (main->program.parameters.array[byte_dump_parameter_text_e].result & f_console_result_found_e) {
+    if (parameters->array[byte_dump_parameter_text_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_text_d;
     }
     else {
       main->setting.flag &= ~byte_dump_main_flag_text_d;
     }
 
-    if (main->program.parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) {
+    if (parameters->array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_unicode_d;
     }
     else {
       main->setting.flag &= ~byte_dump_main_flag_unicode_d;
     }
 
-    if (main->program.parameters.array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) {
+    if (parameters->array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_placeholder_d;
     }
     else {
       main->setting.flag &= ~byte_dump_main_flag_placeholder_d;
     }
 
-    if (main->program.parameters.array[byte_dump_parameter_classic_e].result & f_console_result_found_e) {
+    if (parameters->array[byte_dump_parameter_classic_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_classic_d;
     }
     else {
       main->setting.flag &= ~byte_dump_main_flag_classic_d;
     }
 
-    if (main->program.parameters.remaining.used) {
-      main->setting.state.status = f_memory_array_increase_by(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size);
+    if (parameters->remaining.used) {
+      main->setting.state.status = f_memory_array_increase_by(parameters->remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size);
 
       if (F_status_is_error(main->setting.state.status)) {
         byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_memory_array_increase_by));
@@ -284,20 +286,20 @@ extern "C" {
 
       f_status_t status_files = F_okay;
 
-      for (index = 0; index < main->program.parameters.remaining.used; ++index) {
+      for (index = 0; index < parameters->remaining.used; ++index) {
 
         if (byte_dump_signal_check(main)) return;
 
-        number = main->program.parameters.remaining.array[index];
+        number = parameters->remaining.array[index];
 
-        if (!main->program.parameters.arguments.array[number].used) continue;
+        if (!parameters->arguments.array[number].used) continue;
 
         // Statically allocate the inner strings.
-        main->setting.files.array[main->setting.files.used].string = main->program.parameters.arguments.array[number].string;
-        main->setting.files.array[main->setting.files.used].used = main->program.parameters.arguments.array[number].used;
+        main->setting.files.array[main->setting.files.used].string = parameters->arguments.array[number].string;
+        main->setting.files.array[main->setting.files.used].used = parameters->arguments.array[number].used;
         main->setting.files.array[main->setting.files.used++].size = 0;
 
-        main->setting.state.status = f_file_exists(main->program.parameters.arguments.array[number], F_true);
+        main->setting.state.status = f_file_exists(parameters->arguments.array[number], F_true);
 
         if (main->setting.state.status == F_false) {
           main->setting.state.status = F_status_set_error(F_file_found_not);
@@ -308,7 +310,7 @@ extern "C" {
             status_files = main->setting.state.status;
           }
 
-          byte_dump_print_error_file(&main->program.error, macro_byte_dump_f(f_file_exists), main->program.parameters.arguments.array[number], f_file_operation_find_s, fll_error_file_type_file_e);
+          byte_dump_print_error_file(&main->program.error, macro_byte_dump_f(f_file_exists), parameters->arguments.array[number], f_file_operation_find_s, fll_error_file_type_file_e);
         }
       } // for
 
index f2c9313f242d3d653feb4b3316d7981c8dff1c10..9044499ca25fbbd0e233660276dbef732bf88582 100644 (file)
@@ -9,9 +9,11 @@ extern "C" {
 
     if (!main) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     main->setting.state.step_small = example_allocation_console_d;
 
-    f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
+    f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
 
     main->setting.state.step_small = example_allocation_small_d;
 
@@ -37,19 +39,19 @@ extern "C" {
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= example_main_flag_help_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= example_main_flag_version_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= example_main_flag_copyright_d;
 
       return;
index 0dfd7f77c0fddb8f8062df92a263a92dfb958c37..83eeead1db7273dbe44bc55983403248ddf5380e 100644 (file)
@@ -32,10 +32,10 @@ extern "C" {
  *     F_okay on success.
  *
  *     Errors (with error bit) from: f_console_parameter_process().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *
  * @see f_console_parameter_process()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  */
 #ifndef _di_example_setting_load_
   extern void example_setting_load(const f_console_arguments_t arguments, example_main_t * const main);
index a8683eecfb47dff16c96b4fdfe29df49f3488d9a..be07ce7831a8e7f90c51695193aa39f357fc6197 100644 (file)
@@ -35,7 +35,7 @@ extern "C" {
  *     Errors (with error bit) from: f_path_directory_cleanup().
  *     Errors (with error bit) from: f_utf_is_word_dash_plus().
  *     Errors (with error bit) from: fll_program_parameter_additional_rip().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  * @see f_console_parameter_process()
@@ -44,7 +44,7 @@ extern "C" {
  * @see f_path_directory_cleanup()
  * @see f_utf_is_word_dash_plus()
  * @see fll_program_parameter_additional_rip()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_fake_setting_load_
index a66e89dc31dbb47bc4382fe8814f4c374e68e28a..a1adf47eae6e81c59969483ace65ece45d98e873 100644 (file)
@@ -9,9 +9,11 @@ extern "C" {
 
     if (!main) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     main->setting.state.step_small = firewall_allocation_console_d;
 
-    f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
+    f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
 
     main->setting.state.step_small = firewall_allocation_small_d;
 
@@ -37,19 +39,19 @@ extern "C" {
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= firewall_main_flag_help_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= firewall_main_flag_version_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= firewall_main_flag_copyright_d;
 
       return;
@@ -57,49 +59,49 @@ extern "C" {
 
     f_number_unsigned_t index = 0;
 
-    if (main->program.parameters.array[firewall_parameter_operation_start_e].result & f_console_result_found_e) {
+    if (parameters->array[firewall_parameter_operation_start_e].result & f_console_result_found_e) {
       main->setting.flag &= ~firewall_main_flag_operation_d;
       main->setting.flag |= firewall_main_flag_operation_start_d;
 
-      index = main->program.parameters.array[firewall_parameter_operation_start_e].location;
+      index = parameters->array[firewall_parameter_operation_start_e].location;
     }
 
-    if (main->program.parameters.array[firewall_parameter_operation_stop_e].result & f_console_result_found_e) {
-      if (!(main->setting.flag & firewall_main_flag_operation_d) || main->program.parameters.array[firewall_parameter_operation_stop_e].location > index) {
+    if (parameters->array[firewall_parameter_operation_stop_e].result & f_console_result_found_e) {
+      if (!(main->setting.flag & firewall_main_flag_operation_d) || parameters->array[firewall_parameter_operation_stop_e].location > index) {
         main->setting.flag &= ~firewall_main_flag_operation_d;
         main->setting.flag |= firewall_main_flag_operation_stop_d;
 
-        index = main->program.parameters.array[firewall_parameter_operation_stop_e].location;
+        index = parameters->array[firewall_parameter_operation_stop_e].location;
       }
     }
 
-    if (main->program.parameters.array[firewall_parameter_operation_restart_e].result & f_console_result_found_e) {
-      if (!(main->setting.flag & firewall_main_flag_operation_d) || main->program.parameters.array[firewall_parameter_operation_restart_e].location > index) {
+    if (parameters->array[firewall_parameter_operation_restart_e].result & f_console_result_found_e) {
+      if (!(main->setting.flag & firewall_main_flag_operation_d) || parameters->array[firewall_parameter_operation_restart_e].location > index) {
         main->setting.flag &= ~firewall_main_flag_operation_d;
         main->setting.flag |= firewall_main_flag_operation_restart_d;
 
-        index = main->program.parameters.array[firewall_parameter_operation_restart_e].location;
+        index = parameters->array[firewall_parameter_operation_restart_e].location;
       }
     }
 
-    if (main->program.parameters.array[firewall_parameter_operation_lock_e].result & f_console_result_found_e) {
-      if (!(main->setting.flag & firewall_main_flag_operation_d) || main->program.parameters.array[firewall_parameter_operation_lock_e].location > index) {
+    if (parameters->array[firewall_parameter_operation_lock_e].result & f_console_result_found_e) {
+      if (!(main->setting.flag & firewall_main_flag_operation_d) || parameters->array[firewall_parameter_operation_lock_e].location > index) {
         main->setting.flag &= ~firewall_main_flag_operation_d;
         main->setting.flag |= firewall_main_flag_operation_lock_d;
 
-        index = main->program.parameters.array[firewall_parameter_operation_lock_e].location;
+        index = parameters->array[firewall_parameter_operation_lock_e].location;
       }
     }
 
-    if (main->program.parameters.array[firewall_parameter_operation_show_e].result & f_console_result_found_e) {
-      if (!(main->setting.flag & firewall_main_flag_operation_d) || main->program.parameters.array[firewall_parameter_operation_show_e].location > index) {
+    if (parameters->array[firewall_parameter_operation_show_e].result & f_console_result_found_e) {
+      if (!(main->setting.flag & firewall_main_flag_operation_d) || parameters->array[firewall_parameter_operation_show_e].location > index) {
         main->setting.flag &= ~firewall_main_flag_operation_d;
         main->setting.flag |= firewall_main_flag_operation_show_d;
       }
     }
 
-    if (main->program.parameters.array[firewall_parameter_4_e].result & f_console_result_found_e) {
-      if (main->program.parameters.array[firewall_parameter_6_e].result & f_console_result_found_e) {
+    if (parameters->array[firewall_parameter_4_e].result & f_console_result_found_e) {
+      if (parameters->array[firewall_parameter_6_e].result & f_console_result_found_e) {
         main->setting.flag |= firewall_main_flag_ipv46_d;
       }
       else {
@@ -107,7 +109,7 @@ extern "C" {
         main->setting.flag |= firewall_main_flag_ipv4_d;
       }
     }
-    else if (main->program.parameters.array[firewall_parameter_6_e].result & f_console_result_found_e) {
+    else if (parameters->array[firewall_parameter_6_e].result & f_console_result_found_e) {
       main->setting.flag &= ~firewall_main_flag_ipv4_d;
       main->setting.flag |= firewall_main_flag_ipv6_d;
     }
@@ -120,26 +122,26 @@ extern "C" {
     }
 
     if (main->setting.flag & firewall_main_flag_operation_show_d) {
-      if (main->program.parameters.remaining.used) {
+      if (parameters->remaining.used) {
         main->setting.flag &= ~firewall_main_flag_operation_show_filter_nat_mangle_d;
 
-        for (f_number_unsigned_t i = 0; i < main->program.parameters.remaining.used; ++i) {
+        for (f_number_unsigned_t i = 0; i < parameters->remaining.used; ++i) {
 
           if (firewall_signal_check(main)) return;
 
-          index = main->program.parameters.remaining.array[i];
+          index = parameters->remaining.array[i];
 
-          if (f_compare_dynamic(firewall_show_nat_s, main->program.parameters.arguments.array[index]) == F_equal_to) {
+          if (f_compare_dynamic(firewall_show_nat_s, parameters->arguments.array[index]) == F_equal_to) {
             main->setting.flag |= firewall_main_flag_operation_show_nat_d;
           }
-          else if (f_compare_dynamic(firewall_show_mangle_s, main->program.parameters.arguments.array[index]) == F_equal_to) {
+          else if (f_compare_dynamic(firewall_show_mangle_s, parameters->arguments.array[index]) == F_equal_to) {
             main->setting.flag |= firewall_main_flag_operation_show_mangle_d;
           }
-          else if (f_compare_dynamic(firewall_show_filter_s, main->program.parameters.arguments.array[index]) == F_equal_to) {
+          else if (f_compare_dynamic(firewall_show_filter_s, parameters->arguments.array[index]) == F_equal_to) {
             main->setting.flag |= firewall_main_flag_operation_show_filter_d;
           }
           else {
-            firewall_print_warning_show_option_unknown(&main->program.warning, main->program.parameters.arguments.array[index]);
+            firewall_print_warning_show_option_unknown(&main->program.warning, parameters->arguments.array[index]);
           }
         } // for
       }
index f262d22a86693dcd2c9b16ce5ed975da7126568c..27df97d2170283c5d763beabde03a66130e68936 100644 (file)
@@ -32,10 +32,10 @@ extern "C" {
  *     F_okay on success.
  *
  *     Errors (with error bit) from: f_console_parameter_process().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *
  * @see f_console_parameter_process()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  */
 #ifndef _di_firewall_setting_load_
   extern void firewall_setting_load(const f_console_arguments_t arguments, firewall_main_t * const main);
index 67fd4300070ed343650ba524d3a85617baf0bd48..06b502909e4393e352cbe15075c5c6bd01d55ebe 100644 (file)
@@ -9,9 +9,11 @@ extern "C" {
 
     if (!main) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     main->setting.state.step_small = fss_identify_allocation_console_d;
 
-    f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
+    f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
 
     main->setting.state.step_small = fss_identify_allocation_small_d;
 
@@ -37,19 +39,19 @@ extern "C" {
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_identify_main_flag_help_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_identify_main_flag_version_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_identify_main_flag_copyright_d;
 
       return;
@@ -57,31 +59,31 @@ extern "C" {
 
     f_number_unsigned_t index = 0;
 
-    if (main->program.parameters.array[fss_identify_parameter_content_e].result & f_console_result_found_e) {
+    if (parameters->array[fss_identify_parameter_content_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_identify_main_flag_content_d;
     }
     else {
       main->setting.flag &= ~fss_identify_main_flag_content_d;
     }
 
-    if (main->program.parameters.array[fss_identify_parameter_object_e].result & f_console_result_found_e) {
+    if (parameters->array[fss_identify_parameter_object_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_identify_main_flag_object_d;
     }
     else {
       main->setting.flag &= ~fss_identify_main_flag_object_d;
     }
 
-    if (main->program.parameters.array[fss_identify_parameter_total_e].result & f_console_result_found_e) {
+    if (parameters->array[fss_identify_parameter_total_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_identify_main_flag_total_d;
     }
     else {
       main->setting.flag &= ~fss_identify_main_flag_total_d;
     }
 
-    if (main->program.parameters.array[fss_identify_parameter_line_e].result & f_console_result_value_e) {
-      index = main->program.parameters.array[fss_identify_parameter_line_e].values.array[main->program.parameters.array[fss_identify_parameter_line_e].values.used - 1];
+    if (parameters->array[fss_identify_parameter_line_e].result & f_console_result_value_e) {
+      index = parameters->array[fss_identify_parameter_line_e].values.array[parameters->array[fss_identify_parameter_line_e].values.used - 1];
 
-      main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &main->setting.line);
+      main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[index], &main->setting.line);
 
       // Negative numbers are not supported.
       if (main->setting.state.status == F_number_negative) {
@@ -89,14 +91,14 @@ extern "C" {
       }
 
       if (F_status_is_error(main->setting.state.status)) {
-        fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_line_s, main->program.parameters.arguments.array[index]);
+        fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_line_s, parameters->arguments.array[index]);
 
         return;
       }
 
       main->setting.flag |= fss_identify_main_flag_line_d;
     }
-    else if (main->program.parameters.array[fss_identify_parameter_line_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_identify_parameter_line_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_line_s);
@@ -107,10 +109,10 @@ extern "C" {
       main->setting.flag &= ~fss_identify_main_flag_line_d;
     }
 
-    if (main->program.parameters.array[fss_identify_parameter_name_e].result & f_console_result_value_e) {
+    if (parameters->array[fss_identify_parameter_name_e].result & f_console_result_value_e) {
       main->setting.names.used = 0;
 
-      main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[fss_identify_parameter_name_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.names.array, &main->setting.names.used, &main->setting.names.size);
+      main->setting.state.status = f_memory_array_increase_by(parameters->array[fss_identify_parameter_name_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.names.array, &main->setting.names.used, &main->setting.names.size);
 
       if (F_status_is_error(main->setting.state.status)) {
         fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_memory_array_increase_by));
@@ -118,7 +120,7 @@ extern "C" {
         return;
       }
 
-      main->setting.names.used = main->program.parameters.array[fss_identify_parameter_name_e].values.used;
+      main->setting.names.used = parameters->array[fss_identify_parameter_name_e].values.used;
 
       f_number_unsigned_t i = 0;
       f_number_unsigned_t j = 0;
@@ -128,10 +130,10 @@ extern "C" {
 
         if (fss_identify_signal_check(main)) return;
 
-        index = main->program.parameters.array[fss_identify_parameter_name_e].values.array[i];
+        index = parameters->array[fss_identify_parameter_name_e].values.array[i];
         main->setting.names.array[i].used = 0;
 
-        main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[index], &main->setting.names.array[i]);
+        main->setting.state.status = f_string_dynamic_append_nulless(parameters->arguments.array[index], &main->setting.names.array[i]);
 
         if (F_status_is_error(main->setting.state.status)) {
           fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_string_dynamic_append_nulless));
@@ -184,7 +186,7 @@ extern "C" {
 
       main->setting.flag |= fss_identify_main_flag_name_d;
     }
-    else if (main->program.parameters.array[fss_identify_parameter_name_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_identify_parameter_name_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_name_s);
@@ -195,10 +197,10 @@ extern "C" {
       main->setting.flag &= ~fss_identify_parameter_name_e;
     }
 
-    if (main->program.parameters.remaining.used) {
+    if (parameters->remaining.used) {
       main->setting.files.used = 0;
 
-      main->setting.state.status = f_memory_array_increase_by(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size);
+      main->setting.state.status = f_memory_array_increase_by(parameters->remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size);
 
       if (F_status_is_error(main->setting.state.status)) {
         fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_memory_array_increase_by));
@@ -207,14 +209,14 @@ extern "C" {
       }
 
       // Construct the array without allocating any more memory by setting this as a static string (used > 0, size = 0).
-      for (f_number_unsigned_t index = 0; main->setting.files.used < main->program.parameters.remaining.used; ) {
+      for (f_number_unsigned_t index = 0; main->setting.files.used < parameters->remaining.used; ) {
 
         if (fss_identify_signal_check(main)) return;
 
-        index = main->program.parameters.remaining.array[main->setting.files.used];
+        index = parameters->remaining.array[main->setting.files.used];
 
-        main->setting.files.array[main->setting.files.used].string = main->program.parameters.arguments.array[index].string;
-        main->setting.files.array[main->setting.files.used].used = main->program.parameters.arguments.array[index].used;
+        main->setting.files.array[main->setting.files.used].string = parameters->arguments.array[index].string;
+        main->setting.files.array[main->setting.files.used].used = parameters->arguments.array[index].used;
         main->setting.files.array[main->setting.files.used++].size = 0;
       } // for
 
index d1a52682cc1b3141e5e1b3890435c63d985602cc..5f6b384643a6b920134c9bbc6b326b159f5b6ec7 100644 (file)
@@ -32,10 +32,10 @@ extern "C" {
  *     F_okay on success.
  *
  *     Errors (with error bit) from: f_console_parameter_process().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *
  * @see f_console_parameter_process()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  */
 #ifndef _di_fss_identify_setting_load_
   extern void fss_identify_setting_load(const f_console_arguments_t arguments, fss_identify_main_t * const main);
index 169c2ea0b7ae6c7f2663cd3dcd16cd838a947f7f..3552a9c0970843e20eb2337a6fe4c376cb7de58c 100644 (file)
@@ -45,12 +45,12 @@ extern "C" {
 
     if (!main) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     main->program.output.to.id = F_type_descriptor_output_d;
     main->program.output.to.stream = F_type_output_d;
     main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
 
-    f_console_parameters_t * const parameters = &main->program.parameters;
-
     main->setting.state.step_small = fss_read_allocation_console_d;
 
     f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
index 4e30712bdbee222a8ba896a3fd0be54910d539f5..feed8bbc9c74f3a6e218cefee7ff9b07fe6437c4 100644 (file)
@@ -60,7 +60,7 @@ extern "C" {
  *
  *     Errors (with error bit) from: f_console_parameter_process().
  *     Errors (with error bit) from: f_file_stream_open().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  *     Errors (with error bit) from: fss_read_setting_load_depth().
@@ -73,7 +73,7 @@ extern "C" {
  *
  * @see f_console_parameter_process()
  * @see f_file_stream_open()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  * @see fll_program_parameter_process_verbosity_standard()
  *
  * @see fss_read_setting_load_depth()
index 886a16adf8b3a4a040b38daa1ede46b0aa05b08b..ce31ce3018c274b4ea70cca4edebc8900f2ea3d7 100644 (file)
@@ -97,6 +97,8 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
     if (!main || F_status_is_error(main->setting.state.status) || (main->setting.flag & fss_read_main_flag_version_d)) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     // Use the default standard of: FSS-0000 (Basic)
     main->call.process_help = &fss_read_main_process_help;
     main->call.process_last_line = &fss_read_process_last_line;
@@ -134,9 +136,9 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
     main->setting.feature |= fss_read_feature_flag_line_single_d;
     main->setting.feature |= fss_read_feature_flag_quote_content_d | fss_read_feature_flag_quote_object_d;
 
-    if (main->program.parameters.array[fss_read_parameter_as_e].result & f_console_result_value_e && main->program.parameters.array[fss_read_parameter_as_e].values.used) {
-      const f_number_unsigned_t index = main->program.parameters.array[fss_read_parameter_as_e].values.array[main->program.parameters.array[fss_read_parameter_as_e].values.used - 1];
-      const f_string_static_t as = main->program.parameters.arguments.array[index];
+    if (parameters->array[fss_read_parameter_as_e].result & f_console_result_value_e && parameters->array[fss_read_parameter_as_e].values.used) {
+      const f_number_unsigned_t index = parameters->array[fss_read_parameter_as_e].values.array[parameters->array[fss_read_parameter_as_e].values.used - 1];
+      const f_string_static_t as = parameters->arguments.array[index];
 
       if (f_compare_dynamic(as, fss_read_format_code_short_0000_s) == F_equal_to ||
           f_compare_dynamic(as, fss_read_format_code_long_0000_s) == F_equal_to ||
@@ -158,7 +160,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
         main->setting.feature |= fss_read_feature_flag_line_single_d;
         main->setting.feature |= fss_read_feature_flag_quote_content_d | fss_read_feature_flag_quote_object_d;
 
-        main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
+        parameters->array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
         main->call.process_at = &fss_read_process_at;
         main->call.process_at_line = &fss_read_process_at_line;
@@ -196,7 +198,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
         main->setting.feature |= fss_read_feature_flag_line_single_d | fss_read_feature_flag_content_multiple_d;
         main->setting.feature |= fss_read_feature_flag_quote_content_d | fss_read_feature_flag_quote_object_d;
 
-        main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
+        parameters->array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
         main->call.process_at = &fss_read_process_at;
         main->call.process_at_line = &fss_read_process_at_line;
@@ -233,7 +235,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
         main->setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
 
-        main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
+        parameters->array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
         main->call.process_at = &fss_read_process_at;
         main->call.process_at_line = &fss_read_process_at_line;
@@ -273,7 +275,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
         main->setting.feature |= fss_read_feature_flag_object_align_d;
         main->setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
 
-        main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
+        parameters->array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
         main->call.process_at = &fss_read_process_at;
         main->call.process_at_line = &fss_read_process_at_line;
@@ -312,7 +314,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
         main->setting.feature |= fss_read_feature_flag_depth_multiple_d | fss_read_feature_flag_object_align_d;
         main->setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
 
-        main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
+        parameters->array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
 
         main->call.process_at = &fss_read_process_at;
         main->call.process_at_line = &fss_read_process_at_line;
@@ -350,7 +352,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
         main->setting.feature |= fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
         main->setting.flag |= fss_read_main_flag_payload_error_d;
 
-        main->program.parameters.array[fss_read_parameter_payload_e].flag &= ~f_console_flag_disable_e;
+        parameters->array[fss_read_parameter_payload_e].flag &= ~f_console_flag_disable_e;
 
         main->call.process_at = &fss_read_process_at;
         main->call.process_at_line = &fss_read_process_at_line;
@@ -383,7 +385,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
       main->setting.state.step_small = fss_read_allocation_console_d;
 
-      main->setting.state.status = f_console_parameter_reset(&main->program.parameters);
+      main->setting.state.status = f_console_parameter_reset(parameters);
 
       if (F_status_is_error(main->setting.state.status)) {
         if (main->setting.flag & fss_read_main_flag_help_d) {
@@ -396,7 +398,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
         return;
       }
 
-      f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
+      f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
 
       if (F_status_is_error(main->setting.state.status)) {
         if (main->setting.flag & fss_read_main_flag_help_d) {
@@ -413,23 +415,23 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
       // If the --as parameter changed as a result of the re-run of the parameter processing, then something is wrong with the parameters.
       {
-        const f_number_unsigned_t index_new = main->program.parameters.array[fss_read_parameter_as_e].values.array[main->program.parameters.array[fss_read_parameter_as_e].values.used - 1];
+        const f_number_unsigned_t index_new = parameters->array[fss_read_parameter_as_e].values.array[parameters->array[fss_read_parameter_as_e].values.used - 1];
 
-        if (f_compare_dynamic(as, main->program.parameters.arguments.array[index_new]) != F_equal_to) {
+        if (f_compare_dynamic(as, parameters->arguments.array[index_new]) != F_equal_to) {
           main->setting.state.status = F_status_set_error(F_parameter);
 
           if (main->setting.flag & fss_read_main_flag_help_d) {
             fss_read_main_process_help(main);
           }
           else {
-            fss_read_main_print_error_parameter_as_changed(&main->program.error, as, main->program.parameters.arguments.array[index_new]);
+            fss_read_main_print_error_parameter_as_changed(&main->program.error, as, parameters->arguments.array[index_new]);
           }
 
           return;
         }
       }
     }
-    else if (main->program.parameters.array[fss_read_parameter_as_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_read_parameter_as_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       if (main->setting.flag & fss_read_main_flag_help_d) {
index e452f3aec40ffbbf011fa96b3394c2b5000431d9..04e6d53b94acaa8d53c9d9a0ad365edabe08593b 100644 (file)
@@ -71,12 +71,12 @@ extern int main(const int argc, const f_string_t *argv, const f_string_t *envp);
  *
  *     Errors (with error bit) from: f_console_parameter_process().
  *     Errors (with error bit) from: f_file_stream_open().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  * @see f_console_parameter_process()
  * @see f_file_stream_open()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  * @see fll_program_parameter_process_verbosity_standard()
  *
  * @see fss_read_setting_load()
index 11def301425d8ba6064ce996a688450a558da032..cd6d51912aa9e5e0dbf02cb1a76641df1326e575 100644 (file)
@@ -11,7 +11,9 @@ extern "C" {
 
     main->setting.state.step_small = fss_write_allocation_console_d;
 
-    f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
+    f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
 
     main->setting.state.step_small = fss_write_allocation_small_d;
 
@@ -41,15 +43,15 @@ extern "C" {
     main->program.output.to.stream = F_type_output_d;
     main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
 
-    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_write_main_flag_help_d;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_write_main_flag_version_d;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_write_main_flag_copyright_d;
     }
 
@@ -71,11 +73,11 @@ extern "C" {
       }
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) return;
-    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) return;
+    if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) return;
+    if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) return;
 
-    if ((main->program.parameters.array[fss_write_parameter_file_e].result & f_console_result_value_e) && main->program.parameters.array[fss_write_parameter_file_e].values.used) {
-      if (main->program.parameters.array[fss_write_parameter_file_e].values.used > 1) {
+    if ((parameters->array[fss_write_parameter_file_e].result & f_console_result_value_e) && parameters->array[fss_write_parameter_file_e].values.used) {
+      if (parameters->array[fss_write_parameter_file_e].values.used > 1) {
         main->setting.state.status = F_status_set_error(F_parameter);
 
         fll_program_print_error_parameter_must_specify_once(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_file_s);
@@ -83,22 +85,22 @@ extern "C" {
         return;
       }
 
-      const f_number_unsigned_t index = main->program.parameters.array[fss_write_parameter_file_e].values.array[0];
+      const f_number_unsigned_t index = parameters->array[fss_write_parameter_file_e].values.array[0];
 
       main->program.output.to.id = -1;
       main->program.output.to.stream = 0;
 
-      main->setting.state.status = f_file_stream_open(main->program.parameters.arguments.array[index], f_string_empty_s, &main->program.output.to);
+      main->setting.state.status = f_file_stream_open(parameters->arguments.array[index], f_string_empty_s, &main->program.output.to);
 
       if (F_status_is_error(main->setting.state.status)) {
-        fss_write_print_error_file(&main->program.error, macro_fss_write_f(f_file_stream_open), main->program.parameters.arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e);
+        fss_write_print_error_file(&main->program.error, macro_fss_write_f(f_file_stream_open), parameters->arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e);
 
         return;
       }
 
       main->setting.flag |= fss_write_main_flag_file_to_d;
     }
-    else if (main->program.parameters.array[fss_write_parameter_file_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_write_parameter_file_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_file_s);
@@ -106,8 +108,8 @@ extern "C" {
       return;
     }
 
-    if ((main->program.parameters.array[fss_write_parameter_object_e].result & f_console_result_value_e) && main->program.parameters.array[fss_write_parameter_object_e].values.used) {
-      f_number_unsigneds_t * const values = &main->program.parameters.array[fss_write_parameter_object_e].values;
+    if ((parameters->array[fss_write_parameter_object_e].result & f_console_result_value_e) && parameters->array[fss_write_parameter_object_e].values.used) {
+      f_number_unsigneds_t * const values = &parameters->array[fss_write_parameter_object_e].values;
 
       main->setting.objects.used = 0;
 
@@ -124,14 +126,14 @@ extern "C" {
 
         index = values->array[main->setting.objects.used];
 
-        main->setting.objects.array[main->setting.objects.used].string = main->program.parameters.arguments.array[index].string;
-        main->setting.objects.array[main->setting.objects.used].used = main->program.parameters.arguments.array[index].used;
+        main->setting.objects.array[main->setting.objects.used].string = parameters->arguments.array[index].string;
+        main->setting.objects.array[main->setting.objects.used].used = parameters->arguments.array[index].used;
         main->setting.objects.array[main->setting.objects.used++].size = 0;
       } // for
 
       main->setting.flag |= fss_write_main_flag_object_d;
     }
-    else if (main->program.parameters.array[fss_write_parameter_object_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_write_parameter_object_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_object_s);
@@ -139,11 +141,11 @@ extern "C" {
       return;
     }
 
-    if ((main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_value_e) && main->program.parameters.array[fss_write_parameter_content_e].values.used) {
+    if ((parameters->array[fss_write_parameter_content_e].result & f_console_result_value_e) && parameters->array[fss_write_parameter_content_e].values.used) {
 
       if (main->setting.flag & fss_write_main_flag_object_d) {
         if (!(main->setting.flag & fss_write_main_flag_content_multiple_d)) {
-          if (main->program.parameters.array[fss_write_parameter_content_e].values.used > main->program.parameters.array[fss_write_parameter_object_e].values.used) {
+          if (parameters->array[fss_write_parameter_content_e].values.used > parameters->array[fss_write_parameter_object_e].values.used) {
             main->setting.state.status = F_status_set_error(F_support_not);
 
             fss_write_print_error_one_content_only(&main->program.error);
@@ -156,9 +158,9 @@ extern "C" {
       f_number_unsigned_t stub_object_array[1] = { 0 };
       f_number_unsigneds_t stub_object = macro_f_number_unsigneds_t_initialize_1(stub_object_array, 0, 1);
 
-      f_number_unsigneds_t * const values_content = &main->program.parameters.array[fss_write_parameter_content_e].values;
-      f_number_unsigneds_t * const values_object = main->program.parameters.array[fss_write_parameter_object_e].values.used
-        ? &main->program.parameters.array[fss_write_parameter_object_e].values
+      f_number_unsigneds_t * const values_content = &parameters->array[fss_write_parameter_content_e].values;
+      f_number_unsigneds_t * const values_object = parameters->array[fss_write_parameter_object_e].values.used
+        ? &parameters->array[fss_write_parameter_object_e].values
         : &stub_object;
 
       main->setting.contentss.used = 0;
@@ -206,8 +208,8 @@ extern "C" {
 
           index = values_content->array[i++];
 
-          main->setting.contentss.array[j].array[main->setting.contentss.array[j].used].string = main->program.parameters.arguments.array[index].string;
-          main->setting.contentss.array[j].array[main->setting.contentss.array[j].used].used = main->program.parameters.arguments.array[index].used;
+          main->setting.contentss.array[j].array[main->setting.contentss.array[j].used].string = parameters->arguments.array[index].string;
+          main->setting.contentss.array[j].array[main->setting.contentss.array[j].used].used = parameters->arguments.array[index].used;
           main->setting.contentss.array[j].array[main->setting.contentss.array[j].used++].size = 0;
         } // for
       } // while
@@ -218,7 +220,7 @@ extern "C" {
 
       main->setting.flag |= fss_write_main_flag_content_d;
     }
-    else if (main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_write_parameter_content_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_content_s);
@@ -226,12 +228,12 @@ extern "C" {
       return;
     }
 
-    if ((main->program.parameters.array[fss_write_parameter_prepend_e].result & f_console_result_value_e) && main->program.parameters.array[fss_write_parameter_prepend_e].values.used) {
-      const f_number_unsigned_t index = main->program.parameters.array[fss_write_parameter_prepend_e].values.array[main->program.parameters.array[fss_write_parameter_prepend_e].location];
+    if ((parameters->array[fss_write_parameter_prepend_e].result & f_console_result_value_e) && parameters->array[fss_write_parameter_prepend_e].values.used) {
+      const f_number_unsigned_t index = parameters->array[fss_write_parameter_prepend_e].values.array[parameters->array[fss_write_parameter_prepend_e].location];
 
       main->setting.prepend.used = 0;
 
-      main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[index], &main->setting.prepend);
+      main->setting.state.status = f_string_dynamic_append_nulless(parameters->arguments.array[index], &main->setting.prepend);
 
       if (F_status_is_error(main->setting.state.status)) {
         fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_dynamic_append_nulless));
@@ -239,12 +241,12 @@ extern "C" {
         return;
       }
 
-      if (main->program.parameters.arguments.array[index].used) {
-        f_range_t range = macro_f_range_t_initialize_2(main->program.parameters.arguments.array[index].used);
+      if (parameters->arguments.array[index].used) {
+        f_range_t range = macro_f_range_t_initialize_2(parameters->arguments.array[index].used);
 
-        for (; range.start < main->program.parameters.arguments.array[index].used; range.start++) {
+        for (; range.start < parameters->arguments.array[index].used; range.start++) {
 
-          if (f_fss_is_space(main->program.parameters.arguments.array[index], range, &main->setting.state) == F_false) {
+          if (f_fss_is_space(parameters->arguments.array[index], range, &main->setting.state) == F_false) {
             if (F_status_is_error(main->setting.state.status)) {
               fss_write_print_error(&main->program.error, macro_fss_write_f(f_fss_is_space));
             }
@@ -261,7 +263,7 @@ extern "C" {
 
       main->setting.flag |= fss_write_main_flag_prepend_d;
     }
-    else if (main->program.parameters.array[fss_write_parameter_prepend_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_write_parameter_prepend_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_prepend_s);
@@ -269,8 +271,8 @@ extern "C" {
       return;
     }
 
-    if ((main->program.parameters.array[fss_write_parameter_ignore_e].result & f_console_result_value_e) && main->program.parameters.array[fss_write_parameter_ignore_e].values.used) {
-      if (main->program.parameters.array[fss_write_parameter_ignore_e].values.used % 2) {
+    if ((parameters->array[fss_write_parameter_ignore_e].result & f_console_result_value_e) && parameters->array[fss_write_parameter_ignore_e].values.used) {
+      if (parameters->array[fss_write_parameter_ignore_e].values.used % 2) {
         main->setting.state.status = F_status_set_error(F_parameter);
 
         fll_program_print_error_parameter_missing_value_requires_amount(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, fss_write_string_two_s);
@@ -283,11 +285,11 @@ extern "C" {
         f_number_unsigned_t stub_data_array[1] = { 0 };
         f_number_unsigneds_t stub_data = macro_f_number_unsigneds_t_initialize_1(stub_data_array, 0, 1);
 
-        f_number_unsigneds_t * const values_ignore = &main->program.parameters.array[fss_write_parameter_ignore_e].values;
-        f_number_unsigneds_t * const values_data = main->program.parameters.array[fss_write_parameter_object_e].values.used
-          ? &main->program.parameters.array[fss_write_parameter_object_e].values
-          : main->program.parameters.array[fss_write_parameter_content_e].values.used
-            ? &main->program.parameters.array[fss_write_parameter_content_e].values
+        f_number_unsigneds_t * const values_ignore = &parameters->array[fss_write_parameter_ignore_e].values;
+        f_number_unsigneds_t * const values_data = parameters->array[fss_write_parameter_object_e].values.used
+          ? &parameters->array[fss_write_parameter_object_e].values
+          : parameters->array[fss_write_parameter_content_e].values.used
+            ? &parameters->array[fss_write_parameter_content_e].values
             : &stub_data;
 
         main->setting.ignoress.used = 0;
@@ -334,20 +336,20 @@ extern "C" {
 
             index = values_ignore->array[i++];
 
-            main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].start);
+            main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[index], &main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].start);
 
             if (F_status_is_error(main->setting.state.status)) {
-              fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]);
+              fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, parameters->arguments.array[index]);
 
               return;
             }
 
             index = values_ignore->array[i++];
 
-            main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].stop);
+            main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[index], &main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].stop);
 
             if (F_status_is_error(main->setting.state.status)) {
-              fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]);
+              fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, parameters->arguments.array[index]);
 
               return;
             }
@@ -359,8 +361,8 @@ extern "C" {
                 &main->program.error,
                 f_console_symbol_long_normal_s,
                 fss_write_long_ignore_s,
-                main->program.parameters.arguments.array[values_ignore->array[i - 1]],
-                main->program.parameters.arguments.array[index]
+                parameters->arguments.array[values_ignore->array[i - 1]],
+                parameters->arguments.array[index]
               );
 
               return;
@@ -381,24 +383,24 @@ extern "C" {
         f_number_unsigned_t index = 0;
         f_range_t number = f_range_t_initialize;
 
-        while (i < main->program.parameters.array[fss_write_parameter_ignore_e].values.used) {
+        while (i < parameters->array[fss_write_parameter_ignore_e].values.used) {
 
-          index = main->program.parameters.array[fss_write_parameter_ignore_e].values.array[i++];
+          index = parameters->array[fss_write_parameter_ignore_e].values.array[i++];
 
-          main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &number.start);
+          main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[index], &number.start);
 
           if (F_status_is_error(main->setting.state.status)) {
-            fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]);
+            fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, parameters->arguments.array[index]);
 
             return;
           }
 
-          index = main->program.parameters.array[fss_write_parameter_ignore_e].values.array[i++];
+          index = parameters->array[fss_write_parameter_ignore_e].values.array[i++];
 
-          main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &number.stop);
+          main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[index], &number.stop);
 
           if (F_status_is_error(main->setting.state.status)) {
-            fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]);
+            fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, parameters->arguments.array[index]);
 
             return;
           }
@@ -410,8 +412,8 @@ extern "C" {
               &main->program.error,
               f_console_symbol_long_normal_s,
               fss_write_long_ignore_s,
-              main->program.parameters.arguments.array[main->program.parameters.array[fss_write_parameter_ignore_e].values.array[i - 1]],
-              main->program.parameters.arguments.array[index]
+              parameters->arguments.array[parameters->array[fss_write_parameter_ignore_e].values.array[i - 1]],
+              parameters->arguments.array[index]
             );
 
             return;
@@ -419,7 +421,7 @@ extern "C" {
         } // while
       }
     }
-    else if (main->program.parameters.array[fss_write_parameter_ignore_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_write_parameter_ignore_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
 
@@ -433,7 +435,7 @@ extern "C" {
       main->setting.flag &= ~fss_write_main_flag_ignore_d;
     }
 
-    if (main->program.parameters.array[fss_write_parameter_partial_e].result & f_console_result_found_e) {
+    if (parameters->array[fss_write_parameter_partial_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_write_main_flag_partial_d;
     }
 
@@ -470,7 +472,7 @@ extern "C" {
 
       for (uint8_t i = 0; i < 3; ++i) {
 
-        if (main->program.parameters.array[has[i]].result & f_console_result_found_e) {
+        if (parameters->array[has[i]].result & f_console_result_found_e) {
           if (main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d)) {
             if (!(main->setting.flag & fss_write_main_flag_partial_d)) {
               main->setting.state.status = F_status_set_error(F_parameter);
@@ -495,7 +497,7 @@ extern "C" {
             }
           }
 
-          if (main->program.parameters.array[has_cannots[i][0]].result & f_console_result_found_e) {
+          if (parameters->array[has_cannots[i][0]].result & f_console_result_found_e) {
             main->setting.state.status = F_status_set_error(F_parameter);
 
             fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][0]);
@@ -503,7 +505,7 @@ extern "C" {
             return;
           }
 
-          if (main->program.parameters.array[has_cannots[i][1]].result & f_console_result_found_e) {
+          if (parameters->array[has_cannots[i][1]].result & f_console_result_found_e) {
             main->setting.state.status = F_status_set_error(F_parameter);
 
             fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][1]);
@@ -519,7 +521,7 @@ extern "C" {
     if (main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d)) {
       if (main->setting.flag & fss_write_main_flag_object_d) {
         if (main->setting.flag & fss_write_main_flag_content_multiple_d) {
-          if (main->program.parameters.array[fss_write_parameter_object_e].locations_sub.used > main->program.parameters.array[fss_write_parameter_content_e].locations_sub.used && !(main->setting.flag & fss_write_main_flag_partial_d)) {
+          if (parameters->array[fss_write_parameter_object_e].locations_sub.used > parameters->array[fss_write_parameter_content_e].locations_sub.used && !(main->setting.flag & fss_write_main_flag_partial_d)) {
             main->setting.state.status = F_status_set_error(F_parameter);
 
             fss_write_print_error_parameter_same_times_at_least(&main->program.error);
@@ -529,7 +531,7 @@ extern "C" {
         }
 
         if ((main->setting.flag & fss_write_main_flag_content_d) && (main->setting.flag & fss_write_main_flag_partial_d)) {
-          if (main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_value_e) {
+          if (parameters->array[fss_write_parameter_content_e].result & f_console_result_value_e) {
             main->setting.state.status = F_status_set_error(F_parameter);
 
             fll_program_print_error_parameter_cannot_use_with_xor(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_write_long_partial_s, fss_write_long_object_s, fss_write_long_content_s);
@@ -542,43 +544,43 @@ extern "C" {
 
     main->setting.quote = f_fss_quote_double_s;
 
-    if (main->program.parameters.array[fss_write_parameter_double_e].result & f_console_result_found_e) {
-      if (main->program.parameters.array[fss_write_parameter_single_e].result & f_console_result_found_e) {
-        if (main->program.parameters.array[fss_write_parameter_double_e].location < main->program.parameters.array[fss_write_parameter_single_e].location) {
+    if (parameters->array[fss_write_parameter_double_e].result & f_console_result_found_e) {
+      if (parameters->array[fss_write_parameter_single_e].result & f_console_result_found_e) {
+        if (parameters->array[fss_write_parameter_double_e].location < parameters->array[fss_write_parameter_single_e].location) {
           main->setting.quote = f_fss_quote_single_s;
 
-          if (main->program.parameters.array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
-            if (main->program.parameters.array[fss_write_parameter_single_e].location < main->program.parameters.array[fss_write_parameter_grave_e].location) {
+          if (parameters->array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
+            if (parameters->array[fss_write_parameter_single_e].location < parameters->array[fss_write_parameter_grave_e].location) {
               main->setting.quote = f_fss_quote_grave_s;
             }
           }
         }
-        else if (main->program.parameters.array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
-          if (main->program.parameters.array[fss_write_parameter_double_e].location < main->program.parameters.array[fss_write_parameter_grave_e].location) {
+        else if (parameters->array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
+          if (parameters->array[fss_write_parameter_double_e].location < parameters->array[fss_write_parameter_grave_e].location) {
             main->setting.quote = f_fss_quote_grave_s;
           }
         }
       }
-      else if (main->program.parameters.array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
-        if (main->program.parameters.array[fss_write_parameter_double_e].location < main->program.parameters.array[fss_write_parameter_grave_e].location) {
+      else if (parameters->array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
+        if (parameters->array[fss_write_parameter_double_e].location < parameters->array[fss_write_parameter_grave_e].location) {
           main->setting.quote = f_fss_quote_grave_s;
         }
       }
     }
-    else if (main->program.parameters.array[fss_write_parameter_single_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_write_parameter_single_e].result & f_console_result_found_e) {
       main->setting.quote = f_fss_quote_single_s;
 
-      if (main->program.parameters.array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
-        if (main->program.parameters.array[fss_write_parameter_single_e].location < main->program.parameters.array[fss_write_parameter_grave_e].location) {
+      if (parameters->array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
+        if (parameters->array[fss_write_parameter_single_e].location < parameters->array[fss_write_parameter_grave_e].location) {
           main->setting.quote = f_fss_quote_grave_s;
         }
       }
     }
-    else if (main->program.parameters.array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
+    else if (parameters->array[fss_write_parameter_grave_e].result & f_console_result_found_e) {
       main->setting.quote = f_fss_quote_grave_s;
     }
 
-    if (main->program.parameters.array[fss_write_parameter_trim_e].result & f_console_result_found_e) {
+    if (parameters->array[fss_write_parameter_trim_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_write_main_flag_trim_d;
     }
 
index 48da5fbbc930e111bde77631424ea875d5159b46..9c4e2fc0b10635c4e0ab73f92d6cb4f49062037e 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
  *
  *     Errors (with error bit) from: f_console_parameter_process().
  *     Errors (with error bit) from: f_file_stream_open().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  * @param load_call
  *   (optional) Designate a function to call after performing the initial processing, but before printing help.
@@ -48,7 +48,7 @@ extern "C" {
  *
  * @see f_console_parameter_process()
  * @see f_file_stream_open()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_fss_write_setting_load_
index 17b8647259510c5c9076a1ef8631305dc0fd7175..4bf474d54f17bcc0b4c42f17001e9dd4fe544d8a 100644 (file)
@@ -73,16 +73,6 @@ extern int main(const int argc, const f_string_t *argv, const f_string_t *envp);
  *     F_okay on success.
  *     F_data_not on success but nothing was provided to operate with.
  *
- *     Errors (with error bit) from: f_console_parameter_process().
- *     Errors (with error bit) from: f_file_stream_open().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
- *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
- *
- * @see f_console_parameter_process()
- * @see f_file_stream_open()
- * @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity_standard()
- *
  * @see fss_write_setting_load()
  */
 #ifndef _di_fss_write_main_setting_load_as_
index bdd24626320b5d5686781ca40e98b5a9103be185..16bf5649d77a3e7265d3fb73ad102a794e680c7c 100644 (file)
@@ -13,6 +13,7 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
   data.program.output.flag |= iki_read_print_flag_out_d;
   data.program.message.flag |= iki_read_print_flag_message_d | iki_read_print_flag_out_d;
   data.program.warning.flag |= iki_read_print_flag_warning_d | iki_read_print_flag_out_d;
+
   data.program.error.custom = (void *) &data;
   data.program.debug.custom = (void *) &data;
   data.program.message.custom = (void *) &data;
index eca54c23d48a6a505e6f4edceccd5dc5b5ce5f81..2c1b7cd97d4d34b0c3a67786b33420ebfd6a786c 100644 (file)
@@ -9,12 +9,12 @@ extern "C" {
 
     if (!main) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     main->program.output.to.id = F_type_descriptor_output_d;
     main->program.output.to.stream = F_type_output_d;
     main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
 
-    f_console_parameters_t * const parameters = &main->program.parameters;
-
     main->setting.state.step_small = iki_read_allocation_console_d;
 
     f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
index 2545bf82ac5512f4495340330e0320aa2dd1993b..dc7bfa4489823a0c1a012ce3c765ef8f7402697d 100644 (file)
@@ -35,7 +35,7 @@ extern "C" {
  *     Errors (with error bit) from: f_file_exists().
  *     Errors (with error bit) from: f_memory_array_resize().
  *     Errors (with error bit) from: f_string_dynamic_append().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  * @param do_settings_load
  *   (optional) Designate a function to call after performing the initial processing, but before printing help.
@@ -47,7 +47,7 @@ extern "C" {
  * @see f_file_exists()
  * @see f_memory_array_resize()
  * @see f_string_dynamic_append()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_iki_read_setting_load_
index e3b1610444c576d9394449397d3d1cc5edf721c1..8fd2cf455009d944cb5a5b16557f2acc73183625 100644 (file)
@@ -9,15 +9,15 @@ extern "C" {
 
     if (!main) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     main->program.output.to.id = F_type_descriptor_output_d;
     main->program.output.to.stream = F_type_output_d;
     main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
 
-    f_console_parameters_t * const parameters = &main->program.parameters;
-
     main->setting.state.step_small = iki_write_allocation_console_d;
 
-    f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
+    f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
 
     main->setting.state.step_small = iki_write_allocation_small_d;
 
index 18624962ead7c75a979fd625c7f01252aa055ae4..3cedd88796503f273c10f71b99b761ba44e9e888 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
  *
  *     Errors (with error bit) from: f_console_parameter_process().
  *     Errors (with error bit) from: f_file_stream_open().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  * @param do_settings_load
  *   (optional) Designate a function to call after performing the initial processing, but before printing help.
@@ -43,7 +43,7 @@ extern "C" {
  *
  * @see f_console_parameter_process()
  * @see f_file_stream_open()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_iki_write_setting_load_
index 18e7ce5846883e3c79967084890cf011e668d04e..67ddf6c228647270ad9cf5c68947bab84408eee1 100644 (file)
@@ -9,9 +9,11 @@ extern "C" {
 
     if (!main) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     main->setting.state.step_small = status_code_allocation_console_d;
 
-    f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
+    f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
 
     main->setting.state.step_small = status_code_allocation_small_d;
 
@@ -37,19 +39,19 @@ extern "C" {
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= status_code_main_flag_help_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= status_code_main_flag_version_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= status_code_main_flag_copyright_d;
 
       return;
@@ -62,19 +64,19 @@ extern "C" {
       main->setting.flag &= ~status_code_main_flag_pipe_d;
     }
 
-    if (main->program.parameters.array[status_code_parameter_error_e].result & f_console_result_found_e) {
+    if (parameters->array[status_code_parameter_error_e].result & f_console_result_found_e) {
       main->setting.flag |= status_code_main_flag_error_d;
     }
 
-    if (main->program.parameters.array[status_code_parameter_fine_e].result & f_console_result_found_e) {
+    if (parameters->array[status_code_parameter_fine_e].result & f_console_result_found_e) {
       main->setting.flag |= status_code_main_flag_fine_d;
     }
 
-    if (main->program.parameters.array[status_code_parameter_warning_e].result & f_console_result_found_e) {
+    if (parameters->array[status_code_parameter_warning_e].result & f_console_result_found_e) {
       main->setting.flag |= status_code_main_flag_warning_d;
     }
 
-    if (main->program.parameters.array[status_code_parameter_number_e].result & f_console_result_found_e) {
+    if (parameters->array[status_code_parameter_number_e].result & f_console_result_found_e) {
       main->setting.flag |= status_code_main_flag_number_d;
     }
 
@@ -105,7 +107,7 @@ extern "C" {
       return;
     }
 
-    if (main->program.parameters.remaining.used == 0 && !(main->program.pipe & fll_program_data_pipe_input_e)) {
+    if (parameters->remaining.used == 0 && !(main->program.pipe & fll_program_data_pipe_input_e)) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       status_code_print_error_no_status_codes(&main->program.error);
index 7238b27f00b8ab950c9f3f8a1bfcd9a07d54128b..ae26e837080555f40d8bf22d95a3dd7264954477 100644 (file)
@@ -32,10 +32,10 @@ extern "C" {
  *     F_okay on success.
  *
  *     Errors (with error bit) from: f_console_parameter_process().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *
  * @see f_console_parameter_process()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  */
 #ifndef _di_status_code_setting_load_
   extern void status_code_setting_load(const f_console_arguments_t arguments, status_code_main_t * const main);
index 0d0df014aa5b840476c3c62b29c86f337f5116ed..5468c615b82ecf75e9a4c29f4e6372b3075e1e7a 100644 (file)
@@ -9,9 +9,11 @@ extern "C" {
 
     if (!main) return;
 
+    f_console_parameters_t * const parameters = &main->program.parameters;
+
     main->setting.state.step_small = utf8_allocation_console_d;
 
-    f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
+    f_console_parameter_process(arguments, parameters, &main->setting.state, 0);
 
     main->setting.state.step_small = utf8_allocation_small_d;
 
@@ -93,7 +95,7 @@ extern "C" {
           main->setting.mode &= ~(utf8_mode_to_bytesequence_e | utf8_mode_to_codepoint_e);
 
           // --to_width may be specified with --to_combining.
-          if (main->program.parameters.array[utf8_parameter_to_width_e].result & f_console_result_found_e) {
+          if (parameters->array[utf8_parameter_to_width_e].result & f_console_result_found_e) {
             main->setting.mode |= utf8_mode_to_width_e;
           }
 
@@ -103,7 +105,7 @@ extern "C" {
           main->setting.mode &= ~(utf8_mode_to_bytesequence_e | utf8_mode_to_codepoint_e);
 
           // --to_width may be specified with --to_combining.
-          if (main->program.parameters.array[utf8_parameter_to_combining_e].result & f_console_result_found_e) {
+          if (parameters->array[utf8_parameter_to_combining_e].result & f_console_result_found_e) {
             main->setting.mode |= utf8_mode_to_combining_e;
           }
 
@@ -112,19 +114,19 @@ extern "C" {
       }
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= utf8_main_flag_help_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= utf8_main_flag_version_d;
 
       return;
     }
 
-    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= utf8_main_flag_copyright_d;
 
       return;
@@ -137,8 +139,8 @@ extern "C" {
       main->setting.flag &= ~utf8_main_flag_pipe_d;
     }
 
-    if (main->program.parameters.array[utf8_parameter_to_file_e].result & f_console_result_value_e) {
-      if (main->program.parameters.array[utf8_parameter_to_file_e].values.used > 1) {
+    if (parameters->array[utf8_parameter_to_file_e].result & f_console_result_value_e) {
+      if (parameters->array[utf8_parameter_to_file_e].values.used > 1) {
         main->setting.state.status = F_status_set_error(F_parameter);
 
         utf8_print_error_parameter_file_to_too_many(&main->program.error);
@@ -146,7 +148,7 @@ extern "C" {
         return;
       }
 
-      if (main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]].used) {
+      if (parameters->arguments.array[parameters->array[utf8_parameter_to_file_e].values.array[0]].used) {
         main->setting.path_files_to.used = 0;
 
         main->setting.state.status = f_memory_array_increase_by(1, sizeof(f_string_dynamic_t), (void **) &main->setting.path_files_to.array, &main->setting.path_files_to.used, &main->setting.path_files_to.size);
@@ -159,7 +161,7 @@ extern "C" {
 
         main->setting.path_files_to.array[main->setting.path_files_to.used].used = 0;
 
-        main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]], &main->setting.path_files_to.array[0]);
+        main->setting.state.status = f_string_dynamic_append_nulless(parameters->arguments.array[parameters->array[utf8_parameter_to_file_e].values.array[0]], &main->setting.path_files_to.array[0]);
 
         if (F_status_is_error(main->setting.state.status)) {
           utf8_print_error(&main->program.error, macro_utf8_f(f_string_dynamic_append_nulless));
@@ -169,10 +171,10 @@ extern "C" {
 
         ++main->setting.path_files_to.used;
 
-        main->setting.state.status = f_file_stream_open(main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_open_mode_write_append_s, &main->program.output.to);
+        main->setting.state.status = f_file_stream_open(parameters->arguments.array[parameters->array[utf8_parameter_to_file_e].values.array[0]], f_file_open_mode_write_append_s, &main->program.output.to);
 
         if (F_status_is_error(main->setting.state.status)) {
-          utf8_print_error_file(&main->program.error, macro_utf8_f(f_file_stream_open), main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_operation_open_s, fll_error_file_type_file_e);
+          utf8_print_error_file(&main->program.error, macro_utf8_f(f_file_stream_open), parameters->arguments.array[parameters->array[utf8_parameter_to_file_e].values.array[0]], f_file_operation_open_s, fll_error_file_type_file_e);
 
           return;
         }
@@ -180,14 +182,14 @@ extern "C" {
         main->setting.flag |= utf8_main_flag_file_to_d;
       }
       else {
-        utf8_print_error_parameter_file_name_empty(&main->program.error, main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]);
+        utf8_print_error_parameter_file_name_empty(&main->program.error, parameters->array[utf8_parameter_to_file_e].values.array[0]);
 
         main->setting.state.status = F_status_set_error(F_parameter);
 
         return;
       }
     }
-    else if (main->program.parameters.array[utf8_parameter_to_file_e].result & f_console_result_found_e) {
+    else if (parameters->array[utf8_parameter_to_file_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, utf8_long_to_file_s);
@@ -199,10 +201,10 @@ extern "C" {
       main->setting.flag &= ~utf8_main_flag_file_to_d;
     }
 
-    if (main->program.parameters.array[utf8_parameter_from_file_e].result & f_console_result_value_e) {
+    if (parameters->array[utf8_parameter_from_file_e].result & f_console_result_value_e) {
       main->setting.path_files_from.used = 0;
 
-      main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[utf8_parameter_from_file_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.path_files_from.array, &main->setting.path_files_from.used, &main->setting.path_files_from.size);
+      main->setting.state.status = f_memory_array_increase_by(parameters->array[utf8_parameter_from_file_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.path_files_from.array, &main->setting.path_files_from.used, &main->setting.path_files_from.size);
 
       if (F_status_is_error(main->setting.state.status)) {
         utf8_print_error(&main->program.error, macro_utf8_f(f_memory_array_increase_by));
@@ -210,17 +212,17 @@ extern "C" {
         return;
       }
 
-      main->setting.path_files_from.used = main->program.parameters.array[utf8_parameter_from_file_e].values.used;
+      main->setting.path_files_from.used = parameters->array[utf8_parameter_from_file_e].values.used;
 
       f_number_unsigned_t i = 0;
       f_number_unsigned_t index = 0;
 
       for (; i < main->setting.path_files_from.used; ++i) {
 
-        index = main->program.parameters.array[utf8_parameter_from_file_e].values.array[i];
+        index = parameters->array[utf8_parameter_from_file_e].values.array[i];
         main->setting.path_files_from.array[i].used = 0;
 
-        main->setting.state.status = f_string_dynamic_append(main->program.parameters.arguments.array[index], &main->setting.path_files_from.array[i]);
+        main->setting.state.status = f_string_dynamic_append(parameters->arguments.array[index], &main->setting.path_files_from.array[i]);
 
         if (F_status_is_error(main->setting.state.status)) {
           fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_utf8_f(f_string_dynamic_append_nulless), fll_error_file_flag_fallback_e);
@@ -228,9 +230,9 @@ extern "C" {
           break;
         }
 
-        if (main->program.parameters.arguments.array[index].used) {
-          if (f_file_exists(main->program.parameters.arguments.array[index], F_true) != F_true) {
-            utf8_print_error_parameter_file_not_found(&main->program.error, F_true, main->program.parameters.arguments.array[index]);
+        if (parameters->arguments.array[index].used) {
+          if (f_file_exists(parameters->arguments.array[index], F_true) != F_true) {
+            utf8_print_error_parameter_file_not_found(&main->program.error, F_true, parameters->arguments.array[index]);
 
             if (F_status_is_error_not(main->setting.state.status)) {
               main->setting.state.status = F_status_set_error(F_file_found_not);
@@ -250,7 +252,7 @@ extern "C" {
 
       main->setting.flag |= utf8_main_flag_file_from_d;
     }
-    else if (main->program.parameters.array[utf8_parameter_from_file_e].result & f_console_result_found_e) {
+    else if (parameters->array[utf8_parameter_from_file_e].result & f_console_result_found_e) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, utf8_long_from_file_s);
@@ -261,10 +263,10 @@ extern "C" {
       main->setting.flag &= ~utf8_main_flag_file_from_d;
     }
 
-    if (main->program.parameters.remaining.used) {
+    if (parameters->remaining.used) {
       main->setting.remaining.used = 0;
 
-      main->setting.state.status = f_memory_array_increase_by(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.remaining.array, &main->setting.remaining.used, &main->setting.remaining.size);
+      main->setting.state.status = f_memory_array_increase_by(parameters->remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.remaining.array, &main->setting.remaining.used, &main->setting.remaining.size);
 
       if (F_status_is_error(main->setting.state.status)) {
         utf8_print_error(&main->program.error, macro_utf8_f(f_memory_array_increase_by));
@@ -273,17 +275,17 @@ extern "C" {
       }
 
       // Construct the array without allocating any more memory by setting this as a static string (used > 0, size = 0).
-      for (f_number_unsigned_t index = 0; main->setting.remaining.used < main->program.parameters.remaining.used; ) {
+      for (f_number_unsigned_t index = 0; main->setting.remaining.used < parameters->remaining.used; ) {
 
-        index = main->program.parameters.remaining.array[main->setting.remaining.used];
+        index = parameters->remaining.array[main->setting.remaining.used];
 
-        main->setting.remaining.array[main->setting.remaining.used].string = main->program.parameters.arguments.array[index].string;
-        main->setting.remaining.array[main->setting.remaining.used].used = main->program.parameters.arguments.array[index].used;
+        main->setting.remaining.array[main->setting.remaining.used].string = parameters->arguments.array[index].string;
+        main->setting.remaining.array[main->setting.remaining.used].used = parameters->arguments.array[index].used;
         main->setting.remaining.array[main->setting.remaining.used++].size = 0;
       } // for
     }
 
-    if (!((main->setting.flag & (utf8_main_flag_pipe_d | utf8_main_flag_file_from_d)) || main->program.parameters.remaining.used)) {
+    if (!((main->setting.flag & (utf8_main_flag_pipe_d | utf8_main_flag_file_from_d)) || parameters->remaining.used)) {
       main->setting.state.status = F_status_set_error(F_parameter);
 
       utf8_print_error_no_from(&main->program.error);
@@ -292,7 +294,7 @@ extern "C" {
     }
 
     if (!(main->setting.mode & utf8_mode_to_bytesequence_e)) {
-      if ((main->program.parameters.array[utf8_parameter_separate_e].result & f_console_result_found_e) || (main->program.parameters.array[utf8_parameter_headers_e].result & f_console_result_found_e)) {
+      if ((parameters->array[utf8_parameter_separate_e].result & f_console_result_found_e) || (parameters->array[utf8_parameter_headers_e].result & f_console_result_found_e)) {
         main->setting.prepend = utf8_string_prepend_padding_s;
         main->setting.append = f_string_eol_s;
       }
@@ -301,13 +303,13 @@ extern "C" {
       }
     }
 
-    if (main->program.parameters.array[utf8_parameter_headers_e].result & f_console_result_found_e) {
-      if (main->program.parameters.array[utf8_parameter_separate_e].result & f_console_result_found_e) {
-        if (main->program.parameters.array[utf8_parameter_headers_e].location < main->program.parameters.array[utf8_parameter_separate_e].location) {
+    if (parameters->array[utf8_parameter_headers_e].result & f_console_result_found_e) {
+      if (parameters->array[utf8_parameter_separate_e].result & f_console_result_found_e) {
+        if (parameters->array[utf8_parameter_headers_e].location < parameters->array[utf8_parameter_separate_e].location) {
           main->setting.flag |= utf8_main_flag_separate_d;
         }
-        else if (main->program.parameters.array[utf8_parameter_headers_e].location == main->program.parameters.array[utf8_parameter_separate_e].location) {
-          if (main->program.parameters.array[utf8_parameter_headers_e].location_sub < main->program.parameters.array[utf8_parameter_separate_e].location_sub) {
+        else if (parameters->array[utf8_parameter_headers_e].location == parameters->array[utf8_parameter_separate_e].location) {
+          if (parameters->array[utf8_parameter_headers_e].location_sub < parameters->array[utf8_parameter_separate_e].location_sub) {
             main->setting.flag |= utf8_main_flag_separate_d;
           }
           else {
@@ -322,11 +324,11 @@ extern "C" {
         main->setting.flag |= utf8_main_flag_header_d;
       }
     }
-    else if (main->program.parameters.array[utf8_parameter_separate_e].result & f_console_result_found_e) {
+    else if (parameters->array[utf8_parameter_separate_e].result & f_console_result_found_e) {
       main->setting.flag |= utf8_main_flag_separate_d;
     }
 
-    if (main->program.parameters.array[utf8_parameter_strip_invalid_e].result & f_console_result_found_e) {
+    if (parameters->array[utf8_parameter_strip_invalid_e].result & f_console_result_found_e) {
       main->setting.flag |= utf8_main_flag_strip_invalid_d;
     }
 
index b0b2bcf608c091904444532bb37c18ef173098a8..c2afabe136eab7a4b0ad26e89235e9e982d05ecc 100644 (file)
@@ -32,10 +32,10 @@ extern "C" {
  *     F_okay on success.
  *
  *     Errors (with error bit) from: f_console_parameter_process().
- *     Errors (with error bit) from: fll_program_parameter_process_context().
+ *     Errors (with error bit) from: fll_program_parameter_process_context_standard().
  *
  * @see f_console_parameter_process()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  */
 #ifndef _di_utf8_setting_load_
   extern void utf8_setting_load(const f_console_arguments_t arguments, utf8_main_t * const main);