]> Kevux Git Server - fll/commitdiff
Update: Add "success" color context and initialize color "set" in programs.
authorKevin Day <thekevinday@gmail.com>
Thu, 4 Nov 2021 05:12:12 +0000 (00:12 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 4 Nov 2021 05:15:53 +0000 (00:15 -0500)
There is an "error" and a "warning" but no "success".
Make this complete by adding "success".

The programs aren't initializing the "set".
Attempting to use these always results in no color context.
Fix this by initializing these in each program.

The output context also needs to be initialized just like the error and warning.

25 files changed:
level_0/f_color/c/color-common.h
level_0/f_color/c/color.c
level_2/fll_execute/c/execute.h
level_2/fll_execute/c/private-execute.h
level_2/fll_program/c/program.c
level_3/byte_dump/c/byte_dump.c
level_3/control/c/control.c
level_3/controller/c/controller.c
level_3/fake/c/fake.c
level_3/firewall/c/firewall.c
level_3/fss_basic_list_read/c/fss_basic_list_read.c
level_3/fss_basic_list_write/c/fss_basic_list_write.c
level_3/fss_basic_read/c/fss_basic_read.c
level_3/fss_basic_write/c/fss_basic_write.c
level_3/fss_embedded_list_read/c/fss_embedded_list_read.c
level_3/fss_embedded_list_write/c/fss_embedded_list_write.c
level_3/fss_extended_list_read/c/fss_extended_list_read.c
level_3/fss_extended_list_write/c/fss_extended_list_write.c
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_write/c/fss_extended_write.c
level_3/fss_identify/c/fss_identify.c
level_3/fss_status_code/c/fss_status_code.c
level_3/iki_read/c/iki_read.c
level_3/iki_write/c/iki_write.c
level_3/status_code/c/status_code.c

index a058012b0c39909e9935e7ad2cd72b89947c69b6..104e6527871ac80a185fee435c6632c74fdf9edb 100644 (file)
 extern "C" {
 #endif
 
+/**
+ * Color max size represents the maximum length of the resulting color string.
+ *
+ * This color max size does not include the terminating null.
+ *
+ * A color max size terminated represents the max size with the terminating null.
+ */
 #ifndef _di_f_color_max_size_
-  #define F_color_max_size_d 7
+  #define F_color_max_size_d            7
+  #define F_color_max_size_terminated_d 8
 #endif // _di_f_color_max_size_
 
 #ifndef _di_f_color_types_t_
@@ -382,6 +390,7 @@ extern "C" {
  * notable:      Color context associated with "notable".
  * important:    Color context associated with "important".
  * standout:     Color context associated with "standout".
+ * success:      Color context associated with "success".
  * normal:       Color context associated with "normal".
  * normal_reset: Color context associated with "normal_reset".
  */
@@ -393,13 +402,14 @@ extern "C" {
     f_color_set_t notable;
     f_color_set_t important;
     f_color_set_t standout;
+    f_color_set_t success;
     f_color_set_t normal;
     f_color_set_t normal_reset;
   } f_color_set_context_t;
 
-  #define f_color_set_context_t_initialize { f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize }
+  #define f_color_set_context_t_initialize { f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize }
 
-  #define macro_f_color_set_context_t_initialize(warning, error, title, notable, important, standout, normal, normal_reset) { warning, error, title, notable, important, standout, normal, normal_reset }
+  #define macro_f_color_set_context_t_initialize(warning, error, title, notable, important, standout, success, normal, normal_reset) { warning, error, title, notable, important, standout, success, normal, normal_reset }
 
   #define macro_f_color_set_context_t_clear(set) \
     macro_f_color_set_t_clear(set.warning) \
@@ -408,6 +418,7 @@ extern "C" {
     macro_f_color_set_t_clear(set.notable) \
     macro_f_color_set_t_clear(set.important) \
     macro_f_color_set_t_clear(set.standout) \
+    macro_f_color_set_t_clear(set.success) \
     macro_f_color_set_t_clear(set.normal) \
     macro_f_color_set_t_clear(set.normal_reset)
 
@@ -428,6 +439,7 @@ extern "C" {
  * notable:      Color context associated with "notable".
  * important:    Color context associated with "important".
  * standout:     Color context associated with "standout".
+ * success:      Color context associated with "success".
  * normal:       Color context associated with "normal".
  * normal_reset: Color context associated with "normal_reset".
  */
@@ -444,11 +456,12 @@ extern "C" {
     f_string_dynamic_t notable;
     f_string_dynamic_t important;
     f_string_dynamic_t standout;
+    f_string_dynamic_t success;
     f_string_dynamic_t normal;
     f_string_dynamic_t normal_reset;
   } f_color_context_t;
 
-  #define f_color_context_t_initialize { f_color_t_initialize_linux, f_color_format_t_initialize_linux, F_color_mode_none_d, f_color_set_context_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize }
+  #define f_color_context_t_initialize { f_color_t_initialize_linux, f_color_format_t_initialize_linux, F_color_mode_none_d, f_color_set_context_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize }
 
   #define macro_f_color_context_t_clear(context) \
     macro_f_color_t_clear(context.list) \
@@ -460,19 +473,21 @@ extern "C" {
     macro_f_string_dynamic_t_clear(context.notable) \
     macro_f_string_dynamic_t_clear(context.important) \
     macro_f_string_dynamic_t_clear(context.standout) \
+    macro_f_string_dynamic_t_clear(context.success) \
     macro_f_string_dynamic_t_clear(context.normal) \
     macro_f_string_dynamic_t_clear(context.normal_reset)
 
   #define macro_f_color_context_t_new(status, context) \
-    macro_f_string_dynamic_t_resize(status, context.reset, F_color_max_size_d + 1) \
-    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.warning, F_color_max_size_d + 1) \
-    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.error, F_color_max_size_d + 1) \
-    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.title, F_color_max_size_d + 1) \
-    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.notable, F_color_max_size_d + 1) \
-    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.important, F_color_max_size_d + 1) \
-    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.standout, F_color_max_size_d + 1) \
-    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal, F_color_max_size_d + 1) \
-    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal_reset, F_color_max_size_d + 1)
+    macro_f_string_dynamic_t_resize(status, context.reset, F_color_max_size_terminated_d) \
+    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.warning, F_color_max_size_terminated_d) \
+    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.error, F_color_max_size_terminated_d) \
+    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.title, F_color_max_size_terminated_d) \
+    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.notable, F_color_max_size_terminated_d) \
+    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.important, F_color_max_size_terminated_d) \
+    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.standout, F_color_max_size_terminated_d) \
+    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.success, F_color_max_size_terminated_d) \
+    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal, F_color_max_size_terminated_d) \
+    if (F_status_is_error_not(status)) macro_f_string_dynamic_t_resize(status, context.normal_reset, F_color_max_size_terminated_d)
 
   #define macro_f_color_context_t_delete_simple(context) \
     macro_f_string_dynamic_t_delete_simple(context.reset) \
