From: Kevin Day Date: Fri, 4 Aug 2023 04:57:57 +0000 (-0500) Subject: Update: Set the pipe flag consistely across programs. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=0ae1d845e3d7c63ecf76c36da011fd2bbc9c11e5;p=fll Update: Set the pipe flag consistely across programs. Use the same practice of designating the pipe as a main flag, even if the program isn't using the input pipe. For the fss_read programs that use the word "pipe" in a main flag are renamed to "pipe" "format". --- diff --git a/level_3/byte_dump/c/main/byte_dump.c b/level_3/byte_dump/c/main/byte_dump.c index 2909d66..8062e47 100644 --- a/level_3/byte_dump/c/main/byte_dump.c +++ b/level_3/byte_dump/c/main/byte_dump.c @@ -44,7 +44,7 @@ extern "C" { if (main->setting.files.used || (main->program.pipe & fll_program_data_pipe_input_e)) { f_file_t file = f_file_t_initialize; - if (main->program.pipe & fll_program_data_pipe_input_e) { + if (main->setting.flag & byte_dump_main_flag_pipe_e) { file.id = F_type_descriptor_input_d; file.stream = F_type_input_d; diff --git a/level_3/byte_dump/c/main/common.c b/level_3/byte_dump/c/main/common.c index b60d79f..ffc3700 100644 --- a/level_3/byte_dump/c/main/common.c +++ b/level_3/byte_dump/c/main/common.c @@ -185,6 +185,13 @@ extern "C" { f_number_unsigned_t index = 0; f_number_unsigned_t number = 0; + if (main->program.pipe & fll_program_data_pipe_input_e) { + main->setting.flag |= byte_dump_main_flag_pipe_e; + } + else { + main->setting.flag -= main->setting.flag & byte_dump_main_flag_pipe_e; + } + if (main->program.parameters.array[byte_dump_parameter_width_e].result & f_console_result_value_e) { index = main->program.parameters.array[byte_dump_parameter_width_e].values.array[main->program.parameters.array[byte_dump_parameter_width_e].values.used - 1]; diff --git a/level_3/fake/c/main/common.c b/level_3/fake/c/main/common.c index 68bcb86..2e1408c 100644 --- a/level_3/fake/c/main/common.c +++ b/level_3/fake/c/main/common.c @@ -95,6 +95,13 @@ extern "C" { f_number_unsigned_t j = 0; f_number_unsigned_t index = 0; + if (main->program.pipe & fll_program_data_pipe_input_e) { + main->setting.flag |= fake_main_flag_pipe_e; + } + else { + main->setting.flag -= main->setting.flag & fake_main_flag_pipe_e; + } + { uint8_t i = 0; diff --git a/level_3/fake/c/main/common/enumeration.h b/level_3/fake/c/main/common/enumeration.h index 6cb521c..58aa555 100644 --- a/level_3/fake/c/main/common/enumeration.h +++ b/level_3/fake/c/main/common/enumeration.h @@ -94,6 +94,7 @@ extern "C" { * - operation_clean: The clean operation is designated. * - operation_make: The make operation is designated (or enabled as default). * - operation_skeleton: The skeleton operation is designated. + * - pipe: Use the input pipe. * - print_first: When set, print new line to message output on program begin after loading settings. * - print_last: When set, print new line to message output on program end. * - separate: Enable printing of separators. @@ -115,12 +116,13 @@ extern "C" { fake_main_flag_operation_clean_e = 0x100, fake_main_flag_operation_make_e = 0x200, fake_main_flag_operation_skeleton_e = 0x400, - fake_main_flag_print_first_e = 0x800, - fake_main_flag_print_last_e = 0x1000, - fake_main_flag_separate_e = 0x2000, - fake_main_flag_strip_invalid_e = 0x4000, - fake_main_flag_verify_e = 0x8000, - fake_main_flag_version_e = 0x10000, + fake_main_flag_pipe_e = 0x800, + fake_main_flag_print_first_e = 0x1000, + fake_main_flag_print_last_e = 0x2000, + fake_main_flag_separate_e = 0x4000, + fake_main_flag_strip_invalid_e = 0x8000, + fake_main_flag_verify_e = 0x10000, + fake_main_flag_version_e = 0x20000, }; // enum #endif // _di_fake_main_flag_e_ diff --git a/level_3/fss_read/c/basic/print.c b/level_3/fss_read/c/basic/print.c index 788c332..3d86963 100644 --- a/level_3/fss_read/c/basic/print.c +++ b/level_3/fss_read/c/basic/print.c @@ -42,7 +42,7 @@ extern "C" { fss_read_main_t * const main = (fss_read_main_t *) print->custom; if (main->setting.flag & fss_read_main_flag_content_e) { - if (main->setting.flag & fss_read_main_flag_pipe_e) { + if (main->setting.flag & fss_read_main_flag_pipe_format_e) { fll_print_dynamic_raw(fss_read_pipe_content_start_s, print->to); } else { diff --git a/level_3/fss_read/c/basic_list/print.c b/level_3/fss_read/c/basic_list/print.c index 21c45d5..0d47ffb 100644 --- a/level_3/fss_read/c/basic_list/print.c +++ b/level_3/fss_read/c/basic_list/print.c @@ -43,7 +43,7 @@ extern "C" { f_file_stream_lock(print->to); - if (main->setting.flag & fss_read_main_flag_pipe_e) { + if (main->setting.flag & fss_read_main_flag_pipe_format_e) { f_print_dynamic_raw(fss_read_pipe_content_start_s, print->to); } else { diff --git a/level_3/fss_read/c/embedded_list/print.c b/level_3/fss_read/c/embedded_list/print.c index 243b21a..66a2a8e 100644 --- a/level_3/fss_read/c/embedded_list/print.c +++ b/level_3/fss_read/c/embedded_list/print.c @@ -43,7 +43,7 @@ extern "C" { f_file_stream_lock(print->to); - if (main->setting.flag & fss_read_main_flag_pipe_e) { + if (main->setting.flag & fss_read_main_flag_pipe_format_e) { f_print_dynamic_raw(fss_read_pipe_content_start_s, print->to); } else { diff --git a/level_3/fss_read/c/extended/print.c b/level_3/fss_read/c/extended/print.c index fc49463..040fe85 100644 --- a/level_3/fss_read/c/extended/print.c +++ b/level_3/fss_read/c/extended/print.c @@ -12,7 +12,7 @@ extern "C" { fss_read_main_t * const main = (fss_read_main_t *) print->custom; if (main->setting.flag & fss_read_main_flag_content_e) { - fll_print_dynamic_raw((main->setting.flag & fss_read_main_flag_pipe_e) ? fss_read_pipe_content_start_s : f_fss_extended_next_s, print->to); + fll_print_dynamic_raw((main->setting.flag & fss_read_main_flag_pipe_format_e) ? fss_read_pipe_content_start_s : f_fss_extended_next_s, print->to); } return F_none; @@ -57,7 +57,7 @@ extern "C" { fss_read_main_t * const main = (fss_read_main_t *) print->custom; if (main->setting.flag & fss_read_main_flag_content_e) { - if (main->setting.flag & fss_read_main_flag_pipe_e) { + if (main->setting.flag & fss_read_main_flag_pipe_format_e) { fll_print_dynamic_raw(fss_read_pipe_content_start_s, print->to); } else { diff --git a/level_3/fss_read/c/extended_list/print.c b/level_3/fss_read/c/extended_list/print.c index 17e3f52..4ec740d 100644 --- a/level_3/fss_read/c/extended_list/print.c +++ b/level_3/fss_read/c/extended_list/print.c @@ -43,7 +43,7 @@ extern "C" { f_file_stream_lock(print->to); - if (main->setting.flag & fss_read_main_flag_pipe_e) { + if (main->setting.flag & fss_read_main_flag_pipe_format_e) { f_print_dynamic_raw(fss_read_pipe_content_start_s, print->to); } else { diff --git a/level_3/fss_read/c/main/common.c b/level_3/fss_read/c/main/common.c index 17c3d13..903a952 100644 --- a/level_3/fss_read/c/main/common.c +++ b/level_3/fss_read/c/main/common.c @@ -135,6 +135,13 @@ extern "C" { f_number_unsigned_t i = 0; f_number_unsigned_t index = 0; + if (main->program.pipe & fll_program_data_pipe_input_e) { + main->setting.flag |= fss_read_main_flag_pipe_e; + } + else { + main->setting.flag -= main->setting.flag & fss_read_main_flag_pipe_e; + } + { static const f_number_unsigned_t parameter_code[] = { fss_read_parameter_at_e, @@ -454,7 +461,7 @@ extern "C" { } if (parameters->array[fss_read_parameter_pipe_e].result & f_console_result_found_e) { - main->setting.flag |= fss_read_main_flag_pipe_e; + main->setting.flag |= fss_read_main_flag_pipe_format_e; } if (parameters->array[fss_read_parameter_total_e].result & f_console_result_found_e) { diff --git a/level_3/fss_read/c/main/common/enumeration.h b/level_3/fss_read/c/main/common/enumeration.h index 4cbb25e..59695ba 100644 --- a/level_3/fss_read/c/main/common/enumeration.h +++ b/level_3/fss_read/c/main/common/enumeration.h @@ -39,7 +39,8 @@ extern "C" { * - object_as_line: The Object is counted as its own line for the purpose of -l/--line or any other similar behavior. * - object_trim: Empty space before an after Objects are ignored while processing without affecting printing behavior. * - original: Enable original printing, where the quotes are printed and no delimits are applied. - * - pipe: Print using the special pipe format. + * - pipe: Use the input pipe. + * - pipe_format: Print using the special pipe format. * - print_first: When set, print new line to message output on program begin after loading settings. * - print_last: When set, print new line to message output on program end. * - quote_content: Designate that the standard supports quotes on Content. @@ -72,15 +73,16 @@ extern "C" { fss_read_main_flag_object_trim_e = 0x10000, fss_read_main_flag_original_e = 0x20000, fss_read_main_flag_pipe_e = 0x40000, - fss_read_main_flag_print_first_e = 0x80000, - fss_read_main_flag_print_last_e = 0x100000, - fss_read_main_flag_quote_content_e = 0x200000, - fss_read_main_flag_quote_object_e = 0x400000, - fss_read_main_flag_select_e = 0x800000, - fss_read_main_flag_total_e = 0x1000000, - fss_read_main_flag_trim_e = 0x2000000, - fss_read_main_flag_trim_object_e = 0x4000000, - fss_read_main_flag_version_e = 0x8000000, + fss_read_main_flag_pipe_format_e = 0x80000, + fss_read_main_flag_print_first_e = 0x100000, + fss_read_main_flag_print_last_e = 0x200000, + fss_read_main_flag_quote_content_e = 0x400000, + fss_read_main_flag_quote_object_e = 0x800000, + fss_read_main_flag_select_e = 0x1000000, + fss_read_main_flag_total_e = 0x2000000, + fss_read_main_flag_trim_e = 0x4000000, + fss_read_main_flag_trim_object_e = 0x8000000, + fss_read_main_flag_version_e = 0x10000000, }; // enum #endif // _di_fss_read_main_flag_e_ diff --git a/level_3/fss_read/c/main/print/data.c b/level_3/fss_read/c/main/print/data.c index 648f011..29a51d0 100644 --- a/level_3/fss_read/c/main/print/data.c +++ b/level_3/fss_read/c/main/print/data.c @@ -103,7 +103,7 @@ extern "C" { fss_read_main_t * const main = (fss_read_main_t *) print->custom; - if (main->setting.flag & fss_read_main_flag_pipe_e) { + if (main->setting.flag & fss_read_main_flag_pipe_format_e) { fll_print_dynamic_raw(fss_read_pipe_content_ignore_s, print->to); } @@ -195,7 +195,7 @@ extern "C" { fss_read_main_t * const main = (fss_read_main_t *) print->custom; - fll_print_dynamic_raw((main->setting.flag & fss_read_main_flag_pipe_e) ? fss_read_pipe_content_end_s : f_string_eol_s, print->to); + fll_print_dynamic_raw((main->setting.flag & fss_read_main_flag_pipe_format_e) ? fss_read_pipe_content_end_s : f_string_eol_s, print->to); return F_none; } @@ -208,7 +208,7 @@ extern "C" { fss_read_main_t * const main = (fss_read_main_t *) print->custom; - if (main->setting.flag & fss_read_main_flag_pipe_e) { + if (main->setting.flag & fss_read_main_flag_pipe_format_e) { fll_print_dynamic_raw(fss_read_pipe_content_end_s, print->to); } diff --git a/level_3/fss_read/c/payload/print.c b/level_3/fss_read/c/payload/print.c index d40e206..6ab79f4 100644 --- a/level_3/fss_read/c/payload/print.c +++ b/level_3/fss_read/c/payload/print.c @@ -62,7 +62,7 @@ extern "C" { f_file_stream_lock(print->to); - if (main->setting.flag & fss_read_main_flag_pipe_e) { + if (main->setting.flag & fss_read_main_flag_pipe_format_e) { f_print_dynamic_raw(fss_read_pipe_content_start_s, print->to); } else { diff --git a/level_3/fss_write/c/main/common.c b/level_3/fss_write/c/main/common.c index 3f778a1..1e87b75 100644 --- a/level_3/fss_write/c/main/common.c +++ b/level_3/fss_write/c/main/common.c @@ -80,6 +80,13 @@ extern "C" { main->setting.flag |= fss_write_main_flag_copyright_e; } + if (main->program.pipe & fll_program_data_pipe_input_e) { + main->setting.flag |= fss_write_main_flag_pipe_e; + } + else { + main->setting.flag -= main->setting.flag & fss_write_main_flag_pipe_e; + } + if (callback) { callback(arguments, main); if (F_status_is_error(main->setting.state.status)) return; diff --git a/level_3/fss_write/c/main/common/enumeration.h b/level_3/fss_write/c/main/common/enumeration.h index 2c6c8f2..7b2c33c 100644 --- a/level_3/fss_write/c/main/common/enumeration.h +++ b/level_3/fss_write/c/main/common/enumeration.h @@ -32,6 +32,7 @@ extern "C" { * - object: The Object being written is specified. * - object_open: The Object open characters are to be printed. * - partial: Do not write end of Object/Content character. + * - pipe: Use the input pipe. * - print_first: When set, print new line to message output on program begin after loading settings. * - print_last: When set, print new line to message output on program end. * - trim: Trim Object names. @@ -51,11 +52,12 @@ extern "C" { fss_write_main_flag_object_e = 0x100, fss_write_main_flag_object_open_e = 0x200, fss_write_main_flag_partial_e = 0x400, - fss_write_main_flag_prepend_e = 0x800, - fss_write_main_flag_print_first_e = 0x1000, - fss_write_main_flag_print_last_e = 0x2000, - fss_write_main_flag_trim_e = 0x4000, - fss_write_main_flag_version_e = 0x8000, + fss_write_main_flag_pipe_e = 0x800, + fss_write_main_flag_prepend_e = 0x1000, + fss_write_main_flag_print_first_e = 0x2000, + fss_write_main_flag_print_last_e = 0x4000, + fss_write_main_flag_trim_e = 0x8000, + fss_write_main_flag_version_e = 0x10000, }; // enum #endif // _di_fss_write_main_flag_e_ diff --git a/level_3/fss_write/c/main/fss_write.c b/level_3/fss_write/c/main/fss_write.c index e0a8519..33e38a4 100644 --- a/level_3/fss_write/c/main/fss_write.c +++ b/level_3/fss_write/c/main/fss_write.c @@ -48,7 +48,7 @@ extern "C" { return; } - if (main->program.pipe & fll_program_data_pipe_input_e) { + if (main->setting.flag & fss_write_main_flag_pipe_e) { if (main->callback.process_pipe) { main->callback.process_pipe(void_main); } diff --git a/level_3/iki_read/c/main/common.c b/level_3/iki_read/c/main/common.c index b16e896..97b7e0e 100644 --- a/level_3/iki_read/c/main/common.c +++ b/level_3/iki_read/c/main/common.c @@ -82,6 +82,13 @@ extern "C" { return; } + if (main->program.pipe & fll_program_data_pipe_input_e) { + main->setting.flag |= iki_read_main_flag_pipe_e; + } + else { + main->setting.flag -= main->setting.flag & iki_read_main_flag_pipe_e; + } + if (!(main->program.parameters.remaining.used || (main->program.pipe & fll_program_data_pipe_input_e))) { main->setting.state.status = F_status_set_error(F_parameter); diff --git a/level_3/iki_read/c/main/common/enumeration.h b/level_3/iki_read/c/main/common/enumeration.h index 25a2046..6a112e1 100644 --- a/level_3/iki_read/c/main/common/enumeration.h +++ b/level_3/iki_read/c/main/common/enumeration.h @@ -29,6 +29,7 @@ extern "C" { * - line: Selecting at a specific line. * - name: Selecting using a specific Vocabulary name. * - object: Print Objects. + * - pipe: Use the input pipe. * - print_first: When set, print new line to message output on program begin after loading settings. * - print_last: When set, print new line to message output on program end. * - replace: Using re-assignments. @@ -50,15 +51,16 @@ extern "C" { iki_read_main_flag_line_e = 0x20, iki_read_main_flag_name_e = 0x40, iki_read_main_flag_object_e = 0x80, - iki_read_main_flag_print_first_e = 0x100, - iki_read_main_flag_print_last_e = 0x200, - iki_read_main_flag_reassign_e = 0x400, - iki_read_main_flag_replace_e = 0x800, - iki_read_main_flag_substitute_e = 0x1000, - iki_read_main_flag_total_e = 0x2000, - iki_read_main_flag_version_e = 0x4000, - iki_read_main_flag_whole_e = 0x8000, - iki_read_main_flag_wrap_e = 0x10000, + iki_read_main_flag_pipe_e = 0x100, + iki_read_main_flag_print_first_e = 0x200, + iki_read_main_flag_print_last_e = 0x400, + iki_read_main_flag_reassign_e = 0x800, + iki_read_main_flag_replace_e = 0x1000, + iki_read_main_flag_substitute_e = 0x2000, + iki_read_main_flag_total_e = 0x4000, + iki_read_main_flag_version_e = 0x8000, + iki_read_main_flag_whole_e = 0x10000, + iki_read_main_flag_wrap_e = 0x20000, }; // enum #endif // _di_iki_read_main_flag_e_ diff --git a/level_3/iki_read/c/main/iki_read.c b/level_3/iki_read/c/main/iki_read.c index 4bc7980..7b34d01 100644 --- a/level_3/iki_read/c/main/iki_read.c +++ b/level_3/iki_read/c/main/iki_read.c @@ -41,7 +41,7 @@ extern "C" { return; } - if (main->program.pipe & fll_program_data_pipe_input_e) { + if (main->setting.flag & iki_read_main_flag_pipe_e) { f_file_t file = f_file_t_initialize; file.id = F_type_descriptor_input_d; diff --git a/level_3/iki_write/c/main/common.c b/level_3/iki_write/c/main/common.c index 1b26f35..e0baed8 100644 --- a/level_3/iki_write/c/main/common.c +++ b/level_3/iki_write/c/main/common.c @@ -86,6 +86,13 @@ extern "C" { return; } + if (main->program.pipe & fll_program_data_pipe_input_e) { + main->setting.flag |= iki_write_main_flag_pipe_e; + } + else { + main->setting.flag -= main->setting.flag & iki_write_main_flag_pipe_e; + } + if (main->program.parameters.array[iki_write_parameter_file_e].result & f_console_result_value_e && main->program.parameters.array[iki_write_parameter_file_e].values.used) { if (main->program.parameters.array[iki_write_parameter_file_e].values.used > 1) { main->setting.state.status = F_status_set_error(F_parameter); diff --git a/level_3/iki_write/c/main/common/enumeration.h b/level_3/iki_write/c/main/common/enumeration.h index c946f33..2cb00f8 100644 --- a/level_3/iki_write/c/main/common/enumeration.h +++ b/level_3/iki_write/c/main/common/enumeration.h @@ -26,6 +26,7 @@ extern "C" { * - file_to: Using a specified destination file. * - help: Print help. * - object: The Object being written is specified. + * - pipe: Use the input pipe. * - print_first: When set, print new line to message output on program begin after loading settings. * - print_last: When set, print new line to message output on program end. * - print_last: The Object being written is specified. @@ -40,10 +41,11 @@ extern "C" { iki_write_main_flag_file_to_e = 0x4, iki_write_main_flag_help_e = 0x8, iki_write_main_flag_object_e = 0x10, - iki_write_main_flag_print_first_e = 0x20, - iki_write_main_flag_print_last_e = 0x40, - iki_write_main_flag_version_e = 0x80, - iki_write_main_flag_wrap_e = 0x100, + iki_write_main_flag_pipe_e = 0x20, + iki_write_main_flag_print_first_e = 0x40, + iki_write_main_flag_print_last_e = 0x80, + iki_write_main_flag_version_e = 0x100, + iki_write_main_flag_wrap_e = 0x200, }; // enum #endif // _di_iki_write_main_flag_e_ diff --git a/level_3/iki_write/c/main/iki_write.c b/level_3/iki_write/c/main/iki_write.c index bb07819..15a082b 100644 --- a/level_3/iki_write/c/main/iki_write.c +++ b/level_3/iki_write/c/main/iki_write.c @@ -43,7 +43,7 @@ extern "C" { main->setting.escaped.used = 0; - if (main->program.pipe & fll_program_data_pipe_input_e) { + if (main->setting.flag & iki_write_main_flag_pipe_e) { bool object_ended = F_false; f_number_unsigned_t previous = 0; diff --git a/level_3/status_code/c/main/common.c b/level_3/status_code/c/main/common.c index 2b13434..35d7b54 100644 --- a/level_3/status_code/c/main/common.c +++ b/level_3/status_code/c/main/common.c @@ -82,6 +82,13 @@ extern "C" { return; } + if (main->program.pipe & fll_program_data_pipe_input_e) { + main->setting.flag |= status_code_main_flag_pipe_e; + } + else { + main->setting.flag -= main->setting.flag & status_code_main_flag_pipe_e; + } + if (main->program.parameters.array[status_code_parameter_error_e].result & f_console_result_found_e) { main->setting.flag |= status_code_main_flag_error_e; } diff --git a/level_3/status_code/c/main/common/enumeration.h b/level_3/status_code/c/main/common/enumeration.h index ac99082..b751f2c 100644 --- a/level_3/status_code/c/main/common/enumeration.h +++ b/level_3/status_code/c/main/common/enumeration.h @@ -28,6 +28,7 @@ extern "C" { * - fine: Check if status is "fine". * - help: Print help. * - number: Operate in number mode. + * - pipe: Use the input pipe. * - print_first: When set, print new line to message output on program begin after loading settings. * - print_last: When set, print new line to message output on program end. * - version: Print version. @@ -41,10 +42,11 @@ extern "C" { status_code_main_flag_fine_e = 0x4, status_code_main_flag_help_e = 0x8, status_code_main_flag_number_e = 0x10, - status_code_main_flag_print_first_e = 0x20, - status_code_main_flag_print_last_e = 0x40, - status_code_main_flag_version_e = 0x80, - status_code_main_flag_warning_e = 0x100, + status_code_main_flag_pipe_e = 0x20, + status_code_main_flag_print_first_e = 0x40, + status_code_main_flag_print_last_e = 0x80, + status_code_main_flag_version_e = 0x100, + status_code_main_flag_warning_e = 0x200, }; // enum #endif // _di_status_code_main_flag_e_ diff --git a/level_3/status_code/c/main/status_code.c b/level_3/status_code/c/main/status_code.c index d975149..4f4aa23 100644 --- a/level_3/status_code/c/main/status_code.c +++ b/level_3/status_code/c/main/status_code.c @@ -62,7 +62,7 @@ extern "C" { f_status_t status = F_none; if (main->setting.flag & status_code_main_flag_number_e) { - if (main->program.pipe & fll_program_data_pipe_input_e) { + if (main->setting.flag & status_code_main_flag_pipe_e) { // @todo call status_code_process_number() here for all main from pipe that are space separated. } @@ -94,7 +94,7 @@ extern "C" { } } else if ((main->setting.flag & status_code_main_flag_error_e) || (main->setting.flag & status_code_main_flag_warning_e) || (main->setting.flag & status_code_main_flag_fine_e)) { - if (main->program.pipe & fll_program_data_pipe_input_e) { + if (main->setting.flag & status_code_main_flag_pipe_e) { // @todo call status_code_process_check() here for all main from pipe that is space separated. } @@ -126,7 +126,7 @@ extern "C" { } } else { - if (main->program.pipe & fll_program_data_pipe_input_e) { + if (main->setting.flag & status_code_main_flag_pipe_e) { // @todo call status_code_process_normal() here for all main from pipe that is space separated. } diff --git a/level_3/utf8/c/main/common.c b/level_3/utf8/c/main/common.c index c8601f9..a56c2f8 100644 --- a/level_3/utf8/c/main/common.c +++ b/level_3/utf8/c/main/common.c @@ -173,6 +173,13 @@ extern "C" { return; } + if (main->program.pipe & fll_program_data_pipe_input_e) { + main->setting.flag |= utf8_main_flag_pipe_e; + } + else { + main->setting.flag -= main->setting.flag & utf8_main_flag_pipe_e; + } + if (main->program.parameters.array[utf8_parameter_to_file_e].result & f_console_result_value_e) { if (main->program.parameters.array[utf8_parameter_to_file_e].values.used > 1) { main->setting.state.status = F_status_set_error(F_parameter); @@ -365,13 +372,6 @@ extern "C" { } // for } - if (main->program.pipe & fll_program_data_pipe_input_e) { - main->setting.flag |= utf8_main_flag_pipe_e; - } - else { - main->setting.flag -= main->setting.flag & utf8_main_flag_pipe_e; - } - if (!((main->setting.flag & (utf8_main_flag_pipe_e | utf8_main_flag_file_from_e)) || main->program.parameters.remaining.used)) { main->setting.state.status = F_status_set_error(F_parameter);