The year and author may be more subject to change.
Relocate this into a global static string and provide this is a parameter to fll_program_print_copyright().
The fll_program_print_copyright() is only intended for FLL projects.
Additional programs that I write, like controller, may also depend on this.
These may be operated on at a different time and thus may require the year or author to be updated.
Any more changes than this and it is probably a better idea to just implement ones own copyright print function.
#endif // _di_fll_program_parameter_filenames_s_
#endif // _di_fll_program_parameter_s_
+#ifndef _di_fll_program_copyright_s_
+ #ifndef _di_fll_program_copyright_year_author_s_
+ const f_string_static_t fll_program_copyright_year_author_s = macro_f_string_static_t_initialize_1(FLL_program_copyright_year_author_s, 0, FLL_program_copyright_year_author_s_length);
+ #endif // _di_fll_program_copyright_year_author_s_
+#endif // _di_fll_program_copyright_s_
+
#ifndef _di_fll_program_data_delete_
f_status_t fll_program_data_delete(fll_program_data_t * const data) {
#ifndef _di_level_2_parameter_checking_
extern "C" {
#endif
+/**
+ * Program parameter strings.
+ *
+ * fll_program_parameter_*_s:
+ * - filename: The file name parameter string.
+ * - filenames: The file name(s) parameter string.
+ */
#ifndef _di_fll_program_parameter_s_
#define FLL_program_parameter_filename_s "filename"
#define FLL_program_parameter_filenames_s "filename(s)"
#endif // _di_fll_program_parameter_s_
/**
+ * Copyright relating strings.
+ *
+ * fll_program_copyright_*_s:
+ * - year_author: The year and author used by the FLL project.
+ */
+#ifndef _di_fll_program_copyright_s_
+ #define FLL_program_copyright_year_author_s "2007-2024 Kevin Day"
+
+ #define FLL_program_copyright_year_author_s_length 19
+
+ #ifndef _di_fll_program_copyright_year_author_s_
+ extern const f_string_static_t fll_program_copyright_year_author_s;
+ #endif // _di_fll_program_copyright_year_author_s_
+#endif // _di_fll_program_copyright_s_
+
+/**
* Program data pipe codes.
*
* These are bit-wise codes used to designate that a particular pipe exists and is to be used.
#endif
#ifndef _di_fll_program_print_copyright_
- f_status_t fll_program_print_copyright(fl_print_t * const print) {
+ f_status_t fll_program_print_copyright(fl_print_t * const print, const f_string_static_t year_author) {
#ifndef _di_level_2_parameter_checking_
if (!print) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_file_stream_lock(print->to);
- fl_print_format("Copyright © 2007-2024 Kevin Day.%r", print->to, f_string_eol_s);
+ fl_print_format("Copyright © %Q.%r", print->to, year_author, f_string_eol_s);
#ifndef _di_detailed_copyright_
if (print->verbosity > f_console_verbosity_quiet_e) {
* @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 year_author
+ * The year and author to be printed with the copyright symbol line.
*
* @return
* F_okay on success.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_program_print_copyright_
- extern f_status_t fll_program_print_copyright(fl_print_t * const print);
+ extern f_status_t fll_program_print_copyright(fl_print_t * const print, const f_string_static_t year_author);
#endif // _di_fll_program_print_copyright_
/**
fll_program_print_version(&main->program.message, byte_dump_program_version_s);
}
else if (main->setting.flag & byte_dump_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & byte_dump_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, control_program_version_s);
}
else if (main->setting.flag & control_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & control_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, controller_program_version_s);
}
else if (main->setting.flag & controller_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & controller_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, example_program_version_s);
}
else if (main->setting.flag & example_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & example_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, fake_program_version_s);
}
else if (main->setting.flag & fake_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & fake_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, firewall_program_version_s);
}
else if (main->setting.flag & firewall_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & firewall_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, fss_identify_program_version_s);
}
else if (main->setting.flag & fss_identify_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & fss_identify_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, fss_read_program_version_s);
}
else if (main->setting.flag & fss_read_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & fss_read_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, fss_write_program_version_s);
}
else if (main->setting.flag & fss_write_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & fss_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, iki_read_program_version_s);
}
else if (main->setting.flag & iki_read_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & iki_read_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, iki_write_program_version_s);
}
else if (main->setting.flag & iki_write_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & iki_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, status_code_program_version_s);
}
else if (main->setting.flag & status_code_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & status_code_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
fll_program_print_version(&main->program.message, utf8_program_version_s);
}
else if (main->setting.flag & utf8_main_flag_copyright_e) {
- fll_program_print_copyright(&main->program.message);
+ fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if ((main->setting.flag & utf8_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {