Printing an error for two different long parameters that cannot be used together is very common.
Move this into a single function inside of fll_program.
Make sure that these calls are wrapped in appropriate verbosity checks.
The status code programs is now able to print the number with the error bit and/or warning bit set.
The status code programs status codes error and warning can be used together when using the -n/--number.
Perform minor cleanup where the "main->parameters.remaining.used > 0" can be simplified.
}
#endif // _di_fll_program_parameter_additional_rip_mash_
+#ifndef _di_fll_program_parameter_long_print_cannot_use_with_
+ f_status_t fll_program_parameter_long_print_cannot_use_with(const fl_print_t print, const f_string_static_t first, const f_string_static_t second) {
+
+ flockfile(print.to.stream);
+
+ fl_print_format("%r%[%QCannot specify the '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, print.context);
+ fl_print_format("%[%r%r%]", print.to.stream, print.notable, f_console_symbol_long_enable_s, first, print.notable);
+ fl_print_format("%[' parameter with the '%]", print.to.stream, print.context, print.context);
+ fl_print_format("%[%r%r%]", print.to.stream, print.notable, f_console_symbol_long_enable_s, second, print.notable);
+ fl_print_format("%[' parameter.%]%r", print.to.stream, print.context, print.context, f_string_eol_s);
+
+ funlockfile(print.to.stream);
+
+ return F_none;
+ }
+#endif // _di_fll_program_parameter_long_print_cannot_use_with_
+
#ifndef _di_fll_program_standard_setdown_
f_status_t fll_program_standard_setdown(f_signal_t * const signal) {
#endif // _di_fll_program_parameter_additional_rip_mash_
/**
+ * Print message about two long parameters not being allowed to be used together.
+ *
+ * This assumes both of the long parameters use f_console_symbol_long_enable_s.
+ *
+ * @param print
+ * The output structure.
+ * @param first
+ * The first string.
+ * @param second
+ * The second string.
+ *
+ * @return
+ * F_none on success.
+ */
+#ifndef _di_fll_program_parameter_long_print_cannot_use_with_
+ extern f_status_t fll_program_parameter_long_print_cannot_use_with(const fl_print_t print, const f_string_static_t first, const f_string_static_t second);
+#endif // _di_fll_program_parameter_long_print_cannot_use_with_
+
+/**
* This provides a standard program setdown operations used by FLL programs.
*
* This does the following:
}
}
- if (main->parameters.remaining.used > 0) {
+ if (main->parameters.remaining.used) {
// Pre-process remaining arguments to ensure that they all files exist before processing.
{
int return_code = 0;
- if (main->parameters.remaining.used > 0) {
+ if (main->parameters.remaining.used) {
show_nat = F_false;
show_mangle = F_false;
show_ports = F_false;
for (f_array_length_t i = 0; i < 5; ++i) {
if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_columns_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_basic_list_read_long_columns_s, parameter_name[i]);
+ }
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
if (main->parameters.array[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_basic_list_read_long_pipe_s, fss_basic_list_read_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
else if (main->parameters.array[fss_basic_list_read_parameter_line_e].result == f_console_result_additional_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_line_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_basic_list_read_long_pipe_s, fss_basic_list_read_long_line_s);
+ }
status = F_status_set_error(F_parameter);
}
for (f_array_length_t i = 0; i < 5; ++i) {
if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_columns_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_basic_read_long_columns_s, parameter_name[i]);
+ }
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
if (main->parameters.array[fss_basic_read_parameter_total_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_basic_read_long_pipe_s, fss_basic_read_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
else if (main->parameters.array[fss_basic_read_parameter_line_e].result == f_console_result_additional_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_basic_read_long_line_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_basic_read_long_pipe_s, fss_basic_read_long_line_s);
+ }
status = F_status_set_error(F_parameter);
}
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) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_columns_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_embedded_list_read_long_columns_s, fss_embedded_list_read_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
if (main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_line_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_embedded_list_read_long_line_s, fss_embedded_list_read_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
if (main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_embedded_list_read_long_pipe_s, fss_embedded_list_read_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
for (f_array_length_t i = 0; i < 5; ++i) {
if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_columns_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_extended_list_read_long_columns_s, parameter_name[i]);
+ }
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
if (main->parameters.array[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_extended_list_read_long_pipe_s, fss_extended_list_read_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
else if (main->parameters.array[fss_extended_list_read_parameter_line_e].result == f_console_result_additional_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_line_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_extended_list_read_long_pipe_s, fss_extended_list_read_long_line_s);
+ }
status = F_status_set_error(F_parameter);
}
for (f_array_length_t i = 0; i < 5; ++i) {
if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_columns_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_extended_read_long_columns_s, parameter_name[i]);
+ }
status = F_status_set_error(F_parameter);
+
break;
}
} // for
if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
if (main->parameters.array[fss_extended_read_parameter_total_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_extended_read_long_pipe_s, fss_extended_read_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
else if (main->parameters.array[fss_extended_read_parameter_line_e].result == f_console_result_additional_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_extended_read_long_line_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_extended_read_long_pipe_s, fss_extended_read_long_line_s);
+ }
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && main->parameters.array[fss_identify_parameter_total_e].result == f_console_result_found_e) {
if (main->parameters.array[fss_identify_parameter_object_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_object_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_identify_long_object_s, fss_identify_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
else if (main->parameters.array[fss_identify_parameter_content_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_content_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_identify_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_identify_long_content_s, fss_identify_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
for (f_array_length_t i = 0; i < 5; ++i) {
if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_payload_read_long_columns_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, parameter_name[i], main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_payload_read_long_columns_s, parameter_name[i]);
+ }
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_payload_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_payload_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_payload_read_long_pipe_s, fss_payload_read_long_total_s);
+ }
status = F_status_set_error(F_parameter);
}
else if (main->parameters.array[fss_payload_read_parameter_line_e].result == f_console_result_additional_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_payload_read_long_pipe_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_payload_read_long_line_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_payload_read_long_pipe_s, fss_payload_read_long_line_s);
+ }
status = F_status_set_error(F_parameter);
}
#endif // _di_fss_status_code_program_help_parameters_
#ifndef _di_fss_status_code_parameters_
- const f_string_static_t fss_status_code_short_is_fine_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_is_fine_s, 0, FSS_STATUS_CODE_short_is_fine_s_length);
- const f_string_static_t fss_status_code_short_is_warning_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_is_warning_s, 0, FSS_STATUS_CODE_short_is_warning_s_length);
- const f_string_static_t fss_status_code_short_is_error_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_is_error_s, 0, FSS_STATUS_CODE_short_is_error_s_length);
+ const f_string_static_t fss_status_code_short_fine_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_fine_s, 0, FSS_STATUS_CODE_short_fine_s_length);
+ const f_string_static_t fss_status_code_short_warning_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_warning_s, 0, FSS_STATUS_CODE_short_warning_s_length);
+ const f_string_static_t fss_status_code_short_error_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_error_s, 0, FSS_STATUS_CODE_short_error_s_length);
const f_string_static_t fss_status_code_short_number_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_short_number_s, 0, FSS_STATUS_CODE_short_number_s_length);
- const f_string_static_t fss_status_code_long_is_fine_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_is_fine_s, 0, FSS_STATUS_CODE_long_is_fine_s_length);
- const f_string_static_t fss_status_code_long_is_warning_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_is_warning_s, 0, FSS_STATUS_CODE_long_is_warning_s_length);
- const f_string_static_t fss_status_code_long_is_error_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_is_error_s, 0, FSS_STATUS_CODE_long_is_error_s_length);
+ const f_string_static_t fss_status_code_long_fine_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_fine_s, 0, FSS_STATUS_CODE_long_fine_s_length);
+ const f_string_static_t fss_status_code_long_warning_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_warning_s, 0, FSS_STATUS_CODE_long_warning_s_length);
+ const f_string_static_t fss_status_code_long_error_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_error_s, 0, FSS_STATUS_CODE_long_error_s_length);
const f_string_static_t fss_status_code_long_number_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_long_number_s, 0, FSS_STATUS_CODE_long_number_s_length);
#endif // _di_fss_status_code_parameters_
* The main program parameters.
*/
#ifndef _di_fss_status_code_parameters_
- #define FSS_STATUS_CODE_short_is_fine_s "f"
- #define FSS_STATUS_CODE_short_is_warning_s "w"
- #define FSS_STATUS_CODE_short_is_error_s "e"
- #define FSS_STATUS_CODE_short_number_s "n"
-
- #define FSS_STATUS_CODE_long_is_fine_s "is_fine"
- #define FSS_STATUS_CODE_long_is_warning_s "is_warning"
- #define FSS_STATUS_CODE_long_is_error_s "is_error"
- #define FSS_STATUS_CODE_long_number_s "number"
-
- #define FSS_STATUS_CODE_short_is_fine_s_length 1
- #define FSS_STATUS_CODE_short_is_warning_s_length 1
- #define FSS_STATUS_CODE_short_is_error_s_length 1
- #define FSS_STATUS_CODE_short_number_s_length 1
-
- #define FSS_STATUS_CODE_long_is_fine_s_length 7
- #define FSS_STATUS_CODE_long_is_warning_s_length 10
- #define FSS_STATUS_CODE_long_is_error_s_length 8
- #define FSS_STATUS_CODE_long_number_s_length 6
-
- extern const f_string_static_t fss_status_code_short_is_fine_s;
- extern const f_string_static_t fss_status_code_short_is_warning_s;
- extern const f_string_static_t fss_status_code_short_is_error_s;
+ #define FSS_STATUS_CODE_short_fine_s "f"
+ #define FSS_STATUS_CODE_short_warning_s "w"
+ #define FSS_STATUS_CODE_short_error_s "e"
+ #define FSS_STATUS_CODE_short_number_s "n"
+
+ #define FSS_STATUS_CODE_long_fine_s "fine"
+ #define FSS_STATUS_CODE_long_warning_s "warning"
+ #define FSS_STATUS_CODE_long_error_s "error"
+ #define FSS_STATUS_CODE_long_number_s "number"
+
+ #define FSS_STATUS_CODE_short_fine_s_length 1
+ #define FSS_STATUS_CODE_short_warning_s_length 1
+ #define FSS_STATUS_CODE_short_error_s_length 1
+ #define FSS_STATUS_CODE_short_number_s_length 1
+
+ #define FSS_STATUS_CODE_long_fine_s_length 4
+ #define FSS_STATUS_CODE_long_warning_s_length 7
+ #define FSS_STATUS_CODE_long_error_s_length 5
+ #define FSS_STATUS_CODE_long_number_s_length 6
+
+ extern const f_string_static_t fss_status_code_short_fine_s;
+ extern const f_string_static_t fss_status_code_short_warning_s;
+ extern const f_string_static_t fss_status_code_short_error_s;
extern const f_string_static_t fss_status_code_short_number_s;
- extern const f_string_static_t fss_status_code_long_is_fine_s;
- extern const f_string_static_t fss_status_code_long_is_warning_s;
- extern const f_string_static_t fss_status_code_long_is_error_s;
+ extern const f_string_static_t fss_status_code_long_fine_s;
+ extern const f_string_static_t fss_status_code_long_warning_s;
+ extern const f_string_static_t fss_status_code_long_error_s;
extern const f_string_static_t fss_status_code_long_number_s;
enum {
fss_status_code_parameter_verbosity_debug_e,
fss_status_code_parameter_version_e,
- fss_status_code_parameter_is_fine_e,
- fss_status_code_parameter_is_warning_e,
- fss_status_code_parameter_is_error_e,
+ fss_status_code_parameter_fine_e,
+ fss_status_code_parameter_warning_e,
+ fss_status_code_parameter_error_e,
fss_status_code_parameter_number_e,
};
macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
- macro_f_console_parameter_t_initialize(fss_status_code_short_is_fine_s.string, fss_status_code_long_is_fine_s.string, 0, 0, f_console_type_normal_e), \
- macro_f_console_parameter_t_initialize(fss_status_code_short_is_warning_s.string, fss_status_code_long_is_warning_s.string, 0, 0, f_console_type_normal_e), \
- macro_f_console_parameter_t_initialize(fss_status_code_short_is_error_s.string, fss_status_code_long_is_error_s.string, 0, 0, f_console_type_normal_e), \
+ macro_f_console_parameter_t_initialize(fss_status_code_short_fine_s.string, fss_status_code_long_fine_s.string, 0, 0, f_console_type_normal_e), \
+ macro_f_console_parameter_t_initialize(fss_status_code_short_warning_s.string, fss_status_code_long_warning_s.string, 0, 0, f_console_type_normal_e), \
+ macro_f_console_parameter_t_initialize(fss_status_code_short_error_s.string, fss_status_code_long_error_s.string, 0, 0, f_console_type_normal_e), \
macro_f_console_parameter_t_initialize(fss_status_code_short_number_s.string, fss_status_code_long_number_s.string, 0, 0, f_console_type_normal_e), \
}
f_print_dynamic_raw(f_string_eol_s, file.stream);
- fll_program_print_help_option(file, context, fss_status_code_short_is_fine_s, fss_status_code_long_is_fine_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise.");
- fll_program_print_help_option(file, context, fss_status_code_short_is_warning_s, fss_status_code_long_is_warning_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise.");
- fll_program_print_help_option(file, context, fss_status_code_short_is_error_s, fss_status_code_long_is_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise.");
- fll_program_print_help_option(file, context, fss_status_code_short_number_s, fss_status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number.");
+ fll_program_print_help_option(file, context, fss_status_code_short_fine_s, fss_status_code_long_fine_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true or F_false if status code is neither an error nor a warning or print number with neither the error code nor the warning code bits set.");
+ fll_program_print_help_option(file, context, fss_status_code_short_warning_s, fss_status_code_long_warning_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true or F_false if status code is a warning or print number with warning code bit set.");
+ fll_program_print_help_option(file, context, fss_status_code_short_error_s, fss_status_code_long_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true or F_false if status code is an error or print number with error code bit set.");
+ fll_program_print_help_option(file, context, fss_status_code_short_number_s, fss_status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number.");
fll_program_print_help_usage(file, context, fss_status_code_program_name_s, fss_status_code_program_help_parameters_s);
return F_none;
}
- if (main->parameters.array[fss_status_code_parameter_is_error_e].result == f_console_result_found_e) {
- if (main->parameters.array[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_error_s, main->error.notable);
- fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_warning_s, main->error.notable);
- fl_print_format("%['.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->parameters.array[fss_status_code_parameter_error_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_status_code_parameter_warning_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_status_code_parameter_number_e].result == f_console_result_none_e) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ flockfile(main->error.to.stream);
+
+ fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
+ fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_error_s, main->error.notable);
+ fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
+ fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_warning_s, main->error.notable);
+ fl_print_format("%[' parameter when not also specifying the '%]", main->error.to.stream, main->error.context, main->error.context);
+ fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_number_s, main->error.notable);
+ fl_print_format("%[' parameter.%]%r%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s, f_string_eol_s);
+
+ funlockfile(main->error.to.stream);
+ }
- return F_status_set_error(status);
+ return F_status_set_error(status);
+ }
}
- if (main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_error_s, main->error.notable);
- fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_fine_s, main->error.notable);
- fl_print_format("%['.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->parameters.array[fss_status_code_parameter_fine_e].result == f_console_result_found_e) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_status_code_long_error_s, fss_status_code_long_fine_s);
+ fll_print_dynamic_raw(f_string_eol_s, main->error.to.stream);
+ }
return F_status_set_error(status);
}
}
- else if (main->parameters.array[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e && main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_warning_s, main->error.notable);
- fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fss_status_code_long_is_fine_s, main->error.notable);
- fl_print_format("%['.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ else if (main->parameters.array[fss_status_code_parameter_warning_e].result == f_console_result_found_e && main->parameters.array[fss_status_code_parameter_fine_e].result == f_console_result_found_e) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, fss_status_code_long_warning_s, fss_status_code_long_fine_s);
+ fll_print_dynamic_raw(f_string_eol_s, main->error.to.stream);
+ }
return F_status_set_error(status);
}
f_status_t status2 = F_none;
- if (main->parameters.array[fss_status_code_parameter_is_error_e].result == f_console_result_found_e || main->parameters.array[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e || main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_status_code_parameter_number_e].result == f_console_result_found_e) {
if (main->process_pipe) {
- // @todo call fss_status_code_process_check() here for all main from pipe that is space separated.
+ // @todo call fss_status_code_process_number() here for all main from pipe that is space separated.
}
- if (main->parameters.remaining.used > 0) {
+ if (main->parameters.remaining.used) {
flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
main->signal_check = 0;
}
- status2 = fss_status_code_process_check(main, argv[main->parameters.remaining.array[i]]);
+ status2 = fss_status_code_process_number(main, argv[main->parameters.remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
status = status2;
funlockfile(main->output.to.stream);
}
}
- else if (main->parameters.array[fss_status_code_parameter_number_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_status_code_parameter_error_e].result == f_console_result_found_e || main->parameters.array[fss_status_code_parameter_warning_e].result == f_console_result_found_e || main->parameters.array[fss_status_code_parameter_fine_e].result == f_console_result_found_e) {
if (main->process_pipe) {
- // @todo call fss_status_code_process_number() here for all main from pipe that is space separated.
+ // @todo call fss_status_code_process_check() here for all main from pipe that is space separated.
}
- if (main->parameters.remaining.used > 0) {
+ if (main->parameters.remaining.used) {
flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
main->signal_check = 0;
}
- status2 = fss_status_code_process_number(main, argv[main->parameters.remaining.array[i]]);
+ status2 = fss_status_code_process_check(main, argv[main->parameters.remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
status = status2;
// @todo call fss_status_code_process_normal() here for all main from pipe that is space separated.
}
- if (main->parameters.remaining.used > 0) {
+ if (main->parameters.remaining.used) {
flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
}
}
- if (main->error.verbosity != f_console_verbosity_quiet_e) {
- if (F_status_set_fine(status) == F_interrupt) {
+ if (F_status_set_fine(status) == F_interrupt) {
+ if (main->output.verbosity != f_console_verbosity_quiet_e) {
fflush(main->output.to.stream);
fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
extern void fss_status_code_print_signal_received(fll_program_data_t * const main) F_attribute_visibility_internal_d;
#endif // _di_fss_status_code_print_signal_received_
+/**
+ * Print a message about a one parameter not being allowed to be used with another.
+ *
+ * @param main
+ * The main program data.
+ */
+#ifndef _di_fss_status_code_print_parameter_cannot_be_used_with_
+ extern void fss_status_code_print_parameter_cannot_be_used_with(fll_program_data_t * const main) F_attribute_visibility_internal_d;
+#endif // _di_fss_status_code_print_parameter_cannot_be_used_with_
+
#ifdef __cplusplus
} // extern "C"
#endif
if (F_status_is_error(status)) return status;
}
- if (main->parameters.array[fss_status_code_parameter_is_error_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_status_code_parameter_error_e].result == f_console_result_found_e) {
if (F_status_is_error(number)) {
f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
}
f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
}
- else if (main->parameters.array[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_status_code_parameter_warning_e].result == f_console_result_found_e) {
if (F_status_is_warning(number)) {
f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
}
f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
}
- else if (main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_status_code_parameter_fine_e].result == f_console_result_found_e) {
if (F_status_is_fine(number)) {
f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
}
return F_none;
}
+ if (main->parameters.array[fss_status_code_parameter_error_e].result == f_console_result_found_e) {
+ code = F_status_set_error(code);
+ }
+
+ if (main->parameters.array[fss_status_code_parameter_warning_e].result == f_console_result_found_e) {
+ code = F_status_set_warning(code);
+ }
+
fl_print_format("%ui%r", main->output.to.stream, code, f_string_eol_s);
return F_none;
if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_at_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_whole_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ fll_program_parameter_long_print_cannot_use_with(main->error, iki_read_long_at_s, iki_read_long_whole_s);
}
status = F_status_set_error(F_parameter);
if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ fll_program_parameter_long_print_cannot_use_with(main->error, iki_read_long_substitute_s, iki_read_long_total_s);
}
status = F_status_set_error(F_parameter);
if (main->parameters.array[iki_read_parameter_literal_e].result == f_console_result_found_e) {
if (main->parameters.array[iki_read_parameter_object_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_literal_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_object_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ fll_program_parameter_long_print_cannot_use_with(main->error, iki_read_long_literal_s, iki_read_long_object_s);
}
status = F_status_set_error(F_parameter);
if (main->parameters.array[iki_read_parameter_content_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_literal_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_content_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ fll_program_parameter_long_print_cannot_use_with(main->error, iki_read_long_literal_s, iki_read_long_content_s);
}
status = F_status_set_error(F_parameter);
if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_literal_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ fll_program_parameter_long_print_cannot_use_with(main->error, iki_read_long_literal_s, iki_read_long_total_s);
}
status = F_status_set_error(F_parameter);
else if (main->parameters.array[iki_read_parameter_object_e].result == f_console_result_found_e) {
if (main->parameters.array[iki_read_parameter_content_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_object_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_content_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ fll_program_parameter_long_print_cannot_use_with(main->error, iki_read_long_object_s, iki_read_long_content_s);
}
status = F_status_set_error(F_parameter);
if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_object_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ fll_program_parameter_long_print_cannot_use_with(main->error, iki_read_long_object_s, iki_read_long_total_s);
}
status = F_status_set_error(F_parameter);
if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) {
if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_whole_s, main->error.notable);
- fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, iki_read_long_total_s, main->error.notable);
- fl_print_format("%[' parameter.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ fll_program_parameter_long_print_cannot_use_with(main->error, iki_read_long_whole_s, iki_read_long_total_s);
}
status = F_status_set_error(F_parameter);
#endif // _di_status_code_program_help_parameters_
#ifndef _di_status_code_parameters_
- const f_string_static_t status_code_short_is_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_short_is_fine_s, 0, STATUS_CODE_short_is_fine_s_length);
- const f_string_static_t status_code_short_is_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_short_is_warning_s, 0, STATUS_CODE_short_is_warning_s_length);
- const f_string_static_t status_code_short_is_error_s = macro_f_string_static_t_initialize(STATUS_CODE_short_is_error_s, 0, STATUS_CODE_short_is_error_s_length);
+ const f_string_static_t status_code_short_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_short_fine_s, 0, STATUS_CODE_short_fine_s_length);
+ const f_string_static_t status_code_short_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_short_warning_s, 0, STATUS_CODE_short_warning_s_length);
+ const f_string_static_t status_code_short_error_s = macro_f_string_static_t_initialize(STATUS_CODE_short_error_s, 0, STATUS_CODE_short_error_s_length);
const f_string_static_t status_code_short_number_s = macro_f_string_static_t_initialize(STATUS_CODE_short_number_s, 0, STATUS_CODE_short_number_s_length);
- const f_string_static_t status_code_long_is_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_long_is_fine_s, 0, STATUS_CODE_long_is_fine_s_length);
- const f_string_static_t status_code_long_is_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_long_is_warning_s, 0, STATUS_CODE_long_is_warning_s_length);
- const f_string_static_t status_code_long_is_error_s = macro_f_string_static_t_initialize(STATUS_CODE_long_is_error_s, 0, STATUS_CODE_long_is_error_s_length);
+ const f_string_static_t status_code_long_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_long_fine_s, 0, STATUS_CODE_long_fine_s_length);
+ const f_string_static_t status_code_long_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_long_warning_s, 0, STATUS_CODE_long_warning_s_length);
+ const f_string_static_t status_code_long_error_s = macro_f_string_static_t_initialize(STATUS_CODE_long_error_s, 0, STATUS_CODE_long_error_s_length);
const f_string_static_t status_code_long_number_s = macro_f_string_static_t_initialize(STATUS_CODE_long_number_s, 0, STATUS_CODE_long_number_s_length);
#endif // _di_status_code_parameters_
* The main program parameters.
*/
#ifndef _di_status_code_parameters_
- #define STATUS_CODE_short_is_fine_s "f"
- #define STATUS_CODE_short_is_warning_s "w"
- #define STATUS_CODE_short_is_error_s "e"
- #define STATUS_CODE_short_number_s "n"
-
- #define STATUS_CODE_long_is_fine_s "is_fine"
- #define STATUS_CODE_long_is_warning_s "is_warning"
- #define STATUS_CODE_long_is_error_s "is_error"
- #define STATUS_CODE_long_number_s "number"
-
- #define STATUS_CODE_short_is_fine_s_length 1
- #define STATUS_CODE_short_is_warning_s_length 1
- #define STATUS_CODE_short_is_error_s_length 1
- #define STATUS_CODE_short_number_s_length 1
-
- #define STATUS_CODE_long_is_fine_s_length 7
- #define STATUS_CODE_long_is_warning_s_length 10
- #define STATUS_CODE_long_is_error_s_length 8
- #define STATUS_CODE_long_number_s_length 6
-
- extern const f_string_static_t status_code_short_is_fine_s;
- extern const f_string_static_t status_code_short_is_warning_s;
- extern const f_string_static_t status_code_short_is_error_s;
+ #define STATUS_CODE_short_fine_s "f"
+ #define STATUS_CODE_short_warning_s "w"
+ #define STATUS_CODE_short_error_s "e"
+ #define STATUS_CODE_short_number_s "n"
+
+ #define STATUS_CODE_long_fine_s "fine"
+ #define STATUS_CODE_long_warning_s "warning"
+ #define STATUS_CODE_long_error_s "error"
+ #define STATUS_CODE_long_number_s "number"
+
+ #define STATUS_CODE_short_fine_s_length 1
+ #define STATUS_CODE_short_warning_s_length 1
+ #define STATUS_CODE_short_error_s_length 1
+ #define STATUS_CODE_short_number_s_length 1
+
+ #define STATUS_CODE_long_fine_s_length 4
+ #define STATUS_CODE_long_warning_s_length 7
+ #define STATUS_CODE_long_error_s_length 5
+ #define STATUS_CODE_long_number_s_length 6
+
+ extern const f_string_static_t status_code_short_fine_s;
+ extern const f_string_static_t status_code_short_warning_s;
+ extern const f_string_static_t status_code_short_error_s;
extern const f_string_static_t status_code_short_number_s;
- extern const f_string_static_t status_code_long_is_fine_s;
- extern const f_string_static_t status_code_long_is_warning_s;
- extern const f_string_static_t status_code_long_is_error_s;
+ extern const f_string_static_t status_code_long_fine_s;
+ extern const f_string_static_t status_code_long_warning_s;
+ extern const f_string_static_t status_code_long_error_s;
extern const f_string_static_t status_code_long_number_s;
enum {
status_code_parameter_verbosity_debug_e,
status_code_parameter_version_e,
- status_code_parameter_is_fine_e,
- status_code_parameter_is_warning_e,
- status_code_parameter_is_error_e,
+ status_code_parameter_fine_e,
+ status_code_parameter_warning_e,
+ status_code_parameter_error_e,
status_code_parameter_number_e,
};
macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
- macro_f_console_parameter_t_initialize(status_code_short_is_fine_s.string, status_code_long_is_fine_s.string, 0, 0, f_console_type_normal_e), \
- macro_f_console_parameter_t_initialize(status_code_short_is_warning_s.string, status_code_long_is_warning_s.string, 0, 0, f_console_type_normal_e), \
- macro_f_console_parameter_t_initialize(status_code_short_is_error_s.string, status_code_long_is_error_s.string, 0, 0, f_console_type_normal_e), \
+ macro_f_console_parameter_t_initialize(status_code_short_fine_s.string, status_code_long_fine_s.string, 0, 0, f_console_type_normal_e), \
+ macro_f_console_parameter_t_initialize(status_code_short_warning_s.string, status_code_long_warning_s.string, 0, 0, f_console_type_normal_e), \
+ macro_f_console_parameter_t_initialize(status_code_short_error_s.string, status_code_long_error_s.string, 0, 0, f_console_type_normal_e), \
macro_f_console_parameter_t_initialize(status_code_short_number_s.string, status_code_long_number_s.string, 0, 0, f_console_type_normal_e), \
}
if (F_status_is_error(status)) return status;
- if (main->parameters.array[status_code_parameter_is_error_e].result == f_console_result_found_e) {
+ if (main->parameters.array[status_code_parameter_error_e].result == f_console_result_found_e) {
if (F_status_is_error(number)) {
f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
}
f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
}
- else if (main->parameters.array[status_code_parameter_is_warning_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[status_code_parameter_warning_e].result == f_console_result_found_e) {
if (F_status_is_warning(number)) {
f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
}
f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
}
- else if (main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[status_code_parameter_fine_e].result == f_console_result_found_e) {
if (F_status_is_fine(number)) {
f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
}
return F_none;
}
+ if (main->parameters.array[status_code_parameter_error_e].result == f_console_result_found_e) {
+ code = F_status_set_error(code);
+ }
+
+ if (main->parameters.array[status_code_parameter_warning_e].result == f_console_result_found_e) {
+ code = F_status_set_warning(code);
+ }
+
fl_print_format("%ui%r", main->output.to.stream, code, f_string_eol_s);
return F_none;
f_print_dynamic_raw(f_string_eol_s, file.stream);
- fll_program_print_help_option(file, context, status_code_short_is_fine_s, status_code_long_is_fine_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise.");
- fll_program_print_help_option(file, context, status_code_short_is_warning_s, status_code_long_is_warning_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise.");
- fll_program_print_help_option(file, context, status_code_short_is_error_s, status_code_long_is_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise.");
- fll_program_print_help_option(file, context, status_code_short_number_s, status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number.");
+ fll_program_print_help_option(file, context, status_code_short_fine_s, status_code_long_fine_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true or F_false if status code is neither an error nor a warning or print number with neither the error code nor the warning code bits set.");
+ fll_program_print_help_option(file, context, status_code_short_warning_s, status_code_long_warning_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true or F_false if status code is a warning or print number with warning code bit set.");
+ fll_program_print_help_option(file, context, status_code_short_error_s, status_code_long_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true or F_false if status code is an error or print number with error code bit set.");
+ fll_program_print_help_option(file, context, status_code_short_number_s, status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number.");
fll_program_print_help_usage(file, context, status_code_program_name_s, status_code_program_help_parameters_s);
return F_none;
}
- if (main->parameters.array[status_code_parameter_is_error_e].result == f_console_result_found_e) {
- if (main->parameters.array[status_code_parameter_is_warning_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_error_s, main->error.notable);
- fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_warning_s, main->error.notable);
- fl_print_format("%['.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->parameters.array[status_code_parameter_error_e].result == f_console_result_found_e) {
+ if (main->parameters.array[status_code_parameter_warning_e].result == f_console_result_found_e) {
+ if (main->parameters.array[status_code_parameter_number_e].result == f_console_result_none_e) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ flockfile(main->error.to.stream);
+
+ fl_print_format("%r%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
+ fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_error_s, main->error.notable);
+ fl_print_format("%[' parameter with the '%]", main->error.to.stream, main->error.context, main->error.context);
+ fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_warning_s, main->error.notable);
+ fl_print_format("%[' parameter when not also specifying the '%]", main->error.to.stream, main->error.context, main->error.context);
+ fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_number_s, main->error.notable);
+ fl_print_format("%[' parameter.%]%r%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s, f_string_eol_s);
+
+ funlockfile(main->error.to.stream);
+ }
- return F_status_set_error(status);
+ return F_status_set_error(status);
+ }
}
- if (main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_error_s, main->error.notable);
- fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_fine_s, main->error.notable);
- fl_print_format("%['.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ if (main->parameters.array[status_code_parameter_fine_e].result == f_console_result_found_e) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, status_code_long_error_s, status_code_long_fine_s);
+ fll_print_dynamic_raw(f_string_eol_s, main->error.to.stream);
+ }
return F_status_set_error(status);
}
}
- else if (main->parameters.array[status_code_parameter_is_warning_e].result == f_console_result_found_e && main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
- flockfile(main->error.to.stream);
-
- fl_print_format("%r%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_warning_s, main->error.notable);
- fl_print_format("%[' cannot be used with the parameter '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, status_code_long_is_fine_s, main->error.notable);
- fl_print_format("%['.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-
- funlockfile(main->error.to.stream);
+ else if (main->parameters.array[status_code_parameter_warning_e].result == f_console_result_found_e && main->parameters.array[status_code_parameter_fine_e].result == f_console_result_found_e) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_program_parameter_long_print_cannot_use_with(main->error, status_code_long_warning_s, status_code_long_fine_s);
+ fll_print_dynamic_raw(f_string_eol_s, main->error.to.stream);
+ }
return F_status_set_error(status);
}
f_status_t status2 = F_none;
- if (main->parameters.array[status_code_parameter_is_error_e].result == f_console_result_found_e || main->parameters.array[status_code_parameter_is_warning_e].result == f_console_result_found_e || main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ if (main->parameters.array[status_code_parameter_number_e].result == f_console_result_found_e) {
if (main->process_pipe) {
- // @todo call status_code_process_check() here for all main from pipe that is space separated.
+ // @todo call status_code_process_number() here for all main from pipe that is space separated.
}
- if (main->parameters.remaining.used > 0) {
+ if (main->parameters.remaining.used) {
flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
main->signal_check = 0;
}
- status2 = status_code_process_check(main, argv[main->parameters.remaining.array[i]]);
+ status2 = status_code_process_number(main, argv[main->parameters.remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
status = status2;
funlockfile(main->output.to.stream);
}
}
- else if (main->parameters.array[status_code_parameter_number_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[status_code_parameter_error_e].result == f_console_result_found_e || main->parameters.array[status_code_parameter_warning_e].result == f_console_result_found_e || main->parameters.array[status_code_parameter_fine_e].result == f_console_result_found_e) {
if (main->process_pipe) {
- // @todo call status_code_process_number() here for all main from pipe that is space separated.
+ // @todo call status_code_process_check() here for all main from pipe that is space separated.
}
- if (main->parameters.remaining.used > 0) {
+ if (main->parameters.remaining.used) {
flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
main->signal_check = 0;
}
- status2 = status_code_process_number(main, argv[main->parameters.remaining.array[i]]);
+ status2 = status_code_process_check(main, argv[main->parameters.remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
status = status2;
// @todo call status_code_process_normal() here for all main from pipe that is space separated.
}
- if (main->parameters.remaining.used > 0) {
+ if (main->parameters.remaining.used) {
flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
}
}
- if (main->error.verbosity != f_console_verbosity_quiet_e) {
- if (F_status_set_fine(status) == F_interrupt) {
+ if (F_status_set_fine(status) == F_interrupt) {
+ if (main->output.verbosity != f_console_verbosity_quiet_e) {
fflush(main->output.to.stream);
fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream);