]> Kevux Git Server - fll/commitdiff
Feature: Provide program parameter for displaying copyright.
authorKevin Day <kevin@kevux.org>
Fri, 27 Jan 2023 05:31:07 +0000 (23:31 -0600)
committerKevin Day <kevin@kevux.org>
Fri, 27 Jan 2023 05:31:07 +0000 (23:31 -0600)
Provide copyright printing that can be slighty fine tuned using verbosity.

Provide a define (_di_detailed_copyright_) for reducing some of the string printed.

58 files changed:
build/level_2/defines [new file with mode: 0644]
build/monolithic/defines [new file with mode: 0644]
level_0/f_console/c/console/common.c
level_0/f_console/c/console/common.h
level_2/fll_program/c/program/print.c
level_2/fll_program/c/program/print.h
level_2/fll_program/data/build/defines
level_3/byte_dump/c/byte_dump.c
level_3/byte_dump/c/common.h
level_3/control/c/common.c
level_3/control/c/common.h
level_3/control/c/control.c
level_3/controller/c/common.c
level_3/controller/c/common.h
level_3/controller/c/controller.c
level_3/controller/data/build/defines
level_3/fake/c/main/common.c
level_3/fake/c/main/common.h
level_3/fake/c/main/fake.c
level_3/fake/data/build/defines
level_3/firewall/c/firewall.c
level_3/firewall/data/build/defines
level_3/fss_basic_list_read/c/common.c
level_3/fss_basic_list_read/c/common.h
level_3/fss_basic_list_read/c/fss_basic_list_read.c
level_3/fss_basic_read/c/common.c
level_3/fss_basic_read/c/common.h
level_3/fss_basic_read/c/fss_basic_read.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_extended_list_read/c/common.c
level_3/fss_extended_list_read/c/common.h
level_3/fss_extended_list_read/c/fss_extended_list_read.c
level_3/fss_extended_read/c/common.c
level_3/fss_extended_read/c/common.h
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_identify/c/common.c
level_3/fss_identify/c/common.h
level_3/fss_identify/c/fss_identify.c
level_3/fss_payload_read/c/common.c
level_3/fss_payload_read/c/common.h
level_3/fss_payload_read/c/fss_payload_read.c
level_3/fss_write/c/main/common.c
level_3/fss_write/c/main/common.h
level_3/fss_write/c/main/fss_write.c
level_3/iki_read/c/main/common.c
level_3/iki_read/c/main/common.h
level_3/iki_read/c/main/iki_read.c
level_3/iki_write/c/main/common.c
level_3/iki_write/c/main/common.h
level_3/iki_write/c/main/iki_write.c
level_3/status_code/c/main/common.c
level_3/status_code/c/main/common.h
level_3/status_code/c/main/status_code.c
level_3/utf8/c/main/common.c
level_3/utf8/c/main/common.h
level_3/utf8/c/main/utf8.c

