]> Kevux Git Server - fll/commitdiff
Update: Move standard console parameters enumeration into a standard enumeration...
authorKevin Day <kevin@kevux.org>
Thu, 3 Aug 2023 02:32:26 +0000 (21:32 -0500)
committerKevin Day <kevin@kevux.org>
Thu, 3 Aug 2023 02:32:26 +0000 (21:32 -0500)
This should make the commonly used code slightly easier to maintain.

The control project is omitted because I am in the process of migrating it.
The migrated version will contain the appropriate changes from this.

61 files changed:
level_0/f_console/c/console/common.h
level_2/fll_program/c/private-program.c
level_2/fll_program/c/private-program.h
level_2/fll_program/c/program.c
level_2/fll_program/c/program.h
level_3/byte_dump/c/main/common.c
level_3/byte_dump/c/main/common.h
level_3/byte_dump/c/main/common/enumeration.h
level_3/byte_dump/c/main/common/print.c
level_3/byte_dump/c/main/common/print.h
level_3/controller/c/common.c
level_3/controller/c/common.h
level_3/controller/c/controller.c
level_3/controller/c/rule/private-rule.c
level_3/fake/c/main/common.c
level_3/fake/c/main/common.h
level_3/fake/c/main/common/enumeration.h
level_3/fake/c/main/common/print.c
level_3/fake/c/main/common/print.h
level_3/fake/c/main/make/load_parameters.c
level_3/fake/c/main/make/operate_process_type.c
level_3/firewall/c/common.c
level_3/firewall/c/common.h
level_3/firewall/c/firewall.c
level_3/fss_embedded_list_read/c/common.c
level_3/fss_embedded_list_read/c/common.h
level_3/fss_embedded_list_read/c/fss_embedded_list_read.c
level_3/fss_identify/c/main/common.c
level_3/fss_identify/c/main/common/enumeration.h
level_3/fss_identify/c/main/common/print.c
level_3/fss_identify/c/main/common/print.h
level_3/fss_read/c/main/common.c
level_3/fss_read/c/main/common.h
level_3/fss_read/c/main/common/enumeration.h
level_3/fss_read/c/main/common/print.c
level_3/fss_read/c/main/common/print.h
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/common/enumeration.h
level_3/fss_write/c/main/common/print.c
level_3/fss_write/c/main/common/print.h
level_3/fss_write/c/main/main.h
level_3/iki_read/c/main/common.c
level_3/iki_read/c/main/common.h
level_3/iki_read/c/main/common/enumeration.h
level_3/iki_read/c/main/common/print.c
level_3/iki_read/c/main/common/print.h
level_3/iki_write/c/main/common.c
level_3/iki_write/c/main/common.h
level_3/iki_write/c/main/common/enumeration.h
level_3/iki_write/c/main/common/print.c
level_3/iki_write/c/main/common/print.h
level_3/status_code/c/main/common.c
level_3/status_code/c/main/common/enumeration.h
level_3/status_code/c/main/common/print.c
level_3/status_code/c/main/common/print.h
level_3/utf8/c/main/common.c
level_3/utf8/c/main/common/enumeration.h
level_3/utf8/c/main/common/print.c
level_3/utf8/c/main/common/print.h

index 337245c191ee3e095e0a245dfd41b6403ce5026a..21e97347b8ae8032dc7b7d4f0449d059205c0e8a 100644 (file)
@@ -553,6 +553,34 @@ extern "C" {
 #endif // _di_f_console_parameters_t_
 
 /**
+ * Provide enumerations for the console parameters.
+ *
+ * See the f_console_standard_*_s strings for details.
+ *
+ * The f_console_standard_parameter_last_e is not a parameter.
+ * f_console_standard_parameter_last_e represents the end of the enumeration.
+ * Use f_console_standard_parameter_last_e as the starting enum for any custom project.
+ */
+#ifndef _di_f_console_parameter_state_type_e_
+  enum {
+    f_console_standard_parameter_help_e = 0,
+    f_console_standard_parameter_copyright_e,
+    f_console_standard_parameter_light_e,
+    f_console_standard_parameter_dark_e,
+    f_console_standard_parameter_no_color_e,
+    f_console_standard_parameter_verbosity_quiet_e,
+    f_console_standard_parameter_verbosity_error_e,
+    f_console_standard_parameter_verbosity_normal_e,
+    f_console_standard_parameter_verbosity_verbose_e,
+    f_console_standard_parameter_verbosity_debug_e,
+    f_console_standard_parameter_version_e,
+    f_console_standard_parameter_line_first_no_e,
+    f_console_standard_parameter_line_last_no_e,
+    f_console_standard_parameter_last_e,
+  }; // enum
+#endif // _di_f_console_standard_parameter_e_
+
+/**
  * Create some standard command line parameter options required/expected by the kevux/fss/fll specifications.
  *
  * It is expected that all of the "+" and "++" console options described below are reserved for these purposes.
index 2d9a5621b9b7759a6584b59c036bda1f43b598fb..3deadb70e7f952ca2109a9a949137d02351ae2c8 100644 (file)
@@ -5,6 +5,68 @@
 extern "C" {
 #endif
 
+#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_)
+  f_status_t private_fll_program_parameter_process_context(const f_uint16s_t choices, const uint8_t modes[], const bool right, fll_program_data_t * const main) {
+
+    {
+      if (choices.used) {
+        f_status_t status = F_none;
+        f_number_unsigned_t choice = 0;
+
+        if (right) {
+          status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
+        }
+        else {
+          status = f_console_parameter_prioritize_left(main->parameters, choices, &choice);
+        }
+
+        if (F_status_is_error(status)) return status;
+
+        if (status == F_data_not) {
+          main->context.mode = modes[choices.used - 1];
+        }
+        else {
+          main->context.mode = modes[choice];
+        }
+
+        if (main->context.mode == f_color_mode_dark_e || main->context.mode == f_color_mode_light_e) {
+          status = f_color_load_context(main->context.mode, &main->context);
+          if (F_status_is_error(status)) return status;
+        }
+      }
+      else {
+        main->context.mode = f_color_mode_not_e;
+      }
+    }
+
+    main->message.set =
+      main->output.set =
+      main->error.set =
+      main->warning.set = &main->context.set;
+
+    if (main->context.set.error.before) {
+      main->message.context = f_color_set_empty_s;
+      main->message.notable = main->context.set.notable;
+
+      main->output.context = f_color_set_empty_s;
+      main->output.notable = main->context.set.notable;
+
+      main->error.context = main->context.set.error;
+      main->error.notable = main->context.set.notable;
+
+      main->warning.context = main->context.set.warning;
+      main->warning.notable = main->context.set.notable;
+    }
+    else {
+      f_color_set_t * const sets[] = { &main->message.context, &main->message.notable, &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+
+      private_fll_program_parameter_process_empty(&main->context, sets);
+    }
+
+    return F_none;
+  }
+#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_)
+
 #if !defined(_di_fll_program_print_help_option_) || !defined(_di_fll_program_print_help_option_standard_)
   f_status_t private_fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) {
 
@@ -42,19 +104,19 @@ extern "C" {
   }
 #endif // !defined(_di_fll_program_standard_signal_received_) || !defined(_di_fll_program_standard_signal_handle_)
 
-#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_empty_)
+#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_) || !defined(_di_fll_program_parameter_process_empty_)
   void private_fll_program_parameter_process_empty(f_color_context_t * const context, f_color_set_t * const sets[]) {
 
-    context->set.error = f_color_set_empty_s;
-    context->set.important = f_color_set_empty_s;
-    context->set.normal = f_color_set_empty_s;
-    context->set.normal_reset = f_color_set_empty_s;
-    context->set.notable = f_color_set_empty_s;
-    context->set.reset = f_color_set_empty_s;
-    context->set.standout = f_color_set_empty_s;
-    context->set.success = f_color_set_empty_s;
-    context->set.title = f_color_set_empty_s;
-    context->set.warning = f_color_set_empty_s;
+    context->set.error =
+      context->set.important =
+      context->set.normal =
+      context->set.normal_reset =
+      context->set.notable =
+      context->set.reset =
+      context->set.standout =
+      context->set.success =
+      context->set.title =
+      context->set.warning = f_color_set_empty_s;
 
     if (sets) {
       for (f_number_unsigned_t i = 0; sets[i]; ++i) {
@@ -62,7 +124,7 @@ extern "C" {
       } // for
     }
   }
-#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_empty_)
+#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_) || !defined(_di_fll_program_parameter_process_empty_)
 
 #ifdef __cplusplus
 } // extern "C"
index 0619c3caae6da514b83797ce3b97a61bae478ced..c32bd387bd15fb70fbf4899e7b707d274f6d0703 100644 (file)
@@ -16,6 +16,43 @@ extern "C" {
 #endif
 
 /**
+ * Private implementation of fll_program_parameter_process_context().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param choices
+ *   An array of color modes.
+ *   The default, if no mode is specified, will be the last value in the array.
+ * @param modes
+ *   An array designating the context modes associated with each choice.
+ *   This must exactly match the size of the choices array.
+ *   No bounds checking is performed.
+ * @param right
+ *   If TRUE, use the right-most parameter on conflict.
+ *   If FALSE, use the left-most parameter on conflict.
+ * @param main
+ *   The main program data.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if "values" parameters were expected but not found.
+ *
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_console_parameter_prioritize_left().
+ *   Errors (with error bit) from: f_console_parameter_prioritize_right().
+ *   Errors (with error bit) from: f_color_load_context().
+ *
+ * @see f_console_parameter_prioritize_left()
+ * @see f_console_parameter_prioritize_right()
+ * @see f_color_load_context()
+ */
+#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_)
+  extern f_status_t private_fll_program_parameter_process_context(const f_uint16s_t choices, const uint8_t modes[], const bool right, fll_program_data_t * const main);
+#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_)
+
+/**
  * Print standard help option.
  *
  * This print function does not use locking, be sure something like flockfile() and funlockfile() are appropriately called.
@@ -79,11 +116,12 @@ extern "C" {
  *   Set to NULL to not use.
  *
  * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
  * @see fll_program_parameter_process_empty()
  */
-#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_empty_)
+#if !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_) || !defined(_di_fll_program_parameter_process_empty_)
   extern void private_fll_program_parameter_process_empty(f_color_context_t * const context, f_color_set_t * const sets[]) F_attribute_visibility_internal_d;
-#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_empty_)
+#endif // !defined(_di_fll_program_parameter_process_context_) || !defined(_di_fll_program_parameter_process_context_standard_) || !defined(_di_fll_program_parameter_process_empty_)
 
 #ifdef __cplusplus
 } // extern "C"
