f_status_t status = F_none;
- f_console_parameter_t parameters[] = fss_extended_list_read_console_parameter_t_initialize;
- main->parameters.array = parameters;
- main->parameters.used = fss_extended_list_read_total_parameters_d;
-
{
f_console_parameter_id_t ids[3] = { fss_extended_list_read_parameter_no_color_e, fss_extended_list_read_parameter_light_e, fss_extended_list_read_parameter_dark_e };
const f_console_parameter_ids_t choices = { ids, 3 };
fll_program_parameter_process_empty(&main->context, sets);
}
- if (F_status_is_error(status)) {
- fss_extended_list_read_main_delete(main);
-
- return F_status_set_error(status);
- }
+ if (F_status_is_error(status)) return status;
}
// Identify priority of verbosity related parameters.
const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
-
- if (F_status_is_error(status)) {
- fss_extended_list_read_main_delete(main);
-
- return status;
- }
+ if (F_status_is_error(status)) return status;
if (choice == fss_extended_list_read_parameter_verbosity_quiet_e) {
main->output.verbosity = f_console_verbosity_quiet_e;
if (main->parameters.array[fss_extended_list_read_parameter_help_e].result == f_console_result_found_e) {
fss_extended_list_read_print_help(main->output.to, main->context);
- fss_extended_list_read_main_delete(main);
-
return status;
}
if (main->parameters.array[fss_extended_list_read_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_extended_list_read_program_version_s);
- fss_extended_list_read_main_delete(main);
-
return status;
}
}
fss_extended_list_read_data_delete_simple(&data);
- fss_extended_list_read_main_delete(main);
return F_none;
}
}
fss_extended_list_read_data_delete_simple(&data);
- fss_extended_list_read_main_delete(main);
return status;
}
/**
* Execute main program.
*
- * Be sure to call fss_extended_list_read_main_delete() after executing this.
- *
* If main.signal is non-zero, then this blocks and handles the following signals:
* - F_signal_abort
* - F_signal_broken_pipe
* F_none on success.
*
* Status codes (with error bit) are returned on any problem.
- *
- * @see fss_extended_list_read_main_delete()
*/
#ifndef _di_fss_extended_list_read_main_
extern f_status_t fss_extended_list_read_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
f_console_arguments_t arguments = { argc, argv };
fll_program_data_t data = fll_program_data_t_initialize;
+ f_console_parameter_t parameters[] = fss_extended_list_read_console_parameter_t_initialize;
+ data.parameters.array = parameters;
+ data.parameters.used = fss_extended_list_read_total_parameters_d;
+
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
const f_status_t status = fss_extended_list_read_main(&data, &arguments);
+ fll_program_data_delete(&data);
+
fll_program_standard_setdown(&data.signal);
if (F_status_is_error(status)) return 1;