f_string_t symbol_long;
f_string_t symbol_simple;
- uint16_t values_total;
+ f_array_length_t values_total;
f_console_flag_t flag;
f_console_result_t result;
#endif // _di_fll_program_print_error_missing_variable_not_zero_
#ifndef _di_fll_program_print_error_parameter_both_specified_same_amount_
- f_status_t fll_program_print_error_parameter_both_specified_same_amount(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t first, const f_string_static_t second) {
+ f_status_t fll_program_print_error_parameter_both_specified_same_amount(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_file_stream_lock(print.to);
fl_print_format("%[%QThe '%]", print.to, print.set->error, print.prefix, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_first, first, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
fl_print_format("%[' parameter and the '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_second, second, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
fl_print_format("%[' parameter must be specified the same number of times.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_both_specified_same_amount_
#ifndef _di_fll_program_print_error_parameter_both_specified_same_amount_without_
- f_status_t fll_program_print_error_parameter_both_specified_same_amount_without(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t symbol_third, const f_string_static_t first, const f_string_static_t second, const f_string_static_t third) {
+ f_status_t fll_program_print_error_parameter_both_specified_same_amount_without(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_file_stream_lock(print.to);
fl_print_format("%[%QThe '%]", print.to, print.set->error, print.prefix, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_first, first, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
fl_print_format("%[' parameter and the '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_second, second, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
fl_print_format("%[' parameter must be specified the same number of times when not specifying the '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_third, third, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_3, name_3, print.set->notable);
fl_print_format("%[' parameter.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_both_specified_same_amount_without_
#ifndef _di_fll_program_print_error_parameter_cannot_use_with_
- f_status_t fll_program_print_error_parameter_cannot_use_with(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t first, const f_string_static_t second) {
+ f_status_t fll_program_print_error_parameter_cannot_use_with(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_file_stream_lock(print.to);
fl_print_format("%[%QCannot specify the '%]", print.to, print.set->error, print.prefix, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_first, first, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
fl_print_format("%[' parameter with the '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_second, second, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
fl_print_format("%[' parameter.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_cannot_use_with_
#ifndef _di_fll_program_print_error_parameter_cannot_use_with_without_
- f_status_t fll_program_print_error_parameter_cannot_use_with_without(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t symbol_third, const f_string_static_t first, const f_string_static_t second, const f_string_static_t third) {
+ f_status_t fll_program_print_error_parameter_cannot_use_with_without(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_file_stream_lock(print.to);
fl_print_format("%[%QCannot specify the '%]", print.to, print.set->error, print.prefix, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_first, first, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
fl_print_format("%[' parameter with the '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_second, second, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
fl_print_format("%[' parameter without the '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_third, third, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_3, name_3, print.set->notable);
fl_print_format("%[' parameter.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_cannot_use_with_pipe_
#ifndef _di_fll_program_print_error_parameter_cannot_use_with_xor_
- f_status_t fll_program_print_error_parameter_cannot_use_with_xor(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t symbol_third, const f_string_static_t first, const f_string_static_t second, const f_string_static_t third) {
+ f_status_t fll_program_print_error_parameter_cannot_use_with_xor(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_file_stream_lock(print.to);
fl_print_format("%[%QThe '%]", print.to, print.set->error, print.prefix, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_first, first, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_1, name_1, print.set->notable);
fl_print_format("%[' parameter only allows either the '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_second, second, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_2, name_2, print.set->notable);
fl_print_format("%[' parameter or the '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_third, third, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol_3, name_3, print.set->notable);
fl_print_format("%[' parameter, but not both.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_cannot_use_with_xor_
#ifndef _di_fll_program_print_error_parameter_integer_not_
- f_status_t fll_program_print_error_parameter_integer_not(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value) {
+ f_status_t fll_program_print_error_parameter_integer_not(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
fl_print_format("%[%QThe value '%]", print.to, print.set->error, print.prefix, print.set->error);
fl_print_format("%[%Q%]", print.to, print.set->notable, value, print.set->notable);
fl_print_format("%[' for the parameter '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, parameter, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
fl_print_format("%[' is not a valid integer.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_integer_not_
#ifndef _di_fll_program_print_error_parameter_integer_not_negative_
- f_status_t fll_program_print_error_parameter_integer_not_negative(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value) {
+ f_status_t fll_program_print_error_parameter_integer_not_negative(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
fl_print_format("%[%QThe value '%]", print.to, print.set->error, print.prefix, print.set->error);
fl_print_format("%[%Q%]", print.to, print.set->notable, value, print.set->notable);
fl_print_format("%[' for the parameter '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, parameter, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
fl_print_format("%[' is not a valid negative integer.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_integer_not_negative_
#ifndef _di_fll_program_print_error_parameter_integer_not_positive_
- f_status_t fll_program_print_error_parameter_integer_not_positive(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value) {
+ f_status_t fll_program_print_error_parameter_integer_not_positive(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
fl_print_format("%[%QThe value '%]", print.to, print.set->error, print.prefix, print.set->error);
fl_print_format("%[%Q%]", print.to, print.set->notable, value, print.set->notable);
fl_print_format("%[' for the parameter '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, parameter, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
fl_print_format("%[' is not a valid positive integer.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_integer_not_positive_
#ifndef _di_fll_program_print_error_parameter_missing_value_
- f_status_t fll_program_print_error_parameter_missing_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter) {
+ f_status_t fll_program_print_error_parameter_missing_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_file_stream_lock(print.to);
fl_print_format("%[%QThe parameter%] ", print.to, print.set->error, print.prefix, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, parameter, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
fl_print_format(" %[is specified, but no value is given.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_missing_value_
#ifndef _di_fll_program_print_error_parameter_missing_value_requires_amount_
- f_status_t fll_program_print_error_parameter_missing_value_requires_amount(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t amount) {
+ f_status_t fll_program_print_error_parameter_missing_value_requires_amount(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t amount) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_file_stream_lock(print.to);
fl_print_format("%[%QThe parameter%] ", print.to, print.set->error, print.prefix, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, parameter, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
fl_print_format("%[ is specified, but%] ", print.to, print.set->error, print.set->error);
fl_print_format("%[%Q%]", print.to, print.set->notable, amount, print.set->notable);
fl_print_format(" %[values are not given.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
#endif // _di_fll_program_print_error_parameter_missing_value_requires_amount_
#ifndef _di_fll_program_print_error_parameter_must_specify_once_
- f_status_t fll_program_print_error_parameter_must_specify_once(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter) {
+ f_status_t fll_program_print_error_parameter_must_specify_once(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
f_file_stream_lock(print.to);
fl_print_format("%[%QThe parameter '%]", print.to, print.set->error, print.prefix, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, parameter, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
fl_print_format("%[' may only be specified once.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_must_specify_once_
#ifndef _di_fll_program_print_error_parameter_must_specify_once_value_
- f_status_t fll_program_print_error_parameter_must_specify_once_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value) {
+ f_status_t fll_program_print_error_parameter_must_specify_once_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
fl_print_format("%[%QThe value '%]", print.to, print.set->error, print.prefix, print.set->error);
fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, value, print.set->notable);
fl_print_format("%[' may only be specified once for the parameter '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, parameter, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
fl_print_format("%['.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
#endif // _di_fll_program_print_error_parameter_must_specify_once_value_
#ifndef _di_fll_program_print_error_parameter_range_start_before_stop_
- f_status_t fll_program_print_error_parameter_range_start_before_stop(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value_start, const f_string_static_t value_stop) {
+ f_status_t fll_program_print_error_parameter_range_start_before_stop(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value_start, const f_string_static_t value_stop) {
if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
fl_print_format("%[' may not be greater than the stop value '%]", print.to, print.set->error, print.set->error);
fl_print_format("%[%Q%]", print.to, print.set->notable, value_stop, print.set->notable);
fl_print_format("%[' for the parameter '%]", print.to, print.set->error, print.set->error);
- fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, parameter, print.set->notable);
+ fl_print_format("%[%Q%Q%]", print.to, print.set->notable, symbol, name, print.set->notable);
fl_print_format("%['.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
f_file_stream_unlock(print.to);
}
#endif // _di_fll_program_print_error_parameter_range_start_before_stop_
+#ifndef _di_fll_program_print_error_parameter_value_too_long_
+ f_status_t fll_program_print_error_parameter_value_too_long(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name) {
+
+ if (print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ f_file_stream_lock(print.to);
+
+ fl_print_format("%[%QThe value for the parameter '%]", print.to, print.set->error, print.prefix, print.set->error);
+ fl_print_format("%[%Q%Q%]", print.to, print.notable, symbol, name, print.notable);
+ fl_print_format("%[' is too long.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
+
+ f_file_stream_unlock(print.to);
+
+ return F_none;
+ }
+#endif // _di_fll_program_print_error_parameter_value_too_long_
+
#ifndef _di_fll_program_print_error_pipe_invalid_form_feed_
f_status_t fll_program_print_error_pipe_invalid_form_feed(const fl_print_t print) {
* @param print
* The output structure.
* This locks, uses, and unlocks the file stream.
- * @param symbol_first
+ * @param symbol_1
* The symbol string prepended to the first parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param symbol_second
+ * @param symbol_2
* The symbol string prepended to the second parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param first
+ * @param name_1
* The first parameter name.
- * @param second
+ * @param name_2
* The second parameter name.
*
* @return
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_both_specified_same_amount_
- extern f_status_t fll_program_print_error_parameter_both_specified_same_amount(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t first, const f_string_static_t second);
+ extern f_status_t fll_program_print_error_parameter_both_specified_same_amount(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2);
#endif // _di_fll_program_print_error_parameter_both_specified_same_amount_
/**
* @param print
* The output structure.
* This locks, uses, and unlocks the file stream.
- * @param symbol_first
+ * @param symbol_1
* The symbol string prepended to the first parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param symbol_second
+ * @param symbol_2
* The symbol string prepended to the second parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param symbol_third
+ * @param symbol_3
* The symbol string prepended to the third parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param first
+ * @param name_1
* The first parameter name.
- * @param second
+ * @param name_2
* The second parameter name.
- * @param third
+ * @param name_3
* The third parameter name, representing the "without" parameter.
* The first and second parameter must be specified the same amount of times without this parameter.
*
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_both_specified_same_amount_without_
- extern f_status_t fll_program_print_error_parameter_both_specified_same_amount_without(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t symbol_third, const f_string_static_t first, const f_string_static_t second, const f_string_static_t third);
+ extern f_status_t fll_program_print_error_parameter_both_specified_same_amount_without(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3);
#endif // _di_fll_program_print_error_parameter_both_specified_same_amount_without_
/**
* @param print
* The output structure.
* This locks, uses, and unlocks the file stream.
- * @param symbol_first
+ * @param symbol_1
* The symbol string prepended to the first parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param symbol_second
+ * @param symbol_2
* The symbol string prepended to the second parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param first
+ * @param name_1
* The first parameter name.
- * @param second
+ * @param name_2
* The second parameter name.
*
* @return
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_cannot_use_with_
- extern f_status_t fll_program_print_error_parameter_cannot_use_with(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t first, const f_string_static_t second);
+ extern f_status_t fll_program_print_error_parameter_cannot_use_with(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t name_1, const f_string_static_t name_2);
#endif // _di_fll_program_print_error_parameter_cannot_use_with_
/**
* @param print
* The output structure.
* This locks, uses, and unlocks the file stream.
- * @param symbol_first
+ * @param symbol_1
* The symbol string prepended to the first parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param symbol_second
+ * @param symbol_2
* The symbol string prepended to the second parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param symbol_third
+ * @param symbol_3
* The symbol string prepended to the second parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param first
+ * @param name_1
* The first parameter name (the parameter that cannot be used with the second parameter).
- * @param second
+ * @param name_2
* The second parameter name.
- * @param third
+ * @param name_3
* The third parameter name (the without parameter).
*
* @return
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_cannot_use_with_without_
- extern f_status_t fll_program_print_error_parameter_cannot_use_with_without(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t symbol_third, const f_string_static_t first, const f_string_static_t second, const f_string_static_t third);
+ extern f_status_t fll_program_print_error_parameter_cannot_use_with_without(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3);
#endif // _di_fll_program_print_error_parameter_cannot_use_with_without_
/**
* @param symbol
* The symbol string prepended to the first parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param parameter
+ * @param name
* The parameter name.
*
* @return
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_cannot_use_with_pipe_
- extern f_status_t fll_program_print_error_parameter_cannot_use_with_pipe(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter);
+ extern f_status_t fll_program_print_error_parameter_cannot_use_with_pipe(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
#endif // _di_fll_program_print_error_parameter_cannot_use_with_pipe_
/**
* @param print
* The output structure.
* This locks, uses, and unlocks the file stream.
- * @param symbol_first
+ * @param symbol_1
* The symbol string prepended to the first parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param symbol_second
+ * @param symbol_2
* The symbol string prepended to the second parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param symbol_third
+ * @param symbol_3
* The symbol string prepended to the third parameter.
* This is usually f_console_symbol_long_normal_s.
- * @param first
+ * @param name_1
* The first parameter name.
*
* This represents the parameter that imposes the exclusive or relation on the second and third parameters.
- * @param second
+ * @param name_2
* The second parameter name.
*
* This represents the parameter that is an exclusive or with the third parameter.
- * @param third
+ * @param name_3
* The second parameter name.
*
* This represents the parameter that is an exclusive or with the second parameter.
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_allows_either_xor_
- extern f_status_t fll_program_print_error_parameter_cannot_use_with_xor(const fl_print_t print, const f_string_static_t symbol_first, const f_string_static_t symbol_second, const f_string_static_t symbol_third, const f_string_static_t first, const f_string_static_t second, const f_string_static_t third);
+ extern f_status_t fll_program_print_error_parameter_cannot_use_with_xor(const fl_print_t print, const f_string_static_t symbol_1, const f_string_static_t symbol_2, const f_string_static_t symbol_3, const f_string_static_t name_1, const f_string_static_t name_2, const f_string_static_t name_3);
#endif // _di_fll_program_print_error_parameter_allows_either_xor_
/**
* The symbol string prepended to both parameters.
* This locks, uses, and unlocks the file stream.
* This is usually f_console_symbol_long_normal_s.
- * @param parameter
+ * @param name
* The parameter name.
* @param value
* The value.
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_integer_not_
- extern f_status_t fll_program_print_error_parameter_integer_not(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value);
+ extern f_status_t fll_program_print_error_parameter_integer_not(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
#endif // _di_fll_program_print_error_parameter_integer_not_
/**
* The symbol string prepended to both parameters.
* This locks, uses, and unlocks the file stream.
* This is usually f_console_symbol_long_normal_s.
- * @param parameter
+ * @param name
* The parameter name.
* @param value
* The value.
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_integer_not_negative_
- extern f_status_t fll_program_print_error_parameter_integer_not_negative(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value);
+ extern f_status_t fll_program_print_error_parameter_integer_not_negative(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
#endif // _di_fll_program_print_error_parameter_integer_not_negative_
/**
* The symbol string prepended to both parameters.
* This locks, uses, and unlocks the file stream.
* This is usually f_console_symbol_long_normal_s.
- * @param parameter
+ * @param name
* The parameter name.
* @param value
* The value.
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_integer_not_positive_
- extern f_status_t fll_program_print_error_parameter_integer_not_positive(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value);
+ extern f_status_t fll_program_print_error_parameter_integer_not_positive(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
#endif // _di_fll_program_print_error_parameter_integer_not_positive_
/**
* The symbol string prepended to both parameters.
* This locks, uses, and unlocks the file stream.
* This is usually f_console_symbol_long_normal_s.
- * @param parameter
+ * @param name
* The parameter name.
*
* @return
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_missing_value_
- f_status_t fll_program_print_error_parameter_missing_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter);
+ f_status_t fll_program_print_error_parameter_missing_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
#endif // _di_fll_program_print_error_parameter_missing_value_
/**
* The symbol string prepended to both parameters.
* This locks, uses, and unlocks the file stream.
* This is usually f_console_symbol_long_normal_s.
- * @param parameter
+ * @param name
* The parameter name.
* @param amount
* A string representing the amount of missing parameters.
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_missing_value_requires_amount_
- f_status_t fll_program_print_error_parameter_missing_value_requires_amount(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t amount);
+ f_status_t fll_program_print_error_parameter_missing_value_requires_amount(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t amount);
#endif // _di_fll_program_print_error_parameter_missing_value_requires_amount_
/**
* The symbol string prepended to both parameters.
* This locks, uses, and unlocks the file stream.
* This is usually f_console_symbol_long_normal_s.
- * @param parameter
+ * @param name
* The parameter name.
*
* @return
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_must_specify_once_
- extern f_status_t fll_program_print_error_parameter_must_specify_once(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter);
+ extern f_status_t fll_program_print_error_parameter_must_specify_once(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
#endif // _di_fll_program_print_error_parameter_must_specify_once_
/**
* The symbol string prepended to both parameters.
* This locks, uses, and unlocks the file stream.
* This is usually f_console_symbol_long_normal_s.
- * @param parameter
+ * @param name
* The parameter name.
* @param value
* The value.
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_must_specify_once_value_
- extern f_status_t fll_program_print_error_parameter_must_specify_once_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value);
+ extern f_status_t fll_program_print_error_parameter_must_specify_once_value(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value);
#endif // _di_fll_program_print_error_parameter_must_specify_once_value_
/**
* The symbol string prepended to both parameters.
* This locks, uses, and unlocks the file stream.
* This is usually f_console_symbol_long_normal_s.
- * @param parameter
+ * @param name
* The parameter name.
* @param value_start
* The range start value.
* F_output_not on success, but no printing is performed.
*/
#ifndef _di_fll_program_print_error_parameter_range_start_before_stop_
- extern f_status_t fll_program_print_error_parameter_range_start_before_stop(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t parameter, const f_string_static_t value_start, const f_string_static_t value_stop);
+ extern f_status_t fll_program_print_error_parameter_range_start_before_stop(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value_start, const f_string_static_t value_stop);
#endif // _di_fll_program_print_error_parameter_range_start_before_stop_
/**
+ * Print error message for when the parameter value is too long.
+ *
+ * @param print
+ * The output structure.
+ * This locks, uses, and unlocks the file stream.
+ * @param symbol
+ * The symbol string prepended to both parameters.
+ * This locks, uses, and unlocks the file stream.
+ * This is usually f_console_symbol_long_normal_s.
+ * @param name
+ * The parameter name.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fll_program_print_error_parameter_value_too_long_
+ extern f_status_t fll_program_print_error_parameter_value_too_long(const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
+#endif // _di_fll_program_print_error_parameter_value_too_long_
+
+/**
* Print a message about the pipe having an invalid form-feed character '\f' (U+000C).
*
* This is only printed when verbosity is not set to quiet.
"f_console_parameter_process",
"f_file_is",
"f_file_name_base",
+ "f_string_append",
"f_string_dynamic_append",
"f_string_dynamic_append_nulless",
+ "f_string_dynamic_increase_by",
"f_string_dynamic_mash",
"f_string_dynamic_resize",
+ "f_uint8s_increase_by",
+ "f_utf_is_word_dash_plus",
"fl_directory_copy",
"fll_execute_arguments_add",
"fll_execute_arguments_add_parameter_set",
"fll_execute_program",
+ "fll_program_parameter_process_context",
+ "fll_program_parameter_process_verbosity",
};
#endif // _di_fake_f_a_
fake_f_f_console_parameter_process_e,
fake_f_f_file_is_e,
fake_f_f_file_name_base_e,
+ fake_f_f_string_append_e,
fake_f_f_string_dynamic_append_e,
fake_f_f_string_dynamic_append_nulless_e,
+ fake_f_f_string_dynamic_increase_by_e,
fake_f_f_string_dynamic_mash_e,
fake_f_f_string_dynamic_resize_e,
+ fake_f_f_uint8s_increase_by_e,
+ fake_f_f_utf_is_word_dash_plus_e,
fake_f_fl_directory_copy_e,
fake_f_fll_execute_arguments_add_e,
fake_f_fll_execute_arguments_add_parameter_set_e,
fake_f_fll_execute_program_e,
+ fake_f_fll_program_parameter_process_context_e,
+ fake_f_fll_program_parameter_process_verbosity_e,
}; // enum
#endif // _di_fake_f_e_
const f_string_static_t fake_default_path_sources_s = macro_f_string_static_t_initialize(FAKE_default_path_sources_s, 0, FAKE_default_path_sources_s_length);
const f_string_static_t fake_default_path_work_s = macro_f_string_static_t_initialize(FAKE_default_path_work_s, 0, FAKE_default_path_work_s_length);
- const f_string_static_t fake_default_define_s = macro_f_string_static_t_initialize(FAKE_default_define_s, 0, FAKE_default_define_s_length);
const f_string_static_t fake_default_fakefile_s = macro_f_string_static_t_initialize(FAKE_default_fakefile_s, 0, FAKE_default_fakefile_s_length);
- const f_string_static_t fake_default_mode_s = macro_f_string_static_t_initialize(FAKE_default_mode_s, 0, FAKE_default_mode_s_length);
const f_string_static_t fake_default_process_s = macro_f_string_static_t_initialize(FAKE_default_process_s, 0, FAKE_default_process_s_length);
const f_string_static_t fake_default_settings_s = macro_f_string_static_t_initialize(FAKE_default_settings_s, 0, FAKE_default_settings_s_length);
#endif // _di_fake_default_s_
if (!setting) return F_status_set_error(F_parameter);
+ f_string_dynamic_resize(0, &setting->build);
+ f_string_dynamic_resize(0, &setting->data);
+ f_string_dynamic_resize(0, &setting->fakefile);
+ f_string_dynamic_resize(0, &setting->process);
+ f_string_dynamic_resize(0, &setting->settings);
+ f_string_dynamic_resize(0, &setting->sources);
+ f_string_dynamic_resize(0, &setting->work);
+ f_string_dynamic_resize(0, &setting->path_build);
+ f_string_dynamic_resize(0, &setting->path_build_documentation);
+ f_string_dynamic_resize(0, &setting->path_build_documents);
+ f_string_dynamic_resize(0, &setting->path_build_includes);
+ f_string_dynamic_resize(0, &setting->path_build_libraries);
+ f_string_dynamic_resize(0, &setting->path_build_libraries_script);
+ f_string_dynamic_resize(0, &setting->path_build_libraries_shared);
+ f_string_dynamic_resize(0, &setting->path_build_libraries_static);
+ f_string_dynamic_resize(0, &setting->path_build_objects);
+ f_string_dynamic_resize(0, &setting->path_build_objects_script);
+ f_string_dynamic_resize(0, &setting->path_build_objects_shared);
+ f_string_dynamic_resize(0, &setting->path_build_objects_static);
+ f_string_dynamic_resize(0, &setting->path_build_programs);
+ f_string_dynamic_resize(0, &setting->path_build_programs_script);
+ f_string_dynamic_resize(0, &setting->path_build_programs_shared);
+ f_string_dynamic_resize(0, &setting->path_build_programs_static);
+ f_string_dynamic_resize(0, &setting->path_build_settings);
+ f_string_dynamic_resize(0, &setting->path_build_stage);
+ f_string_dynamic_resize(0, &setting->path_data);
+ f_string_dynamic_resize(0, &setting->path_data_build);
+ f_string_dynamic_resize(0, &setting->path_data_documentation);
+ f_string_dynamic_resize(0, &setting->path_data_settings);
+ f_string_dynamic_resize(0, &setting->path_documents);
+ f_string_dynamic_resize(0, &setting->path_licenses);
+ f_string_dynamic_resize(0, &setting->path_sources);
+ f_string_dynamic_resize(0, &setting->path_work);
+ f_string_dynamic_resize(0, &setting->path_work_includes);
+ f_string_dynamic_resize(0, &setting->path_work_libraries);
+ f_string_dynamic_resize(0, &setting->path_work_libraries_script);
+ f_string_dynamic_resize(0, &setting->path_work_libraries_shared);
+ f_string_dynamic_resize(0, &setting->path_work_libraries_static);
+ f_string_dynamic_resize(0, &setting->path_work_programs);
+ f_string_dynamic_resize(0, &setting->path_work_programs_script);
+ f_string_dynamic_resize(0, &setting->path_work_programs_shared);
+ f_string_dynamic_resize(0, &setting->path_work_programs_static);
+ f_string_dynamic_resize(0, &setting->file_data_build_defines);
+ f_string_dynamic_resize(0, &setting->file_data_build_dependencies);
+ f_string_dynamic_resize(0, &setting->file_data_build_fakefile);
+ f_string_dynamic_resize(0, &setting->file_data_build_process_post);
+ f_string_dynamic_resize(0, &setting->file_data_build_process_pre);
+ f_string_dynamic_resize(0, &setting->file_data_build_settings);
+ f_string_dynamic_resize(0, &setting->file_documents_readme);
+
+ f_string_dynamics_resize(0, &setting->defines);
+ f_string_dynamics_resize(0, &setting->modes);
+
+ f_uint8s_resize(0, &setting->operations);
+
return F_none;
}
#endif // _di_fake_setting_delete_
setting->status = f_console_parameter_process(arguments, &main->parameters);
if (F_status_is_error(setting->status)) {
+
fake_print_line_first_locked(setting, main->error);
- fll_error_print(main->error, F_status_set_fine(setting->status), "f_console_parameter_process", F_true);
- fake_print_line_last_locked(setting, main->error);
+ fll_error_print(main->error, F_status_set_fine(setting->status), macro_fake_f(f_console_parameter_process), F_true);
return;
}
if (F_status_is_error(setting->status)) {
fake_print_line_first_locked(setting, main->error);
- fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_context", F_true);
- fake_print_line_last_locked(setting, main->error);
+ fll_error_print(main->error, F_status_set_fine(setting->status), macro_fake_f(fll_program_parameter_process_context), F_true);
return;
}
if (F_status_is_error(setting->status)) {
fake_print_line_first_locked(setting, main->error);
- fll_error_print(main->error, F_status_set_fine(setting->status), "fll_program_parameter_process_verbosity", F_true);
- fake_print_line_last_locked(setting, main->error);
+ fll_error_print(main->error, F_status_set_fine(setting->status), macro_fake_f(fll_program_parameter_process_verbosity), F_true);
return;
}
return;
}
- f_string_static_t * const args = main->parameters.arguments.array;
+ uint8_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t width_max = 0;
+ f_array_length_t index = 0;
+
+ {
+ const uint8_t enables[] = {
+ fake_parameter_documents_enable_e,
+ fake_parameter_shared_enable_e,
+ fake_parameter_static_enable_e,
+ };
+
+ const uint8_t disables[] = {
+ fake_parameter_documents_enable_e,
+ fake_parameter_shared_enable_e,
+ fake_parameter_static_enable_e,
+ };
+
+ const uint16_t flags[] = {
+ fake_main_flag_enable_documents_e,
+ fake_main_flag_enable_shared_e,
+ fake_main_flag_enable_static_e,
+ };
+
+ for (; i < 3; ++i) {
+
+ if (main->parameters.array[enables[i]].result & f_console_result_found_e) {
+ if (main->parameters.array[disables[i]].result & f_console_result_found_e) {
+ if (main->parameters.array[enables[i]].location < main->parameters.array[disables[i]].location) {
+ setting->flag -= setting->flag & flags[i];
+ }
+ else {
+ setting->flag |= flags[i];
+ }
+ }
+ else {
+ setting->flag |= flags[i];
+ }
+ }
+ else if (main->parameters.array[disables[i]].result & f_console_result_found_e) {
+ setting->flag -= setting->flag & flags[i];
+ }
+ } // for
+ }
+
+ {
+ const f_array_length_t parameters[] = {
+ fake_parameter_fakefile_e,
+ fake_parameter_mode_e,
+ fake_parameter_path_build_e,
+ fake_parameter_path_data_e,
+ fake_parameter_path_sources_e,
+ fake_parameter_path_work_e,
+ fake_parameter_process_e,
+ fake_parameter_settings_e,
+ fake_parameter_sources_e,
+ };
+
+ const f_string_static_t names[] = {
+ fake_long_fakefile_s,
+ fake_long_mode_s,
+ fake_long_path_build_s,
+ fake_long_path_data_s,
+ fake_long_path_sources_s,
+ fake_long_path_work_s,
+ fake_long_process_s,
+ fake_long_settings_s,
+ fake_long_sources_s,
+ };
+
+ const f_string_dynamic_t variable[] = {
+ &setting->fakefile,
+ &setting->mode,
+ &setting->path_build,
+ &setting->path_data,
+ &setting->path_sources,
+ &setting->path_work,
+ &setting->process,
+ &setting->settings,
+ &setting->sources,
+ };
+
+ bool validate_word[] = {
+ F_false, // fake_parameter_fakefile_e
+ F_false, // fake_parameter_mode_e
+ F_false, // fake_parameter_path_build_e
+ F_false, // fake_parameter_path_data_e
+ F_false, // fake_parameter_path_sources_e
+ F_false, // fake_parameter_path_work_e
+ F_true, // fake_parameter_process_e
+ F_false, // fake_parameter_settings_e
+ F_false, // fake_parameter_sources_e
+ };
+
+ f_string_static_t *defaults[] = {
+ &fake_default_fakefile_s, // fake_parameter_fakefile_e
+ 0, // fake_parameter_mode_e
+ 0, // fake_parameter_path_build_e
+ 0, // fake_parameter_path_data_e
+ 0, // fake_parameter_path_sources_e
+ 0, // fake_parameter_path_work_e
+ &fake_default_process_s, // fake_parameter_process_e
+ &fake_default_settings_s, // fake_parameter_settings_e
+ 0, // fake_parameter_sources_e
+ };
+
+ for (i = 0; i < 9; ++i) {
+
+ if (main->parameters.array[parameters[i]].result & f_console_result_found_e) {
+ setting->status = F_status_set_error(F_parameter);
+
+ fake_print_line_first_locked(setting, main->error);
+ fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, names[i]);
+
+ return;
+ }
+
+ if (main->parameters.array[parameters[i]].result & f_console_result_additional_e) {
+ index = data->main->parameters.array[parameters[i]].values.array[0];
+
+ if (data->main->parameters.arguments.array[index].used) {
+ if (validate_word[i]) {
+ width_max = 0;
+
+ for (j = 0; j < data->main->parameters.arguments.array[index].used; ++j) {
+
+ width_max = data->main->parameters.arguments.array[index].used - j;
+
+ status = f_utf_is_word_dash_plus(data->main->parameters.arguments.array[index].string + j, width_max, F_false);
+
+ if (F_status_is_error(status)) {
+ fll_error_print(data->main->error, F_status_set_fine(status), macro_fake_f(f_string_dynamic_increase_by), F_true);
+
+ if (fll_error_print(data->main->error, F_status_set_fine(status), macro_fake_f(f_utf_is_word_dash_plus), F_false) == F_known_not && data->main->error.verbosity > f_console_verbosity_quiet_e) {
+ f_file_stream_lock(data->main->error.to);
+
+ fl_print_format("%r%[%QFailed to process the parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+ fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_process_s, data->main->error.notable);
+ fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
+
+ f_file_stream_unlock(data->main->error.to);
+ }
+
+ return status;
+ }
+
+ if (status == F_false) {
+ if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
+ f_file_stream_lock(data->main->error.to);
+
+ fl_print_format("%r%[%QThe '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+ fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, fake_long_process_s, data->main->error.notable);
+ fl_print_format("%[' parameters value '%]", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
+ fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, data->main->parameters.arguments.array[index], data->main->error.notable);
+ fl_print_format("%[' contains non-word, non-dash, and non-plus characters.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
+
+ f_file_stream_unlock(data->main->error.to);
+ }
+
+ return F_status_set_error(F_parameter);
+ }
+ } // for
+ }
+
+ status = f_string_dynamic_increase_by(data->main->parameters.arguments.array[index].used + 1, parameters_value[i]);
+
+ if (F_status_is_error(status)) {
+ fll_error_print(data->main->error, F_status_set_fine(status), macro_fake_f(f_string_dynamic_increase_by), F_true);
+
+ return status;
+ }
+
+ setting->status = f_string_dynamic_append(data->main->parameters.arguments.array[index], parameters_value[i]);
+
+ if (F_status_is_error(setting->status)) {
+ if (status == F_status_set_error(F_string_too_large)) {
+ if (print.verbosity < f_console_verbosity_normal_e) {
+ fake_print_line_first_locked(setting, main->error);
+ fake_print_error_parameter_value_too_long(data->main->error, f_console_symbol_long_normal_s, names[i]);
+ }
+ }
+ else {
+ fll_error_print(data->main->error, F_status_set_fine(status), macro_fake_f(f_string_append), F_true);
+ }
+
+ return;
+ }
+
+ status = F_none;
+ }
+ }
+ else if (defaults[i]) {
+ }
+ } // for
+ }
+
+ // @todo define (multi valued map)
+ if (main->parameters.array[fake_parameter_define_e].result & f_console_result_found_e) {
+ setting->status = F_status_set_error(F_parameter);
+
+ fake_print_line_first_locked(setting, main->error);
+ fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fake_long_define_s);
+
+ return;
+ }
+
+ //f_string_static_t * const args = main->parameters.arguments.array;
- //if (main->parameters.array[fake_parameter_strip_invalid_e].result & f_console_result_found_e) {
- // setting->flag |= fake_main_flag_strip_invalid_e;
- //}
+ /*
+ * fake_process_console_parameters
+ fake_parameter_operation_build_e,
+ fake_parameter_operation_clean_e,
+ fake_parameter_operation_make_e,
+ fake_parameter_operation_skeleton_e,
+ */
+
+ f_array_length_t operations_length = main->parameters.array[fake_parameter_operation_build_e].locations.used;
+
+ operations_length += main->parameters.array[fake_parameter_operation_clean_e].locations.used;
+ operations_length += main->parameters.array[fake_parameter_operation_make_e].locations.used;
+ operations_length += main->parameters.array[fake_parameter_operation_skeleton_e].locations.used;
+
+ setting->operations.used = 0;
+
+ setting->status = f_uint8s_increase_by(operations_length ? operations_length : 1, &setting->operations);
+
+ if (F_status_is_error(setting->status)) {
+ fake_print_error(setting, main->error, macro_fake_f(f_uint8s_increase_by));
+
+ return;
+ }
+
+ // Ensure the default operation always exists.
+ if (operations_length) {
+ data.flag |= fake_data_flag_operation_e;
+ }
+ else {
+ setting->status = f_uint8s_increase_by(1, &setting->operations);
+
+ if (F_status_is_error(status)) {
+ fake_print_error(setting, main->error, macro_fake_f(f_uint8s_increase_by));
+
+ return;
+ }
+ }
}
#endif // _di_fake_setting_load_
#define FAKE_default_path_sources_s "sources" F_path_separator_s
#define FAKE_default_path_work_s ""
- #define FAKE_default_define_s ""
#define FAKE_default_fakefile_s "fakefile"
- #define FAKE_default_mode_s ""
#define FAKE_default_process_s ""
#define FAKE_default_settings_s "settings"
#define FAKE_default_path_sources_s_length 7 + F_path_separator_s_length
#define FAKE_default_path_work_s_length 0
- #define FAKE_default_define_s_length 0
#define FAKE_default_fakefile_s_length 8
- #define FAKE_default_mode_s_length 0
#define FAKE_default_process_s_length 0
#define FAKE_default_settings_s_length 8
extern const f_string_static_t fake_default_path_sources_s;
extern const f_string_static_t fake_default_path_work_s;
- extern const f_string_static_t fake_default_define_s;
extern const f_string_static_t fake_default_fakefile_s;
- extern const f_string_static_t fake_default_mode_s;
extern const f_string_static_t fake_default_process_s;
extern const f_string_static_t fake_default_settings_s;
#endif // _di_fake_default_s_
fake_parameter_path_sources_e,
fake_parameter_path_work_e,
- fake_parameter_documents_disabled_e,
- fake_parameter_documents_enabled_e,
- fake_parameter_shared_disabled_e,
- fake_parameter_shared_enabled_e,
- fake_parameter_static_disabled_e,
- fake_parameter_static_enabled_e,
+ fake_parameter_documents_disable_e,
+ fake_parameter_documents_enable_e,
+ fake_parameter_shared_disable_e,
+ fake_parameter_shared_enable_e,
+ fake_parameter_static_disable_e,
+ fake_parameter_static_enable_e,
fake_parameter_operation_build_e,
fake_parameter_operation_clean_e,
* Flags passed to the main function or program.
*
* fake_main_flag_*_e:
- * - none: No flags set.
- * - file_from: Using a specified source file.
- * - file_to: Using a specified destination file.
- * - header: Enable printing of headers.
- * - help: Print help.
- * - separate: Enable printing of separators.
- * - strip_invalid: Using strip invalid character mode.
- * - verify: Using verify mode.
- * - version: Print version.
+ * - none: No flags set.
+ * - enable_documents: Enable documents, as-in --enable-doc (not specifying means --disable-doc).
+ * - enable_shared: Enable shared, as-in --enable-shared (not specifying means --disable-shared).
+ * - enable_static: Enable static, as-in --enable-static (not specifying means --disable-static).
+ * - file_from: Using a specified source file.
+ * - file_to: Using a specified destination file.
+ * - header: Enable printing of headers.
+ * - help: Print help.
+ * - separate: Enable printing of separators.
+ * - strip_invalid: Using strip invalid character mode.
+ * - verify: Using verify mode.
+ * - version: Print version.
*/
#ifndef _di_fake_main_flag_e_
enum {
- fake_main_flag_none_e = 0x0,
- fake_main_flag_file_from_e = 0x1,
- fake_main_flag_file_to_e = 0x2,
- fake_main_flag_header_e = 0x4,
- fake_main_flag_help_e = 0x8,
- fake_main_flag_separate_e = 0x10,
- fake_main_flag_strip_invalid_e = 0x20,
- fake_main_flag_verify_e = 0x40,
- fake_main_flag_version_e = 0x80,
+ fake_main_flag_none_e = 0x0,
+ fake_main_flag_enable_documents_e = 0x1,
+ fake_main_flag_enable_shared_e = 0x2,
+ fake_main_flag_enable_static_e = 0x4,
+ fake_main_flag_file_from_e = 0x8,
+ fake_main_flag_file_to_e = 0x10,
+ fake_main_flag_header_e = 0x20,
+ fake_main_flag_help_e = 0x40,
+ fake_main_flag_separate_e = 0x80,
+ fake_main_flag_strip_invalid_e = 0x100,
+ fake_main_flag_verify_e = 0x200,
+ fake_main_flag_version_e = 0x400,
}; // enum
#endif // _di_fake_main_flag_e_
*
* line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
* line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
+ *
+ * build: The build directory.
+ * data: The data directory.
+ * fakefile: The fakefile file path.
+ * process: The process name.
+ * settings: The settings file path.
+ * sources: The sources directory.
+ * work: The work directory.
+ *
+ * path_build: The build path.
+ * path_build_documentation: The build documentation path.
+ * path_build_documents: The build documents path.
+ * path_build_includes: The build includes path.
+ * path_build_libraries: The build libraries path.
+ * path_build_libraries_script: The build libraries_script path.
+ * path_build_libraries_shared: The build libraries_shared path.
+ * path_build_libraries_static: The build libraries_static path.
+ * path_build_objects: The build objects path.
+ * path_build_objects_script: The build objects_script path.
+ * path_build_objects_shared: The build objects_shared path.
+ * path_build_objects_static: The build objects_static path.
+ * path_build_programs: The build programs path.
+ * path_build_programs_script: The build programs_script path.
+ * path_build_programs_shared: The build programs_shared path.
+ * path_build_programs_static: The build programs_static path.
+ * path_build_settings: The build settings path.
+ * path_build_stage: The build stage path.
+ *
+ * path_data: The data path.
+ * path_data_build: The build data path.
+ * path_data_documentation: The documentation data path.
+ * path_data_settings: The settings data path.
+ *
+ * path_documents: The documents path.
+ * path_licenses: The licenses path.
+ * path_sources: The sources path.
+ *
+ * path_work: The work path.
+ * path_work_includes: The includes work path.
+ * path_work_libraries: The libraries work path.
+ * path_work_libraries_script: The libraries_script work path.
+ * path_work_libraries_shared: The libraries_shared work path.
+ * path_work_libraries_static: The libraries_static work path.
+ * path_work_programs: The programs work path.
+ * path_work_programs_script: The programs_script work path.
+ * path_work_programs_shared: The programs_shared work path.
+ * path_work_programs_static: The programs_static work path.
+ *
+ * file_data_build_defines: The defines build file data.
+ * file_data_build_dependencies: The dependencies build file data.
+ * file_data_build_fakefile: The fakefile build file data.
+ * file_data_build_process_post: The process_post_s build file data.
+ * file_data_build_process_pre: The process_pre_s build file data.
+ * file_data_build_settings: The settings build file data.
+ *
+ * file_documents_readme: The documents readme file data.
+
+ * defines: The define data.
+ * modes: The mode data.
+ *
+ * operations: The operations, in the order in which they are given.
*/
#ifndef _di_fake_setting_t_
typedef struct {
f_string_static_t line_first;
f_string_static_t line_last;
+
+ f_string_dynamic_t build;
+ f_string_dynamic_t data;
+ f_string_dynamic_t fakefile;
+ f_string_dynamic_t process;
+ f_string_dynamic_t settings;
+ f_string_dynamic_t sources;
+ f_string_dynamic_t work;
+
+ f_string_dynamic_t path_build;
+ f_string_dynamic_t path_build_documentation;
+ f_string_dynamic_t path_build_documents;
+ f_string_dynamic_t path_build_includes;
+ f_string_dynamic_t path_build_libraries;
+ f_string_dynamic_t path_build_libraries_script;
+ f_string_dynamic_t path_build_libraries_shared;
+ f_string_dynamic_t path_build_libraries_static;
+ f_string_dynamic_t path_build_objects;
+ f_string_dynamic_t path_build_objects_script;
+ f_string_dynamic_t path_build_objects_shared;
+ f_string_dynamic_t path_build_objects_static;
+ f_string_dynamic_t path_build_programs;
+ f_string_dynamic_t path_build_programs_script;
+ f_string_dynamic_t path_build_programs_shared;
+ f_string_dynamic_t path_build_programs_static;
+ f_string_dynamic_t path_build_settings;
+ f_string_dynamic_t path_build_stage;
+
+ f_string_dynamic_t path_data;
+ f_string_dynamic_t path_data_build;
+ f_string_dynamic_t path_data_documentation;
+ f_string_dynamic_t path_data_settings;
+
+ f_string_dynamic_t path_documents;
+
+ f_string_dynamic_t path_licenses;
+
+ f_string_dynamic_t path_sources;
+
+ f_string_dynamic_t path_work;
+ f_string_dynamic_t path_work_includes;
+ f_string_dynamic_t path_work_libraries;
+ f_string_dynamic_t path_work_libraries_script;
+ f_string_dynamic_t path_work_libraries_shared;
+ f_string_dynamic_t path_work_libraries_static;
+ f_string_dynamic_t path_work_programs;
+ f_string_dynamic_t path_work_programs_script;
+ f_string_dynamic_t path_work_programs_shared;
+ f_string_dynamic_t path_work_programs_static;
+
+ // @fixme there is overlap here with setting->fakefile and similar.
+ f_string_dynamic_t file_data_build_defines;
+ f_string_dynamic_t file_data_build_dependencies;
+ f_string_dynamic_t file_data_build_fakefile;
+ f_string_dynamic_t file_data_build_process_post;
+ f_string_dynamic_t file_data_build_process_pre;
+ f_string_dynamic_t file_data_build_settings;
+
+ f_string_dynamic_t file_documents_readme;
+
+ f_string_dynamics_t defines; // @todo conside instead: f_string_maps_t defines;
+ f_string_dynamics_t modes;
+
+ f_uint8s_t operations;
} fake_setting_t;
#define fake_setting_t_initialize \
F_none, \
f_string_static_t_initialize, \
f_string_static_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_uint8s_t_initialize, \
}
#endif // _di_fake_setting_t_
#ifndef _di_fake_main_
void fake_main(fll_program_data_t * const main, fake_setting_t * const setting) {
- if (!main || !setting || F_status_is_error(setting->status)) return;
+ if (!main || !setting) return;
+
+ if (F_status_is_error(setting->status)) {
+ fake_print_line_last_locked(setting, main->error);
+
+ return;
+ }
setting->status = F_none;
}
}
- if (setting->status != F_child) {
- if (F_status_is_error(setting->status)) {
- fake_print_line_last_locked(setting, main->error);
- }
- else if (setting->status != F_interrupt) {
- fake_print_line_last_locked(setting, main->message);
- }
+ if (F_status_is_error(setting->status)) {
+ fake_print_line_last_locked(setting, main->error);
+ }
+ else if (setting->status != F_interrupt && setting->status != F_child) {
+ fake_print_line_last_locked(setting, main->message);
}
fake_data_delete(&data);
fll_program_data_t data = fll_program_data_t_initialize;
fake_setting_t setting = fake_setting_t_initialize;
+ setting.flag |= fake_main_flag_enable_documents_e;
+ setting.flag |= fake_main_flag_enable_shared_e;
+ setting.flag |= fake_main_flag_enable_static_e;
f_console_parameter_t parameters[] = fake_console_parameter_t_initialize;
data.parameters.array = parameters;
}
#endif // _di_fake_print_error_parameter_operation_not_with_
+#ifndef _di_fake_print_error_parameter_value_too_long_
+ f_status_t fake_print_error_parameter_value_too_long(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
+
+ if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
+
+ if (!F_status_is_error(setting->status)) {
+ if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+ }
+
+ f_file_stream_lock(print.to);
+
+ fake_print_line_first_unlocked(setting, print);
+
+ fl_print_format("%[%QThe value '%]", print.to, print.context, print.prefix, print.context);
+ fl_print_format("%[%Q%]", print.to, print.notable, value, print.notable);
+ fl_print_format("%[' for the parameter '%]", print.to, print.context, print.prefix, print.context);
+ fl_print_format("%[%Q%Q%]", print.to, print.notable, symbol, name, print.notable);
+ fl_print_format("%[' is too long.%]%r", print.to, print.context, print.context, f_string_eol_s);
+
+ f_file_stream_unlock(print.to);
+
+ return F_none;
+ }
+#endif // _di_fake_print_error_parameter_too_value_long_
+
#ifndef _di_fake_print_help_
f_status_t fake_print_help(fake_setting_t * const setting, const fl_print_t print) {
* @param print
* Designates the how and where to print.
* @param operation_1
- * The symbol for the operation that cannot be used.
+ * The name of the first operation that cannot be used.
* @param operation_2
- * The second operation that cannot be used.
+ * The name of the second operation that cannot be used.
*
* @return
* F_none on success.
#endif // _di_fake_print_error_parameter_operation_not_with_
/**
+ * Print error message for when the parameter value is too long.
+ *
+ * @param setting
+ * The main program settings.
+ *
+ * This does not alter setting.status.
+ * @param print
+ * Designates the how and where to print.
+ * @param symbol
+ * The symbol of the parameter.
+ * @param name
+ * The name of the parameter.
+ * @param value
+ * The value that is too long.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fake_print_error_parameter_value_too_long_
+ extern f_status_t fake_print_error_parameter_value_too_long(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
+#endif // _di_fake_print_error_parameter_too_value_long_
+
+/**
* Print help.
*
* @param setting
}
}
- if (data->main->parameters.array[fake_parameter_shared_disabled_e].result & f_console_result_found_e) {
- if (data->main->parameters.array[fake_parameter_shared_enabled_e].result & f_console_result_found_e) {
- if (data->main->parameters.array[fake_parameter_shared_enabled_e].location > data->main->parameters.array[fake_parameter_shared_disabled_e].location) {
+ if (data->main->parameters.array[fake_parameter_shared_disable_e].result & f_console_result_found_e) {
+ if (data->main->parameters.array[fake_parameter_shared_enable_e].result & f_console_result_found_e) {
+ if (data->main->parameters.array[fake_parameter_shared_enable_e].location > data->main->parameters.array[fake_parameter_shared_disable_e].location) {
setting->build_shared = F_true;
setting->search_shared = F_true;
}
setting->search_shared = F_false;
}
}
- else if (data->main->parameters.array[fake_parameter_shared_enabled_e].result & f_console_result_found_e) {
+ else if (data->main->parameters.array[fake_parameter_shared_enable_e].result & f_console_result_found_e) {
setting->build_shared = F_true;
setting->search_shared = F_true;
}
- if (data->main->parameters.array[fake_parameter_static_disabled_e].result & f_console_result_found_e) {
- if (data->main->parameters.array[fake_parameter_static_enabled_e].result & f_console_result_found_e) {
- if (data->main->parameters.array[fake_parameter_static_enabled_e].location > data->main->parameters.array[fake_parameter_static_disabled_e].location) {
+ if (data->main->parameters.array[fake_parameter_static_disable_e].result & f_console_result_found_e) {
+ if (data->main->parameters.array[fake_parameter_static_enable_e].result & f_console_result_found_e) {
+ if (data->main->parameters.array[fake_parameter_static_enable_e].location > data->main->parameters.array[fake_parameter_static_disable_e].location) {
setting->build_static = F_true;
setting->search_static = F_true;
}
setting->search_static = F_false;
}
}
- else if (data->main->parameters.array[fake_parameter_static_enabled_e].result & f_console_result_found_e) {
+ else if (data->main->parameters.array[fake_parameter_static_enable_e].result & f_console_result_found_e) {
setting->build_static = F_true;
setting->search_static = F_true;
}
*
* flag: A set of flags, such as designating that no operations are provided.
* operation: A code representing the currrent operation.
- *
- * fakefile: The fakefile data.
- * process: The process data.
- * settings: The settings data.
- *
- * path_build: The build path.
- * path_build_documentation: The build documentation path.
- * path_build_documents: The build documents path.
- * path_build_includes: The build includes path.
- * path_build_libraries: The build libraries path.
- * path_build_libraries_script: The build libraries_script path.
- * path_build_libraries_shared: The build libraries_shared path.
- * path_build_libraries_static: The build libraries_static path.
- * path_build_objects: The build objects path.
- * path_build_objects_script: The build objects_script path.
- * path_build_objects_shared: The build objects_shared path.
- * path_build_objects_static: The build objects_static path.
- * path_build_programs: The build programs path.
- * path_build_programs_script: The build programs_script path.
- * path_build_programs_shared: The build programs_shared path.
- * path_build_programs_static: The build programs_static path.
- * path_build_settings: The build settings path.
- * path_build_stage: The build stage path.
- *
- * path_data: The data path.
- * path_data_build: The build data path.
- * path_data_documentation: The documentation data path.
- * path_data_settings: The settings data path.
- *
- * path_documents: The documents path.
- * path_licenses: The licenses path.
- * path_sources: The sources path.
- *
- * path_work: The work path.
- * path_work_includes: The includes work path.
- * path_work_libraries: The libraries work path.
- * path_work_libraries_script: The libraries_script work path.
- * path_work_libraries_shared: The libraries_shared work path.
- * path_work_libraries_static: The libraries_static work path.
- * path_work_programs: The programs work path.
- * path_work_programs_script: The programs_script work path.
- * path_work_programs_shared: The programs_shared work path.
- * path_work_programs_static: The programs_static work path.
- *
- * file_data_build_defines: The defines build file data.
- * file_data_build_dependencies: The dependencies build file data.
- * file_data_build_fakefile: The fakefile build file data.
- * file_data_build_process_post: The process_post_s build file data.
- * file_data_build_process_pre: The process_pre_s build file data.
- * file_data_build_settings: The settings build file data.
- *
- * file_documents_readme: The documents readme file data.
-
- * define: The define data.
- * mode: The mode data.
*/
#ifndef _di_fake_data_t_
typedef struct {
uint8_t flag;
uint8_t operation;
-
- f_string_dynamic_t fakefile;
- f_string_dynamic_t process;
- f_string_dynamic_t settings;
-
- f_string_dynamic_t path_build;
- f_string_dynamic_t path_build_documentation;
- f_string_dynamic_t path_build_documents;
- f_string_dynamic_t path_build_includes;
- f_string_dynamic_t path_build_libraries;
- f_string_dynamic_t path_build_libraries_script;
- f_string_dynamic_t path_build_libraries_shared;
- f_string_dynamic_t path_build_libraries_static;
- f_string_dynamic_t path_build_objects;
- f_string_dynamic_t path_build_objects_script;
- f_string_dynamic_t path_build_objects_shared;
- f_string_dynamic_t path_build_objects_static;
- f_string_dynamic_t path_build_programs;
- f_string_dynamic_t path_build_programs_script;
- f_string_dynamic_t path_build_programs_shared;
- f_string_dynamic_t path_build_programs_static;
- f_string_dynamic_t path_build_settings;
- f_string_dynamic_t path_build_stage;
-
- f_string_dynamic_t path_data;
- f_string_dynamic_t path_data_build;
- f_string_dynamic_t path_data_documentation;
- f_string_dynamic_t path_data_settings;
-
- f_string_dynamic_t path_documents;
-
- f_string_dynamic_t path_licenses;
-
- f_string_dynamic_t path_sources;
-
- f_string_dynamic_t path_work;
- f_string_dynamic_t path_work_includes;
- f_string_dynamic_t path_work_libraries;
- f_string_dynamic_t path_work_libraries_script;
- f_string_dynamic_t path_work_libraries_shared;
- f_string_dynamic_t path_work_libraries_static;
- f_string_dynamic_t path_work_programs;
- f_string_dynamic_t path_work_programs_script;
- f_string_dynamic_t path_work_programs_shared;
- f_string_dynamic_t path_work_programs_static;
-
- f_string_dynamic_t file_data_build_defines;
- f_string_dynamic_t file_data_build_dependencies;
- f_string_dynamic_t file_data_build_fakefile;
- f_string_dynamic_t file_data_build_process_post;
- f_string_dynamic_t file_data_build_process_pre;
- f_string_dynamic_t file_data_build_settings;
-
- f_string_dynamic_t file_documents_readme;
-
- f_string_dynamics_t define;
- f_string_dynamics_t mode;
} fake_data_t;
#define fake_data_t_initialize \
0, \
0, \
0, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
}
#endif // _di_fake_main_t_
}
#endif // _di_fake_pipe_buffer_
+// @todo move this into the common.
#ifndef _di_fake_process_console_parameters_
f_status_t fake_process_console_parameters(fake_data_t * const data) {
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(macro_fss_write_setting(setting), main->error);
fss_write_print_error_unsupported_eol(macro_fss_write_setting(setting), main->error);
- fss_write_print_line_last_locked(macro_fss_write_setting(setting), main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_must_specify_once(main->error, f_console_symbol_long_normal_s, fss_write_long_file_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_file_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_object_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_content_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_prepend_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, fss_write_string_two_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
if (F_status_is_error(setting->status)) {
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
if (F_status_is_error(setting->status)) {
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
main->parameters.arguments.array[values_ignore->array[i - 1]],
main->parameters.arguments.array[index]
);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
if (F_status_is_error(setting->status)) {
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
if (F_status_is_error(setting->status)) {
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->parameters.arguments.array[index]);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
main->parameters.arguments.array[main->parameters.array[fss_write_parameter_ignore_e].values.array[i - 1]],
main->parameters.arguments.array[index]
);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_ignore_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_long_partial_s
);
- fss_write_print_line_last_locked(setting, main->error);
-
return;
}
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][0]);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][1]);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_object_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_content_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with_xor(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_write_long_partial_s, fss_write_long_object_s, fss_write_long_content_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
#ifndef _di_fss_write_main_
void fss_write_main(fll_program_data_t * const main, fss_write_setting_t * const setting) {
- if (!main || !setting || F_status_is_error(setting->status)) return;
+ if (!main || !setting) return;
+
+ if (F_status_is_error(setting->status)) {
+ fss_write_print_line_last_locked(setting, main->error);
+
+ return;
+ }
setting->status = F_none;
if (main->pipe & fll_program_data_pipe_input_e) {
if (setting->process_pipe) {
setting->process_pipe(main, setting);
- if (F_status_is_error(setting->status)) return;
}
}
- if (setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e | fss_write_flag_object_open_e | fss_write_flag_content_next_e | fss_write_flag_content_end_e)) {
- if (setting->process_normal) {
- setting->process_normal(main, (void *) setting);
- if (F_status_is_error(setting->status)) return;
+ if (F_status_is_error_not(setting->status)) {
+ if (setting->flag & (fss_write_flag_object_e | fss_write_flag_content_e | fss_write_flag_object_open_e | fss_write_flag_content_next_e | fss_write_flag_content_end_e)) {
+ if (setting->process_normal) {
+ setting->process_normal(main, (void *) setting);
+ }
}
}
- // Ensure a new line is always put at the end of the program execution.
- fss_write_print_line_last_locked(setting, main->message);
+ if (F_status_is_error(setting->status)) {
+ fss_write_print_line_last_locked(setting, main->error);
+ }
+ else if (setting->status != F_interrupt) {
+ fss_write_print_line_last_locked(setting, main->message);
+ }
}
#endif // _di_fss_write_main_
if (setting->flag & fss_write_flag_help_e) {
fss_write_main_process_help(main, setting);
}
- else {
- fss_write_print_line_last_locked(setting, main->error);
- }
return;
}
fss_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, fss_write_long_as_s);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, print);
fll_error_print(print, F_status_set_fine(setting->status), function, F_true);
- fss_write_print_line_last_locked(setting, print);
return F_none;
}
fss_write_print_line_first_locked(setting, print);
fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type);
- fss_write_print_line_last_locked(setting, print);
return F_none;
}
fl_print_format("%[' parameter at least the same number of times when not specifying the '%]", print.to, print.context, print.context);
fl_print_format("%[%r%r%]", print.to, print.notable, f_console_symbol_long_normal_s, fss_write_long_partial_s, print.notable);
fl_print_format("%[' parameter.%]%r", print.to, print.context, print.context, f_string_eol_s);
- fss_write_print_line_last_unlocked(setting, print);
f_file_stream_unlock(print.to);
fl_print_format("%[%QThe%] ", print.to, print.context, print.prefix, print.context);
fl_print_format("%[%r%]", print.to, print.notable, setting->standard, print.notable);
fl_print_format(" %[standard only supports one Content per Object.%]%r", print.to, print.context, print.context, f_string_eol_s);
- fss_write_print_line_last_unlocked(setting, print);
f_file_stream_unlock(print.to);
fl_print_format("%[%QThe%] ", print.to, print.context, print.prefix, print.context);
fl_print_format("%[%r%]", print.to, print.notable, setting->standard, print.notable);
fl_print_format(" %[standard does not support end of line character '%]", print.to, print.context, print.context);
- fss_write_print_line_last_unlocked(setting, print);
-
fl_print_format("%[\\n%]", print.to, print.set->notable, print.set->notable);
fl_print_format("%[' (%]", print.to, print.set->error, print.set->error);
fl_print_format("%[U+000A%]", print.to, print.set->notable, print.set->notable);
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_locked(setting, main->error);
fss_write_print_error_unsupported_eol(setting, main->error);
- fss_write_print_line_last_locked(setting, main->error);
return;
}
fss_write_print_line_first_unlocked(setting, print);
fl_print_format("%[%QThe payload may only be specified last.%]%r", print.to, print.set->error, print.prefix, print.set->error, f_string_eol_s);
- fss_write_print_line_last_unlocked(setting, print);
f_file_stream_unlock(print.to);
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_missing_file(main->error);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_at_s, iki_read_long_whole_s);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, iki_read_long_at_s, main->parameters.arguments.array[index]);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_read_long_at_s);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_integer_not(main->error, f_console_symbol_long_normal_s, iki_read_long_line_s, main->parameters.arguments.array[index]);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_read_long_line_s);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_read_long_name_s);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, iki_read_long_replace_s, iki_read_string_two_s);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, iki_read_long_wrap_s, iki_read_string_three_s);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_literal_s, names[i]);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_object_s, names[i]);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_content_s, iki_read_long_total_s);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_total_s, iki_read_long_wrap_s);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
if (F_status_is_error(setting->status)) {
iki_read_print_line_first_locked(setting, main->error);
fll_error_file_print(main->error, F_status_set_fine(setting->status), "f_file_exists", F_true, setting->files.array[setting->files.used], f_file_operation_verify_s, fll_error_file_type_file_e);
- iki_read_print_line_last_locked(setting, main->error);
return;
}
iki_read_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value_requires_amount(main->error, f_console_symbol_long_normal_s, name, iki_read_string_three_s);
- iki_read_print_line_last_locked(setting, main->error);
return F_false;
}
#ifndef _di_iki_read_main_
void iki_read_main(fll_program_data_t * const main, iki_read_setting_t * const setting) {
- if (!main || !setting || F_status_is_error(setting->status)) return;
+ if (!main || !setting) return;
+
+ if (F_status_is_error(setting->status)) {
+ iki_read_print_line_last_locked(setting, main->error);
+
+ return;
+ }
setting->status = F_none;
}
else {
iki_read_process_buffer(main, setting);
- if (F_status_is_error(setting->status)) return;
}
}
- if (setting->files.used) {
+ if (F_status_is_error_not(setting->status) && setting->files.used) {
f_file_t file = f_file_t_initialize;
off_t size_block = 0;
off_t size_file = 0;
setting->status = F_status_set_error(F_interrupt);
- return;
+ break;
}
main->signal_check = 0;
if (F_status_is_error(setting->status)) {
iki_read_print_error_file(setting, main->error, macro_iki_read_f(f_file_stream_open), setting->files.array[i], f_file_operation_process_s, fll_error_file_type_file_e);
- return;
+ break;
}
setting->status = f_file_descriptor(&file);
if (F_status_is_error(setting->status)) {
iki_read_print_error_file(setting, main->error, macro_iki_read_f(f_file_descriptor), setting->files.array[i], f_file_operation_process_s, fll_error_file_type_file_e);
- return;
+ break;
}
size_file = 0;
f_file_stream_close(&file);
iki_read_process_buffer(main, setting);
- if (F_status_is_error(setting->status)) return;
+ if (F_status_is_error(setting->status)) break;
setting->buffer.used = 0;
} // for
if (F_status_is_error(setting->status)) {
f_file_stream_flush(file);
f_file_stream_close(&file);
-
- return;
}
}
- // Ensure a new line is always put at the end of the program execution.
- iki_read_print_line_last_locked(setting, main->message);
+ if (F_status_is_error(setting->status)) {
+ iki_read_print_line_last_locked(setting, main->error);
+ }
+ else if (setting->status != F_interrupt) {
+ iki_read_print_line_last_locked(setting, main->message);
+ }
}
#endif // _di_iki_read_main_
iki_read_print_line_first_locked(setting, print);
fll_error_print(print, F_status_set_fine(setting->status), function, F_true);
- iki_read_print_line_last_locked(setting, print);
return F_none;
}
iki_read_print_line_first_locked(setting, print);
fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type);
- iki_read_print_line_last_locked(setting, print);
return F_none;
}
iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_must_specify_once(main->error, f_console_symbol_long_normal_s, iki_write_long_file_s);
- iki_write_print_line_last_locked(setting, main->error);
return;
}
if (F_status_is_error(setting->status)) {
iki_write_print_line_first_locked(setting, main->error);
fll_error_file_print(main->error, F_status_set_fine(setting->status), "f_file_stream_open", F_true, main->parameters.arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e);
- iki_write_print_line_last_locked(setting, main->error);
return;
}
iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_write_long_file_s);
- iki_write_print_line_last_locked(setting, main->error);
return;
}
iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_write_long_object_s);
- iki_write_print_line_last_locked(setting, main->error);
return;
}
iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, iki_write_long_content_s);
- iki_write_print_line_last_locked(setting, main->error);
return;
}
iki_write_print_line_first_locked(setting, main->error);
iki_write_print_error_main_missing(setting, main->error);
- iki_write_print_line_last_locked(setting, main->error);
return;
}
#ifndef _di_iki_write_main_
void iki_write_main(fll_program_data_t * const main, iki_write_setting_t * const setting) {
- if (!main || !setting || F_status_is_error(setting->status)) return;
+ if (!main || !setting) return;
+
+ if (F_status_is_error(setting->status)) {
+ iki_write_print_line_last_locked(setting, main->error);
+
+ return;
+ }
setting->status = F_none;
if (fll_program_standard_signal_received(main)) {
setting->status = F_status_set_error(F_interrupt);
- return;
+ break;
}
main->signal_check = 0;
}
iki_write_process(main, setting, setting->objects.array[i], setting->contents.array[i]);
- if (F_status_is_error(setting->status)) return;
+ if (F_status_is_error(setting->status)) break;
fll_print_dynamic_raw(f_string_eol_s, main->output.to);
} // for
- // Ensure a new line is always put at the end of the program execution.
- iki_write_print_line_last_locked(setting, main->message);
+ if (F_status_is_error(setting->status)) {
+ iki_write_print_line_last_locked(setting, main->error);
+ }
+ else if (setting->status != F_interrupt) {
+ iki_write_print_line_last_locked(setting, main->message);
+ }
}
#endif // _di_iki_write_main_
iki_write_print_line_first_locked(setting, print);
fll_error_print(print, F_status_set_fine(setting->status), function, F_true);
- iki_write_print_line_last_locked(setting, print);
return F_none;
}
iki_write_print_line_first_locked(setting, print);
fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type);
- iki_write_print_line_last_locked(setting, print);
return F_none;
}
fl_print_format("%[%Q%]", print.to, print.set->notable, object, print.set->notable);
fl_print_format("%[' is not a valid IKI Object.%]%r", print.to, print.set->error, print.set->error, f_string_eol_s);
- iki_write_print_line_last_unlocked(setting, print);
-
f_file_stream_unlock(print.to);
return F_none;
if (main->error.verbosity != f_console_verbosity_quiet_e) {
iki_write_print_line_first_locked(setting, main->error);
fll_program_print_error_missing_variable_not_zero(main->error, iki_write_object_s);
- iki_write_print_line_last_locked(setting, main->error);
}
return;
status_code_print_line_first_locked(setting, main->error);
status_code_print_error_cannot_error_warning_number(setting, main->error);
- status_code_print_line_last_locked(setting, main->error);
return;
}
status_code_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_error_s, status_code_long_fine_s);
- status_code_print_line_last_locked(setting, main->error);
return;
}
status_code_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_cannot_use_with(main->error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_warning_s, status_code_long_fine_s);
- status_code_print_line_last_locked(setting, main->error);
return;
}
status_code_print_line_first_locked(setting, main->error);
status_code_print_error_no_status_codes(setting, main->error);
- status_code_print_line_last_locked(setting, main->error);
return;
}
macro_f_console_parameter_t_initialize4(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e, 0), \
macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e, 0), \
\
- macro_f_console_parameter_t_initialize4(status_code_short_fine_s, status_code_long_fine_s, 0, f_console_flag_normal_e, 0) \
- macro_f_console_parameter_t_initialize4(status_code_short_warning_s, status_code_long_warning_s, 0, f_console_flag_normal_e, 0) \
- macro_f_console_parameter_t_initialize4(status_code_short_error_s, status_code_long_error_s, 0, f_console_flag_normal_e, 0) \
- macro_f_console_parameter_t_initialize4(status_code_short_number_s, status_code_long_number_s, 0, f_console_flag_normal_e, 0) \
+ macro_f_console_parameter_t_initialize4(status_code_short_fine_s, status_code_long_fine_s, 0, f_console_flag_normal_e, 0), \
+ macro_f_console_parameter_t_initialize4(status_code_short_warning_s, status_code_long_warning_s, 0, f_console_flag_normal_e, 0), \
+ macro_f_console_parameter_t_initialize4(status_code_short_error_s, status_code_long_error_s, 0, f_console_flag_normal_e, 0), \
+ macro_f_console_parameter_t_initialize4(status_code_short_number_s, status_code_long_number_s, 0, f_console_flag_normal_e, 0), \
}
#define status_code_total_parameters_d 16
status_code_print_line_first_locked(setting, print);
fll_error_print(print, F_status_set_fine(setting->status), function, F_true);
- status_code_print_line_last_locked(setting, print);
return F_none;
}
#ifndef _di_status_code_main_
void status_code_main(fll_program_data_t * const main, status_code_setting_t * const setting) {
- if (!main || !setting || F_status_is_error(setting->status)) return;
+ if (!main || !setting) return;
+
+ if (F_status_is_error(setting->status)) {
+ status_code_print_line_last_locked(setting, main->error);
+
+ return;
+ }
if (!setting->status_string_from || !setting->status_string_to) {
}
if (choices.array[choice] == utf8_parameter_from_bytesequence_e) {
- if (setting->mode & utf8_mode_from_codepoint_e) {
- setting->mode -= utf8_mode_from_codepoint_e;
- }
-
+ setting->mode -= setting->mode & utf8_mode_from_codepoint_e;
setting->mode |= utf8_mode_from_bytesequence_e;
}
else if (choices.array[choice] == utf8_parameter_from_codepoint_e) {
- if (setting->mode & utf8_mode_from_bytesequence_e) {
- setting->mode -= utf8_mode_from_bytesequence_e;
- }
-
+ setting->mode -= setting->mode & utf8_mode_from_bytesequence_e;
setting->mode |= utf8_mode_from_codepoint_e;
}
}
}
if (choices.array[choice] == utf8_parameter_to_bytesequence_e) {
- if (setting->mode & utf8_mode_to_codepoint_e) {
- setting->mode -= utf8_mode_to_codepoint_e;
- }
-
- if (setting->mode & utf8_mode_to_combining_e) {
- setting->mode -= utf8_mode_to_combining_e;
- }
-
- if (setting->mode & utf8_mode_to_width_e) {
- setting->mode -= utf8_mode_to_width_e;
- }
+ setting->mode -= setting->mode & utf8_mode_to_codepoint_e;
+ setting->mode -= setting->mode & utf8_mode_to_combining_e;
+ setting->mode -= setting->mode & utf8_mode_to_width_e;
setting->mode |= utf8_mode_to_bytesequence_e;
}
else if (choices.array[choice] == utf8_parameter_to_codepoint_e) {
- if (setting->mode & utf8_mode_to_bytesequence_e) {
- setting->mode -= utf8_mode_to_bytesequence_e;
- }
-
- if (setting->mode & utf8_mode_to_combining_e) {
- setting->mode -= utf8_mode_to_combining_e;
- }
-
- if (setting->mode & utf8_mode_to_width_e) {
- setting->mode -= utf8_mode_to_width_e;
- }
+ setting->mode -= setting->mode & utf8_mode_to_bytesequence_e;
+ setting->mode -= setting->mode & utf8_mode_to_combining_e;
+ setting->mode -= setting->mode & utf8_mode_to_width_e;
setting->mode |= utf8_mode_to_codepoint_e;
}
else if (choices.array[choice] == utf8_parameter_to_combining_e) {
- if (setting->mode & utf8_mode_to_bytesequence_e) {
- setting->mode -= utf8_mode_to_bytesequence_e;
- }
-
- if (setting->mode & utf8_mode_to_codepoint_e) {
- setting->mode -= utf8_mode_to_codepoint_e;
- }
+ setting->mode -= setting->mode & utf8_mode_to_bytesequence_e;
+ setting->mode -= setting->mode & utf8_mode_to_codepoint_e;
// --to_width may be specified with --to_combining.
if (main->parameters.array[utf8_parameter_to_width_e].result & f_console_result_found_e) {
setting->mode |= utf8_mode_to_combining_e;
}
else if (choices.array[choice] == utf8_parameter_to_width_e) {
- if (setting->mode & utf8_mode_to_bytesequence_e) {
- setting->mode -= utf8_mode_to_bytesequence_e;
- }
-
- if (setting->mode & utf8_mode_to_codepoint_e) {
- setting->mode -= utf8_mode_to_codepoint_e;
- }
+ setting->mode -= setting->mode & utf8_mode_to_bytesequence_e;
+ setting->mode -= setting->mode & utf8_mode_to_codepoint_e;
// --to_width may be specified with --to_combining.
if (main->parameters.array[utf8_parameter_to_combining_e].result & f_console_result_found_e) {
setting->status = F_status_set_error(F_parameter);
utf8_print_error_parameter_file_to_too_many(setting, main->error);
- utf8_print_line_last_locked(setting, main->error);
return;
}
else {
utf8_print_line_first_locked(setting, main->error);
utf8_print_error_parameter_file_name_empty(setting, main->error, main->parameters.array[utf8_parameter_to_file_e].values.array[0]);
- utf8_print_line_last_locked(setting, main->error);
setting->status = F_status_set_error(F_parameter);
utf8_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, utf8_long_to_file_s);
- utf8_print_line_last_locked(setting, main->error);
return;
}
else {
main->output.to = main->message.to;
-
- if (setting->flag & utf8_main_flag_file_to_e) {
- setting->flag -= utf8_main_flag_file_to_e;
- }
+ setting->flag -= setting->flag & utf8_main_flag_file_to_e;
}
if (main->parameters.array[utf8_parameter_from_file_e].result & f_console_result_value_e) {
}
} // for
- if (F_status_is_error(setting->status)) {
- utf8_print_line_last_locked(setting, main->error);
-
- return;
- }
+ if (F_status_is_error(setting->status)) return;
setting->flag |= utf8_main_flag_file_from_e;
}
utf8_print_line_first_locked(setting, main->error);
fll_program_print_error_parameter_missing_value(main->error, f_console_symbol_long_normal_s, utf8_long_from_file_s);
- utf8_print_line_last_locked(setting, main->error);
return;
}
else {
- if (setting->flag & utf8_main_flag_file_from_e) {
- setting->flag -= utf8_main_flag_file_from_e;
- }
+ setting->flag -= setting->flag & utf8_main_flag_file_from_e;
}
if (main->parameters.remaining.used) {
utf8_print_line_first_locked(setting, main->error);
utf8_print_error_no_from(setting, main->error);
- utf8_print_line_last_locked(setting, main->error);
return;
}
utf8_print_line_first_locked(setting, print);
fll_error_print(print, F_status_set_fine(setting->status), function, F_true);
- utf8_print_line_last_locked(setting, print);
return F_none;
}
utf8_print_line_first_locked(setting, print);
fll_error_file_print(print, F_status_set_fine(setting->status), function, F_true, name, operation, type);
- utf8_print_line_last_locked(setting, print);
return F_none;
}
#ifndef _di_utf8_main_
void utf8_main(fll_program_data_t * const main, utf8_setting_t * const setting) {
- if (!main || !setting || F_status_is_error(setting->status)) return;
+ if (!main || !setting) return;
+
+ if (F_status_is_error(setting->status)) {
+ utf8_print_line_last_locked(setting, main->error);
+
+ return;
+ }
setting->status = F_none;
}
if (F_status_is_error(setting->status) && F_status_set_fine(setting->status) != F_utf_fragment && F_status_set_fine(setting->status) != F_complete_not_utf) {
- utf8_print_error_file(setting, main->error, setting->mode & utf8_mode_from_bytesequence_e ? macro_utf8_f(utf8_process_file_bytesequence) : utf8_process_file_bytesequence(utf8_process_file_codepoint), setting->path_files_from.array[i], f_file_operation_process_s, fll_error_file_type_file_e);
+ utf8_print_error_file(setting, main->error, setting->mode & utf8_mode_from_bytesequence_e ? macro_utf8_f(utf8_process_file_bytesequence) : macro_utf8_f(utf8_process_file_codepoint), setting->path_files_from.array[i], f_file_operation_process_s, fll_error_file_type_file_e);
break;
}
if (F_status_is_error(setting->status)) {
utf8_print_line_last_locked(setting, main->error);
+
+ return;
}
- else if (setting->status != F_interrupt) {
- utf8_print_line_last_locked(setting, main->message);
- }
- if (F_status_is_error(setting->status) || setting->status == F_interrupt) return;
+ if (setting->status == F_interrupt) return;
+
+ utf8_print_line_last_locked(setting, main->message);
if (setting->flag & utf8_main_flag_verify_e) {
setting->status = valid;