#endif // _di_fll_program_print_help_operations_
#ifndef _di_fll_program_print_help_option_
- f_status_t fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) {
+ f_status_t fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char * const description) {
#ifndef _di_level_2_parameter_checking_
if (!print) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
}
#endif // _di_fll_program_print_help_option_
-#ifndef _di_fll_program_print_help_option_standard_
- f_status_t fll_program_print_help_option_standard(fl_print_t * const print) {
+#ifndef _di_fll_program_print_help_option_long_
+ f_status_t fll_program_print_help_option_long(fl_print_t * const print, const f_string_static_t option_long, const f_string_static_t symbol_long, const char * const description) {
#ifndef _di_level_2_parameter_checking_
if (!print) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- 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.");
- private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, silencing most print->to.");
- private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, using only error print->to.");
- private_fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Set verbosity to normal.");
- private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Increase verbosity beyond normal print->to.");
- private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Enable debugging, significantly increasing verbosity beyond normal print->to.");
- private_fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print only the version number.");
+ fl_print_format(" %Q%[%Q%] %S%r", print->to, symbol_long, print->set->standout, option_long, print->set->standout, description, f_string_eol_s);
return F_okay;
}
-#endif // _di_fll_program_print_help_option_standard_
+#endif // _di_fll_program_print_help_option_long_
-#ifndef _di_fll_program_print_help_option_long_
- f_status_t fll_program_print_help_option_long(fl_print_t * const print, const f_string_static_t option_long, const f_string_static_t symbol_long, const char *description) {
+#ifndef _di_fll_program_print_help_option_other_
+ f_status_t fll_program_print_help_option_other(fl_print_t * const print, const f_string_static_t option_other, const char * const description) {
#ifndef _di_level_2_parameter_checking_
if (!print) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- fl_print_format(" %Q%[%Q%] %S%r", print->to, symbol_long, print->set->standout, option_long, print->set->standout, description, f_string_eol_s);
+ fl_print_format(" %[%Q%] %S%r", print->to, print->set->standout, option_other, print->set->standout, description, f_string_eol_s);
return F_okay;
}
-#endif // _di_fll_program_print_help_option_long_
+#endif // _di_fll_program_print_help_option_other_
-#ifndef _di_fll_program_print_help_option_other_
- f_status_t fll_program_print_help_option_other(fl_print_t * const print, const f_string_static_t option_other, const char *description) {
+#ifndef _di_fll_program_print_help_option_short_
+ f_status_t fll_program_print_help_option_short(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t symbol_short, const char * const description) {
#ifndef _di_level_2_parameter_checking_
if (!print) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- fl_print_format(" %[%Q%] %S%r", print->to, print->set->standout, option_other, print->set->standout, description, f_string_eol_s);
+ fl_print_format(" %Q%[%Q%] %S%r", print->to, symbol_short, print->set->standout, option_short, print->set->standout, description, f_string_eol_s);
return F_okay;
}
-#endif // _di_fll_program_print_help_option_other_
+#endif // _di_fll_program_print_help_option_short_
+
+#ifndef _di_fll_program_print_help_option_standard_
+ f_status_t fll_program_print_help_option_standard(fl_print_t * const print) {
+ #ifndef _di_level_2_parameter_checking_
+ if (!print) return F_status_set_error(F_parameter);
+ #endif // _di_level_2_parameter_checking_
+
+ 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.");
+ private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, silencing most print->to.");
+ private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, using only error print->to.");
+ private_fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Set verbosity to normal.");
+ private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Increase verbosity beyond normal print->to.");
+ private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Enable debugging, significantly increasing verbosity beyond normal print->to.");
+ private_fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print only the version number.");
+
+ return F_okay;
+ }
+#endif // _di_fll_program_print_help_option_standard_
#ifndef _di_fll_program_print_help_special_options_
f_status_t fll_program_print_help_special_options(fl_print_t * const print) {
* @see fl_print_format()
*/
#ifndef _di_fll_program_print_help_option_
- extern f_status_t fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description);
+ extern f_status_t fll_program_print_help_option(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char * const description);
#endif // _di_fll_program_print_help_option_
/**
* @see fl_print_format()
*/
#ifndef _di_fll_program_print_help_option_long_
- extern f_status_t fll_program_print_help_option_long(fl_print_t * const print, const f_string_static_t option_long, const f_string_static_t symbol_long, const char *description);
+ extern f_status_t fll_program_print_help_option_long(fl_print_t * const print, const f_string_static_t option_long, const f_string_static_t symbol_long, const char * const description);
#endif // _di_fll_program_print_help_option_long_
/**
* @see fl_print_format()
*/
#ifndef _di_fll_program_print_help_option_other_
- extern f_status_t fll_program_print_help_option_other(fl_print_t * const print, const f_string_static_t option_other, const char *description);
+ extern f_status_t fll_program_print_help_option_other(fl_print_t * const print, const f_string_static_t option_other, const char * const description);
#endif // _di_fll_program_print_help_option_other_
/**
+ * Print standard help option (short option only).
+ *
+ * This print function does not use locking, be sure something like flockfile() and funlockfile() are appropriately called.
+ *
+ * @param print
+ * The output structure to print to.
+ * This uses but does not lock or unlock file stream.
+ * This requires print.set to be non-NULL.
+ * @param option_short
+ * The short name of the option.
+ * @param symbol_short
+ * The short symbol of the option.
+ * @param description
+ * A desciption associated with the option.
+ *
+ * @return
+ * F_okay on success.
+ * F_output_not on success, but no printing is performed.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_print_format()
+ */
+#ifndef _di_fll_program_print_help_option_short_
+ extern f_status_t fll_program_print_help_option_short(fl_print_t * const print, const f_string_static_t option_short, const f_string_static_t symbol_short, const char * const description);
+#endif // _di_fll_program_print_help_option_short_
+
+/**
* Print all standard help options.
*
* This print function does not use locking, be sure something like flockfile() and funlockfile() are appropriately called.