]> Kevux Git Server - fll/commitdiff
Progress: Continue program related work.
authorKevin Day <kevin@kevux.org>
Thu, 19 Jan 2023 05:33:00 +0000 (23:33 -0600)
committerKevin Day <kevin@kevux.org>
Thu, 19 Jan 2023 05:33:00 +0000 (23:33 -0600)
39 files changed:
level_0/f_console/c/console/common.h
level_2/fll_program/c/program/print.c
level_2/fll_program/c/program/print.h
level_3/fake/c/main/common-print.c
level_3/fake/c/main/common-print.h
level_3/fake/c/main/common.c
level_3/fake/c/main/common.h
level_3/fake/c/main/fake.c
level_3/fake/c/main/main.c
level_3/fake/c/main/print.c
level_3/fake/c/main/print.h
level_3/fake/c/main/private-build-load.c
level_3/fake/c/main/private-common.h
level_3/fake/c/main/private-fake.c
level_3/fss_write/c/basic/fss_write.c
level_3/fss_write/c/basic_list/fss_write.c
level_3/fss_write/c/embedded_list/fss_write.c
level_3/fss_write/c/extended/fss_write.c
level_3/fss_write/c/extended_list/fss_write.c
level_3/fss_write/c/main/common.c
level_3/fss_write/c/main/fss_write.c
level_3/fss_write/c/main/main.c
level_3/fss_write/c/main/print.c
level_3/fss_write/c/payload/fss_write.c
level_3/fss_write/c/payload/print.c
level_3/iki_read/c/main/common.c
level_3/iki_read/c/main/iki_read.c
level_3/iki_read/c/main/print.c
level_3/iki_write/c/main/common.c
level_3/iki_write/c/main/iki_write.c
level_3/iki_write/c/main/print.c
level_3/iki_write/c/main/private-write.c
level_3/status_code/c/main/common.c
level_3/status_code/c/main/common.h
level_3/status_code/c/main/print.c
level_3/status_code/c/main/status_code.c
level_3/utf8/c/main/common.c
level_3/utf8/c/main/print.c
level_3/utf8/c/main/utf8.c

