// 0x10 = output descriptor, 0x20 = error descriptor, 0x40 = input descriptor.
flag = 0;
- f_file_t file = f_file_t_initialize;
+ {
+ f_file_t file = f_file_t_initialize;
- if (F_type_output_d) {
- file.stream = F_type_output_d;
- flag |= 0x1;
+ if (F_type_output_d) {
+ file.stream = F_type_output_d;
+ flag |= 0x1;
- f_file_stream_flush(file);
- }
- else {
- if (F_type_descriptor_output_d != -1) {
- file.id = F_type_descriptor_output_d;
- flag |= 0x20;
+ f_file_stream_flush(file);
+ }
+ else {
+ if (F_type_descriptor_output_d != -1) {
+ file.id = F_type_descriptor_output_d;
+ flag |= 0x20;
- f_file_flush(file);
+ f_file_flush(file);
+ }
}
- }
- if (F_type_error_d) {
- file.stream = F_type_error_d;
- flag |= 0x2;
+ if (F_type_error_d) {
+ file.stream = F_type_error_d;
+ flag |= 0x2;
- f_file_stream_flush(file);
- }
- else {
- if (F_type_descriptor_error_d != -1) {
- file.id = F_type_descriptor_output_d;
- flag |= 0x40;
+ f_file_stream_flush(file);
+ }
+ else {
+ if (F_type_descriptor_error_d != -1) {
+ file.id = F_type_descriptor_output_d;
+ flag |= 0x40;
- f_file_flush(file);
+ f_file_flush(file);
+ }
}
- }
- if (F_type_input_d) {
- file.stream = F_type_input_d;
- flag |= 0x4;
+ if (F_type_input_d) {
+ file.stream = F_type_input_d;
+ flag |= 0x4;
- f_file_stream_flush(file);
- }
- else {
- if (F_type_descriptor_input_d != -1) {
- file.id = F_type_descriptor_input_d;
- flag |= 0x80;
+ f_file_stream_flush(file);
+ }
+ else {
+ if (F_type_descriptor_input_d != -1) {
+ file.id = F_type_descriptor_input_d;
+ flag |= 0x80;
- f_file_flush(file);
+ f_file_flush(file);
+ }
}
- }
- if (flag & 0x1) {
- file.stream = F_type_output_d;
+ if (flag & 0x1) {
+ file.stream = F_type_output_d;
- f_file_stream_close(&file);
- }
+ f_file_stream_close(&file);
+ }
- if (flag & 0x2) {
- file.stream = F_type_error_d;
+ if (flag & 0x2) {
+ file.stream = F_type_error_d;
- f_file_stream_close(&file);
- }
+ f_file_stream_close(&file);
+ }
- if (flag & 0x4) {
- file.stream = F_type_input_d;
+ if (flag & 0x4) {
+ file.stream = F_type_input_d;
- f_file_stream_close(&file);
- }
+ f_file_stream_close(&file);
+ }
- if (flag & 0x10) {
- file.id = F_type_descriptor_output_d;
+ if (flag & 0x10) {
+ file.id = F_type_descriptor_output_d;
- f_file_close(&file);
- }
+ f_file_close(&file);
+ }
- if (flag & 0x20) {
- file.id = F_type_descriptor_error_d;
+ if (flag & 0x20) {
+ file.id = F_type_descriptor_error_d;
- f_file_close(&file);
- }
+ f_file_close(&file);
+ }
- if (flag & 0x40) {
- file.id = F_type_descriptor_input_d;
+ if (flag & 0x40) {
+ file.id = F_type_descriptor_input_d;
- f_file_close(&file);
+ f_file_close(&file);
+ }
}
- const f_status_t status = f_signal_close(&program->signal);
- if (F_status_is_error(status)) return status;
+ {
+ const f_status_t status = f_signal_close(&program->signal);
+ if (F_status_is_error(status)) return status;
+ }
return F_okay;
}