diff --git a/build/level_2/defines b/build/level_2/defines
new file mode 100644 (file)
index 0000000..91fff5d
--- /dev/null
@@ -0,0 +1,3 @@
+# fss-0000
+
+_di_detailed_copyright_ Disable the detailed copyright message (saves a small amount of space).
diff --git a/build/monolithic/defines b/build/monolithic/defines
new file mode 100644 (file)
index 0000000..91fff5d
--- /dev/null
@@ -0,0 +1,3 @@
+# fss-0000
+
+_di_detailed_copyright_ Disable the detailed copyright message (saves a small amount of space).
index efaf6c9793047fc9735e6e8b8d3bed95718ebb14..b700c25130fb8c4ba7c6850b5145c02df5adb867 100644 (file)
@@ -5,6 +5,10 @@ extern "C" {
 #endif
 
 #ifndef _di_f_console_standard_s_
+  #ifndef _di_f_console_standard_short_copyright_s_
+    const f_string_static_t f_console_standard_short_copyright_s = macro_f_string_static_t_initialize(F_console_standard_short_copyright_s, 0, F_console_standard_short_copyright_s_length);
+  #endif // _di_f_console_standard_short_copyright_s_
+
   #ifndef _di_f_console_standard_short_dark_s_
     const f_string_static_t f_console_standard_short_dark_s = macro_f_string_static_t_initialize(F_console_standard_short_dark_s, 0, F_console_standard_short_dark_s_length);
   #endif // _di_f_console_standard_short_dark_s_
@@ -61,6 +65,10 @@ extern "C" {
     const f_string_static_t f_console_standard_short_version_s = macro_f_string_static_t_initialize(F_console_standard_short_version_s, 0, F_console_standard_short_version_s_length);
   #endif // _di_f_console_standard_short_version_s_
 
+  #ifndef _di_f_console_standard_long_copyright_s_
+    const f_string_static_t f_console_standard_long_copyright_s = macro_f_string_static_t_initialize(F_console_standard_long_copyright_s, 0, F_console_standard_long_copyright_s_length);
+  #endif // _di_f_console_standard_long_copyright_s_
+
   #ifndef _di_f_console_standard_long_dark_s_
     const f_string_static_t f_console_standard_long_dark_s = macro_f_string_static_t_initialize(F_console_standard_long_dark_s, 0, F_console_standard_long_dark_s_length);
   #endif // _di_f_console_standard_long_dark_s_
index 5b6185c1979c4354da80014e4520c5243637f3fb..0b1e59a3c153381547566b7abef57b2d30440f73 100644 (file)
@@ -562,6 +562,7 @@ extern "C" {
  * This is not strictly a requirement, but expect level 3 projects to work this way.
  *
  * The following options are subjective in interpretation of the verbosity but are expected to be follow the general interpretation:
+ *   - copyright:     Display copyright, if compiled in (consider combining with quiet, verbose, and normal).
  *   - debug:         Enable debugging, which will likely increase output verbosity.
  *   - error:         Similar to quiet, except that error messages are printed (this is less verbose than "normal").
  *   - normal:        Use normal printing (don't use debug/quiet/verbose).
@@ -587,6 +588,7 @@ extern "C" {
  *     - To avoid problems with the status code after a program is forcibly killed, the status_out environment variable should be cleared at program start.
  */
 #ifndef _di_f_console_standard_s_
+  #define F_console_standard_short_copyright_s     "C"
   #define F_console_standard_short_dark_s          "d"
   #define F_console_standard_short_debug_s         "D"
   #define F_console_standard_short_error_s         "E"
@@ -602,6 +604,7 @@ extern "C" {
   #define F_console_standard_short_verbose_s       "V"
   #define F_console_standard_short_version_s       "v"
 
+  #define F_console_standard_short_copyright_s_length     1
   #define F_console_standard_short_dark_s_length          1
   #define F_console_standard_short_debug_s_length         1
   #define F_console_standard_short_error_s_length         1
@@ -617,6 +620,7 @@ extern "C" {
   #define F_console_standard_short_verbose_s_length       1
   #define F_console_standard_short_version_s_length       1
 
+  #define F_console_standard_long_copyright_s     "copyright"
   #define F_console_standard_long_dark_s          "dark"
   #define F_console_standard_long_debug_s         "debug"
   #define F_console_standard_long_error_s         "error"
@@ -632,6 +636,7 @@ extern "C" {
   #define F_console_standard_long_verbose_s       "verbose"
   #define F_console_standard_long_version_s       "version"
 
+  #define F_console_standard_long_copyright_s_length     9
   #define F_console_standard_long_dark_s_length          4
   #define F_console_standard_long_debug_s_length         5
   #define F_console_standard_long_error_s_length         5
@@ -647,6 +652,10 @@ extern "C" {
   #define F_console_standard_long_verbose_s_length       7
   #define F_console_standard_long_version_s_length       7
 
+  #ifndef _di_f_console_standard_short_copyright_s_
+    extern const f_string_static_t f_console_standard_short_copyright_s;
+  #endif // _di_f_console_standard_short_copyright_s_
+
   #ifndef _di_f_console_standard_short_dark_s_
     extern const f_string_static_t f_console_standard_short_dark_s;
   #endif // _di_f_console_standard_short_dark_s_
@@ -703,6 +712,10 @@ extern "C" {
     extern const f_string_static_t f_console_standard_short_version_s;
   #endif // _di_f_console_standard_short_version_s_
 
+  #ifndef _di_f_console_standard_long_copyright_s_
+    extern const f_string_static_t f_console_standard_long_copyright_s;
+  #endif // _di_f_console_standard_long_copyright_s_
+
   #ifndef _di_f_console_standard_long_dark_s_
     extern const f_string_static_t f_console_standard_long_dark_s;
   #endif // _di_f_console_standard_long_dark_s_
index 7c480f9ddea94374676fe1fef64f7a50dd576038..dd2892f1785402d6b44204be51a06610f07c2f26 100644 (file)
@@ -5,6 +5,40 @@
 extern "C" {
 #endif
 
+#ifndef _di_fll_program_print_copyright_
+  f_status_t fll_program_print_copyright(const fl_print_t print, const uint8_t first_last) {
+
+    f_file_stream_lock(print.to);
+
+    if (first_last & 0x1) {
+      f_print_dynamic_raw(f_string_eol_s, print.to);
+    }
+
+    fl_print_format("Copyright © 2007-2023 Kevin Day.%r", print.to, f_string_eol_s);
+
+    #ifndef _di_detailed_copyright_
+      if (print.verbosity > f_console_verbosity_quiet_e) {
+        if (print.verbosity > f_console_verbosity_normal_e) {
+          fl_print_format("%rThis program comes with ABSOLUTELY NO WARRANTY.%r", print.to, f_string_eol_s, f_string_eol_s);
+          fl_print_format("This is free software, and you are welcome to modify or redistribute in accordance to the license.%r", print.to, f_string_eol_s);
+        }
+
+        fl_print_format("%rSource code license lgpl-2.1-or-later.%r", print.to, f_string_eol_s, f_string_eol_s);
+        fl_print_format("Standard and specification license open-standard-license-1.0.%r", print.to, f_string_eol_s);
+        fl_print_format("Documentation license cc-by-sa-4.0.%r", print.to, f_string_eol_s);
+      }
+    #endif // _di_detailed_copyright_
+
+    if (first_last & 0x2) {
+      f_print_dynamic_raw(f_string_eol_s, print.to);
+    }
+
+    f_file_stream_unlock(print.to);
+
+    return F_none;
+  }
+#endif // _di_fll_program_print_copyright_
+
 #ifndef _di_fll_program_print_error_missing_file_
   f_status_t fll_program_print_error_missing_file(const fl_print_t print) {
 
@@ -409,6 +443,7 @@ extern "C" {
   f_status_t fll_program_print_help_option_standard(const fl_print_t print) {
 
     private_fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "         Print this help message.");
+    private_fll_program_print_help_option(print, f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "    Print the copyright.");
     private_fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "         Output using colors that show up better on dark backgrounds.");
     private_fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "        Output using colors that show up better on light backgrounds.");
     private_fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "     Do not print using color.");
index 85157d7bdd9de18e67fdef815730277b8f987ae7..10605555639250235870beca967b971f2131626b 100644 (file)
@@ -17,6 +17,25 @@ extern "C" {
 #endif
 
 /**
+ * Print Featureless Linux Library copyright.
+ *
+ * @param print
+ *   The output structure to print to.
+ *   The print.verbosity is used to determine how much detail is printed (except for when _di_detailed_copyright_ is set).
+ * @param uint8_t
+ *   Bitwise variable representing whether or not to print the first and last new line.
+ *   Set bit 0x1 to printing first line.
+ *   Set bit 0x2 to printing last line.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fll_program_print_copyright_
+  extern f_status_t fll_program_print_copyright(const fl_print_t print, const uint8_t first_last);
+#endif // _di_fll_program_print_copyright_
+
+/**
  * Print an error message when a file is not provided.
  *
  * This is only printed when verbosity is not set to quiet.
index c6653172ef1e71eb1aff738b1cbad4300feeacd6..91fff5d31b04d5598fd2e56286116e463f58b21b 100644 (file)
@@ -1,2 +1,3 @@
 # fss-0000
 
+_di_detailed_copyright_ Disable the detailed copyright message (saves a small amount of space).
index 0943b835c9ba034a11bbc7cf9247906a58a0c674..e7b63fc52b78b190dce952844657f99e9a0ff8e6 100644 (file)
@@ -142,8 +142,6 @@ extern "C" {
       }
     }
 
-    status = F_none;
-
     if (main->parameters.array[byte_dump_parameter_help_e].result & f_console_result_found_e) {
       byte_dump_print_help(setting, main->message);
 
@@ -156,6 +154,14 @@ extern "C" {
       return F_none;
     }
 
+    if (main->parameters.array[byte_dump_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return F_none;
+    }
+
+    status = F_none;
+
     if (main->parameters.remaining.used || (main->pipe & fll_program_data_pipe_input_e)) {
       if (main->parameters.array[byte_dump_parameter_width_e].result & f_console_result_found_e) {
         f_file_stream_lock(main->error.to);
index 5557932c4684200b705385aa04cabd21e84051f8..39933ee704c79c433f0237e5b69f686279cafa54 100644 (file)
@@ -284,6 +284,7 @@ extern "C" {
 
   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,
@@ -319,7 +320,8 @@ extern "C" {
 
   #define byte_dump_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_normal_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -351,7 +353,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_5(byte_dump_long_classic_s, 0, f_console_flag_normal_e), \
     }
 
-  #define byte_dump_total_parameters_d 28
+  #define byte_dump_total_parameters_d 29
 #endif // _di_byte_dump_parameter_d_
 
 /**
index 959418284549c5844621640ed9228779b48974e0..179804aea7de61f39c097037c72ffd401065b670 100644 (file)
@@ -270,6 +270,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[control_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= control_main_flag_copyright_e;
+
+      return;
+    }
+
     f_string_static_t * const args = main->parameters.arguments.array;
 
     if (main->parameters.array[control_parameter_strip_invalid_e].result & f_console_result_found_e) {
index 69b844db8e86e233f9c24290be52b559e0289d86..bf877c885f0a803557c58b5538d18cf796961bd8 100644 (file)
@@ -95,6 +95,7 @@ extern "C" {
 
   enum {
     control_parameter_help_e = 0,
+    control_parameter_copyright_e,
     control_parameter_light_e,
     control_parameter_dark_e,
     control_parameter_no_color_e,
@@ -115,7 +116,8 @@ extern "C" {
 
   #define control_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -134,7 +136,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(control_short_socket_s,   control_long_socket_s,   1, f_console_flag_normal_e), \
     }
 
-  #define control_total_parameters_d 16
+  #define control_total_parameters_d 17
 #endif // _di_control_parameter_d_
 
 /**
@@ -192,6 +194,7 @@ extern "C" {
  *
  * control_main_flag_*_e:
  *   - none:          No flags set.
+ *   - copyright:     Print copyright.
  *   - file_from:     Using a specified source file.
  *   - file_to:       Using a specified destination file.
  *   - help:          Print help.
@@ -204,14 +207,15 @@ extern "C" {
 #ifndef _di_control_main_flag_e_
   enum {
     control_main_flag_none_e          = 0x0,
-    control_main_flag_file_from_e     = 0x1,
-    control_main_flag_file_to_e       = 0x2,
-    control_main_flag_header_e        = 0x4,
-    control_main_flag_help_e          = 0x8,
-    control_main_flag_separate_e      = 0x10,
-    control_main_flag_strip_invalid_e = 0x20,
-    control_main_flag_verify_e        = 0x40,
-    control_main_flag_version_e       = 0x80,
+    control_main_flag_copyright_e     = 0x1,
+    control_main_flag_file_from_e     = 0x2,
+    control_main_flag_file_to_e       = 0x4,
+    control_main_flag_header_e        = 0x8,
+    control_main_flag_help_e          = 0x10,
+    control_main_flag_separate_e      = 0x20,
+    control_main_flag_strip_invalid_e = 0x40,
+    control_main_flag_verify_e        = 0x80,
+    control_main_flag_version_e       = 0x100,
   }; // enum
 #endif // _di_control_main_flag_e_
 
index 2fb179aafbda6ae6d404f1862fe9c1a8b0f44293..1ad7632ed1172e8c25dae0a8e1ccd83fb65cdb99 100644 (file)
@@ -59,8 +59,6 @@ extern "C" {
       }
     }
 
-    status = F_none;
-
     if (main->parameters.array[control_parameter_help_e].result & f_console_result_found_e) {
       control_print_help(main);
 
@@ -73,6 +71,14 @@ extern "C" {
       return F_none;
     }
 
+    if (main->parameters.array[control_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return F_none;
+    }
+
+    status = F_none;
+
     {
       uint8_t ids[] = {
         control_parameter_name_e,
index 2caf0a1170ec50e10831dbff62c6b334ce5a50bd..007375abb289fdeb69f753eb4209f89eb6874329 100644 (file)
@@ -702,6 +702,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[controller_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= controller_main_flag_copyright_e;
+
+      return;
+    }
+
     f_string_static_t * const args = main->parameters.arguments.array;
 
     if (main->parameters.array[controller_parameter_strip_invalid_e].result & f_console_result_found_e) {
index 01a69a007e62b930228329faef5dbc194f87c3e0..9504f821d35e8a6af26ff2fd79ecb1608a76d727 100644 (file)
@@ -117,6 +117,7 @@ extern "C" {
 
   enum {
     controller_parameter_help_e,
+    controller_parameter_copyright_e,
     controller_parameter_light_e,
     controller_parameter_dark_e,
     controller_parameter_no_color_e,
@@ -143,7 +144,8 @@ extern "C" {
 
   #define controller_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -168,7 +170,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(controller_short_validate_s,        controller_long_validate_s,        0, f_console_flag_normal_e), \
     }
 
-  #define controller_total_parameters_d 22
+  #define controller_total_parameters_d 23
 #endif // _di_controller_parameter_d_
 
 /**
@@ -450,6 +452,7 @@ extern "C" {
  *
  * controller_main_flag_*_e:
  *   - none:          No flags set.
+ *   - copyright:     Print copyright.
  *   - file_from:     Using a specified source file.
  *   - file_to:       Using a specified destination file.
  *   - help:          Print help.
@@ -462,14 +465,15 @@ extern "C" {
 #ifndef _di_controller_main_flag_e_
   enum {
     controller_main_flag_none_e          = 0x0,
-    controller_main_flag_file_from_e     = 0x1,
-    controller_main_flag_file_to_e       = 0x2,
-    controller_main_flag_header_e        = 0x4,
-    controller_main_flag_help_e          = 0x8,
-    controller_main_flag_separate_e      = 0x10,
-    controller_main_flag_strip_invalid_e = 0x20,
-    controller_main_flag_verify_e        = 0x40,
-    controller_main_flag_version_e       = 0x80,
+    controller_main_flag_copyright_e     = 0x1,
+    controller_main_flag_file_from_e     = 0x2,
+    controller_main_flag_file_to_e       = 0x4,
+    controller_main_flag_header_e        = 0x8,
+    controller_main_flag_help_e          = 0x10,
+    controller_main_flag_separate_e      = 0x20,
+    controller_main_flag_strip_invalid_e = 0x40,
+    controller_main_flag_verify_e        = 0x80,
+    controller_main_flag_version_e       = 0x100,
   }; // enum
 #endif // _di_controller_main_flag_e_
 
index ea6e3969b6e0ed7e9f8b5801aa1855ca48dca7bc..1bf10a2464022e1ffa86a1e0325ba7ded1026ede 100644 (file)
@@ -64,10 +64,6 @@ extern "C" {
       }
     }
 
-    f_string_static_t * const argv = main->parameters.arguments.array;
-
-    status = F_none;
-
     if (main->parameters.array[controller_parameter_help_e].result & f_console_result_found_e) {
       controller_print_help(main);
 
@@ -84,6 +80,16 @@ extern "C" {
       return F_none;
     }
 
+    if (main->parameters.array[controller_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return F_none;
+    }
+
+    status = F_none;
+
+    f_string_static_t * const argv = main->parameters.arguments.array;
+
     controller_setting_t setting = controller_setting_t_initialize;
 
     setting.control.server.address = (struct sockaddr *) &setting.control.address;
index 63c654fad82d5526199dfe4630d592baa90f1c81..80818ea98e1750bbe4f12a89e1843124890a9e81 100644 (file)
@@ -1,6 +1,7 @@
 # fss-0000
 
 _di_libcap_ Disable libcap support, allow for compiling and linking without libcap (-lcap).
+
 _libcap_legacy_only_ Disable functionality provided by later versions of libcap (2.43 and later).
 _controller_as_init_ Build the program to run as if it were "init" by default, including displaying the program name as "Init Program" or "Init". This changes the main.c file only, leaving the library shareable between both "controller" and "init".
 _override_controller_default_engine_ Provide a custom scripting engine name string to execute (such as php).
index 31dd4d657422d00b2ead2afe3b243d7147c52c15..4388cb73babe0e5659a78880feb31f232898ed23 100644 (file)
@@ -216,6 +216,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[fake_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= fake_main_flag_copyright_e;
+
+      return;
+    }
+
     f_array_length_t j = 0;
     f_array_length_t index = 0;
 
index 31c3438fb5d82d4efd0f65876217db2db7d94a10..b5b613b05fa1a46f020e3c5b1511182b94fd6e70 100644 (file)
@@ -424,6 +424,7 @@ extern "C" {
 
   enum {
     fake_parameter_help_e,
+    fake_parameter_copyright_e,
     fake_parameter_light_e,
     fake_parameter_dark_e,
     fake_parameter_no_color_e,
@@ -463,6 +464,7 @@ extern "C" {
   #define fake_console_parameter_t_initialize \
     { \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -498,7 +500,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_6(fake_other_operation_skeleton_s, 0, f_console_flag_simple_e), \
     }
 
-  #define fake_total_parameters_d 31
+  #define fake_total_parameters_d 32
 #endif // _di_fake_parameter_d_
 
 /**
@@ -506,6 +508,7 @@ extern "C" {
  *
  * fake_main_flag_*_e:
  *   - none:               No flags set.
+ *   - copyright:          Print copyright.
  *   - enable_documents:   Enable documents, as-in --enable-doc (not specifying means --disable-doc).
  *   - enable_shared:      Enable shared, as-in --enable-shared (not specifying means --disable-shared).
  *   - enable_static:      Enable static, as-in --enable-static (not specifying means --disable-static).
@@ -526,22 +529,23 @@ extern "C" {
 #ifndef _di_fake_main_flag_e_
   enum {
     fake_main_flag_none_e               = 0x0,
-    fake_main_flag_enable_documents_e   = 0x1,
-    fake_main_flag_enable_shared_e      = 0x2,
-    fake_main_flag_enable_static_e      = 0x4,
-    fake_main_flag_file_from_e          = 0x8,
-    fake_main_flag_file_to_e            = 0x10,
-    fake_main_flag_header_e             = 0x20,
-    fake_main_flag_help_e               = 0x40,
-    fake_data_flag_operation_e          = 0x80,
-    fake_data_flag_operation_build_e    = 0x100,
-    fake_data_flag_operation_clean_e    = 0x200,
-    fake_data_flag_operation_make_e     = 0x400,
-    fake_data_flag_operation_skeleton_e = 0x800,
-    fake_main_flag_separate_e           = 0x1000,
-    fake_main_flag_strip_invalid_e      = 0x2000,
-    fake_main_flag_verify_e             = 0x4000,
-    fake_main_flag_version_e            = 0x8000,
+    fake_main_flag_copyright_e          = 0x1,
+    fake_main_flag_enable_documents_e   = 0x2,
+    fake_main_flag_enable_shared_e      = 0x4,
+    fake_main_flag_enable_static_e      = 0x8,
+    fake_main_flag_file_from_e          = 0x10,
+    fake_main_flag_file_to_e            = 0x20,
+    fake_main_flag_header_e             = 0x40,
+    fake_main_flag_help_e               = 0x80,
+    fake_data_flag_operation_e          = 0x100,
+    fake_data_flag_operation_build_e    = 0x200,
+    fake_data_flag_operation_clean_e    = 0x400,
+    fake_data_flag_operation_make_e     = 0x800,
+    fake_data_flag_operation_skeleton_e = 0x1000,
+    fake_main_flag_separate_e           = 0x2000,
+    fake_main_flag_strip_invalid_e      = 0x4000,
+    fake_main_flag_verify_e             = 0x8000,
+    fake_main_flag_version_e            = 0x10000,
   }; // enum
 #endif // _di_fake_main_flag_e_
 
@@ -574,7 +578,7 @@ extern "C" {
  */
 #ifndef _di_fake_setting_t_
   typedef struct {
-    uint16_t flag;
+    uint32_t flag;
 
     f_state_t state;
     f_status_t status;
index 513f875eb5262b27bca4e83ec8bdbb5d53dcf82f..657e30b6fcaa556cf40c2eaef5035e7b47480da6 100644 (file)
@@ -38,6 +38,12 @@ extern "C" {
       return;
     }
 
+    if (setting->flag & fake_main_flag_copyright_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return;
+    }
+
     if ((setting->flag & fake_data_flag_operation_build_e) && (setting->flag & fake_data_flag_operation_make_e)) {
       setting->status = F_status_set_error(F_parameter);
 
index 427a9c7f6e8260f06f0fa66ee81b02ef567747b2..546ad61163654d263d352494d0f85c19c5608ce1 100644 (file)
@@ -1,6 +1,7 @@
 # fss-0000
 
 _di_libcap_ Disable libcap support, allow for compiling and linking without libcap (-lcap).
+
 _libcap_legacy_only_ Disable functionality provided by later versions of libcap (2.43 and later).
 _pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
 _pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 49f71b04ea0212a6123f84f4c8f0e9158e24e63f..a22727d50774804d512c10037cd1b719d65d92aa 100644 (file)
@@ -66,12 +66,6 @@ extern "C" {
       }
     }
 
-    firewall_data_t data = firewall_data_t_initialize;
-    data.main = main;
-    data.argv = main->parameters.arguments.array;
-
-    status = F_none;
-
     if (main->parameters.array[firewall_parameter_help_e].result & f_console_result_found_e) {
       firewall_print_help(setting, main->message);
 
@@ -84,6 +78,18 @@ extern "C" {
       return F_none;
     }
 
+    if (main->parameters.array[firewall_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return F_none;
+    }
+
+    status = F_none;
+
+    firewall_data_t data = firewall_data_t_initialize;
+    data.main = main;
+    data.argv = main->parameters.arguments.array;
+
     // now determine which command was placed first
     bool found_command = F_false;
     unsigned int command = 0;
index 427a9c7f6e8260f06f0fa66ee81b02ef567747b2..546ad61163654d263d352494d0f85c19c5608ce1 100644 (file)
@@ -1,6 +1,7 @@
 # fss-0000
 
 _di_libcap_ Disable libcap support, allow for compiling and linking without libcap (-lcap).
+
 _libcap_legacy_only_ Disable functionality provided by later versions of libcap (2.43 and later).
 _pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr.
 _pthread_sigqueue_unsupported_ Disable GNU specific sigqueue().
index 940455ff054c3e123265ba2d9eef90aec5af24e6..375798fd9fb10077387bba8695a15d5e50b8e433 100644 (file)
@@ -161,6 +161,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[fss_basic_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= fss_basic_list_read_main_flag_copyright_e;
+
+      return;
+    }
+
     f_string_static_t * const args = main->parameters.arguments.array;
 
     if (main->parameters.array[fss_basic_list_read_parameter_strip_invalid_e].result & f_console_result_found_e) {
index 83b359eb3b931bfbd3a167ba5a52e644030d2a75..656a811749f4802f762c3685229c5268851e6859 100644 (file)
@@ -193,6 +193,7 @@ extern "C" {
 
   enum {
     fss_basic_list_read_parameter_help_e,
+    fss_basic_list_read_parameter_copyright_e,
     fss_basic_list_read_parameter_light_e,
     fss_basic_list_read_parameter_dark_e,
     fss_basic_list_read_parameter_no_color_e,
@@ -223,7 +224,8 @@ extern "C" {
 
   #define fss_basic_list_read_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -252,7 +254,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(fss_basic_list_read_short_trim_s, fss_basic_list_read_long_trim_s, 0, 0, f_console_flag_normal_e), \
     }
 
-  #define fss_basic_list_read_total_parameters_d 26
+  #define fss_basic_list_read_total_parameters_d 27
 #endif // _di_fss_basic_list_read_parameter_d_
 
 /**
@@ -310,6 +312,7 @@ extern "C" {
  *
  * fss_basic_list_read_main_flag_*_e:
  *   - none:          No flags set.
+ *   - copyright:     Print copyright.
  *   - file_from:     Using a specified source file.
  *   - file_to:       Using a specified destination file.
  *   - help:          Print help.
@@ -322,14 +325,15 @@ extern "C" {
 #ifndef _di_fss_basic_list_read_main_flag_e_
   enum {
     fss_basic_list_read_main_flag_none_e          = 0x0,
-    fss_basic_list_read_main_flag_file_from_e     = 0x1,
-    fss_basic_list_read_main_flag_file_to_e       = 0x2,
-    fss_basic_list_read_main_flag_header_e        = 0x4,
-    fss_basic_list_read_main_flag_help_e          = 0x8,
-    fss_basic_list_read_main_flag_separate_e      = 0x10,
-    fss_basic_list_read_main_flag_strip_invalid_e = 0x20,
-    fss_basic_list_read_main_flag_verify_e        = 0x40,
-    fss_basic_list_read_main_flag_version_e       = 0x80,
+    fss_basic_list_read_main_flag_copyright_e     = 0x1,
+    fss_basic_list_read_main_flag_file_from_e     = 0x2,
+    fss_basic_list_read_main_flag_file_to_e       = 0x4,
+    fss_basic_list_read_main_flag_header_e        = 0x8,
+    fss_basic_list_read_main_flag_help_e          = 0x10,
+    fss_basic_list_read_main_flag_separate_e      = 0x20,
+    fss_basic_list_read_main_flag_strip_invalid_e = 0x40,
+    fss_basic_list_read_main_flag_verify_e        = 0x80,
+    fss_basic_list_read_main_flag_version_e       = 0x100,
   }; // enum
 #endif // _di_fss_basic_list_read_main_flag_e_
 
index 774ceacdfae1111d3ed63634576f0404107a5203..d2a3908faf1677140847efaf0f806709a70d85bd 100644 (file)
@@ -59,20 +59,26 @@ extern "C" {
       }
     }
 
-    status = F_none;
-
     if (main->parameters.array[fss_basic_list_read_parameter_help_e].result & f_console_result_found_e) {
       fss_basic_list_read_print_help(setting, main->message);
 
-      return status;
+      return F_none;
     }
 
     if (main->parameters.array[fss_basic_list_read_parameter_version_e].result & f_console_result_found_e) {
       fll_program_print_version(main->message, fss_basic_list_read_program_version_s);
 
-      return status;
+      return F_none;
     }
 
+    if (main->parameters.array[fss_basic_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return F_none;
+    }
+
+    status = F_none;
+
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
     fss_basic_list_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_basic_list_read_data_t data = fss_basic_list_read_data_t_initialize;
index 62ed9c8acd7168f52153389b97b23c74efc929ec..2411e51285143a4ef1c9070cf82bc24d6bd14b86 100644 (file)
@@ -160,6 +160,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[fss_basic_read_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= fss_basic_read_main_flag_copyright_e;
+
+      return;
+    }
+
     f_string_static_t * const args = main->parameters.arguments.array;
 
     if (main->parameters.array[fss_basic_read_parameter_strip_invalid_e].result & f_console_result_found_e) {
index 4743856ef4d95dc4ac445260a30591f370837b17..76e3317d9343a22841032529228035570ec98e12 100644 (file)
@@ -191,6 +191,7 @@ extern "C" {
 
   enum {
     fss_basic_read_parameter_help_e,
+    fss_basic_read_parameter_copyright_e,
     fss_basic_read_parameter_light_e,
     fss_basic_read_parameter_dark_e,
     fss_basic_read_parameter_no_color_e,
@@ -221,7 +222,8 @@ extern "C" {
 
   #define fss_basic_read_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -250,7 +252,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(fss_basic_read_short_trim_s, fss_basic_read_long_trim_s, 0, 0, f_console_flag_normal_e), \
     }
 
-  #define fss_basic_read_total_parameters_d 26
+  #define fss_basic_read_total_parameters_d 27
 #endif // _di_fss_basic_read_parameter_d_
 
 /**
@@ -308,6 +310,7 @@ extern "C" {
  *
  * fss_basic_read_main_flag_*_e:
  *   - none:          No flags set.
+ *   - copyright:     Print copyright.
  *   - file_from:     Using a specified source file.
  *   - file_to:       Using a specified destination file.
  *   - help:          Print help.
@@ -320,14 +323,15 @@ extern "C" {
 #ifndef _di_fss_basic_read_main_flag_e_
   enum {
     fss_basic_read_main_flag_none_e          = 0x0,
-    fss_basic_read_main_flag_file_from_e     = 0x1,
-    fss_basic_read_main_flag_file_to_e       = 0x2,
-    fss_basic_read_main_flag_header_e        = 0x4,
-    fss_basic_read_main_flag_help_e          = 0x8,
-    fss_basic_read_main_flag_separate_e      = 0x10,
-    fss_basic_read_main_flag_strip_invalid_e = 0x20,
-    fss_basic_read_main_flag_verify_e        = 0x40,
-    fss_basic_read_main_flag_version_e       = 0x80,
+    fss_basic_read_main_flag_copyright_e     = 0x1,
+    fss_basic_read_main_flag_file_from_e     = 0x2,
+    fss_basic_read_main_flag_file_to_e       = 0x4,
+    fss_basic_read_main_flag_header_e        = 0x8,
+    fss_basic_read_main_flag_help_e          = 0x10,
+    fss_basic_read_main_flag_separate_e      = 0x20,
+    fss_basic_read_main_flag_strip_invalid_e = 0x40,
+    fss_basic_read_main_flag_verify_e        = 0x80,
+    fss_basic_read_main_flag_version_e       = 0x100,
   }; // enum
 #endif // _di_fss_basic_read_main_flag_e_
 
index 5d1dd2a5ad7885e8862b6c957d41bdf84079044c..f516c08932aa663107a45c7061b1c09bc5ec3621 100644 (file)
@@ -59,20 +59,26 @@ extern "C" {
       }
     }
 
-    status = F_none;
-
     if (main->parameters.array[fss_basic_read_parameter_help_e].result & f_console_result_found_e) {
       fss_basic_read_print_help(setting, main->message);
 
-      return status;
+      return F_none;
     }
 
     if (main->parameters.array[fss_basic_read_parameter_version_e].result & f_console_result_found_e) {
       fll_program_print_version(main->message, fss_basic_read_program_version_s);
 
-      return status;
+      return F_none;
     }
 
+    if (main->parameters.array[fss_basic_read_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return F_none;
+    }
+
+    status = F_none;
+
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
     fss_basic_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_basic_read_data_t data = fss_basic_read_data_t_initialize;
index c9325bbde5dcf01aaf3d3f2822955bcd15441a7f..b246207d626e00708d83ac28a9af00e83bbe4c50 100644 (file)
@@ -159,6 +159,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[fss_embedded_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= fss_embedded_list_read_main_flag_copyright_e;
+
+      return;
+    }
+
     f_string_static_t * const args = main->parameters.arguments.array;
 
     if (main->parameters.array[fss_embedded_list_read_parameter_strip_invalid_e].result & f_console_result_found_e) {
index a9cfd08d429575b46a02715cf3e585e217ae7633..049987cc7483fb501008b1f0640322c6c2668c8c 100644 (file)
@@ -191,6 +191,7 @@ extern "C" {
 
   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,
@@ -221,7 +222,8 @@ extern "C" {
 
   #define fss_embedded_list_read_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -250,7 +252,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(fss_embedded_list_read_short_trim_s.string, fss_embedded_list_read_long_trim_s.string, 0, 0, f_console_flag_normal_e), \
     }
 
-  #define fss_embedded_list_read_total_parameters_d 26
+  #define fss_embedded_list_read_total_parameters_d 27
 #endif // _di_fss_embedded_list_read_parameter_d_
 
 /**
@@ -291,6 +293,7 @@ extern "C" {
  *
  * fss_embedded_list_read_main_flag_*_e:
  *   - none:          No flags set.
+ *   - copyright:     Print copyright.
  *   - file_from:     Using a specified source file.
  *   - file_to:       Using a specified destination file.
  *   - help:          Print help.
@@ -303,14 +306,15 @@ extern "C" {
 #ifndef _di_fss_embedded_list_read_main_flag_e_
   enum {
     fss_embedded_list_read_main_flag_none_e          = 0x0,
-    fss_embedded_list_read_main_flag_file_from_e     = 0x1,
-    fss_embedded_list_read_main_flag_file_to_e       = 0x2,
-    fss_embedded_list_read_main_flag_header_e        = 0x4,
-    fss_embedded_list_read_main_flag_help_e          = 0x8,
-    fss_embedded_list_read_main_flag_separate_e      = 0x10,
-    fss_embedded_list_read_main_flag_strip_invalid_e = 0x20,
-    fss_embedded_list_read_main_flag_verify_e        = 0x40,
-    fss_embedded_list_read_main_flag_version_e       = 0x80,
+    fss_embedded_list_read_main_flag_copyright_e     = 0x1,
+    fss_embedded_list_read_main_flag_file_from_e     = 0x2,
+    fss_embedded_list_read_main_flag_file_to_e       = 0x4,
+    fss_embedded_list_read_main_flag_header_e        = 0x8,
+    fss_embedded_list_read_main_flag_help_e          = 0x10,
+    fss_embedded_list_read_main_flag_separate_e      = 0x20,
+    fss_embedded_list_read_main_flag_strip_invalid_e = 0x40,
+    fss_embedded_list_read_main_flag_verify_e        = 0x80,
+    fss_embedded_list_read_main_flag_version_e       = 0x100,
   }; // enum
 #endif // _di_fss_embedded_list_read_main_flag_e_
 
index 5abcaa3d9aafd55102a918b146348dca24d33e73..ede790fa3a32c73f4634903c78f9d3ce89a785c8 100644 (file)
@@ -59,28 +59,30 @@ extern "C" {
       }
     }
 
-    fss_embedded_list_read_data_t data = fss_embedded_list_read_data_t_initialize;
-    data.main = main;
-    data.argv = main->parameters.arguments.array;
-
-    status = F_none;
-
     if (main->parameters.array[fss_embedded_list_read_parameter_help_e].result & f_console_result_found_e) {
       fss_embedded_list_read_print_help(setting, main->message);
 
-      fss_embedded_list_read_data_delete(&data);
-
       return F_none;
     }
 
     if (main->parameters.array[fss_embedded_list_read_parameter_version_e].result & f_console_result_found_e) {
       fll_program_print_version(main->message, fss_embedded_list_read_program_version_s);
 
-      fss_embedded_list_read_data_delete(&data);
+      return F_none;
+    }
+
+    if (main->parameters.array[fss_embedded_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
 
       return F_none;
     }
 
+    status = F_none;
+
+    fss_embedded_list_read_data_t data = fss_embedded_list_read_data_t_initialize;
+    data.main = main;
+    data.argv = main->parameters.arguments.array;
+
     if (F_status_is_error_not(status) && (main->parameters.array[fss_embedded_list_read_parameter_total_e].result & f_console_result_found_e)) {
       if (main->parameters.array[fss_embedded_list_read_parameter_columns_e].result & f_console_result_found_e) {
         if (main->error.verbosity > f_console_verbosity_quiet_e) {
index 45a689f9404f04afc0a52e8657a09284f24f0cb0..d2efda0fff7797a6ea3ecb6f11f02776244db9da 100644 (file)
@@ -167,6 +167,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[fss_extended_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= fss_extended_list_read_main_flag_copyright_e;
+
+      return;
+    }
+
     f_string_static_t * const args = main->parameters.arguments.array;
 
     if (main->parameters.array[fss_extended_list_read_parameter_strip_invalid_e].result & f_console_result_found_e) {
index 48b39dca14cb553bc8f08340fdf2fa63fc8c696c..46fe1319681eb0c85ed7c8429969cd7cc67a5168 100644 (file)
@@ -191,6 +191,7 @@ extern "C" {
 
   enum {
     fss_extended_list_read_parameter_help_e,
+    fss_extended_list_read_parameter_copyright_e
     fss_extended_list_read_parameter_light_e,
     fss_extended_list_read_parameter_dark_e,
     fss_extended_list_read_parameter_no_color_e,
@@ -221,7 +222,8 @@ extern "C" {
 
   #define fss_extended_list_read_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -250,7 +252,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(fss_extended_list_read_short_trim_s, fss_extended_list_read_long_trim_s, 0, 0, f_console_flag_normal_e), \
     }
 
-  #define fss_extended_list_read_total_parameters_d 26
+  #define fss_extended_list_read_total_parameters_d 27
 #endif // _di_fss_extended_list_read_parameter_d_
 
 /**
@@ -308,6 +310,7 @@ extern "C" {
  *
  * fss_extended_list_read_main_flag_*_e:
  *   - none:          No flags set.
+ *   - copyright:     Print copyright.
  *   - file_from:     Using a specified source file.
  *   - file_to:       Using a specified destination file.
  *   - help:          Print help.
@@ -320,14 +323,15 @@ extern "C" {
 #ifndef _di_fss_extended_list_read_main_flag_e_
   enum {
     fss_extended_list_read_main_flag_none_e          = 0x0,
-    fss_extended_list_read_main_flag_file_from_e     = 0x1,
-    fss_extended_list_read_main_flag_file_to_e       = 0x2,
-    fss_extended_list_read_main_flag_header_e        = 0x4,
-    fss_extended_list_read_main_flag_help_e          = 0x8,
-    fss_extended_list_read_main_flag_separate_e      = 0x10,
-    fss_extended_list_read_main_flag_strip_invalid_e = 0x20,
-    fss_extended_list_read_main_flag_verify_e        = 0x40,
-    fss_extended_list_read_main_flag_version_e       = 0x80,
+    fss_extended_list_read_main_flag_copyright_e     = 0x1,
+    fss_extended_list_read_main_flag_file_from_e     = 0x2,
+    fss_extended_list_read_main_flag_file_to_e       = 0x4,
+    fss_extended_list_read_main_flag_header_e        = 0x8,
+    fss_extended_list_read_main_flag_help_e          = 0x10,
+    fss_extended_list_read_main_flag_separate_e      = 0x20,
+    fss_extended_list_read_main_flag_strip_invalid_e = 0x40,
+    fss_extended_list_read_main_flag_verify_e        = 0x80,
+    fss_extended_list_read_main_flag_version_e       = 0x100,
   }; // enum
 #endif // _di_fss_extended_list_read_main_flag_e_
 
index f6e3ea2fa95e40c126993569a78f963a44140456..944c56aee9cc7536466e148574583787d3380913 100644 (file)
@@ -59,8 +59,6 @@ extern "C" {
       }
     }
 
-    status = F_none;
-
     if (main->parameters.array[fss_extended_list_read_parameter_help_e].result & f_console_result_found_e) {
       fss_extended_list_read_print_help(setting, main->message);
 
@@ -73,6 +71,14 @@ extern "C" {
       return status;
     }
 
+    if (main->parameters.array[fss_extended_list_read_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return status;
+    }
+
+    status = F_none;
+
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
     fss_extended_list_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_extended_list_read_data_t data = fss_extended_list_read_data_t_initialize;
index e78fd2d9819fde4f94917ead8b884ff709f811ae..3fa4e2216d9b4aaf8407c2d792d171a5bf1b2f24 100644 (file)
@@ -160,6 +160,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[fss_extended_read_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= fss_extended_read_main_flag_copyright_e;
+
+      return;
+    }
+
     f_string_static_t * const args = main->parameters.arguments.array;
 
     if (main->parameters.array[fss_extended_read_parameter_strip_invalid_e].result & f_console_result_found_e) {
index da94ab39a97608498dd334a39dd0190594f9676a..49f5d5b0108de8a3e6f80ac6edc2e4697afe0ba8 100644 (file)
@@ -191,6 +191,7 @@ extern "C" {
 
   enum {
     fss_extended_read_parameter_help_e,
+    fss_extended_read_parameter_copyright_e,
     fss_extended_read_parameter_light_e,
     fss_extended_read_parameter_dark_e,
     fss_extended_read_parameter_no_color_e,
@@ -221,7 +222,8 @@ extern "C" {
 
   #define fss_extended_read_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -249,7 +251,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(fss_extended_read_short_trim_s, fss_extended_read_long_trim_s, 0, 0, f_console_flag_normal_e), \
     }
 
-  #define fss_extended_read_total_parameters_d 26
+  #define fss_extended_read_total_parameters_d 27
 #endif // _di_fss_extended_read_parameter_d_
 
 /**
@@ -307,6 +309,7 @@ extern "C" {
  *
  * fss_extended_read_main_flag_*_e:
  *   - none:          No flags set.
+ *   - copyright:     Print copyright.
  *   - file_from:     Using a specified source file.
  *   - file_to:       Using a specified destination file.
  *   - help:          Print help.
@@ -319,14 +322,15 @@ extern "C" {
 #ifndef _di_fss_extended_read_main_flag_e_
   enum {
     fss_extended_read_main_flag_none_e          = 0x0,
-    fss_extended_read_main_flag_file_from_e     = 0x1,
-    fss_extended_read_main_flag_file_to_e       = 0x2,
-    fss_extended_read_main_flag_header_e        = 0x4,
-    fss_extended_read_main_flag_help_e          = 0x8,
-    fss_extended_read_main_flag_separate_e      = 0x10,
-    fss_extended_read_main_flag_strip_invalid_e = 0x20,
-    fss_extended_read_main_flag_verify_e        = 0x40,
-    fss_extended_read_main_flag_version_e       = 0x80,
+    fss_extended_read_main_flag_copyright_e     = 0x1,
+    fss_extended_read_main_flag_file_from_e     = 0x2,
+    fss_extended_read_main_flag_file_to_e       = 0x4,
+    fss_extended_read_main_flag_header_e        = 0x8,
+    fss_extended_read_main_flag_help_e          = 0x10,
+    fss_extended_read_main_flag_separate_e      = 0x20,
+    fss_extended_read_main_flag_strip_invalid_e = 0x40,
+    fss_extended_read_main_flag_verify_e        = 0x80,
+    fss_extended_read_main_flag_version_e       = 0x100,
   }; // enum
 #endif // _di_fss_extended_read_main_flag_e_
 
index f3342f2c37f6e4f898e086c57f2729581e64e266..8b0076488287ef71061b25bef66c1bee9c29a5b9 100644 (file)
@@ -59,8 +59,6 @@ extern "C" {
       }
     }
 
-    status = F_none;
-
     if (main->parameters.array[fss_extended_read_parameter_help_e].result & f_console_result_found_e) {
       fss_extended_read_print_help(setting, main->message);
 
@@ -73,6 +71,14 @@ extern "C" {
       return status;
     }
 
+    if (main->parameters.array[fss_extended_read_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return status;
+    }
+
+    status = F_none;
+
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
     fss_extended_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_extended_read_data_t data = fss_extended_read_data_t_initialize;
index 79ccfc649778e3c56211197a8add25c7b0b86f6f..fb37b77478e3ca5e37391544b608480875daecd0 100644 (file)
@@ -127,6 +127,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[fss_identify_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= fss_identify_main_flag_copyright_e;
+
+      return;
+    }
+
     f_string_static_t * const args = main->parameters.arguments.array;
 
     if (main->parameters.array[fss_identify_parameter_strip_invalid_e].result & f_console_result_found_e) {
index cafb8f5c6b770c7f34e857ad66362afb7b80ab55..be5b9b3cc13ba8e797b5edb315cd2a8d2a71e690 100644 (file)
@@ -108,6 +108,7 @@ extern "C" {
 
   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,
@@ -129,7 +130,8 @@ extern "C" {
 
   #define fss_identify_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -149,7 +151,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(fss_identify_short_total_s, fss_identify_long_total_s, 0, 0, f_console_flag_normal_e), \
     }
 
-  #define fss_identify_total_parameters_d 17
+  #define fss_identify_total_parameters_d 18
 #endif // _di_fss_identify_parameter_d_
 
 /**
@@ -157,6 +159,7 @@ extern "C" {
  *
  * fss_identify_main_flag_*_e:
  *   - none:          No flags set.
+ *   - copyright:     Print copyright.
  *   - file_from:     Using a specified source file.
  *   - file_to:       Using a specified destination file.
  *   - help:          Print help.
@@ -169,14 +172,15 @@ extern "C" {
 #ifndef _di_fss_identify_main_flag_e_
   enum {
     fss_identify_main_flag_none_e          = 0x0,
-    fss_identify_main_flag_file_from_e     = 0x1,
-    fss_identify_main_flag_file_to_e       = 0x2,
-    fss_identify_main_flag_header_e        = 0x4,
-    fss_identify_main_flag_help_e          = 0x8,
-    fss_identify_main_flag_separate_e      = 0x10,
-    fss_identify_main_flag_strip_invalid_e = 0x20,
-    fss_identify_main_flag_verify_e        = 0x40,
-    fss_identify_main_flag_version_e       = 0x80,
+    fss_identify_main_flag_copyright_e     = 0x1,
+    fss_identify_main_flag_file_from_e     = 0x2,
+    fss_identify_main_flag_file_to_e       = 0x4,
+    fss_identify_main_flag_header_e        = 0x8,
+    fss_identify_main_flag_help_e          = 0x10,
+    fss_identify_main_flag_separate_e      = 0x20,
+    fss_identify_main_flag_strip_invalid_e = 0x40,
+    fss_identify_main_flag_verify_e        = 0x80,
+    fss_identify_main_flag_version_e       = 0x100,
   }; // enum
 #endif // _di_fss_identify_main_flag_e_
 
index a537fb3037074f7d6db869473f874488671d5e38..307b1f63d3e80f2416d034ca797f5c339d2935c4 100644 (file)
@@ -58,8 +58,6 @@ extern "C" {
       }
     }
 
-    status = F_none;
-
     if (main->parameters.array[fss_identify_parameter_help_e].result & f_console_result_found_e) {
       fss_identify_print_help(setting, main->message);
 
@@ -72,6 +70,14 @@ extern "C" {
       return F_none;
     }
 
+    if (main->parameters.array[fss_identify_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return F_none;
+    }
+
+    status = F_none;
+
     fss_identify_data_t data = fss_identify_data_t_initialize;
 
     data.argv = main->parameters.arguments.array;
index 322e213030270474e4bb60c553c19e56eb881603..6544fb476db11eddaa419a6285bdc365c934ce6f 100644 (file)
@@ -161,6 +161,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[fss_payload_read_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= fss_payload_read_main_flag_copyright_e;
+
+      return;
+    }
+
     f_string_static_t * const args = main->parameters.arguments.array;
 
     if (main->parameters.array[fss_payload_read_parameter_strip_invalid_e].result & f_console_result_found_e) {
index 239912c17cae3d6227a708402370c75ca6e48b15..61b2072530c092563f9c2efa1ecd8d3a569d246b 100644 (file)
@@ -185,6 +185,7 @@ extern "C" {
 
   enum {
     fss_payload_read_parameter_help_e,
+    fss_payload_read_parameter_copyright_e,
     fss_payload_read_parameter_light_e,
     fss_payload_read_parameter_dark_e,
     fss_payload_read_parameter_no_color_e,
@@ -215,7 +216,8 @@ extern "C" {
 
   #define fss_payload_read_console_parameter_t_initialize \
     { \
-      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e,  0), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -244,7 +246,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(fss_payload_read_short_trim_s, fss_payload_read_long_trim_s, 0, 0, f_console_flag_normal_e), \
     }
 
-  #define fss_payload_read_total_parameters_d 26
+  #define fss_payload_read_total_parameters_d 27
 #endif // _di_fss_payload_read_parameter_d_
 
 /**
@@ -304,6 +306,7 @@ extern "C" {
  *   - none:       No flags set.
  *   - at:         Selecting at a specific index.
  *   - content:    Print Contents.
+ *   - copyright:  Print copyright.
  *   - help:       Print help.
  *   - literal:    Print as literal data (printing entire variable).
  *   - line:       Selecting at a specific line.
@@ -322,18 +325,19 @@ extern "C" {
     fss_payload_read_main_flag_none_e       = 0x0,
     fss_payload_read_main_flag_at_e         = 0x1,
     fss_payload_read_main_flag_content_e    = 0x2,
-    fss_payload_read_main_flag_help_e       = 0x4,
-    fss_payload_read_main_flag_literal_e    = 0x8,
-    fss_payload_read_main_flag_line_e       = 0x10,
-    fss_payload_read_main_flag_name_e       = 0x20,
-    fss_payload_read_main_flag_object_e     = 0x40,
-    fss_payload_read_main_flag_reassign_e   = 0x80,
-    fss_payload_read_main_flag_replace_e    = 0x100,
-    fss_payload_read_main_flag_substitute_e = 0x200,
-    fss_payload_read_main_flag_total_e      = 0x400,
-    fss_payload_read_main_flag_version_e    = 0x800,
-    fss_payload_read_main_flag_whole_e      = 0x1000,
-    fss_payload_read_main_flag_wrap_e       = 0x2000,
+    fss_payload_read_main_flag_copyright_e  = 0x4,
+    fss_payload_read_main_flag_help_e       = 0x8,
+    fss_payload_read_main_flag_literal_e    = 0x10,
+    fss_payload_read_main_flag_line_e       = 0x20,
+    fss_payload_read_main_flag_name_e       = 0x40,
+    fss_payload_read_main_flag_object_e     = 0x80,
+    fss_payload_read_main_flag_reassign_e   = 0x100,
+    fss_payload_read_main_flag_replace_e    = 0x200,
+    fss_payload_read_main_flag_substitute_e = 0x400,
+    fss_payload_read_main_flag_total_e      = 0x800,
+    fss_payload_read_main_flag_version_e    = 0x1000,
+    fss_payload_read_main_flag_whole_e      = 0x2000,
+    fss_payload_read_main_flag_wrap_e       = 0x4000,
   }; // enum
 #endif // _di_fss_payload_read_main_flag_e_
 
index 778f84b36cecb929964ac76e95e1bf1d2a292c7e..56e5f9823abd740e4bbf6ace44a97a07598c710c 100644 (file)
@@ -59,8 +59,6 @@ extern "C" {
       }
     }
 
-    status = F_none;
-
     if (main->parameters.array[fss_payload_read_parameter_help_e].result & f_console_result_found_e) {
       fss_payload_read_print_help(setting, main->message);
 
@@ -73,6 +71,14 @@ extern "C" {
       return status;
     }
 
+    if (main->parameters.array[fss_payload_read_parameter_copyright_e].result & f_console_result_found_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return status;
+    }
+
+    status = F_none;
+
     // Provide a range designating where within the buffer a particular file exists, using a statically allocated array.
     fss_payload_read_file_t files_array[main->parameters.remaining.used + 1];
     fss_payload_read_data_t data = fss_payload_read_data_t_initialize;
index 05f33ed394a694d36d76888ab277e219f88de76a..2e530dc5a4fb0b05bdfc695b8a1da6ec3a0642ac 100644 (file)
@@ -151,6 +151,10 @@ extern "C" {
       setting->flag |= fss_write_flag_version_e;
     }
 
+    if (main->parameters.array[fss_write_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= fss_write_flag_copyright_e;
+    }
+
     if (callback) {
       callback(arguments, state, main, setting);
       if (F_status_is_error(setting->status)) return;
index aee7ca0f5084d0bab6c24e045c1690fe5255661a..03af4a906a8f33bda0df79e3bbefa6d781d6e879 100644 (file)
@@ -221,6 +221,7 @@ extern "C" {
 
   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,
@@ -252,6 +253,7 @@ extern "C" {
   #define fss_write_console_parameter_t_initialize \
     { \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -280,7 +282,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(fss_write_short_trim_s,         fss_write_long_trim_s,         0, f_console_flag_normal_e), \
     }
 
-  #define fss_write_total_parameters_d 26
+  #define fss_write_total_parameters_d 27
 #endif // _di_fss_write_parameter_d_
 
 /**
@@ -292,6 +294,7 @@ extern "C" {
  *   - content_end:      The Content end characters are to be printed.
  *   - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
  *   - content_next:     The Content next characters are to be printed.
+ *   - copyright:        Print copyright.
  *   - file_to:          Using a specified destination file.
  *   - help:             Print help.
  *   - ignore:           Ignore a given range within a Content (specify flag before setting loading to designate ignores is supported by standard).
@@ -309,15 +312,16 @@ extern "C" {
     fss_write_flag_content_end_e      = 0x2,
     fss_write_flag_content_multiple_e = 0x4,
     fss_write_flag_content_next_e     = 0x8,
-    fss_write_flag_file_to_e          = 0x10,
-    fss_write_flag_help_e             = 0x20,
-    fss_write_flag_ignore_e           = 0x40,
-    fss_write_flag_object_e           = 0x80,
-    fss_write_flag_object_open_e      = 0x100,
-    fss_write_flag_partial_e          = 0x200,
-    fss_write_flag_prepend_e          = 0x400,
-    fss_write_flag_trim_e             = 0x800,
-    fss_write_flag_version_e          = 0x1000,
+    fss_write_flag_copyright_e        = 0x10,
+    fss_write_flag_file_to_e          = 0x20,
+    fss_write_flag_help_e             = 0x40,
+    fss_write_flag_ignore_e           = 0x80,
+    fss_write_flag_object_e           = 0x100,
+    fss_write_flag_object_open_e      = 0x200,
+    fss_write_flag_partial_e          = 0x400,
+    fss_write_flag_prepend_e          = 0x800,
+    fss_write_flag_trim_e             = 0x1000,
+    fss_write_flag_version_e          = 0x2000,
   }; // enum
 #endif // _di_fss_write_flag_e_
 
index 7cdb5f16e69112fb0f61320bace7ee3f43633ee9..ea8288ee0ddd67eb21880d71615fc564e32cb805 100644 (file)
@@ -31,6 +31,12 @@ extern "C" {
       return;
     }
 
+    if (setting->flag & fss_write_flag_copyright_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return;
+    }
+
     setting->escaped.used = 0;
 
     if (main->pipe & fll_program_data_pipe_input_e) {
index 6a5bb381121127af5321c33ea67d6f492d60466b..c1ff6ba2fbe5d65a1955acaa0f6f005f3921280b 100644 (file)
@@ -152,6 +152,12 @@ extern "C" {
 
         return;
       }
+
+      if (main->parameters.array[iki_read_parameter_copyright_e].result & f_console_result_found_e) {
+        setting->flag |= iki_read_main_flag_copyright_e;
+
+        return;
+      }
     }
 
     if (!(main->parameters.remaining.used || (main->pipe & fll_program_data_pipe_input_e))) {
index f323261c9583db77609b18e2a6cc58a2d577a54d..09012ebb909f483247dbc9a48be6e8a0b7958f23 100644 (file)
@@ -164,6 +164,7 @@ extern "C" {
 
   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,
@@ -193,6 +194,7 @@ extern "C" {
   #define iki_read_console_parameter_t_initialize \
     { \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -219,7 +221,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(iki_read_short_wrap_s,       iki_read_long_wrap_s,       3, f_console_flag_normal_e), \
     }
 
-  #define iki_read_total_parameters_d 24
+  #define iki_read_total_parameters_d 25
 #endif // _di_iki_read_parameter_d_
 
 #ifndef _di_iki_read_substitution_t_
@@ -249,6 +251,7 @@ extern "C" {
  *   - none:       No flags set.
  *   - at:         Selecting at a specific index.
  *   - content:    Print Contents.
+ *   - copyright:  Print copyright.
  *   - help:       Print help.
  *   - literal:    Print as literal data (printing entire variable).
  *   - line:       Selecting at a specific line.
@@ -267,18 +270,19 @@ extern "C" {
     iki_read_main_flag_none_e       = 0x0,
     iki_read_main_flag_at_e         = 0x1,
     iki_read_main_flag_content_e    = 0x2,
-    iki_read_main_flag_help_e       = 0x4,
-    iki_read_main_flag_literal_e    = 0x8,
-    iki_read_main_flag_line_e       = 0x10,
-    iki_read_main_flag_name_e       = 0x20,
-    iki_read_main_flag_object_e     = 0x40,
-    iki_read_main_flag_reassign_e   = 0x80,
-    iki_read_main_flag_replace_e    = 0x100,
-    iki_read_main_flag_substitute_e = 0x200,
-    iki_read_main_flag_total_e      = 0x400,
-    iki_read_main_flag_version_e    = 0x800,
-    iki_read_main_flag_whole_e      = 0x1000,
-    iki_read_main_flag_wrap_e       = 0x2000,
+    iki_read_main_flag_copyright_e  = 0x4,
+    iki_read_main_flag_help_e       = 0x8,
+    iki_read_main_flag_literal_e    = 0x10,
+    iki_read_main_flag_line_e       = 0x20,
+    iki_read_main_flag_name_e       = 0x40,
+    iki_read_main_flag_object_e     = 0x80,
+    iki_read_main_flag_reassign_e   = 0x100,
+    iki_read_main_flag_replace_e    = 0x200,
+    iki_read_main_flag_substitute_e = 0x400,
+    iki_read_main_flag_total_e      = 0x800,
+    iki_read_main_flag_version_e    = 0x1000,
+    iki_read_main_flag_whole_e      = 0x2000,
+    iki_read_main_flag_wrap_e       = 0x4000,
   };
 #endif // _di_iki_read_main_flag_e_
 
index 0a6fd5122702b7558e8685c8fad4546e0d5bf3bc..c141a77602abf1e32d94ef36917987ec219b51f0 100644 (file)
@@ -31,6 +31,12 @@ extern "C" {
       return;
     }
 
+    if (setting->flag & iki_read_main_flag_copyright_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return;
+    }
+
     if (main->pipe & fll_program_data_pipe_input_e) {
       f_file_t file = f_file_t_initialize;
 
index b1e67d22980b15e58232c3bfa342305a50e56693..8c3d41ebeb5f92922e03ed157220b5b73c6b98c7 100644 (file)
@@ -134,6 +134,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[iki_write_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= iki_write_main_flag_copyright_e;
+
+      return;
+    }
+
     if (main->parameters.array[iki_write_parameter_file_e].result & f_console_result_value_e && main->parameters.array[iki_write_parameter_file_e].values.used) {
       if (main->parameters.array[iki_write_parameter_file_e].values.used > 1) {
         setting->status = F_status_set_error(F_parameter);
index c8725d58ddcac66a7488c5591ea702d4f7cc175d..66f68eb80ddf689a39e7f3cbcbc8f8ad2ade2162 100644 (file)
@@ -125,6 +125,7 @@ extern "C" {
 
   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,
@@ -148,6 +149,7 @@ extern "C" {
   #define iki_write_console_parameter_t_initialize \
     { \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -168,28 +170,30 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(iki_write_short_single_s,   iki_write_long_single_s,   0, f_console_flag_normal_e), \
     }
 
-  #define iki_write_total_parameters_d 18
+  #define iki_write_total_parameters_d 19
 #endif // _di_iki_write_parameter_d_
 
 /**
  * Flags passed to the main function or program.
  *
  * iki_write_main_flag_*_e:
- *   - none:     No flags set.
- *   - content:  The Content being written is specified.
- *   - file_to:  Using a specified destination file.
- *   - help:     Print help.
- *   - object:   The Object being written is specified.
- *   - version:  Print version.
+ *   - none:       No flags set.
+ *   - content:    The Content being written is specified.
+ *   - copyright:  Print copyright.
+ *   - file_to:    Using a specified destination file.
+ *   - help:       Print help.
+ *   - object:     The Object being written is specified.
+ *   - version:    Print version.
  */
 #ifndef _di_iki_write_main_flag_e_
   enum {
-    iki_write_main_flag_none_e    = 0x0,
-    iki_write_main_flag_content_e = 0x1,
-    iki_write_main_flag_file_to_e = 0x2,
-    iki_write_main_flag_help_e    = 0x4,
-    iki_write_main_flag_object_e  = 0x8,
-    iki_write_main_flag_version_e = 0x10,
+    iki_write_main_flag_none_e      = 0x0,
+    iki_write_main_flag_content_e   = 0x1,
+    iki_write_main_flag_copyright_e = 0x2,
+    iki_write_main_flag_file_to_e   = 0x4,
+    iki_write_main_flag_help_e      = 0x8,
+    iki_write_main_flag_object_e    = 0x10,
+    iki_write_main_flag_version_e   = 0x20,
   };
 #endif // _di_iki_write_main_flag_e_
 
index f18ad87c62a7cd8fc300f9bd72acd41f50d88948..b1686baeef2cb8a528858baa2cfbc420ec8f66a9 100644 (file)
@@ -31,6 +31,12 @@ extern "C" {
       return;
     }
 
+    if (setting->flag & iki_write_main_flag_copyright_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return;
+    }
+
     setting->escaped.used = 0;
 
     if (main->pipe & fll_program_data_pipe_input_e) {
index 2831a422f24fde927712193b03ce7fbf73c5d9c2..627aac968dac6e1b04fb63f6eaf017b2e2f90480 100644 (file)
@@ -124,6 +124,12 @@ extern "C" {
 
         return;
       }
+
+      if (main->parameters.array[status_code_parameter_copyright_e].result & f_console_result_found_e) {
+        setting->flag |= status_code_main_flag_copyright_e;
+
+        return;
+      }
     }
 
     if (main->parameters.array[status_code_parameter_error_e].result & f_console_result_found_e) {
index 514e6af81676a264f673ff863c10b070e8593cc3..c26e30a532943a67b16963a9e7cc3c686d990096 100644 (file)
@@ -148,6 +148,7 @@ extern "C" {
 
   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,
@@ -169,6 +170,7 @@ extern "C" {
   #define status_code_console_parameter_t_initialize \
     { \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -187,7 +189,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(status_code_short_number_s,  status_code_long_number_s,  0, f_console_flag_normal_e), \
     }
 
-  #define status_code_total_parameters_d 16
+  #define status_code_total_parameters_d 17
 #endif // _di_status_code_parameter_d_
 
 /**
@@ -196,23 +198,25 @@ extern "C" {
  * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
  *
  * status_code_main_flag_*_e:
- *   - none:    No flags set.
- *   - error:   Check if status is "error".
- *   - fine:    Check if status is "fine".
- *   - help:    Print help.
- *   - number:  Operate in number mode.
- *   - version: Print version.
- *   - warning: Check if status is "warning".
+ *   - none:      No flags set.
+ *   - copyright: Print copyright.
+ *   - error:     Check if status is "error".
+ *   - fine:      Check if status is "fine".
+ *   - help:      Print help.
+ *   - number:    Operate in number mode.
+ *   - version:   Print version.
+ *   - warning:   Check if status is "warning".
  */
 #ifndef _di_status_code_main_flag_e_
   enum {
-    status_code_main_flag_none_e    = 0x0,
-    status_code_main_flag_error_e   = 0x1,
-    status_code_main_flag_fine_e    = 0x2,
-    status_code_main_flag_help_e    = 0x4,
-    status_code_main_flag_number_e  = 0x8,
-    status_code_main_flag_version_e = 0x10,
-    status_code_main_flag_warning_e = 0x20,
+    status_code_main_flag_none_e      = 0x0,
+    status_code_main_flag_copyright_e = 0x1,
+    status_code_main_flag_error_e     = 0x2,
+    status_code_main_flag_fine_e      = 0x4,
+    status_code_main_flag_help_e      = 0x8,
+    status_code_main_flag_number_e    = 0x10,
+    status_code_main_flag_version_e   = 0x20,
+    status_code_main_flag_warning_e   = 0x40,
   };
 #endif // _di_status_code_main_flag_e_
 
index 7012b8992fbc1b2f2ebde196a05593cf48c22b75..a1ef2e8ea22fef2fd1fb28081704e83c38851d1f 100644 (file)
@@ -45,6 +45,12 @@ extern "C" {
       return;
     }
 
+    if (setting->flag & status_code_main_flag_copyright_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return;
+    }
+
     f_status_t status2 = F_none;
 
     if (setting->flag & status_code_main_flag_number_e) {
index 6756ae820c8d04b6755e7f32ab825b315f67b4a0..2758a5cbcab549001c0f8f5b9125b6d1e5d4f16e 100644 (file)
@@ -245,6 +245,12 @@ extern "C" {
       return;
     }
 
+    if (main->parameters.array[utf8_parameter_copyright_e].result & f_console_result_found_e) {
+      setting->flag |= utf8_main_flag_copyright_e;
+
+      return;
+    }
+
     if (main->parameters.array[utf8_parameter_to_file_e].result & f_console_result_value_e) {
       if (main->parameters.array[utf8_parameter_to_file_e].values.used > 1) {
         setting->status = F_status_set_error(F_parameter);
index 1012a9b35dd0e804c136bf043fd30195ed429944..f3a321a78ecff0729d0f281f30244c1453649ffb 100644 (file)
@@ -244,6 +244,7 @@ extern "C" {
 
   enum {
     utf8_parameter_help_e,
+    utf8_parameter_copyright_e,
     utf8_parameter_light_e,
     utf8_parameter_dark_e,
     utf8_parameter_no_color_e,
@@ -276,6 +277,7 @@ extern "C" {
   #define utf8_console_parameter_t_initialize \
     { \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s,          f_console_standard_long_help_s,          0, f_console_flag_normal_e), \
+      macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s,     f_console_standard_long_copyright_s,     0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s,         f_console_standard_long_light_s,         0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s,          f_console_standard_long_dark_s,          0, f_console_flag_inverse_e), \
       macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s,      f_console_standard_long_no_color_s,      0, f_console_flag_inverse_e), \
@@ -302,7 +304,7 @@ extern "C" {
       macro_f_console_parameter_t_initialize_3(utf8_short_verify_s,            utf8_long_verify_s,            0, f_console_flag_normal_e), \
     }
 
-  #define utf8_total_parameters_d 24
+  #define utf8_total_parameters_d 25
 #endif // _di_utf8_parameter_d_
 
 /**
@@ -338,6 +340,7 @@ extern "C" {
  *
  * utf8_main_flag_*_e:
  *   - none:           No flags set.
+ *   - copyright:      Print the copyright.
  *   - file_from:      Using a specified source file.
  *   - file_to:        Using a specified destination file.
  *   - header:         Enable printing of headers.
@@ -351,15 +354,16 @@ extern "C" {
 #ifndef _di_utf8_main_flag_e_
   enum {
     utf8_main_flag_none_e          = 0x0,
-    utf8_main_flag_file_from_e     = 0x1,
-    utf8_main_flag_file_to_e       = 0x2,
-    utf8_main_flag_header_e        = 0x4,
-    utf8_main_flag_help_e          = 0x8,
-    utf8_main_flag_pipe_e          = 0x10,
-    utf8_main_flag_separate_e      = 0x20,
-    utf8_main_flag_strip_invalid_e = 0x40,
-    utf8_main_flag_verify_e        = 0x80,
-    utf8_main_flag_version_e       = 0x100,
+    utf8_main_flag_copyright_e     = 0x1,
+    utf8_main_flag_file_from_e     = 0x2,
+    utf8_main_flag_file_to_e       = 0x4,
+    utf8_main_flag_header_e        = 0x8,
+    utf8_main_flag_help_e          = 0x10,
+    utf8_main_flag_pipe_e          = 0x20,
+    utf8_main_flag_separate_e      = 0x40,
+    utf8_main_flag_strip_invalid_e = 0x80,
+    utf8_main_flag_verify_e        = 0x100,
+    utf8_main_flag_version_e       = 0x200,
   }; // enum
 #endif // _di_utf8_main_flag_e_
 
index bdd20664b61e838f98ac31417daafc670040498e..136d97afdd2893b98314ca29e68a5a8402a3f3b7 100644 (file)
@@ -33,6 +33,12 @@ extern "C" {
       return;
     }
 
+    if (setting->flag & utf8_main_flag_copyright_e) {
+      fll_program_print_copyright(main->message, (setting->line_first.used ? 0x1 : 0x0) | (setting->line_last.used ? 0x2 : 0x0));
+
+      return;
+    }
+
     if (!(setting->flag & utf8_main_flag_header_e)) {
       utf8_print_line_first_locked(setting, main->message);
     }