index fa31c0a3ed68fe9fc67a63678013e82fc474151a..e41c816177bb83d8ea1f26590b55da88503f9160 100644 (file)
@@ -440,7 +440,7 @@ extern "C" {
     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;
index 03c1a79d04acc9fdce92877f323b5b38ecfea33e..f691f4f8cc6a6ac5d6f79691b8c69d371879fb91 100644 (file)
@@ -40,16 +40,16 @@ extern "C" {
 #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);
@@ -59,18 +59,18 @@ extern "C" {
 #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);
@@ -80,16 +80,16 @@ extern "C" {
 #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);
@@ -99,18 +99,18 @@ extern "C" {
 #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);
@@ -137,18 +137,18 @@ extern "C" {
 #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);
@@ -158,7 +158,7 @@ extern "C" {
 #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;
 
@@ -167,7 +167,7 @@ extern "C" {
     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);
@@ -177,7 +177,7 @@ extern "C" {
 #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;
 
@@ -186,7 +186,7 @@ extern "C" {
     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);
@@ -196,7 +196,7 @@ extern "C" {
 #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;
 
@@ -205,7 +205,7 @@ extern "C" {
     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);
@@ -215,14 +215,14 @@ extern "C" {
 #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);
@@ -232,14 +232,14 @@ extern "C" {
 #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);
@@ -251,14 +251,14 @@ extern "C" {
 #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);
@@ -268,7 +268,7 @@ extern "C" {
 #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;
 
@@ -277,7 +277,7 @@ extern "C" {
     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);
@@ -287,7 +287,7 @@ extern "C" {
 #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;
 
@@ -298,7 +298,7 @@ extern "C" {
     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);
@@ -307,6 +307,23 @@ extern "C" {
   }
 #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) {
 
index 5f4a1e9defda390ae464ea0768d24e88773ea931..8fbaf0eee07f347ad4d41e321df00bb2490c4805 100644 (file)
@@ -75,15 +75,15 @@ extern "C" {
  * @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
@@ -91,7 +91,7 @@ extern "C" {
  *   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_
 
 /**
@@ -107,20 +107,20 @@ extern "C" {
  * @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.
  *
@@ -129,7 +129,7 @@ extern "C" {
  *   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_
 
 /**
@@ -145,15 +145,15 @@ extern "C" {
  * @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
@@ -161,7 +161,7 @@ extern "C" {
  *   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_
 
 /**
@@ -177,20 +177,20 @@ extern "C" {
  * @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
@@ -198,7 +198,7 @@ extern "C" {
  *   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_
 
 /**
@@ -217,7 +217,7 @@ extern "C" {
  * @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
@@ -225,7 +225,7 @@ extern "C" {
  *   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_
 
 /**
@@ -241,24 +241,24 @@ extern "C" {
  * @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.
@@ -268,7 +268,7 @@ extern "C" {
  *   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_
 
 /**
@@ -288,7 +288,7 @@ extern "C" {
  *   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.
@@ -298,7 +298,7 @@ extern "C" {
  *   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_
 
 /**
@@ -318,7 +318,7 @@ extern "C" {
  *   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.
@@ -328,7 +328,7 @@ extern "C" {
  *   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_
 
 /**
@@ -348,7 +348,7 @@ extern "C" {
  *   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.
@@ -358,7 +358,7 @@ extern "C" {
  *   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_
 
 /**
@@ -378,7 +378,7 @@ extern "C" {
  *   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
@@ -386,7 +386,7 @@ extern "C" {
  *   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_
 
 /**
@@ -406,7 +406,7 @@ extern "C" {
  *   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.
@@ -416,7 +416,7 @@ extern "C" {
  *   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_
 
 /**
@@ -436,7 +436,7 @@ extern "C" {
  *   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
@@ -444,7 +444,7 @@ extern "C" {
  *   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_
 
 /**
@@ -464,7 +464,7 @@ extern "C" {
  *   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.
@@ -474,7 +474,7 @@ extern "C" {
  *   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_
 
 /**
@@ -494,7 +494,7 @@ extern "C" {
  *   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.
@@ -506,10 +506,31 @@ extern "C" {
  *   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.
index d189a9c1941f68a193164f6b25d074e2fd724850..c1bf5215e57769a8b25ff6f12d4737f99ada07a9 100644 (file)
@@ -10,14 +10,20 @@ extern "C" {
     "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_
 
index a72d710a87bcfa2e67b3f4862497556d13296ff2..11b38c3737e09489286c450852d4cc5e52e3030d 100644 (file)
@@ -43,14 +43,20 @@ extern "C" {
     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_
 
index 862e5ad5017b14e8504bbcd8e72bd60a95a803fd..d6515e6dfcc44d7a06940777046b9f7e8f78b76f 100644 (file)
@@ -56,9 +56,7 @@ extern "C" {
   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_
@@ -118,6 +116,61 @@ extern "C" {
 
     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_
@@ -133,9 +186,9 @@ extern "C" {
     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;
     }
@@ -156,8 +209,7 @@ extern "C" {
 
         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;
         }
@@ -189,8 +241,7 @@ extern "C" {
 
         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;
         }
@@ -213,11 +264,251 @@ extern "C" {
       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_
 
index 2fe01384ee505ca600d70c339c1883e3dfef9063..bdd7b7f673864caea72d9258f2f62997a32c4b39 100644 (file)
@@ -184,9 +184,7 @@ extern "C" {
   #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"
 
@@ -195,9 +193,7 @@ extern "C" {
   #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
 
@@ -206,9 +202,7 @@ extern "C" {
   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_
@@ -453,12 +447,12 @@ extern "C" {
     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,
@@ -511,27 +505,33 @@ extern "C" {
  * 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_
 
@@ -548,6 +548,67 @@ extern "C" {
  *
  * 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 {
@@ -558,6 +619,70 @@ extern "C" {
 
     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 \
@@ -567,6 +692,58 @@ extern "C" {
       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_
 
index eb23da7c7bc1a101062bc351854a07673d7ac51d..2ff7c90bcc5b1531d08828530e19b6837f28e7e1 100644 (file)
@@ -16,7 +16,13 @@ extern "C" {
 #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;
 
@@ -294,13 +300,11 @@ extern "C" {
       }
     }
 
-    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);
index 194496da9e2a13288ebf42aa19511034b5cb0bd5..c4da12442198ea7e9f1797cac7e4d141cd5742cc 100644 (file)
@@ -4,6 +4,9 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
   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;
index 36a915f58dc7cd9d102c6c30a41c215372a3ed95..77b05e63692668b24b581c85316664ec1b468727 100644 (file)
@@ -80,6 +80,31 @@ extern "C" {
   }
 #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) {
 
index dc1ddf926fcfb047e8af23dd4a98a3265fbc31af..42038a45685be9e3fd8d2cd1e48b1eeb8be32f16 100644 (file)
@@ -85,9 +85,9 @@ extern "C" {
  * @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.
@@ -98,6 +98,30 @@ extern "C" {
 #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
index f5f41baf4f6abb499226587d4476e3c90b2cfb86..fe61ad9e68663bfb1309842d9ecbfd1e922814d7 100644 (file)
@@ -1381,9 +1381,9 @@ extern "C" {
       }
     }
 
-    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;
         }
@@ -1411,14 +1411,14 @@ extern "C" {
         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;
         }
@@ -1446,7 +1446,7 @@ extern "C" {
         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;
     }
index 09b7e222b5ea71517a8e788121c9b9549ee23eed..9446d459a8ac05034630d144e6743e858b89c42a 100644 (file)
@@ -33,61 +33,6 @@ extern "C" {
  *
  * 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 {
@@ -97,63 +42,6 @@ extern "C" {
 
     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 \
@@ -163,53 +51,6 @@ extern "C" {
       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_
 
index 26ec25b7e06962598c82108f851386aa92e27f1a..58a3af03f28d4cda24b7d61fd04fe490bcc428be 100644 (file)
@@ -188,6 +188,7 @@ extern "C" {
   }
 #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) {
 
index 78e7332481279c3c7426f407f713ed1590c3254c..46308a45d58385a878dc7514b064ac6f0e361e96 100644 (file)
@@ -28,7 +28,6 @@ extern "C" {
 
         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;
       }
@@ -91,7 +90,6 @@ extern "C" {
 
         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;
       }
index 38d636b039588609d3647d9f8d71d124f6d33882..3ef6b0054159701d7db634de7f76b4a712b46148 100644 (file)
@@ -31,7 +31,6 @@ extern "C" {
 
         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;
       }
@@ -91,7 +90,6 @@ extern "C" {
 
         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;
       }
index 9978353e60ce60c06d386710b4037e76a3d1da1b..ea90288e919e44387ef6e9399db00c25088aef9c 100644 (file)
@@ -32,7 +32,6 @@ extern "C" {
 
         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;
       }
@@ -96,7 +95,6 @@ extern "C" {
 
         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;
       }
index 15b2cfae17664e5138e56fe60bc517b37f1b6096..ddb6e3431c3a312fece4cab3e127c2a16c84b1d8 100644 (file)
@@ -33,7 +33,6 @@ extern "C" {
 
         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;
       }
@@ -103,7 +102,6 @@ extern "C" {
 
         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;
       }
index e905ce3859702893e308368d19e38b1ce9cbbff0..28c6f1b47dd376bc010c6473de923cae317dab3d 100644 (file)
@@ -32,7 +32,6 @@ extern "C" {
 
         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;
       }
@@ -96,7 +95,6 @@ extern "C" {
 
         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;
       }
index a110f3c47fbc9221bf84ee00eee1d4a96dc48023..a9534c0e6d7de366ecea439f1d39b70cee48f328 100644 (file)
@@ -172,7 +172,6 @@ extern "C" {
 
         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;
       }
@@ -197,7 +196,6 @@ extern "C" {
 
       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;
     }
@@ -232,7 +230,6 @@ extern "C" {
 
       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;
     }
@@ -321,7 +318,6 @@ extern "C" {
 
       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;
     }
@@ -370,7 +366,6 @@ extern "C" {
 
       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;
     }
@@ -381,7 +376,6 @@ extern "C" {
 
         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;
       }
@@ -449,7 +443,6 @@ extern "C" {
             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;
             }
@@ -461,7 +454,6 @@ extern "C" {
             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;
             }
@@ -477,7 +469,6 @@ extern "C" {
                 main->parameters.arguments.array[values_ignore->array[i - 1]],
                 main->parameters.arguments.array[index]
               );
-              fss_write_print_line_last_locked(setting, main->error);
 
               return;
             }
@@ -506,7 +497,6 @@ extern "C" {
           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;
           }
@@ -518,7 +508,6 @@ extern "C" {
           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;
           }
@@ -534,7 +523,6 @@ extern "C" {
               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;
           }
@@ -546,7 +534,6 @@ extern "C" {
 
       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;
     }
@@ -614,8 +601,6 @@ extern "C" {
                 fss_write_long_partial_s
               );
 
-              fss_write_print_line_last_locked(setting, main->error);
-
               return;
             }
           }
@@ -625,7 +610,6 @@ extern "C" {
 
             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;
           }
@@ -635,7 +619,6 @@ extern "C" {
 
             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;
           }
@@ -652,7 +635,6 @@ extern "C" {
 
           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;
         }
@@ -662,7 +644,6 @@ extern "C" {
 
           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;
         }
@@ -681,7 +662,6 @@ extern "C" {
 
             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;
           }
index 4ba95373880063545afaeb561642e3eccc26c96d..286e3412d9b604e078fa36d7e1a2630c450fd914 100644 (file)
@@ -7,7 +7,13 @@ extern "C" {
 #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;
 
@@ -30,19 +36,23 @@ extern "C" {
     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_
 
index 832854e737012bb237f20d220838037b40771328..1339e8679fd465284f0ad86ebf08f84a368b8640 100644 (file)
@@ -178,9 +178,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
         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;
       }
@@ -196,7 +193,6 @@ int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
 
       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;
     }
index 16ca8245634ab5283666b79f9f58686bf29545bb..8eb931caf453e777851131882aca4beb5e3ba3e7 100644 (file)
@@ -11,7 +11,6 @@ extern "C" {
 
     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;
   }
@@ -24,7 +23,6 @@ extern "C" {
 
     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;
   }
@@ -45,7 +43,6 @@ extern "C" {
     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);
 
@@ -64,7 +61,6 @@ extern "C" {
     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);
 
@@ -100,8 +96,6 @@ extern "C" {
     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);
index cc0505643f5bb2fd7552c52c0ab3a6b58e9823c7..ada935145097e754b3fd86c72bcfb5a6270d9803 100644 (file)
@@ -411,7 +411,6 @@ extern "C" {
 
           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;
         }
@@ -452,7 +451,6 @@ extern "C" {
 
             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;
           }
index f1c4e7853eab8d55d5b6a20d2b207f57563ed0c6..6a62739ef1dcf33a538c3d56919b41f96abed620 100644 (file)
@@ -13,7 +13,6 @@ extern "C" {
 
     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);
 
index 205efebe7283e303db583e04e8ad45ff9d085ae2..a411a4678158d3e715448012a7d61fbe8b02f8d5 100644 (file)
@@ -160,7 +160,6 @@ extern "C" {
 
       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;
     }
@@ -171,7 +170,6 @@ extern "C" {
 
         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;
       }
@@ -187,7 +185,6 @@ extern "C" {
 
         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;
       }
@@ -199,7 +196,6 @@ extern "C" {
 
       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;
     }
@@ -216,7 +212,6 @@ extern "C" {
 
         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;
       }
@@ -228,7 +223,6 @@ extern "C" {
 
       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;
     }
@@ -282,7 +276,6 @@ extern "C" {
 
       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;
     }
@@ -293,7 +286,6 @@ extern "C" {
 
         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;
       }
@@ -378,7 +370,6 @@ extern "C" {
 
         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;
       }
@@ -475,7 +466,6 @@ extern "C" {
 
           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;
         }
@@ -501,7 +491,6 @@ extern "C" {
 
           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;
         }
@@ -515,7 +504,6 @@ extern "C" {
 
         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;
       }
@@ -528,7 +516,6 @@ extern "C" {
 
         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;
       }
@@ -582,7 +569,6 @@ extern "C" {
         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;
         }
@@ -601,7 +587,6 @@ extern "C" {
 
       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;
     }
index 19bfc296352c6651b40d726506872c6ae8408bf6..0a6fd5122702b7558e8685c8fad4546e0d5bf3bc 100644 (file)
@@ -9,7 +9,13 @@ extern "C" {
 #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;
 
@@ -39,11 +45,10 @@ extern "C" {
       }
       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;
@@ -57,7 +62,7 @@ extern "C" {
 
             setting->status = F_status_set_error(F_interrupt);
 
-            return;
+            break;
           }
 
           main->signal_check = 0;
@@ -71,7 +76,7 @@ extern "C" {
         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);
@@ -79,7 +84,7 @@ extern "C" {
         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;
@@ -146,7 +151,7 @@ extern "C" {
         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
@@ -154,13 +159,15 @@ extern "C" {
       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_
 
index d93cfa608d50e349dde2fccc4528544d9f624eba..b076e5885385ae05a1b9f6eb61b1625c0a9727a8 100644 (file)
@@ -12,7 +12,6 @@ extern "C" {
 
     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;
   }
@@ -25,7 +24,6 @@ extern "C" {
 
     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;
   }
index af8390503814841bd8ad53d6d5aaae354a82eae6..a05d3f314274af844b552505595e142cce3905b9 100644 (file)
@@ -141,7 +141,6 @@ extern "C" {
 
         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;
       }
@@ -156,7 +155,6 @@ extern "C" {
       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;
       }
@@ -168,7 +166,6 @@ extern "C" {
 
       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;
     }
@@ -203,7 +200,6 @@ extern "C" {
 
       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;
     }
@@ -238,7 +234,6 @@ extern "C" {
 
       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;
     }
@@ -248,7 +243,6 @@ extern "C" {
 
       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;
     }
index 1f7123b84c6c935f7e6774a0e1f42142911f8473..f18ad87c62a7cd8fc300f9bd72acd41f50d88948 100644 (file)
@@ -9,7 +9,13 @@ extern "C" {
 #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;
 
@@ -168,20 +174,24 @@ extern "C" {
         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_
 
index 4ed07f899a5b4bc09caf002a14dba8cb38ac3f37..660a6197c4fd5be3bbd51377be8be5ef14420d92 100644 (file)
@@ -12,7 +12,6 @@ extern "C" {
 
     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;
   }
@@ -25,7 +24,6 @@ extern "C" {
 
     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;
   }
@@ -63,8 +61,6 @@ extern "C" {
     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;
index cdaf9e7c8b8acb191914c4cd247fdf81f68a01a1..f65dde35f59ac849fa68ac4143ff565adfa87734 100644 (file)
@@ -15,7 +15,6 @@ extern "C" {
       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;
index 8e05fe6ea91fecdddfe588448c8c4d0f68635181..cc5cd74ad7059fc051e5cd4bd56aaad7b7bbefd6 100644 (file)
@@ -150,7 +150,6 @@ extern "C" {
 
           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;
         }
@@ -161,7 +160,6 @@ extern "C" {
 
         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;
       }
@@ -171,7 +169,6 @@ extern "C" {
 
       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;
     }
@@ -181,7 +178,6 @@ extern "C" {
 
       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;
     }
index 064e6b68145ecf1ee70bddc8d02956143fa323a9..c47387138325c67b0ede2ef007da208898d10850 100644 (file)
@@ -181,10 +181,10 @@ extern "C" {
       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
index e74871f0a528a9e2145b392f44d66b90db8e3ee5..d785812537c61ac1935f3bedc5b76ab472a107eb 100644 (file)
@@ -12,7 +12,6 @@ extern "C" {
 
     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;
   }
index 2b420449cb93f7cb4f0897caa4f9a3ff66440dfb..7012b8992fbc1b2f2ebde196a05593cf48c22b75 100644 (file)
@@ -8,7 +8,13 @@ extern "C" {
 #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) {
 
index 6f5653b5d5f155daf1a5fb58c516803a36d39090..23fe00ed463948cfd4b0d8f2a86ba97c0669b41e 100644 (file)
@@ -170,17 +170,11 @@ extern "C" {
         }
 
         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;
         }
       }
@@ -201,43 +195,22 @@ extern "C" {
         }
 
         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) {
@@ -247,13 +220,8 @@ extern "C" {
           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) {
@@ -282,7 +250,6 @@ extern "C" {
         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;
       }
@@ -323,7 +290,6 @@ extern "C" {
       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);
 
@@ -335,16 +301,12 @@ extern "C" {
 
       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) {
@@ -395,11 +357,7 @@ extern "C" {
         }
       } // 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;
     }
@@ -408,14 +366,11 @@ extern "C" {
 
       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) {
@@ -445,7 +400,6 @@ extern "C" {
 
       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;
     }
index 0c911516d6542cbefa60f3906ba058c91b39633d..5a6f19e13b83d135f000d640e5fe63a243b0360a 100644 (file)
@@ -12,7 +12,6 @@ extern "C" {
 
     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;
   }
@@ -87,7 +86,6 @@ extern "C" {
 
     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;
   }
index 6692327a4b75fb6b9d182b483460594aceffe4b6..3777d1018a12f2c5bc2fba265e5199b55da8e0c7 100644 (file)
@@ -11,7 +11,13 @@ extern "C" {
 #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;
 
@@ -118,7 +124,7 @@ extern "C" {
         }
 
         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;
         }
@@ -169,12 +175,13 @@ extern "C" {
 
     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;