@@ -482,6 +497,7 @@ extern "C" {
     macro_f_string_dynamic_t_delete_simple(context.notable) \
     macro_f_string_dynamic_t_delete_simple(context.important) \
     macro_f_string_dynamic_t_delete_simple(context.standout) \
+    macro_f_string_dynamic_t_delete_simple(context.success) \
     macro_f_string_dynamic_t_delete_simple(context.normal) \
     macro_f_string_dynamic_t_delete_simple(context.normal_reset) \
     macro_f_color_context_t_clear(context)
@@ -494,6 +510,7 @@ extern "C" {
     macro_f_string_dynamic_t_destroy_simple(context.notable, size) \
     macro_f_string_dynamic_t_destroy_simple(context.important, size) \
     macro_f_string_dynamic_t_destroy_simple(context.standout, size) \
+    macro_f_string_dynamic_t_destroy_simple(context.success, size) \
     macro_f_string_dynamic_t_destroy_simple(context.normal) \
     macro_f_string_dynamic_t_destroy_simple(context.normal_reset) \
     macro_f_color_context_t_clear(context)
index 56eee2472b80ccbd010655514cfb9d318ed301a9..4e0ae16246127b979ff569fdc515e24b6f5dff2a 100644 (file)
@@ -35,11 +35,11 @@ extern "C" {
     }
 
     if (F_status_is_error_not(status)) {
-      status = macro_fl_color_save_1(&context->notable, context->format, context->list.bold);
+      status = macro_fl_color_save_2(&context->success, context->format, context->list.bold, context->list.green);
     }
 
     if (F_status_is_error_not(status)) {
-      status = macro_fl_color_save_1(&context->standout,  context->format, context->list.purple);
+      status = macro_fl_color_save_1(&context->notable, context->format, context->list.bold);
     }
 
     if (use_light_colors) {
@@ -52,11 +52,11 @@ extern "C" {
       }
 
       if (F_status_is_error_not(status)) {
-        context->mode = F_color_mode_light_d;
+        status = macro_fl_color_save_1(&context->standout,  context->format, context->list.purple);
       }
 
       if (F_status_is_error_not(status)) {
-        status = macro_fl_color_save_1(&context->standout,  context->format, context->list.purple);
+        context->mode = F_color_mode_light_d;
       }
     }
     else {
@@ -69,11 +69,11 @@ extern "C" {
       }
 
       if (F_status_is_error_not(status)) {
-        context->mode = F_color_mode_dark_d;
+        status = macro_fl_color_save_1(&context->standout, context->format, context->list.green);
       }
 
       if (F_status_is_error_not(status)) {
-        status = macro_fl_color_save_1(&context->standout,  context->format, context->list.green);
+        context->mode = F_color_mode_dark_d;
       }
     }
 
@@ -96,6 +96,9 @@ extern "C" {
       context->set.standout.before = &context->standout;
       context->set.standout.after = &context->reset;
 
+      context->set.success.before = &context->success;
+      context->set.success.after = &context->reset;
+
       context->set.normal.before = &context->normal;
       context->set.normal.after = &context->reset;
 
index f82ce2250d4399d46ebb3661260335b2949a91a5..e80b28080bde8613cb58f99217f875729f3f735b 100644 (file)
@@ -73,13 +73,13 @@ extern "C" {
  *
  *   Errors (with error bit) from: macro_f_string_dynamics_t_resize().
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see macro_f_string_dynamics_t_resize()
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  */
@@ -118,12 +118,12 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  */
@@ -164,12 +164,12 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  */
@@ -196,12 +196,12 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  */
@@ -224,12 +224,12 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  */
@@ -262,12 +262,12 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  */
@@ -302,12 +302,12 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  */
@@ -332,12 +332,12 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  */
@@ -466,7 +466,7 @@ extern "C" {
  *   Errors (with error bit) from: f_thread_signal_mask().
  *   Errors (with error bit) from: fl_environment_path_explode_dynamic().
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  * @see close()
index 09d6df18ee5b7b7e52f60d978c8b226551cbd464..874219ea5db668e19e049cf9aa0db56e05e851b4 100644 (file)
@@ -31,12 +31,12 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  * @see fll_execute_arguments_add()
@@ -72,12 +72,12 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_delete().
+ *   Errors (with error bit) from: f_string_dynamic_resize().
  *   Errors (with error bit) from: f_string_dynamic_terminate().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
- * @see f_string_dynamic_delete()
+ * @see f_string_dynamic_resize()
  * @see f_string_dynamic_terminate()
  * @see f_string_dynamics_increase()
  * @see fll_execute_arguments_add_parameter()
index b41a670c0ee8579d51b43d40fcb42f41e629d2f1..076701765d0d403f5c6940ddf6fafa69e06b947e 100644 (file)
@@ -122,6 +122,7 @@ extern "C" {
     context->set.notable = f_color_set_empty_s;
     context->set.important = f_color_set_empty_s;
     context->set.standout = f_color_set_empty_s;
+    context->set.success = f_color_set_empty_s;
     context->set.normal = f_color_set_empty_s;
     context->set.normal_reset = f_color_set_empty_s;
 
index 5c81bfc5cebd1f43665d07039d8afad537bb6ebe..40961dbd6c1a7fe45dcdb5da8da4c4f4f62958ea 100644 (file)
@@ -85,7 +85,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -93,7 +100,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 8ae92cc1ba4b8c4bf499a7155ee8b64b886e52e1..5828881f750354ed2be124f8505cd383b4fb1dea 100644 (file)
@@ -45,7 +45,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -53,7 +60,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 354392c40d5b0a4c8efdc9cfc1cee1d5be56f7e3..86e75557e7f285bc0e77c47b19824289b6f84381 100644 (file)
@@ -70,7 +70,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -78,7 +85,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 8865385296b9014b2f9043787f0d5a2fe4f57057..f29568a46f90a7cf98f4d939ddda203113660e67 100644 (file)
@@ -96,7 +96,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -104,7 +111,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 61022372402a32cfc0f833ed22f789b222ed5c1b..65f92b21df1f54faab3ba0bf36818198e8da4806 100644 (file)
@@ -57,7 +57,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -65,7 +72,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 31cefbb99151af3d540309d5c63da86db5e5be64..2b636b40cfe2eca2d5a040b5db72e17140c1adb8 100644 (file)
@@ -130,7 +130,14 @@ extern "C" {
 
         status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -138,7 +145,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 3bf697e7cd0eb41a30bb80d58d1804674d79fabc..639d4fc7003a0ec545a8421d55dcf4dc3565bb2f 100644 (file)
@@ -69,7 +69,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -77,7 +84,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 1c5d3faeb974fb1782c23ad81162563e4556cb4e..9b242234414788b586b90d71cb8a66eb6c800c37 100644 (file)
@@ -130,7 +130,14 @@ extern "C" {
 
         status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -138,7 +145,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 45e226c8d4a741d7427e4727739bc00da673008b..bc95f79d216afb79c21ec236782e2dafb1ab98a0 100644 (file)
@@ -69,7 +69,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -77,7 +84,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 357d7d4cb1f2548cc275b08d509107363676f899..205e9eb6ebdca25bb6b44061b799cde272926ed8 100644 (file)
@@ -130,7 +130,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -138,7 +145,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index fcd97e6225b9ed1907c652c1f376e0381dca5c8a..f76382e224a068cfc5995735bc0af5bd48111820 100644 (file)
@@ -72,7 +72,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -80,7 +87,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index c1fd33bafc9d76614000b57d3f23b8c155b41284..29f18ff9159c298de17e2607e9dbff3c1f693121 100644 (file)
@@ -130,7 +130,14 @@ extern "C" {
 
         status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -138,7 +145,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index c8e0c349ed5981cbc3ace1424eaca410690c6603..e375446535742d3278ea904550609a07002d0239 100644 (file)
@@ -72,7 +72,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -80,7 +87,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index dbff56a94b70351b1aa59e2ad3625583c3818fda..acb58116baaf565717bb180d3aac0c0e3dd27706 100644 (file)
@@ -129,7 +129,14 @@ extern "C" {
 
         status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -137,7 +144,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index c3abe92a6e0f713ca144b98a86bb1cf9710ab998..2a26795e59936f62c2920cc926bae498d952c950 100644 (file)
@@ -69,7 +69,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -77,7 +84,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index b096fe84cebbd42b85426284f8304ba90584a9ee..84e7f864ccea6cf8ba6732a9d4feeef985c499b6 100644 (file)
@@ -70,7 +70,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -78,7 +85,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index b7704e939a8b2bfc74037c3a9d18dd84a557b30e..e98c17f22063d976a738236f03c20e2aeae4cb6d 100644 (file)
@@ -51,7 +51,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -59,7 +66,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index 1027962bf079676f7206740da549edf0d66436e1..7935a96059e0fed4fae66fb132aa9217d0adaab5 100644 (file)
@@ -78,7 +78,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -86,7 +93,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index e6fc94e69a2e7023c4b14ab43853ad75592a0e29..3bca0e0658c6ca64e1a3bb5088a527a67f2e730f 100644 (file)
@@ -61,7 +61,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -69,7 +76,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }
index f463f7d981a44e7d1d791e436e5c555c7d58c1e5..9d2a0993663183b7b86a80beed84f7a0b25f6e9d 100644 (file)
@@ -51,7 +51,14 @@ extern "C" {
 
         status = fll_program_parameter_process(arguments, parameters, choices, F_true, &main->remaining, &main->context);
 
+        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->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;
 
@@ -59,7 +66,7 @@ extern "C" {
           main->warning.notable = main->context.set.notable;
         }
         else {
-          f_color_set_t *sets[] = { &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+          f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
 
           fll_program_parameter_process_empty(&main->context, sets);
         }