index cb5cd2efc0109ec193f99593216ece0247039093..c90ec8271bf34d0fdf933cb3985117a431963e3a 100644 (file)
@@ -7,71 +7,32 @@ extern "C" {
 
 #ifndef _di_fll_program_parameter_process_context_
   f_status_t fll_program_parameter_process_context(const f_uint16s_t choices, const uint8_t modes[], const bool right, fll_program_data_t * const main) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!main) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-    {
-      if (choices.used) {
-        f_status_t status = F_none;
-        f_number_unsigned_t choice = 0;
-
-        if (right) {
-          status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
-        }
-        else {
-          status = f_console_parameter_prioritize_left(main->parameters, choices, &choice);
-        }
-
-        if (F_status_is_error(status)) return status;
-
-        if (status == F_data_not) {
-          main->context.mode = modes[choices.used - 1];
-        }
-        else {
-          main->context.mode = modes[choice];
-        }
-
-        if (main->context.mode == f_color_mode_dark_e || main->context.mode == f_color_mode_light_e) {
-          status = f_color_load_context(main->context.mode, &main->context);
-          if (F_status_is_error(status)) return status;
-        }
-      }
-      else {
-        main->context.mode = f_color_mode_not_e;
-      }
-    }
-
-    main->message.set = &main->context.set;
-    main->output.set = &main->context.set;
-    main->error.set = &main->context.set;
-    main->warning.set = &main->context.set;
-
-    if (main->context.set.error.before) {
-      main->message.context = f_color_set_empty_s;
-      main->message.notable = main->context.set.notable;
-
-      main->output.context = f_color_set_empty_s;
-      main->output.notable = main->context.set.notable;
-
-      main->error.context = main->context.set.error;
-      main->error.notable = main->context.set.notable;
+    return private_fll_program_parameter_process_context(choices, modes, right, main);
+  }
+#endif // _di_fll_program_parameter_process_context_
 
-      main->warning.context = main->context.set.warning;
-      main->warning.notable = main->context.set.notable;
-    }
-    else {
-      f_color_set_t *sets[] = { &main->message.context, &main->message.notable, &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+#ifndef _di_fll_program_parameter_process_context_standard_
+  f_status_t fll_program_parameter_process_context_standard(const bool right, fll_program_data_t * const main) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!main) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
 
-      private_fll_program_parameter_process_empty(&main->context, sets);
-    }
+    uint16_t array[3] = { f_console_standard_parameter_no_color_e, f_console_standard_parameter_light_e, f_console_standard_parameter_dark_e };
+    const f_uint16s_t choices = macro_f_uint16s_t_initialize_1(array, 0, 3);
+    const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
 
-    return F_none;
+    return private_fll_program_parameter_process_context(choices, modes, right, main);
   }
