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".
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;
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];
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;
* - 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.
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_
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 {
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 {
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 {
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;
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 {
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 {
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,
}
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) {
* - 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.
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_
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);
}
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;
}
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);
}
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 {
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;
* - 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.
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_
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);
}
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);
* - 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.
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_
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;
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);
* - 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.
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_
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;
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;
}
* - 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.
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_
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.
}
}
}
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.
}
}
}
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.
}
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);
} // 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);