// fll-0 includes
#include <level_0/console.h>
#include <level_0/file.h>
+#include <level_0/pipe.h>
#include <level_0/print.h>
#include <level_0/string.h>
#include <level_0/type.h>
f_string_dynamics chains;
f_string_lengths remaining;
+ f_bool process_pipe;
f_string_dynamics devices;
fl_color_context context;
f_console_parameter_initialize_firewall, \
f_string_dynamics_initialize, \
f_string_lengths_initialize, \
+ f_false, \
f_string_dynamics_initialize, \
fl_color_context_initialize, \
}
const f_console_arguments arguments = { argc, argv };
firewall_data data = firewall_data_initialize;
- if (f_status_is_error(firewall_main(arguments, &data))) {
+ if (f_pipe_exists()) {
+ data.process_pipe = f_true;
+ }
+
+ f_status status = firewall_main(arguments, &data);
+
+ if (f_status_is_error(status)) {
return 1;
}
data.process_pipe = f_true;
}
- if (f_status_is_error(fss_basic_list_read_main(arguments, &data))) {
+ f_status status = fss_basic_list_read_main(arguments, &data);
+
+ if (f_status_is_error(status)) {
return 1;
}
data.process_pipe = f_true;
}
- if (f_status_is_error(fss_basic_list_write_main(arguments, &data))) {
+ f_status status = fss_basic_list_write_main(arguments, &data);
+
+ if (f_status_is_error(status)) {
return 1;
}
data.process_pipe = f_true;
}
- if (f_status_is_error(fss_basic_read_main(arguments, &data))) {
+ f_status status = fss_basic_read_main(arguments, &data);
+
+ if (f_status_is_error(status)) {
return 1;
}
const f_console_arguments arguments = { argc, argv };
fss_basic_write_data data = fss_basic_write_data_initialize;
- if (f_pipe_exists()) {
- data.process_pipe = f_true;
- }
+ f_status status = fss_basic_write_main(arguments, &data);
- if (f_status_is_error(fss_basic_write_main(arguments, &data))) {
+ if (f_status_is_error(status)) {
return 1;
}
data.process_pipe = f_true;
}
- if (f_status_is_error(fss_extended_read_main(arguments, &data))) {
+ f_status status = fss_extended_read_main(arguments, &data);
+
+ if (f_status_is_error(status)) {
return 1;
}
data.process_pipe = f_true;
}
- if (f_status_is_error(fss_extended_write_main(arguments, &data))) {
+ f_status status = fss_extended_write_main(arguments, &data);
+
+ if (f_status_is_error(status)) {
return 1;
}
const f_console_arguments arguments = { argc, argv };
init_argument data = init_argument_initialize;
- return init_main(arguments, &data);
+ if (f_pipe_exists()) {
+ data.process_pipe = f_true;
+ }
+
+ f_status status = init_main(arguments, &data);
+
+ if (f_status_is_error(status)) {
+ return 1;
+ }
+
+ return 0;
}