-#endif // _di_fll_program_parameter_process_context_
+#endif // _di_fll_program_parameter_process_context_standard_
 
 #ifndef _di_fll_program_parameter_process_empty_
   f_status_t fll_program_parameter_process_empty(f_color_context_t * const context, f_color_set_t * const sets[]) {
     #ifndef _di_level_2_parameter_checking_
       if (!context) return F_status_set_error(F_parameter);
-      if (!sets) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     private_fll_program_parameter_process_empty(context, sets);
@@ -109,11 +70,43 @@ extern "C" {
   }
 #endif // _di_fll_program_parameter_process_verbosity_
 
+#ifndef _di_fll_program_parameter_process_verbosity_standard_
+  f_status_t fll_program_parameter_process_verbosity_standard(const bool right, fll_program_data_t * const main) {
+    #ifndef _di_level_2_parameter_checking_
+      if (!main) return F_status_set_error(F_parameter);
+    #endif // _di_level_2_parameter_checking_
+
+    uint16_t array[5] = { f_console_standard_parameter_verbosity_quiet_e, f_console_standard_parameter_verbosity_error_e, f_console_standard_parameter_verbosity_verbose_e, f_console_standard_parameter_verbosity_debug_e, f_console_standard_parameter_verbosity_normal_e };
+    const f_uint16s_t choices = macro_f_uint16s_t_initialize_1(array, 0, 5);
+
+    const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+
+
+    f_number_unsigned_t choice = 0;
+
+    {
+      const f_status_t status = right ? f_console_parameter_prioritize_right(main->parameters, choices, &choice) : f_console_parameter_prioritize_left(main->parameters, choices, &choice);
+
+      if (F_status_is_error(status)) return status;
+
+      if (status == F_data_not) {
+        choice = choices.used - 1;
+      }
+    }
+
+    main->message.verbosity = verbosity[choice];
+    main->output.verbosity = main->message.verbosity;
+    main->error.verbosity = main->message.verbosity;
+    main->warning.verbosity = main->message.verbosity;
+
+    return F_none;
+  }
+#endif // _di_fll_program_parameter_process_verbosity_standard_
+
 #ifndef _di_fll_program_parameter_additional_append_
   f_status_t fll_program_parameter_additional_append(const f_string_static_t * const arguments, const f_number_unsigneds_t values, f_string_dynamics_t * const destination) {
     #ifndef _di_level_2_parameter_checking_
-      if (!arguments) return F_status_set_error(F_parameter);
-      if (!destination) return F_status_set_error(F_parameter);
+      if (!arguments || !destination) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = F_none;
@@ -149,8 +142,7 @@ extern "C" {
 #ifndef _di_fll_program_parameter_additional_mash_
   f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_static_t * const arguments, const f_number_unsigneds_t values, f_string_dynamic_t * const destination) {
     #ifndef _di_level_2_parameter_checking_
-      if (!arguments) return F_status_set_error(F_parameter);
-      if (!destination) return F_status_set_error(F_parameter);
+      if (!arguments || !destination) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = F_none;
@@ -174,8 +166,7 @@ extern "C" {
 #ifndef _di_fll_program_parameter_additional_rip_
   f_status_t fll_program_parameter_additional_rip(const f_string_static_t * const arguments, const f_number_unsigneds_t values, f_string_dynamics_t * const destination) {
     #ifndef _di_level_2_parameter_checking_
-      if (!arguments) return F_status_set_error(F_parameter);
-      if (!destination) return F_status_set_error(F_parameter);
+      if (!arguments || !destination) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = F_none;
@@ -211,8 +202,7 @@ extern "C" {
 #ifndef _di_fll_program_parameter_additional_rip_mash_
   f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_static_t * const arguments, const f_number_unsigneds_t values, f_string_dynamic_t * const destination) {
     #ifndef _di_level_2_parameter_checking_
-      if (!arguments) return F_status_set_error(F_parameter);
-      if (!destination) return F_status_set_error(F_parameter);
+      if (!arguments || !destination) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = F_none;
index 14c9e468701210fbb1afebff1cf68abb265da6e8..4e6e465e4cdd9ec007092ab7ae1dfc2650efff69 100644 (file)
@@ -75,6 +75,38 @@ extern "C" {
 #endif // _di_fll_program_parameter_process_context_
 
 /**
+ * Determine the color context from the parameters and then set the color context based on the choice.
+ *
+ * This will allow for the color context and the color sets to be safely used when colors are disabled.
+ *
+ * This is identical to fll_program_parameter_process_context() except it provides the standard choices and modes.
+ *
+ * @param right
+ *   If TRUE, use the right-most parameter on conflict.
+ *   If FALSE, use the left-most parameter on conflict.
+ * @param main
+ *   The main program data.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if "values" parameters were expected but not found.
+ *
+ *   F_memory_not (with error bit) on out of memory.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_console_parameter_prioritize_left().
+ *   Errors (with error bit) from: f_console_parameter_prioritize_right().
+ *   Errors (with error bit) from: f_color_load_context().
+ *
+ * @see f_console_parameter_prioritize_left()
+ * @see f_console_parameter_prioritize_right()
+ * @see f_color_load_context()
+ */
+#ifndef _di_fll_program_parameter_process_context_standard_
+  extern f_status_t fll_program_parameter_process_context_standard(const bool right, fll_program_data_t * const main);
+#endif // _di_fll_program_parameter_process_context_standard_
+
+/**
  * Set the provided context to empty along with all additional color sets.
  *
  * This will allow for safe usage of the color context and color sets to be safely processed when colors are disabled.
@@ -127,6 +159,32 @@ extern "C" {
 #endif // _di_fll_program_parameter_process_verbosity_
 
 /**
+ * Determine the verbosity from the parameters and then set the verbosity based on the choice.
+ *
+ * This is identical to fll_program_parameter_process_verbosity() except it provides the standard choices and modes.
+ *
+ * @param right
+ *   If TRUE, use the right-most parameter on conflict.
+ *   If FALSE, use the left-most parameter on conflict.
+ * @param main
+ *   The main program data.
+ *
+ * @return
+ *   F_none on success.
+ *
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ *   Errors (with error bit) from: f_console_parameter_prioritize_left().
+ *   Errors (with error bit) from: f_console_parameter_prioritize_right().
+ *
+ * @see f_console_parameter_prioritize_left()
+ * @see f_console_parameter_prioritize_right()
+ */
+#ifndef _di_fll_program_parameter_process_verbosity_standard_
+  extern f_status_t fll_program_parameter_process_verbosity_standard(const bool right, fll_program_data_t * const main);
+#endif // _di_fll_program_parameter_process_verbosity_standard_
+
+/**
  * Allocate new strings from all of the provided locations.
  *
  * These new strings are appended onto the destination.
index 724557af9f112d4fabde1dfb75ea2e8bd43e1e0c..b60d79fd49a91e5586c4c8c061bbfe2227185323 100644 (file)
@@ -16,14 +16,14 @@ extern "C" {
     main->setting.state.step_small = byte_dump_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[byte_dump_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & byte_dump_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= byte_dump_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[byte_dump_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & byte_dump_main_flag_print_last_e;
     }
     else {
@@ -40,51 +40,33 @@ extern "C" {
       return;
     }
 
-    {
-      f_number_unsigned_t choice = 0;
-      f_uint16s_t choices = f_uint16s_t_initialize;
-
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { byte_dump_parameter_no_color_e, byte_dump_parameter_light_e, byte_dump_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      }
 
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+      byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_context_standard));
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+      return;
+    }
 
-          byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_context));
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-          return;
-        }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { byte_dump_parameter_verbosity_quiet_e, byte_dump_parameter_verbosity_error_e, byte_dump_parameter_verbosity_verbose_e, byte_dump_parameter_verbosity_debug_e, byte_dump_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
-
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+      byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_verbosity_standard));
 
-          byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_verbosity));
+      return;
+    }
 
-          return;
-        }
-      }
+    {
+      f_number_unsigned_t choice = 0;
+      f_uint16s_t choices = f_uint16s_t_initialize;
 
       // Identify priority of mode parameters.
       {
@@ -182,19 +164,19 @@ extern "C" {
       }
     }
 
-    if (main->program.parameters.array[byte_dump_parameter_help_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_help_e;
 
       return;
     }
 
-    if (main->program.parameters.array[byte_dump_parameter_version_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_version_e;
 
       return;
     }
 
-    if (main->program.parameters.array[byte_dump_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= byte_dump_main_flag_copyright_e;
 
       return;
index be220c4c5a564a32641399b871467949d5061563..c16719d627ba2f43693ed84350ebfca1a9248605 100644 (file)
@@ -32,10 +32,12 @@ extern "C" {
  *     F_none 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().
+ *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  * @see f_console_parameter_process()
- * @see fll_program_parameter_process_context()
+ * @see fll_program_parameter_process_context_standard()
+ * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_byte_dump_setting_load_
   extern void byte_dump_setting_load(const f_console_arguments_t arguments, byte_dump_main_t * const main);
index 0b6a49cbda6424f111f03cba90cb87b441edf90e..b1029808e01cd4b674f576aefe1bdee2c66308ae 100644 (file)
@@ -120,21 +120,7 @@ extern "C" {
  */
 #ifndef _di_byte_dump_parameter_e_
   enum {
-    byte_dump_parameter_help_e,
-    byte_dump_parameter_copyright_e,
-    byte_dump_parameter_light_e,
-    byte_dump_parameter_dark_e,
-    byte_dump_parameter_no_color_e,
-    byte_dump_parameter_verbosity_quiet_e,
-    byte_dump_parameter_verbosity_error_e,
-    byte_dump_parameter_verbosity_normal_e,
-    byte_dump_parameter_verbosity_verbose_e,
-    byte_dump_parameter_verbosity_debug_e,
-    byte_dump_parameter_version_e,
-    byte_dump_parameter_line_first_no_e,
-    byte_dump_parameter_line_last_no_e,
-
-    byte_dump_parameter_binary_e,
+    byte_dump_parameter_binary_e = f_console_standard_parameter_last_e,
     byte_dump_parameter_decimal_e,
     byte_dump_parameter_duodecimal_e,
     byte_dump_parameter_hexidecimal_e,
index d7518777b68ffec19ff836dff6084a7bb1fd617f..b989ef37bec2f8b688c838f2071f110bf1f248b1 100644 (file)
@@ -13,8 +13,8 @@ extern "C" {
     "f_string_dynamics_increase_by",
     "f_thread_create",
     "fl_conversion_dynamic_to_unsigned_detect",
-    "fll_program_parameter_process_context",
-    "fll_program_parameter_process_verbosity",
+    "fll_program_parameter_process_context_standard",
+    "fll_program_parameter_process_verbosity_standard",
   };
 #endif // _di_byte_dump_f_a_
 
index 71ec9f94ff36f9e5a4be526a7dc6a657eb31b534..b97bc89e47a418f6e430bdabbff7c683e06ec92b 100644 (file)
@@ -46,8 +46,8 @@ extern "C" {
     byte_dump_f_f_string_dynamics_increase_by_e,
     byte_dump_f_f_thread_create_e,
     byte_dump_f_fl_conversion_dynamic_to_unsigned_detect_e,
-    byte_dump_f_fll_program_parameter_process_context_e,
-    byte_dump_f_fll_program_parameter_process_verbosity_e,
+    byte_dump_f_fll_program_parameter_process_context_standard_e,
+    byte_dump_f_fll_program_parameter_process_verbosity_standard_e,
   }; // enum
 #endif // _di_byte_dump_f_e_
 
index 1d6f326a5a594ad24a621f4759eef99bebc3615f..4ad0ab00c5e6ea037fc113321490fc58ec359236 100644 (file)
@@ -623,14 +623,14 @@ extern "C" {
     main->setting.state.step_small = controller_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[controller_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & controller_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= controller_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[controller_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & controller_main_flag_print_last_e;
     }
     else {
@@ -647,70 +647,47 @@ extern "C" {
       return;
     }
 
-    {
-      f_number_unsigned_t choice = 0;
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { controller_parameter_no_color_e, controller_parameter_light_e, controller_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
-
-          if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.error);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.error);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { controller_parameter_verbosity_quiet_e, controller_parameter_verbosity_error_e, controller_parameter_verbosity_verbose_e, controller_parameter_verbosity_debug_e, controller_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
-
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+      return;
+    }
 
-        if (F_status_is_error(main->setting.state.status)) {
-          fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-          if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.error);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.error);
       }
+
+      return;
     }
 
     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;
 
-    if (main->program.parameters.array[controller_parameter_help_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= controller_main_flag_help_e;
 
       return;
     }
 
-    if (main->program.parameters.array[controller_parameter_version_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= controller_main_flag_version_e;
 
       return;
     }
 
-    if (main->program.parameters.array[controller_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= controller_main_flag_copyright_e;
 
       return;
index 3bed915725442361756256d6f5e385159562c03a..1c800bf58450c234f1ad80723ad338bc2965dbc8 100644 (file)
@@ -132,21 +132,7 @@ extern "C" {
   extern const f_string_static_t controller_long_validate_s;
 
   enum {
-    controller_parameter_help_e,
-    controller_parameter_copyright_e,
-    controller_parameter_light_e,
-    controller_parameter_dark_e,
-    controller_parameter_no_color_e,
-    controller_parameter_verbosity_quiet_e,
-    controller_parameter_verbosity_error_e,
-    controller_parameter_verbosity_normal_e,
-    controller_parameter_verbosity_verbose_e,
-    controller_parameter_verbosity_debug_e,
-    controller_parameter_version_e,
-    controller_parameter_line_first_no_e,
-    controller_parameter_line_last_no_e,
-
-    controller_parameter_cgroup_e,
+    controller_parameter_cgroup_e = f_console_standard_parameter_last_e,
     controller_parameter_daemon_e,
     controller_parameter_init_e,
     controller_parameter_interruptible_e,
index b23727a48b1776003f9987285ddbd08d7d8b3685..98114f868d426cf6e1e0e68d1d0c8b8b249eadf2 100644 (file)
@@ -25,66 +25,43 @@ extern "C" {
 
     if (F_status_is_error(status)) return;
 
-    {
-      f_number_unsigned_t choice = 0;
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { controller_parameter_no_color_e, controller_parameter_light_e, controller_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
-
-          if (main->error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->error);
-          }
+    if (F_status_is_error(status)) {
+      fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->error);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { controller_parameter_verbosity_quiet_e, controller_parameter_verbosity_error_e, controller_parameter_verbosity_verbose_e, controller_parameter_verbosity_debug_e, controller_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
-
-        const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+      return;
+    }
 
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+    status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-          if (main->error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->error);
-          }
+    if (F_status_is_error(status)) {
+      fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->error);
       }
+
+      return;
     }
 
-    if (main->parameters.array[controller_parameter_help_e].result & f_console_result_found_e) {
+    if (main->parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       controller_print_help(main);
 
       return F_none;
     }
 
-    if (main->parameters.array[controller_parameter_version_e].result & f_console_result_found_e) {
+    if (main->parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       fll_program_print_version(main->message, controller_program_version_s);
 
       return F_none;
     }
 
-    if (main->parameters.array[controller_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       fll_program_print_copyright(main->message);
 
       return F_none;
index 52c12484d407162c0cc45c608cd08b7ae5138580..05bfbe882d72f1a66c262490829220781b1150b7 100644 (file)
@@ -2169,13 +2169,13 @@ extern "C" {
       };
 
       const uint8_t codes[] = {
-        controller_parameter_help_e,
-        controller_parameter_dark_e,
-        controller_parameter_no_color_e,
-        controller_parameter_verbosity_quiet_e,
-        controller_parameter_verbosity_normal_e,
-        controller_parameter_verbosity_verbose_e,
-        controller_parameter_verbosity_debug_e,
+        f_console_standard_parameter_help_e,
+        f_console_standard_parameter_dark_e,
+        f_console_standard_parameter_no_color_e,
+        f_console_standard_parameter_verbosity_quiet_e,
+        f_console_standard_parameter_verbosity_normal_e,
+        f_console_standard_parameter_verbosity_verbose_e,
+        f_console_standard_parameter_verbosity_debug_e,
         controller_parameter_init_e,
         controller_parameter_interruptible_e,
         controller_parameter_daemon_e,
index 3e830c934bccfde9601d4450698ffc1a848be4fb..68bcb86d2d25e106af509a19478756c26b611e74 100644 (file)
@@ -26,14 +26,14 @@ extern "C" {
     }
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[fake_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fake_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= fake_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[fake_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fake_main_flag_print_last_e;
     }
     else {
@@ -50,65 +50,43 @@ extern "C" {
       return;
     }
 
-    {
-      f_uint16s_t choices = f_uint16s_t_initialize;
-
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { fake_parameter_no_color_e, fake_parameter_light_e, fake_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
-
-          fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_context));
-
-          return;
-        }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { fake_parameter_verbosity_quiet_e, fake_parameter_verbosity_error_e, fake_parameter_verbosity_verbose_e, fake_parameter_verbosity_debug_e, fake_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
+      fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_context_standard));
 
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+      return;
+    }
 
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      }
 
-          fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_verbosity));
+      fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_verbosity_standard));
 
-          return;
-        }
-      }
+      return;
     }
 
-    if (main->program.parameters.array[fake_parameter_help_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= fake_main_flag_help_e;
 
       return;
     }
 
-    if (main->program.parameters.array[fake_parameter_version_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= fake_main_flag_version_e;
 
       return;
     }
 
-    if (main->program.parameters.array[fake_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= fake_main_flag_copyright_e;
 
       return;
index 9999760e38bf5a283d135a4b30696039d2c0e791..d9ff36b4b78c301fe185a7a8d2706ad2b74e9df8 100644 (file)
@@ -36,7 +36,7 @@ extern "C" {
  *     Errors (with error bit) from: f_uint8s_increase_by().
  *     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_verbosity().
+ *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  * @see f_console_parameter_process()
  * @see f_path_directory_cleanup()
@@ -45,7 +45,7 @@ extern "C" {
  * @see f_uint8s_increase_by()
  * @see fll_program_parameter_additional_rip()
  * @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_fake_setting_load_
   extern void fake_setting_load(const f_console_arguments_t arguments, fake_main_t * const main);
index f6c5ed5c30abc820832a3b05da66f17d1c118dbf..6cb521c0f76182ea8132b6e044992a67353ca8b6 100644 (file)
@@ -21,21 +21,7 @@ extern "C" {
  */
 #ifndef _di_fake_parameter_e_
   enum {
-    fake_parameter_help_e,
-    fake_parameter_copyright_e,
-    fake_parameter_light_e,
-    fake_parameter_dark_e,
-    fake_parameter_no_color_e,
-    fake_parameter_verbosity_quiet_e,
-    fake_parameter_verbosity_error_e,
-    fake_parameter_verbosity_normal_e,
-    fake_parameter_verbosity_verbose_e,
-    fake_parameter_verbosity_debug_e,
-    fake_parameter_version_e,
-    fake_parameter_line_first_no_e,
-    fake_parameter_line_last_no_e,
-
-    fake_parameter_build_e,
+    fake_parameter_build_e = f_console_standard_parameter_last_e,
     fake_parameter_data_e,
     fake_parameter_define_e,
     fake_parameter_documents_e,
index 2acad157ea00d6b888e7cdd359f2f65d5e53a609..cfcd165f9a3668b19872ee1d699b4fca21fd8367 100644 (file)
@@ -87,8 +87,8 @@ extern "C" {
     "fll_fss_snatch_apart",
     "fll_fss_snatch_map_apart",
     "fll_program_parameter_additional_rip",
-    "fll_program_parameter_process_context",
-    "fll_program_parameter_process_verbosity",
+    "fll_program_parameter_process_context_standard",
+    "fll_program_parameter_process_verbosity_standard",
     "fake_build_arguments_standard_add",
     "fake_build_get_file_name_without_extension",
     "fake_build_load_setting",
index 150335248b555e686194303c475738cf4d8db702..0391e798d7a2659a56e810462047d10c58ddb251 100644 (file)
@@ -120,8 +120,8 @@ extern "C" {
     fake_f_fll_fss_snatch_apart_e,
     fake_f_fll_fss_snatch_map_apart_e,
     fake_f_fll_program_parameter_additional_rip_e,
-    fake_f_fll_program_parameter_process_context_e,
-    fake_f_fll_program_parameter_process_verbosity_e,
+    fake_f_fll_program_parameter_process_context_standard_e,
+    fake_f_fll_program_parameter_process_verbosity_standard_e,
     fake_f_fake_build_arguments_standard_add_e,
     fake_f_fake_build_get_file_name_without_extension_e,
     fake_f_fake_build_load_setting_e,
index ef63cd5dac3be81fbfd9efecf4d6fdda63550c0b..2a3dee4c40cc0d31c1e8c2acf0ddd5fda129ec34 100644 (file)
@@ -26,10 +26,10 @@ extern "C" {
       }
 
       if (main->program.context.mode == f_color_mode_not_e) {
-        if (main->program.parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
+        if (main->program.parameters.array[f_console_standard_parameter_no_color_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
         }
-        else if (main->program.parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
+        else if (main->program.parameters.array[f_console_standard_parameter_no_color_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
         }
 
@@ -38,10 +38,10 @@ extern "C" {
         }
       }
       else if (main->program.context.mode == f_color_mode_dark_e) {
-        if (main->program.parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
+        if (main->program.parameters.array[f_console_standard_parameter_dark_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
         }
-        else if (main->program.parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
+        else if (main->program.parameters.array[f_console_standard_parameter_dark_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
         }
 
@@ -50,10 +50,10 @@ extern "C" {
         }
       }
       else {
-        if (main->program.parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
+        if (main->program.parameters.array[f_console_standard_parameter_light_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
         }
-        else if (main->program.parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
+        else if (main->program.parameters.array[f_console_standard_parameter_light_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
         }
 
@@ -90,10 +90,10 @@ extern "C" {
       }
 
       if (main->program.error.verbosity == f_console_verbosity_quiet_e) {
-        if (main->program.parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
+        if (main->program.parameters.array[f_console_standard_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
         }
-        else if (main->program.parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
+        else if (main->program.parameters.array[f_console_standard_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
         }
 
@@ -102,10 +102,10 @@ extern "C" {
         }
       }
       else if (main->program.error.verbosity == f_console_verbosity_error_e) {
-        if (main->program.parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
+        if (main->program.parameters.array[f_console_standard_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
         }
-        else if (main->program.parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
+        else if (main->program.parameters.array[f_console_standard_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
         }
 
@@ -114,10 +114,10 @@ extern "C" {
         }
       }
       else if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
-        if (main->program.parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
+        if (main->program.parameters.array[f_console_standard_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
         }
-        else if (main->program.parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
+        else if (main->program.parameters.array[f_console_standard_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
         }
 
@@ -126,10 +126,10 @@ extern "C" {
         }
       }
       else {
-        if (main->program.parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
+        if (main->program.parameters.array[f_console_standard_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
         }
-        else if (main->program.parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
+        else if (main->program.parameters.array[f_console_standard_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
           main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
         }
 
index 1420d50f850b98320a748e50577a4a0afef00fc6..cbbc455b39cf5899eaf13e8811cf5af71fda3911 100644 (file)
@@ -1238,7 +1238,7 @@ extern "C" {
       F_true,
       main->setting.work.used,
       main->program.parameters.array[fake_parameter_build_e].result & f_console_result_value_e,
-      (main->program.parameters.array[fake_parameter_light_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_dark_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_no_color_e].result & f_console_result_found_e),
+      (main->program.parameters.array[f_console_standard_parameter_light_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_dark_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_no_color_e].result & f_console_result_found_e),
       main->program.parameters.array[fake_parameter_data_e].result & f_console_result_value_e,
       main->program.parameters.array[fake_parameter_define_e].result & f_console_result_value_e,
       main->program.parameters.array[fake_parameter_fakefile_e].result & f_console_result_value_e,
@@ -1246,7 +1246,7 @@ extern "C" {
       main->program.parameters.array[fake_parameter_process_e].result & f_console_result_value_e,
       main->program.parameters.array[fake_parameter_settings_e].result & f_console_result_value_e,
       main->program.parameters.array[fake_parameter_sources_e].result & f_console_result_value_e,
-      (main->program.parameters.array[fake_parameter_verbosity_quiet_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_verbosity_normal_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_verbosity_verbose_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_verbosity_debug_e].result & f_console_result_found_e),
+      (main->program.parameters.array[f_console_standard_parameter_verbosity_quiet_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_verbosity_normal_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_verbosity_verbose_e].result & f_console_result_found_e) || (main->program.parameters.array[f_console_standard_parameter_verbosity_debug_e].result & f_console_result_found_e),
       main->program.parameters.array[fake_parameter_work_e].result & f_console_result_value_e,
       data_make->parameter_value.build.used,
       data_make->parameter_value.color.used,
index 088b29d7a7a0f2780f9673e4a37e9944e1ede834..488fedfdee57e7e0e74f245ed4a6b4ad3bc50be4 100644 (file)
@@ -122,14 +122,14 @@ extern "C" {
     main->setting.state.status = f_console_parameter_process(state, arguments, &main->program.parameters, &main->setting.state, 0);
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[firewall_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & firewall_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= firewall_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[firewall_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & firewall_main_flag_print_last_e;
     }
     else {
@@ -146,64 +146,41 @@ extern "C" {
       return;
     }
 
-    {
-      f_number_unsigned_t choice = 0;
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { firewall_parameter_no_color_e, firewall_parameter_light_e, firewall_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
-
-          if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.error);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.error);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { firewall_parameter_verbosity_quiet_e, firewall_parameter_verbosity_error_e, firewall_parameter_verbosity_verbose_e, firewall_parameter_verbosity_debug_e, firewall_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
-
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+      return;
+    }
 
-        if (F_status_is_error(main->setting.state.status)) {
-          fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-          if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.error);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.error);
       }
+
+      return;
     }
 
     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;
 
-    if (main->program.parameters.array[firewall_parameter_help_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= firewall_main_flag_help_e;
 
       return;
     }
 
-    if (main->program.parameters.array[firewall_parameter_version_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= firewall_main_flag_version_e;
 
       return;
index 3ba3a3a70f1e0f3175750a76df214eab1df604e4..c3c3222f04b79c64875b0c57f3f3f4c3cd8c4774 100644 (file)
@@ -349,18 +349,7 @@ extern "C" {
   }; // enum
 
   enum {
-    firewall_parameter_help_e,
-    firewall_parameter_light_e,
-    firewall_parameter_dark_e,
-    firewall_parameter_no_color_e,
-    firewall_parameter_verbosity_quiet_e,
-    firewall_parameter_verbosity_error_e,
-    firewall_parameter_verbosity_normal_e,
-    firewall_parameter_verbosity_verbose_e,
-    firewall_parameter_verbosity_debug_e,
-    firewall_parameter_version_e,
-
-    firewall_parameter_command_start_e,
+    firewall_parameter_command_start_e = f_console_standard_parameter_last_e,
     firewall_parameter_command_stop_e,
     firewall_parameter_command_restart_e,
     firewall_parameter_command_lock_e,
index 94ad05522ca5ed195df66a1d3488b8c8da52d808..1e627c55810848c0393b856b2b729a448eff5688 100644 (file)
@@ -25,66 +25,43 @@ extern "C" {
 
     if (F_status_is_error(status)) return;
 
-    {
-      f_number_unsigned_t choice = 0;
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { firewall_parameter_no_color_e, firewall_parameter_light_e, firewall_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
+    if (F_status_is_error(status)) {
+      fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
 
-          if (main->error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->error);
-          }
-
-          return;
-        }
+      if (main->error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->error);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { firewall_parameter_verbosity_quiet_e, firewall_parameter_verbosity_error_e, firewall_parameter_verbosity_verbose_e, firewall_parameter_verbosity_debug_e, firewall_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
-
-        const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+      return;
+    }
 
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+    status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-          if (main->error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->error);
-          }
+    if (F_status_is_error(status)) {
+      fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->error);
       }
+
+      return;
     }
 
-    if (main->parameters.array[firewall_parameter_help_e].result & f_console_result_found_e) {
+    if (main->parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       firewall_print_help(setting, main->message);
 
       return F_none;
     }
 
-    if (main->parameters.array[firewall_parameter_version_e].result & f_console_result_found_e) {
+    if (main->parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       fll_program_print_version(&main->message, firewall_program_version_s);
 
       return F_none;
     }
 
-    if (main->parameters.array[firewall_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       fll_program_print_copyright(&main->message);
 
       return F_none;
index 0cf42a1b28d72e27650fda63345931179cb6e7df..6c6f2edeb8bf0330e5320d6c95c109bc9a991b81 100644 (file)
@@ -80,14 +80,14 @@ extern "C" {
     main->setting.state.step_small = fss_embedded_list_read_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[fss_embedded_list_read_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fss_embedded_list_read_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= fss_embedded_list_read_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[fss_embedded_list_read_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fss_embedded_list_read_main_flag_print_last_e;
     }
     else {
@@ -104,70 +104,47 @@ extern "C" {
       return;
     }
 
-    {
-      f_number_unsigned_t choice = 0;
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { fss_embedded_list_read_parameter_no_color_e, fss_embedded_list_read_parameter_light_e, fss_embedded_list_read_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
-
-          if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.error);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.error);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { fss_embedded_list_read_parameter_verbosity_quiet_e, fss_embedded_list_read_parameter_verbosity_error_e, fss_embedded_list_read_parameter_verbosity_verbose_e, fss_embedded_list_read_parameter_verbosity_debug_e, fss_embedded_list_read_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
-
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+      return;
+    }
 
-        if (F_status_is_error(main->setting.state.status)) {
-          fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-          if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.error);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.error);
       }
+
+      return;
     }
 
     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;
 
-    if (main->program.parameters.array[fss_embedded_list_read_parameter_help_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_embedded_list_read_main_flag_help_e;
 
       return;
     }
 
-    if (main->program.parameters.array[fss_embedded_list_read_parameter_version_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_embedded_list_read_main_flag_version_e;
 
       return;
     }
 
-    if (main->program.parameters.array[fss_embedded_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_embedded_list_read_main_flag_copyright_e;
 
       return;
index 4758a572299d17781ae27513b195e84924d238e8..d50e8438bf6c47080f1fb4bd519ba0ec13df651d 100644 (file)
@@ -199,21 +199,7 @@ extern "C" {
   extern const f_string_static_t fss_embedded_list_read_long_trim_s;
 
   enum {
-    fss_embedded_list_read_parameter_help_e,
-    fss_embedded_list_read_parameter_copyright_e,
-    fss_embedded_list_read_parameter_light_e,
-    fss_embedded_list_read_parameter_dark_e,
-    fss_embedded_list_read_parameter_no_color_e,
-    fss_embedded_list_read_parameter_verbosity_quiet_e,
-    fss_embedded_list_read_parameter_verbosity_error_e,
-    fss_embedded_list_read_parameter_verbosity_normal_e,
-    fss_embedded_list_read_parameter_verbosity_verbose_e,
-    fss_embedded_list_read_parameter_verbosity_debug_e,
-    fss_embedded_list_read_parameter_version_e,
-    fss_embedded_list_read_parameter_line_first_no_e,
-    fss_embedded_list_read_parameter_line_last_no_e,
-
-    fss_embedded_list_read_parameter_at_e,
+    fss_embedded_list_read_parameter_at_e = f_console_standard_parameter_last_e,
     fss_embedded_list_read_parameter_content_e,
     fss_embedded_list_read_parameter_columns_e,
     fss_embedded_list_read_parameter_delimit_e,
index 0e38380122c2e90c0372c09e62189636a018aa3f..9279de238fd4f15da8557b337bcb22c91da40752 100644 (file)
@@ -20,66 +20,43 @@ extern "C" {
 
     if (F_status_is_error(status)) return;
 
-    {
-      f_number_unsigned_t choice = 0;
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { fss_embedded_list_read_parameter_no_color_e, fss_embedded_list_read_parameter_light_e, fss_embedded_list_read_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
+    if (F_status_is_error(status)) {
+      fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context_standard", fll_error_file_flag_fallback_e);
 
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_context", fll_error_file_flag_fallback_e);
-
-          if (main->error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->error);
-          }
-
-          return;
-        }
+      if (main->error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->error);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { fss_embedded_list_read_parameter_verbosity_quiet_e, fss_embedded_list_read_parameter_verbosity_error_e, fss_embedded_list_read_parameter_verbosity_verbose_e, fss_embedded_list_read_parameter_verbosity_debug_e, fss_embedded_list_read_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
-
-        const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
-
-        status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+      return;
+    }
 
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", fll_error_file_flag_fallback_e);
+    status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-          if (main->error.verbosity > f_console_verbosity_quiet_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->error);
-          }
+    if (F_status_is_error(status)) {
+      fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity_standard", fll_error_file_flag_fallback_e);
 
-          return;
-        }
+      if (main->error.verbosity > f_console_verbosity_quiet_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->error);
       }
+
+      return;
     }
 
-    if (main->parameters.array[fss_embedded_list_read_parameter_help_e].result & f_console_result_found_e) {
+    if (main->parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       fss_embedded_list_read_print_help(setting, main->message);
 
       return F_none;
     }
 
-    if (main->parameters.array[fss_embedded_list_read_parameter_version_e].result & f_console_result_found_e) {
+    if (main->parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       fll_program_print_version(main->message, fss_embedded_list_read_program_version_s);
 
       return F_none;
     }
 
-    if (main->parameters.array[fss_embedded_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       fll_program_print_copyright(main->message);
 
       return F_none;
index c9896489fb9d2ed34f5aa629cc903bdf9e3e62d5..a2a2870d1b7d6bcc6868f7caf0024b3f072ea00d 100644 (file)
@@ -16,14 +16,14 @@ extern "C" {
     main->setting.state.step_small = fss_identify_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[fss_identify_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fss_identify_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= fss_identify_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[fss_identify_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fss_identify_main_flag_print_last_e;
     }
     else {
@@ -40,45 +40,43 @@ extern "C" {
       return;
     }
 
-    {
-      f_number_unsigned_t choice = 0;
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { fss_identify_parameter_no_color_e, fss_identify_parameter_light_e, fss_identify_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      }
 
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+      fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_context_standard));
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+      return;
+    }
 
-          fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_context));
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-          return;
-        }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
+
+      fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_verbosity_standard));
+
+      return;
     }
 
-    if (main->program.parameters.array[fss_identify_parameter_help_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_identify_main_flag_help_e;
 
       return;
     }
 
-    if (main->program.parameters.array[fss_identify_parameter_version_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_identify_main_flag_version_e;
 
       return;
     }
 
-    if (main->program.parameters.array[fss_identify_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_identify_main_flag_copyright_e;
 
       return;
index e2468216e7836e1988014c0cf5df022ed4746577..4404ee036d905adf7df9d645cc3980334f23ee46 100644 (file)
@@ -61,21 +61,7 @@ extern "C" {
  */
 #ifndef _di_fss_identify_parameter_e_
   enum {
-    fss_identify_parameter_help_e,
-    fss_identify_parameter_copyright_e,
-    fss_identify_parameter_light_e,
-    fss_identify_parameter_dark_e,
-    fss_identify_parameter_no_color_e,
-    fss_identify_parameter_verbosity_quiet_e,
-    fss_identify_parameter_verbosity_error_e,
-    fss_identify_parameter_verbosity_normal_e,
-    fss_identify_parameter_verbosity_verbose_e,
-    fss_identify_parameter_verbosity_debug_e,
-    fss_identify_parameter_version_e,
-    fss_identify_parameter_line_first_no_e,
-    fss_identify_parameter_line_last_no_e,
-
-    fss_identify_parameter_content_e,
+    fss_identify_parameter_content_e = f_console_standard_parameter_last_e,
     fss_identify_parameter_line_e,
     fss_identify_parameter_name_e,
     fss_identify_parameter_object_e,
index 5386a408fa0be3c680987f1d05b69daab7db26c9..8ac08cd1edd1a25bd6fb8246c0cc557b347953e3 100644 (file)
@@ -16,8 +16,8 @@ extern "C" {
     "f_thread_create",
     "f_utf_is_word_dash",
     "fll_fss_identify",
-    "fll_program_parameter_process_context",
-    "fll_program_parameter_process_verbosity",
+    "fll_program_parameter_process_context_standard",
+    "fll_program_parameter_process_verbosity_standard",
   };
 #endif // _di_fss_identify_f_a_
 
index 07a176e1efe522db22d35f2ebcfc1a402746ec16..2bd3f34f15210c7c6327e763be0c9c68f627ccdb 100644 (file)
@@ -49,8 +49,8 @@ extern "C" {
     fss_identify_f_f_thread_create_e,
     fss_identify_f_f_utf_is_word_dash_e,
     fss_identify_f_fll_fss_identify_e,
-    fss_identify_f_fll_program_parameter_process_context_e,
-    fss_identify_f_fll_program_parameter_process_verbosity_e,
+    fss_identify_f_fll_program_parameter_process_context_standard_e,
+    fss_identify_f_fll_program_parameter_process_verbosity_standard_e,
   }; // enum
 #endif // _di_fss_identify_f_e_
 
index 75d88ba77e49586c54d183a41263ee420e07b295..17c3d13b140553309d67aafe7bd27d0a31e29f39 100644 (file)
@@ -54,14 +54,14 @@ extern "C" {
     main->setting.state.step_small = fss_read_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (parameters->array[fss_read_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fss_read_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= fss_read_main_flag_print_first_e;
     }
 
-    if (parameters->array[fss_read_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (parameters->array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fss_read_main_flag_print_last_e;
     }
     else {
@@ -78,65 +78,43 @@ extern "C" {
       return;
     }
 
-    {
-      f_uint16s_t choices = f_uint16s_t_initialize;
-
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { fss_read_parameter_no_color_e, fss_read_parameter_light_e, fss_read_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
-
-          fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_context));
-
-          return;
-        }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { fss_read_parameter_verbosity_quiet_e, fss_read_parameter_verbosity_error_e, fss_read_parameter_verbosity_verbose_e, fss_read_parameter_verbosity_debug_e, fss_read_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
+      fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_context_standard));
 
-        const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+      return;
+    }
 
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      }
 
-          fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_verbosity));
+      fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_verbosity_standard));
 
-          return;
-        }
-      }
+      return;
     }
 
     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;
 
-    if (parameters->array[fss_read_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_read_main_flag_help_e;
     }
 
-    if (parameters->array[fss_read_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_read_main_flag_version_e;
     }
 
-    if (parameters->array[fss_read_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_read_main_flag_copyright_e;
     }
 
@@ -151,8 +129,8 @@ extern "C" {
       }
     }
 
-    if (parameters->array[fss_read_parameter_help_e].result & f_console_result_found_e) return;
-    if (parameters->array[fss_read_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;
 
     f_number_unsigned_t i = 0;
     f_number_unsigned_t index = 0;
index 0ac1caec99c27e680e98aaccdacfe068554ae019..ce47ccf0186e1f1537f0d3ffd90fb5677cf0fb46 100644 (file)
@@ -62,7 +62,7 @@ extern "C" {
  *     Errors (with error bit) from: f_file_stream_open().
  *     Errors (with error bit) from: f_string_dynamics_resize().
  *     Errors (with error bit) from: fll_program_parameter_process_context().
- *     Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  *     Errors (with error bit) from: fss_read_setting_load_depth().
  *     Errors (with error bit) from: fss_read_signal_check()
@@ -75,7 +75,7 @@ extern "C" {
  * @see f_file_stream_open()
  * @see f_string_dynamics_resize()
  * @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
  *
  * @see fss_read_setting_load_depth()
  * @see fss_read_signal_check()
index dea9f486c697041a93b882bddb8797a98091c437..4cbb25ed398457b616752d982cb7156d49c9ec02 100644 (file)
@@ -89,21 +89,7 @@ extern "C" {
  */
 #ifndef _di_fss_read_parameter_e_
   enum {
-    fss_read_parameter_help_e,
-    fss_read_parameter_copyright_e,
-    fss_read_parameter_light_e,
-    fss_read_parameter_dark_e,
-    fss_read_parameter_no_color_e,
-    fss_read_parameter_verbosity_quiet_e,
-    fss_read_parameter_verbosity_error_e,
-    fss_read_parameter_verbosity_normal_e,
-    fss_read_parameter_verbosity_verbose_e,
-    fss_read_parameter_verbosity_debug_e,
-    fss_read_parameter_version_e,
-    fss_read_parameter_line_first_no_e,
-    fss_read_parameter_line_last_no_e,
-
-    fss_read_parameter_as_e,
+    fss_read_parameter_as_e = f_console_standard_parameter_last_e,
     fss_read_parameter_at_e,
     fss_read_parameter_content_e,
     fss_read_parameter_columns_e,
index eb112e3a258103d5030b153effc126da33fb34e0..7df4a2eff841c69d737a56984e89a72842aec57c 100644 (file)
@@ -49,8 +49,8 @@ extern "C" {
     "fll_fss_extended_read",
     "fll_fss_extended_list_read",
     "fll_fss_payload_read",
-    "fll_program_parameter_process_context",
-    "fll_program_parameter_process_verbosity",
+    "fll_program_parameter_process_context_standard",
+    "fll_program_parameter_process_verbosity_standard",
     "fss_read_depths_resize",
     "fss_read_ensure_quotes_length",
     "fss_read_files_resize",
index 8a3da056ea06e28e4b65a48074a28e2c03094645..12b358ef263daa0caa6415cd60f797269e2f7626 100644 (file)
@@ -82,8 +82,8 @@ extern "C" {
     fss_read_f_fll_fss_extended_read_e,
     fss_read_f_fll_fss_extended_list_read_e,
     fss_read_f_fll_fss_payload_read_e,
-    fss_read_f_fll_program_parameter_process_context_e,
-    fss_read_f_fll_program_parameter_process_verbosity_e,
+    fss_read_f_fll_program_parameter_process_context_standard_e,
+    fss_read_f_fll_program_parameter_process_verbosity_standard_e,
     fss_read_f_fss_read_depths_resize_e,
     fss_read_f_fss_read_ensure_quotes_length_e,
     fss_read_f_fss_read_files_resize_e,
index f913001c7844584febd0590295e12f11c91bdefb..d183272689a0db6b7fbc3a51a484983e3b2db74d 100644 (file)
@@ -74,13 +74,13 @@ extern int main(const int argc, const f_string_t *argv, const f_string_t *envp);
  *     Errors (with error bit) from: f_file_stream_open().
  *     Errors (with error bit) from: f_string_dynamics_resize().
  *     Errors (with error bit) from: fll_program_parameter_process_context().
- *     Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  * @see f_console_parameter_process()
  * @see f_file_stream_open()
  * @see f_string_dynamics_resize()
  * @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
  *
  * @see fss_read_setting_load()
  */
index afed4a675da3e9f07228f10659af8cced7ff0d90..3f778a177a73584cabe2a687c52c8a56a6c5ff88 100644 (file)
@@ -16,14 +16,14 @@ extern "C" {
     main->setting.state.step_small = fss_write_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[fss_write_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fss_write_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= fss_write_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[fss_write_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & fss_write_main_flag_print_last_e;
     }
     else {
@@ -40,65 +40,43 @@ extern "C" {
       return;
     }
 
-    {
-      f_uint16s_t choices = f_uint16s_t_initialize;
-
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { fss_write_parameter_no_color_e, fss_write_parameter_light_e, fss_write_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
-
-          fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_context));
-
-          return;
-        }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { fss_write_parameter_verbosity_quiet_e, fss_write_parameter_verbosity_error_e, fss_write_parameter_verbosity_verbose_e, fss_write_parameter_verbosity_debug_e, fss_write_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
+      fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_context_standard));
 
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+      return;
+    }
 
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      }
 
-          fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_verbosity));
+      fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_verbosity_standard));
 
-          return;
-        }
-      }
+      return;
     }
 
     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;
 
-    if (main->program.parameters.array[fss_write_parameter_help_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_write_main_flag_help_e;
     }
 
-    if (main->program.parameters.array[fss_write_parameter_version_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_write_main_flag_version_e;
     }
 
-    if (main->program.parameters.array[fss_write_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= fss_write_main_flag_copyright_e;
     }
 
@@ -113,8 +91,8 @@ extern "C" {
       }
     }
 
-    if (main->program.parameters.array[fss_write_parameter_help_e].result & f_console_result_found_e) return;
-    if (main->program.parameters.array[fss_write_parameter_version_e].result & f_console_result_found_e) return;
+    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 ((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) {
index f8ef10491a46fec0012b961bfacf10ce05bf6cbd..3ea8b015b13bdd9e75a8efc770645d55edbee0fb 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
  *     Errors (with error bit) from: f_file_stream_open().
  *     Errors (with error bit) from: f_string_dynamics_resize().
  *     Errors (with error bit) from: fll_program_parameter_process_context().
- *     Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  * @param callback
  *   (optional) Designate a function to call after performing the initial processing, but before printing help.
  *   If the function returns F_done, then this function immediately returns, resetting status to F_none.
@@ -50,7 +50,7 @@ extern "C" {
  * @see f_file_stream_open()
  * @see f_string_dynamics_resize()
  * @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_fss_write_setting_load_
   extern void fss_write_setting_load(const f_console_arguments_t arguments, fss_write_main_t * const main, void (*callback)(const f_console_arguments_t arguments, fss_write_main_t * const main));
index 511ab143b73363002d52490c5d728884078cbbc6..2c6c8f2f21ddc57ac63acee4c81efb5894a762ee 100644 (file)
@@ -64,21 +64,7 @@ extern "C" {
  */
 #ifndef _di_fss_write_parameter_e_
   enum {
-    fss_write_parameter_help_e,
-    fss_write_parameter_copyright_e,
-    fss_write_parameter_light_e,
-    fss_write_parameter_dark_e,
-    fss_write_parameter_no_color_e,
-    fss_write_parameter_verbosity_quiet_e,
-    fss_write_parameter_verbosity_error_e,
-    fss_write_parameter_verbosity_normal_e,
-    fss_write_parameter_verbosity_verbose_e,
-    fss_write_parameter_verbosity_debug_e,
-    fss_write_parameter_version_e,
-    fss_write_parameter_line_first_no_e,
-    fss_write_parameter_line_last_no_e,
-
-    fss_write_parameter_as_e,
+    fss_write_parameter_as_e = f_console_standard_parameter_last_e,
     fss_write_parameter_backtick_e,
     fss_write_parameter_content_e,
     fss_write_parameter_content_end_e,
index 7ed91f8d48210ef245853134ab71aa448d9efdaa..8d95d98bf4c10e2fd3c6bebdc8f464d395a9d145 100644 (file)
@@ -35,8 +35,8 @@ extern "C" {
     "fl_fss_extended_list_object_write",
     "fl_fss_extended_object_write",
     "fl_fss_payload_content_write",
-    "fll_program_parameter_process_context",
-    "fll_program_parameter_process_verbosity",
+    "fll_program_parameter_process_context_standard",
+    "fll_program_parameter_process_verbosity_standard",
     "fll_fss_payload_write",
   };
 #endif // _di_fss_write_f_a_
index 1f33f989c61f0ad4b4cac8487d85848214fa29b2..2a709f2900ef5c0dea6b784f1039c36ae756bd46 100644 (file)
@@ -68,8 +68,8 @@ extern "C" {
     fss_write_f_fl_fss_extended_list_object_write_e,
     fss_write_f_fl_fss_extended_object_write_e,
     fss_write_f_fl_fss_payload_content_write_e,
-    fss_write_f_fll_program_parameter_process_context_e,
-    fss_write_f_fll_program_parameter_process_verbosity_e,
+    fss_write_f_fll_program_parameter_process_context_standard_e,
+    fss_write_f_fll_program_parameter_process_verbosity_standard_e,
     fss_write_f_fll_fss_payload_write_e,
   }; // enum
 #endif // _di_fss_write_f_e_
index f7e5fa50b5bff36b3b56cfde0df8d2e37f3baa4c..dae60f06c581690b5fa5f62668eeecd794874843 100644 (file)
@@ -78,13 +78,13 @@ extern int main(const int argc, const f_string_t *argv, const f_string_t *envp);
  *     Errors (with error bit) from: f_file_stream_open().
  *     Errors (with error bit) from: f_string_dynamics_resize().
  *     Errors (with error bit) from: fll_program_parameter_process_context().
- *     Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  * @see f_console_parameter_process()
  * @see f_file_stream_open()
  * @see f_string_dynamics_resize()
  * @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
  *
  * @see fss_write_setting_load()
  */
index 0505667108e474d60604ce9cfab76666b0e3dc3c..b16e896c51cfc9000d1314edf31f244641eea9ba 100644 (file)
@@ -16,14 +16,14 @@ extern "C" {
     main->setting.state.step_small = iki_read_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[iki_read_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & iki_read_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= iki_read_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[iki_read_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & iki_read_main_flag_print_last_e;
     }
     else {
@@ -40,68 +40,46 @@ extern "C" {
       return;
     }
 
-    {
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { iki_read_parameter_no_color_e, iki_read_parameter_light_e, iki_read_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
-
-          iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_context));
-
-          return;
-        }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { iki_read_parameter_verbosity_quiet_e, iki_read_parameter_verbosity_error_e, iki_read_parameter_verbosity_verbose_e, iki_read_parameter_verbosity_debug_e, iki_read_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
+      iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_context_standard));
 
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+      return;
+    }
 
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      }
 
-          iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_verbosity));
+      iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_verbosity_standard));
 
-          return;
-        }
-      }
+      return;
+    }
 
-      if (main->program.parameters.array[iki_read_parameter_help_e].result & f_console_result_found_e) {
-        main->setting.flag |= iki_read_main_flag_help_e;
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+      main->setting.flag |= iki_read_main_flag_help_e;
 
-        return;
-      }
+      return;
+    }
 
-      if (main->program.parameters.array[iki_read_parameter_version_e].result & f_console_result_found_e) {
-        main->setting.flag |= iki_read_main_flag_version_e;
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+      main->setting.flag |= iki_read_main_flag_version_e;
 
-        return;
-      }
+      return;
+    }
 
-      if (main->program.parameters.array[iki_read_parameter_copyright_e].result & f_console_result_found_e) {
-        main->setting.flag |= iki_read_main_flag_copyright_e;
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+      main->setting.flag |= iki_read_main_flag_copyright_e;
 
-        return;
-      }
+      return;
     }
 
     if (!(main->program.parameters.remaining.used || (main->program.pipe & fll_program_data_pipe_input_e))) {
index 62bfa01f2abc29ea409f3695859102428d68fb85..c9651fdb0fae9de5eb28b2b35e4ad21fc1e5bff3 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
  *     Errors (with error bit) from: f_string_maps_resize().
  *     Errors (with error bit) from: f_string_triples_resize().
  *     Errors (with error bit) from: fll_program_parameter_process_context().
- *     Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  * @see f_console_parameter_process()
  * @see f_file_exists()
@@ -47,7 +47,7 @@ extern "C" {
  * @see f_string_maps_resize()
  * @see f_string_triples_resize()
  * @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_iki_read_setting_load_
   extern void iki_read_setting_load(const f_console_arguments_t arguments, iki_read_main_t * const main);
index 773458529996c1defa3b92145611d85efebfe82b..25a20468e4e0b2b006d2ec896596cffc15778947 100644 (file)
@@ -67,21 +67,7 @@ extern "C" {
  */
 #ifndef _di_iki_read_parameter_e_
   enum {
-    iki_read_parameter_help_e,
-    iki_read_parameter_copyright_e,
-    iki_read_parameter_light_e,
-    iki_read_parameter_dark_e,
-    iki_read_parameter_no_color_e,
-    iki_read_parameter_verbosity_quiet_e,
-    iki_read_parameter_verbosity_error_e,
-    iki_read_parameter_verbosity_normal_e,
-    iki_read_parameter_verbosity_verbose_e,
-    iki_read_parameter_verbosity_debug_e,
-    iki_read_parameter_version_e,
-    iki_read_parameter_line_first_no_e,
-    iki_read_parameter_line_last_no_e,
-
-    iki_read_parameter_at_e,
+    iki_read_parameter_at_e = f_console_standard_parameter_last_e,
     iki_read_parameter_content_e,
     iki_read_parameter_line_e,
     iki_read_parameter_literal_e,
index e4c0c501604255beb5823b3ae4065be1de71e458..5395a20015d2fa898da50fb3ac93d09935d8be77 100644 (file)
@@ -23,8 +23,8 @@ extern "C" {
     "f_string_triples_increase_by",
     "f_thread_create",
     "fl_iki_read",
-    "fll_program_parameter_process_context",
-    "fll_program_parameter_process_verbosity",
+    "fll_program_parameter_process_context_standard",
+    "fll_program_parameter_process_verbosity_standard",
   };
 #endif // _di_iki_read_f_a_
 
index f47d03287a914264d0ff09b0bb91844c85d98fac..7e40b70b42d1744ddb4cbf49d69b3dc746ace62a 100644 (file)
@@ -56,8 +56,8 @@ extern "C" {
     iki_read_f_f_string_triples_increase_by_e,
     iki_read_f_f_thread_create_e,
     iki_read_f_fl_iki_read_e,
-    iki_read_f_fll_program_parameter_process_context_e,
-    iki_read_f_fll_program_parameter_process_verbosity_e,
+    iki_read_f_fll_program_parameter_process_context_standard_e,
+    iki_read_f_fll_program_parameter_process_verbosity_standard_e,
   }; // enum
 #endif // _di_iki_read_f_e_
 
index 75fd984487abdb05823a1612073a35b73930439c..1b26f35df0bdfaa6c6ada8cc6191d11d5be24ff8 100644 (file)
@@ -16,14 +16,14 @@ extern "C" {
     main->setting.state.step_small = iki_write_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[iki_write_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & iki_write_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= iki_write_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[iki_write_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & iki_write_main_flag_print_last_e;
     }
     else {
@@ -40,69 +40,47 @@ extern "C" {
       return;
     }
 
-    {
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { iki_write_parameter_no_color_e, iki_write_parameter_light_e, iki_write_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
-
-          iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_context));
-
-          return;
-        }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { iki_write_parameter_verbosity_quiet_e, iki_write_parameter_verbosity_error_e, iki_write_parameter_verbosity_verbose_e, iki_write_parameter_verbosity_debug_e, iki_write_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
+      iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_context_standard));
 
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+      return;
+    }
 
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      }
 
-          iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_verbosity));
+      iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_verbosity_standard));
 
-          return;
-        }
-      }
+      return;
     }
 
     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;
 
-    if (main->program.parameters.array[iki_write_parameter_help_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= iki_write_main_flag_help_e;
 
       return;
     }
 
-    if (main->program.parameters.array[iki_write_parameter_version_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= iki_write_main_flag_version_e;
 
       return;
     }
 
-    if (main->program.parameters.array[iki_write_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= iki_write_main_flag_copyright_e;
 
       return;
index 034752609710bcc8a33d561243d8a53f15cf184d..0a5d9b7e1750cb76039aff67ec89e58746bf0a31 100644 (file)
@@ -35,13 +35,13 @@ extern "C" {
  *     Errors (with error bit) from: f_file_stream_open().
  *     Errors (with error bit) from: f_string_dynamics_resize().
  *     Errors (with error bit) from: fll_program_parameter_process_context().
- *     Errors (with error bit) from: fll_program_parameter_process_verbosity().
+ *     Errors (with error bit) from: fll_program_parameter_process_verbosity_standard().
  *
  * @see f_console_parameter_process()
  * @see f_file_stream_open()
  * @see f_string_dynamics_resize()
  * @see fll_program_parameter_process_context()
- * @see fll_program_parameter_process_verbosity()
+ * @see fll_program_parameter_process_verbosity_standard()
  */
 #ifndef _di_iki_write_setting_load_
   extern void iki_write_setting_load(const f_console_arguments_t arguments, iki_write_main_t * const main);
index eeb8e2e6a71108cee907da59170f7b584f0d0380..c946f33ef05e4f4f381d2fa52bf534dd6b6be7eb 100644 (file)
@@ -52,21 +52,7 @@ extern "C" {
  */
 #ifndef _di_iki_write_parameter_e_
   enum {
-    iki_write_parameter_help_e,
-    iki_write_parameter_copyright_e,
-    iki_write_parameter_light_e,
-    iki_write_parameter_dark_e,
-    iki_write_parameter_no_color_e,
-    iki_write_parameter_verbosity_quiet_e,
-    iki_write_parameter_verbosity_error_e,
-    iki_write_parameter_verbosity_normal_e,
-    iki_write_parameter_verbosity_verbose_e,
-    iki_write_parameter_verbosity_debug_e,
-    iki_write_parameter_version_e,
-    iki_write_parameter_line_first_no_e,
-    iki_write_parameter_line_last_no_e,
-
-    iki_write_parameter_backtick_e,
+    iki_write_parameter_backtick_e = f_console_standard_parameter_last_e,
     iki_write_parameter_content_e,
     iki_write_parameter_double_e,
     iki_write_parameter_file_e,
index 48eaf5ff9de0ab3138495c4323b03c68356ab7a1..2d1fd7ee50e4337955d8ee0dd9487c8d876c2f9b 100644 (file)
@@ -15,8 +15,8 @@ extern "C" {
     "f_string_dynamics_resize",
     "f_thread_create",
     "fll_iki_content_escape",
-    "fll_program_parameter_process_context",
-    "fll_program_parameter_process_verbosity",
+    "fll_program_parameter_process_context_standard",
+    "fll_program_parameter_process_verbosity_standard",
   };
 #endif // _di_iki_write_f_a_
 
index a240b5cede0186a5242730a6df78d4b8ffabe678..9a0e34609c3d91049bf29b0153ae744a8473bca7 100644 (file)
@@ -48,8 +48,8 @@ extern "C" {
     iki_write_f_f_string_dynamics_resize_e,
     iki_write_f_f_thread_create_e,
     iki_write_f_fll_iki_content_escape_e,
-    iki_write_f_fll_program_parameter_process_context_e,
-    iki_write_f_fll_program_parameter_process_verbosity_e,
+    iki_write_f_fll_program_parameter_process_context_standard_e,
+    iki_write_f_fll_program_parameter_process_verbosity_standard_e,
   }; // enum
 #endif // _di_iki_write_f_e_
 
index 4f1897165f7f599db1a18910ace22d21b4a9e408..2b134343242961161cb22cf3d7edf3d34fc0f659 100644 (file)
@@ -16,14 +16,14 @@ extern "C" {
     main->setting.state.step_small = status_code_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[status_code_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & status_code_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= status_code_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[status_code_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & status_code_main_flag_print_last_e;
     }
     else {
@@ -40,68 +40,46 @@ extern "C" {
       return;
     }
 
-    {
-      f_uint16s_t choices = f_uint16s_t_initialize;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { status_code_parameter_no_color_e, status_code_parameter_light_e, status_code_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
-
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
-
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
-
-          status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_context));
-
-          return;
-        }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { status_code_parameter_verbosity_quiet_e, status_code_parameter_verbosity_error_e, status_code_parameter_verbosity_verbose_e, status_code_parameter_verbosity_debug_e, status_code_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
+      status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_context_standard));
 
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+      return;
+    }
 
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      }
 
-          status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_verbosity));
+      status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_verbosity_standard));
 
-          return;
-        }
-      }
+      return;
+    }
 
-      if (main->program.parameters.array[status_code_parameter_help_e].result & f_console_result_found_e) {
-        main->setting.flag |= status_code_main_flag_help_e;
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+      main->setting.flag |= status_code_main_flag_help_e;
 
-        return;
-      }
+      return;
+    }
 
-      if (main->program.parameters.array[status_code_parameter_version_e].result & f_console_result_found_e) {
-        main->setting.flag |= status_code_main_flag_version_e;
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+      main->setting.flag |= status_code_main_flag_version_e;
 
-        return;
-      }
+      return;
+    }
 
-      if (main->program.parameters.array[status_code_parameter_copyright_e].result & f_console_result_found_e) {
-        main->setting.flag |= status_code_main_flag_copyright_e;
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+      main->setting.flag |= status_code_main_flag_copyright_e;
 
-        return;
-      }
+      return;
     }
 
     if (main->program.parameters.array[status_code_parameter_error_e].result & f_console_result_found_e) {
index 25b03aefdd05be4878a687ae7149a6d4ef789b89..ac99082559cc09d74c5f009df11b5be8c60d445d 100644 (file)
@@ -53,21 +53,7 @@ extern "C" {
  */
 #ifndef _di_status_code_parameter_e_
   enum {
-    status_code_parameter_help_e,
-    status_code_parameter_copyright_e,
-    status_code_parameter_light_e,
-    status_code_parameter_dark_e,
-    status_code_parameter_no_color_e,
-    status_code_parameter_verbosity_quiet_e,
-    status_code_parameter_verbosity_error_e,
-    status_code_parameter_verbosity_normal_e,
-    status_code_parameter_verbosity_verbose_e,
-    status_code_parameter_verbosity_debug_e,
-    status_code_parameter_version_e,
-    status_code_parameter_line_first_no_e,
-    status_code_parameter_line_last_no_e,
-
-    status_code_parameter_fine_e,
+    status_code_parameter_fine_e = f_console_standard_parameter_last_e,
     status_code_parameter_warning_e,
     status_code_parameter_error_e,
     status_code_parameter_number_e,
index 600acc87747709ed1b95494e2ae9723795c13809..4841d558acc1020d0e9b9187c98614094a0d14be 100644 (file)
@@ -8,8 +8,8 @@ extern "C" {
   const f_string_t status_code_f_a[] = {
     "f_console_parameter_process",
     "f_thread_create",
-    "fll_program_parameter_process_context",
-    "fll_program_parameter_process_verbosity",
+    "fll_program_parameter_process_context_standard",
+    "fll_program_parameter_process_verbosity_standard",
     "status_string_from",
     "status_string_to",
   };
index 9ded4a58bc80c7610c3181c5bab8317982a6f122..f27e477a0e6c7ff40885693b5b9c4cff684fa885 100644 (file)
@@ -41,8 +41,8 @@ extern "C" {
   enum {
     status_code_f_f_console_parameter_process_e,
     status_code_f_f_thread_create_e,
-    status_code_f_fll_program_parameter_process_context_e,
-    status_code_f_fll_program_parameter_process_verbosity_e,
+    status_code_f_fll_program_parameter_process_context_standard_e,
+    status_code_f_fll_program_parameter_process_verbosity_standard_e,
     status_code_f_status_string_from_e,
     status_code_f_status_string_to_e,
   }; // enum
index 565b468d5e1c86247a97d1c84d271365ada0665c..c8601f9ed43f746c6cb395f937a00eac30a88db1 100644 (file)
@@ -16,14 +16,14 @@ extern "C" {
     main->setting.state.step_small = utf8_allocation_small_d;
 
     // Identify and process first/last parameters.
-    if (main->program.parameters.array[utf8_parameter_line_first_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & utf8_main_flag_print_first_e;
     }
     else {
       main->setting.flag |= utf8_main_flag_print_first_e;
     }
 
-    if (main->program.parameters.array[utf8_parameter_line_last_no_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
       main->setting.flag -= main->setting.flag & utf8_main_flag_print_last_e;
     }
     else {
@@ -40,51 +40,33 @@ extern "C" {
       return;
     }
 
-    {
-      f_number_unsigned_t choice = 0;
-      f_uint16s_t choices = f_uint16s_t_initialize;
-
-      // Identify and prioritize "color context" parameters.
-      {
-        uint16_t choices_array[3] = { utf8_parameter_no_color_e, utf8_parameter_light_e, utf8_parameter_dark_e };
-        choices.array = choices_array;
-        choices.used = 3;
+    main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
 
-        static const uint8_t modes[3] = { f_color_mode_not_e, f_color_mode_light_e, f_color_mode_dark_e };
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
+      }
 
-        main->setting.state.status = fll_program_parameter_process_context(choices, modes, F_true, &main->program);
+      utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_context_standard));
 
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
+      return;
+    }
 
-          utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_context));
+    main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
 
-          return;
-        }
+    if (F_status_is_error(main->setting.state.status)) {
+      if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
+        fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
       }
 
-      // Identify and prioritize "verbosity" parameters.
-      {
-        uint16_t choices_array[5] = { utf8_parameter_verbosity_quiet_e, utf8_parameter_verbosity_error_e, utf8_parameter_verbosity_verbose_e, utf8_parameter_verbosity_debug_e, utf8_parameter_verbosity_normal_e };
-        choices.array = choices_array;
-        choices.used = 5;
-
-        static const uint8_t verbosity[5] = { f_console_verbosity_quiet_e, f_console_verbosity_error_e, f_console_verbosity_verbose_e, f_console_verbosity_debug_e, f_console_verbosity_normal_e };
+      utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_verbosity_standard));
 
-        main->setting.state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, &main->program);
-
-        if (F_status_is_error(main->setting.state.status)) {
-          if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
-            fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-          }
-
-          utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_verbosity));
+      return;
+    }
 
-          return;
-        }
-      }
+    {
+      f_number_unsigned_t choice = 0;
+      f_uint16s_t choices = f_uint16s_t_initialize;
 
       // Identify and prioritize "from" mode parameters.
       {
@@ -173,19 +155,19 @@ extern "C" {
       }
     }
 
-    if (main->program.parameters.array[utf8_parameter_help_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
       main->setting.flag |= utf8_main_flag_help_e;
 
       return;
     }
 
-    if (main->program.parameters.array[utf8_parameter_version_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
       main->setting.flag |= utf8_main_flag_version_e;
 
       return;
     }
 
-    if (main->program.parameters.array[utf8_parameter_copyright_e].result & f_console_result_found_e) {
+    if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
       main->setting.flag |= utf8_main_flag_copyright_e;
 
       return;
index 17a6534e3dd1a91b4af9ba5280f97d05bd467b66..35f5819100c4b0068a2810b06f6cba21db729058 100644 (file)
@@ -118,21 +118,7 @@ extern "C" {
  */
 #ifndef _di_utf8_parameter_e_
   enum {
-    utf8_parameter_help_e,
-    utf8_parameter_copyright_e,
-    utf8_parameter_light_e,
-    utf8_parameter_dark_e,
-    utf8_parameter_no_color_e,
-    utf8_parameter_verbosity_quiet_e,
-    utf8_parameter_verbosity_error_e,
-    utf8_parameter_verbosity_normal_e,
-    utf8_parameter_verbosity_verbose_e,
-    utf8_parameter_verbosity_debug_e,
-    utf8_parameter_version_e,
-    utf8_parameter_line_first_no_e,
-    utf8_parameter_line_last_no_e,
-
-    utf8_parameter_from_bytesequence_e,
+    utf8_parameter_from_bytesequence_e = f_console_standard_parameter_last_e,
     utf8_parameter_from_codepoint_e,
     utf8_parameter_from_file_e,
 
index 7d7ac5b18eae6a397de22d884406f0311244c561..86b26aa3dd13f6a345e841989a555f88edb90c1e 100644 (file)
@@ -12,8 +12,8 @@ extern "C" {
     "f_string_dynamic_append_nulless",
     "f_string_dynamics_increase_by",
     "f_thread_create",
-    "fll_program_parameter_process_context",
-    "fll_program_parameter_process_verbosity",
+    "fll_program_parameter_process_context_standard",
+    "fll_program_parameter_process_verbosity_standard",
     "utf8_detect_codepoint",
     "utf8_process_file_bytesequence",
     "utf8_process_file_codepoint",
index 5f98d2cf3da0e11b3279464b531235d1646d5819..4059a6a2414bed35fd593a3bbd4c6200455a403e 100644 (file)
@@ -45,8 +45,8 @@ extern "C" {
     utf8_f_f_string_dynamic_append_nulless_e,
     utf8_f_f_string_dynamics_increase_by_e,
     utf8_f_f_thread_create_e,
-    utf8_f_fll_program_parameter_process_context_e,
-    utf8_f_fll_program_parameter_process_verbosity_e,
+    utf8_f_fll_program_parameter_process_context_standard_e,
+    utf8_f_fll_program_parameter_process_verbosity_standard_e,
     utf8_f_utf8_detect_codepoint_e,
     utf8_f_utf8_process_file_bytesequence_e,
     utf8_f_utf8_process_file_codepoint_e,