Starting with utf8, start the process of breaking out the parameter settings into a variable that the caller can customize.
This should improve extensibility such that the caller can provide their own initializers.
Other incidental changes are made.
status = byte_dump_file(&data, data.argv[main->parameters.remaining.array[counter]], file);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_interrupt) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = byte_dump_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = control_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
status = f_file_stream_read(file, &data->cache.large);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, data->cache.small, f_file_operation_read_s, fll_error_file_type_file_e);
if (F_status_is_error(status)) {
if (!required && F_status_set_fine(status) == F_file_found_not) {
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
return F_file_found_not;
}
}
}
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error_not(status)) {
struct stat stat_file;
fll_print_format("%i%r", file.stream, pid, f_string_eol_s);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) return status;
status = f_file_stream_read(pid_file, &pid_buffer);
if (F_status_is_error_not(status)) {
- status = f_file_stream_close(F_true, &pid_file);
+ status = f_file_stream_flush(&pid_file);
+ }
+
+ if (F_status_is_error_not(status)) {
+ status = f_file_stream_close(&pid_file);
}
if (F_status_is_error_not(status)) {
status = f_file_stream_read(pid_file, &pid_buffer);
if (F_status_is_error_not(status)) {
- status = f_file_stream_close(F_true, &pid_file);
+ status = f_file_stream_flush(&pid_file);
+ }
+
+ if (F_status_is_error_not(status)) {
+ status = f_file_stream_close(&pid_file);
}
if (F_status_is_error_not(status)) {
data.pid = getpid();
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
f_file_umask_get(&data.umask);
controller_main_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
// When the child process exits, it must return the code to the parent so the parent knows how to handle the exit.
if (status == F_child) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
f_file_umask_get(&data.umask);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (status == F_child) {
exit(data.child);
name_function = "f_file_read";
status = f_file_read(file, buffer);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
}
}
else if (status == F_false) {
data_make.error.context = data->main->context.set.warning;
data_make.error.notable = data->main->context.set.notable;
data_make.error.to.stream = F_type_warning_d;
- data_make.error.to.id = F_type_descriptor_warning_d;
+ data_make.error.to.id = F_type_descriptor_output_d;
data_make.error.set = &data->main->context.set;
}
else {
}
}
- f_file_stream_close(F_true, &data_make.path.top);
+ f_file_stream_flush(&data_make.path.top);
+ f_file_stream_close(&data_make.path.top);
f_array_lengths_resize(0, §ion_stack);
fake_make_data_delete(&data_make);
data_make->error.context = data_make->main->context.set.warning;
data_make->error.notable = data_make->main->context.set.notable;
data_make->error.to.stream = F_type_warning_d;
- data_make->error.to.id = F_type_descriptor_warning_d;
+ data_make->error.to.id = F_type_descriptor_output_d;
data_make->error.set = &data_make->main->context.set;
}
else {
else {
status = F_none;
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
}
}
} // for
}
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
}
if (F_status_is_error(status)) return F_status_set_error(F_failure);
if (F_status_is_error(status)) {
fll_error_file_print(data->main->error, F_status_set_fine(status), "f_file_write", F_true, path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
return status;
}
fll_print_format("File '%Q' pre-populated.%r", data->main->output.to.stream, path, f_string_eol_s);
}
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
}
}
else if (F_status_is_error(status)) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = firewall_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (status == F_child) {
exit(data.child);
firewall_print_error_on_unhandled(data->main->error, "f_file_open", F_status_set_fine(status));
}
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
}
else {
status = f_file_read(file, &local_buffer);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (data->main->error.verbosity != f_console_verbosity_quiet_e) {
status = f_file_read(file, &local->buffer);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (data->main->error.verbosity != f_console_verbosity_quiet_e) {
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_increase_by", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) break;
} // for
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
}
} // for
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
}
if (F_status_is_error_not(status)) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_basic_list_read_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
}
if (main->parameters.array[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) {
- if (output.id != -1) {
- f_file_stream_close(F_true, &output);
- }
+ f_file_stream_flush(&output);
+ f_file_stream_close(&output);
}
// Ensure a newline is always put at the end of the program execution, unless in quiet mode.
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_basic_list_write_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) break;
} // for
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_basic_read_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
}
if (main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) {
- if (output.id != -1) {
- f_file_stream_close(F_true, &output);
- }
+ f_file_stream_flush(&output);
+ f_file_stream_close(&output);
}
// Ensure a newline is always put at the end of the program execution, unless in quiet mode.
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_basic_write_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
fll_print_format("%r%r", main->output.to.stream, f_string_ascii_0_s, f_string_eol_s);
}
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
continue;
}
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) break;
} // for
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_embedded_list_read_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
}
if (main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) {
- if (output.id != -1) {
- f_file_stream_close(F_true, &output);
- }
+ f_file_stream_flush(&output);
+ f_file_stream_close(&output);
}
// Ensure a newline is always put at the end of the program execution, unless in quiet mode.
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_embedded_list_write_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) break;
} // for
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_extended_list_read_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
}
if (main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) {
- if (output.id != -1) {
- f_file_stream_close(F_true, &output);
- }
+ f_file_stream_flush(&output);
+ f_file_stream_close(&output);
}
// Ensure a newline is always put at the end of the program execution, unless in quiet mode.
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_extended_list_write_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) break;
} // for
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_extended_read_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
}
if (main->parameters.array[fss_extended_write_parameter_file_e].result == f_console_result_additional_e) {
- if (output.id != -1) {
- f_file_stream_close(F_true, &output);
- }
+ f_file_stream_flush(&output);
+ f_file_stream_close(&output);
}
// Ensure a newline is always put at the end of the program execution, unless in quiet mode.
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_extended_write_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
}
}
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) break;
} // for
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_identify_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) break;
} // for
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_payload_read_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
}
if (main->parameters.array[fss_payload_write_parameter_file_e].result == f_console_result_additional_e) {
- if (output.id != -1) {
- f_file_stream_close(F_true, &output);
- }
+ f_file_stream_flush(&output);
+ f_file_stream_close(&output);
}
// Ensure a newline is always put at the end of the program execution, unless in quiet mode.
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_payload_write_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = fss_status_code_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status) || status == F_false) return 1;
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
// Skip past empty files.
if (!size_file) {
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
continue;
}
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, data.argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
break;
}
if (F_status_is_error(status)) break;
} // for
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_interrupt) {
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = iki_read_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
}
if (main->parameters.array[iki_write_parameter_file_e].result == f_console_result_additional_e) {
- if (file.id != -1) {
- f_file_stream_close(F_true, &file);
- }
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
}
// Ensure a new line is always put at the end of the program execution, unless in quiet mode.
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = iki_write_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
data.process_pipe = F_true;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
const f_status_t status = status_code_main(&data, &arguments);
fll_program_data_delete(&data);
- fll_program_standard_setdown(&data.signal);
+ fll_program_standard_set_down(&data.signal);
if (F_status_is_error(status)) return 1;
/**
* Modes used to designate how to the input and output are to be processed.
*
- * utf8_mode_from_*:
+ * utf8_mode_*_e:
+ * - none: No modes in use.
+ *
+ * utf8_mode_from_*_e:
* - bytesequence: The input format is bytesequence.
* - codepoint: The input format is codepoint (U+XXXX or U+XXXXXX).
*
- * utf8_mode_to_*:
+ * utf8_mode_to_*_e:
* - bytesequence: The outout format is bytesequence.
* - codepoint: The outout format is codepoint (U+XXXX or U+XXXXXX).
* - combining: The outout format is whether or not character is combining (may be used with "width").
* - width: The outout format is how wide the character is (may be used with "combining").
*/
-#ifndef _di_utf8_modes_
- #define utf8_mode_from_bytesequence_d 0x1
- #define utf8_mode_from_codepoint_d 0x2
- #define utf8_mode_to_bytesequence_d 0x4
- #define utf8_mode_to_codepoint_d 0x8
- #define utf8_mode_to_combining_d 0x10
- #define utf8_mode_to_width_d 0x20
-#endif // _di_utf8_modes_
+#ifndef _di_utf8_modes_e_
+ enum {
+ utf8_mode_none_e = 0x0,
+ utf8_mode_from_bytesequence_e = 0x1,
+ utf8_mode_from_codepoint_d = 0x2,
+ utf8_mode_to_bytesequence_d = 0x4,
+ utf8_mode_to_codepoint_d = 0x8,
+ utf8_mode_to_combining_d = 0x10,
+ utf8_mode_to_width_d = 0x20,
+ };
+#endif // _di_utf8_modes_e_
+
+/**
+ * The UTF-8 main program settings.
+ *
+ * This is passed to the program-specific main entry point to designate program settings.
+ * These program settings are often processed from the program arguments (often called the command line arguments).
+ *
+ * mode: The input/output mode (see utf8_modes_e).
+ */
+#ifndef _di_utf8_main_setting_t_
+ typedef struct {
+ uint8_t mode;
+ } utf8_main_setting_t;
+
+ #define utf8_main_setting_t_initialize \
+ { \
+ utf8_mode_from_bytesequence_d | utf8_mode_to_codepoint_d, \
+ }
+#endif // _di_utf8_main_setting_t_
+
+/*
+ f_color_set_t valid;
+ f_color_set_t valid_not;
+
+ f_string_static_t append;
+ f_string_static_t prepend;
+
+ f_string_dynamic_t buffer;
+ f_string_dynamic_t text;
+ } utf8_data_t;
+
+ #define utf8_data_t_initialize \
+ { \
+ 0, \
+ 0, \
+ 0, \
+ f_file_t_initialize, \
+ utf8_mode_from_bytesequence_d | utf8_mode_to_codepoint_d, \
+ f_color_set_t_initialize, \
+ f_color_set_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ }
+ */
#ifdef __cplusplus
} // extern "C"
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
+
fll_program_data_t data = fll_program_data_t_initialize;
+ utf8_main_setting_t setting = utf8_main_setting_t_initialize;
f_console_parameter_t parameters[] = utf8_console_parameter_t_initialize;
data.parameters.array = parameters;
data.parameters.used = utf8_total_parameters_d;
if (f_pipe_input_exists()) {
- data.process_pipe = F_true;
+ data.pipe |= fll_program_data_pipe_input_e;
}
- fll_program_standard_setup(&data.signal);
+ fll_program_standard_set_up(&data.signal);
- const f_status_t status = utf8_main(&data, &arguments);
+ f_status_t status = utf8_main_setting_load(arguments, data, &setting);
- fll_program_data_delete(&data);
+ if (F_status_is_error_not(status)) {
+ status = utf8_main(&data, &setting);
+ }
+
+ if (data.message.stream != data.output.stream) {
+ f_file_stream_flush(&data->output);
+ f_file_stream_close(&data->output);
+ }
+
+ utf8_main_setting_unload(data, &setting);
- fll_program_standard_setdown(&data.signal);
+ utf8_main_setting_delete(&setting);
+
+ fll_program_data_delete(&data);
- if (F_status_is_error(status)) return 1;
+ fll_program_standard_set_down(&data.signal);
- return 0;
+ return F_status_is_error(status) ? 1 : 0;
}
#ifndef _di_utf8_data_delete_
void utf8_data_delete(utf8_data_t *data) {
- if (data->file.stream != data->main->output.to.stream) {
- f_file_stream_close(F_true, &data->file);
- }
-
f_string_dynamic_resize(0, &data->buffer);
f_string_dynamic_resize(0, &data->text);
}
/**
* The program data.
*
- * argv: The argument structure in the progam data parameters for simplifying syntax.
+ * main: The main program data.
+ * setting: The main program settings.
+ * argv: The argument structure in the progam data parameters for simplifying syntax.
+ *
* main: The main program data.
* file: The output file for writing the processed data to (may potentially default to "output").
- * mode: The input/output mode (see utf8_modes).
* valid: Designate the output context set for valid characters.
* valid_not: Designate the output context set for invalid characters.
* append: A string to append. A value of NULL results in not appending.
#ifndef _di_utf8_data_t_
typedef struct {
fll_program_data_t *main;
+ utf8_main_setting_t *setting;
f_string_static_t *argv;
- f_file_t file;
- uint8_t mode;
+ //f_file_t file;
f_color_set_t valid;
f_color_set_t valid_not;
{ \
0, \
0, \
- f_file_t_initialize, \
- utf8_mode_from_bytesequence_d | utf8_mode_to_codepoint_d, \
+ 0, \
+ //f_file_t_initialize, \
f_color_set_t_initialize, \
f_color_set_t_initialize, \
f_string_static_t_initialize, \
}
}
- if (valid_not || F_status_is_error(status)) {
- return F_utf_not;
- }
+ if (valid_not || F_status_is_error(status)) return F_utf_not;
return F_none;
}
data->buffer.used = 0;
- if (F_status_is_error(status) || status == F_interrupt) {
- return status;
- }
+ if (F_status_is_error(status) || status == F_interrupt) return status;
return valid;
}
data->buffer.used = 0;
- if (F_status_is_error(status) || status == F_interrupt) {
- return status;
- }
+ if (F_status_is_error(status) || status == F_interrupt) return status;
return valid;
}
#endif // _di_utf8_print_help_
#ifndef _di_utf8_main_
- f_status_t utf8_main(fll_program_data_t * const main, const f_console_arguments_t *arguments) {
+ f_status_t utf8_main(fll_program_data_t * const main, utf8_main_setting_t * const setting) {
- f_status_t status = F_none;
-
- utf8_data_t data = utf8_data_t_initialize;
- data.main = main;
-
- // Identify priority of color parameters.
- {
- f_console_parameter_id_t ids[3] = { utf8_parameter_no_color_e, utf8_parameter_light_e, utf8_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
-
- status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->context);
-
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
-
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
-
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
-
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
-
- fll_program_parameter_process_empty(&main->context, sets);
- }
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
-
- utf8_data_delete(&data);
-
- return F_status_set_error(status);
- }
- }
-
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[5] = { utf8_parameter_verbosity_quiet_e, utf8_parameter_verbosity_error_e, utf8_parameter_verbosity_normal_e, utf8_parameter_verbosity_verbose_e, utf8_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5);
-
- status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
-
- utf8_data_delete(&data);
-
- return status;
- }
-
- if (choice == utf8_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == utf8_parameter_verbosity_error_e) {
- main->output.verbosity = f_console_verbosity_error_e;
- main->error.verbosity = f_console_verbosity_error_e;
- main->warning.verbosity = f_console_verbosity_error_e;
- }
- else if (choice == utf8_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == utf8_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == utf8_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
- }
-
- // Identify and prioritize from mode parameters.
- {
- f_console_parameter_id_t ids[2] = { utf8_parameter_from_bytesequence_e, utf8_parameter_from_codepoint_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 2);
-
- status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
-
- utf8_data_delete(&data);
-
- return status;
- }
-
- if (choice == utf8_parameter_from_bytesequence_e) {
- if (data.mode & utf8_mode_from_codepoint_d) {
- data.mode -= utf8_mode_from_codepoint_d;
- }
-
- data.mode |= utf8_mode_from_bytesequence_d;
- }
- else if (choice == utf8_parameter_from_codepoint_e) {
- if (data.mode & utf8_mode_from_bytesequence_d) {
- data.mode -= utf8_mode_from_bytesequence_d;
- }
-
- data.mode |= utf8_mode_from_codepoint_d;
- }
- }
-
- // Identify and prioritize to mode parameters.
- {
- f_console_parameter_id_t ids[5] = { utf8_parameter_to_bytesequence_e, utf8_parameter_to_codepoint_e, utf8_parameter_to_combining_e, utf8_parameter_to_width_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5);
-
- status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
-
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
-
- utf8_data_delete(&data);
-
- return status;
- }
-
- if (choice == utf8_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == utf8_parameter_verbosity_error_e) {
- main->output.verbosity = f_console_verbosity_error_e;
- main->error.verbosity = f_console_verbosity_error_e;
- main->warning.verbosity = f_console_verbosity_error_e;
- }
- else if (choice == utf8_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == utf8_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == utf8_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
-
- if (choice == utf8_parameter_to_bytesequence_e) {
- if (data.mode & utf8_mode_to_codepoint_d) {
- data.mode -= utf8_mode_to_codepoint_d;
- }
-
- if (data.mode & utf8_mode_to_combining_d) {
- data.mode -= utf8_mode_to_combining_d;
- }
-
- if (data.mode & utf8_mode_to_width_d) {
- data.mode -= utf8_mode_to_width_d;
- }
-
- data.mode |= utf8_mode_to_bytesequence_d;
- }
- else if (choice == utf8_parameter_to_codepoint_e) {
- if (data.mode & utf8_mode_to_bytesequence_d) {
- data.mode -= utf8_mode_to_bytesequence_d;
- }
-
- if (data.mode & utf8_mode_to_combining_d) {
- data.mode -= utf8_mode_to_combining_d;
- }
-
- if (data.mode & utf8_mode_to_width_d) {
- data.mode -= utf8_mode_to_width_d;
- }
-
- data.mode |= utf8_mode_to_codepoint_d;
+ if (!main || !setting) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_error_print(main->error, F_status_set_fine(status), "utf8_main", F_true);
+ fll_print_dynamic_raw(f_string_eol_s, main->message.to.stream);
}
- else if (choice == utf8_parameter_to_combining_e) {
- if (data.mode & utf8_mode_to_bytesequence_d) {
- data.mode -= utf8_mode_to_bytesequence_d;
- }
-
- if (data.mode & utf8_mode_to_codepoint_d) {
- data.mode -= utf8_mode_to_codepoint_d;
- }
-
- // --to_width may be specified with --to_combining.
- if (main->parameters.array[utf8_parameter_to_width_e].result == f_console_result_found_e) {
- data.mode |= utf8_mode_to_width_d;
- }
-
- data.mode |= utf8_mode_to_combining_d;
- }
- else if (choice == utf8_parameter_to_width_e) {
- if (data.mode & utf8_mode_to_bytesequence_d) {
- data.mode -= utf8_mode_to_bytesequence_d;
- }
-
- if (data.mode & utf8_mode_to_codepoint_d) {
- data.mode -= utf8_mode_to_codepoint_d;
- }
-
- // --to_width may be specified with --to_combining.
- if (main->parameters.array[utf8_parameter_to_combining_e].result == f_console_result_found_e) {
- data.mode |= utf8_mode_to_combining_d;
- }
- data.mode |= utf8_mode_to_width_d;
- }
+ return F_status_set_error(F_paremeter);
}
+ utf8_data_t data = utf8_data_t_initialize;
+ data.main = main;
+ data.setting = setting;
data.argv = main->parameters.arguments.array;
- status = F_none;
+ f_status_t status = F_none;
if (main->parameters.array[utf8_parameter_help_e].result == f_console_result_found_e) {
- utf8_print_help(main->output.to, main->context);
+ utf8_print_help(main->message.to, main->context);
utf8_data_delete(&data);
}
if (main->parameters.array[utf8_parameter_version_e].result == f_console_result_found_e) {
- fll_program_print_version(main->output.to, utf8_program_version_s);
+ fll_program_print_version(main->message.to, utf8_program_version_s);
utf8_data_delete(&data);
status = F_status_set_error(F_parameter);
}
else {
- data.file = main->output.to;
+ data.file = main->message.to;
}
}
}
}
- data.valid_not = main->output.set->error;
+ data.valid_not = main->message.set->error;
}
if (F_status_is_error_not(status)) {
status = utf8_process_file_codepoint(&data, file);
}
- f_file_stream_close(F_true, &file);
+ f_file_stream_flush(&file);
+ f_file_stream_close(&file);
if (main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) {
if (status == F_false) {
}
}
- if (main->output.verbosity != f_console_verbosity_quiet_e && main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
+ if (main->message.verbosity != f_console_verbosity_quiet_e && main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
if (status == F_interrupt) {
fflush(data.file.stream);
- if (data.file.stream != main->output.to.stream) {
- fflush(main->output.to.stream);
+ if (data.file.stream != main->message.to.stream) {
+ fflush(main->message.to.stream);
}
}
- fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
+ fll_print_dynamic_raw(f_string_eol_s, main->message.to.stream);
}
utf8_data_delete(&data);
- if (F_status_is_error(status) || status == F_interrupt) {
- return status;
- }
+ if (F_status_is_error(status) || status == F_interrupt) return status;
return valid;
}
#endif // _di_utf8_main_
+#ifndef _di_utf8_main_setting_delete_
+ f_status_t utf8_main_setting_delete(utf8_main_setting_t * const setting) {
+
+ return F_none;
+ }
+#endif // _di_utf8_main_setting_delete_
+
+#ifndef _di_utf8_main_setting_load_
+ f_status_t utf8_main_setting_load(const f_console_arguments_t arguments, fll_program_data_t * const main, utf8_main_setting_t * const setting) {
+
+ f_status_t status = F_none;
+
+ // Identify priority of color parameters.
+ {
+ f_console_parameter_id_t ids[3] = { utf8_parameter_no_color_e, utf8_parameter_light_e, utf8_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+
+ status = fll_program_parameter_process(arguments, choices, F_true, main);
+
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
+
+ return status;
+ }
+ }
+
+ {
+ const verbosity[5] = { utf8_parameter_verbosity_quiet_e, utf8_parameter_verbosity_error_e, f_console_verbosity_normal_e, utf8_parameter_verbosity_verbose_e, utf8_parameter_verbosity_debug_e };
+ f_console_parameter_id_t ids[5] = { utf8_parameter_verbosity_quiet_e, utf8_parameter_verbosity_error_e, utf8_parameter_verbosity_normal_e, utf8_parameter_verbosity_verbose_e, utf8_parameter_verbosity_debug_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5);
+
+ status = fll_program_parameter_process_verbosity(choices, F_true, verbosity, main);
+
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process_verbosity", F_true);
+
+ return status;
+ }
+ }
+
+ // Identify and prioritize from mode parameters.
+ {
+ f_console_parameter_id_t ids[2] = { utf8_parameter_from_bytesequence_e, utf8_parameter_from_codepoint_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 2);
+
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
+
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+
+ return status;
+ }
+
+ if (choice == utf8_parameter_from_bytesequence_e) {
+ if (data.mode & utf8_mode_from_codepoint_d) {
+ data.mode -= utf8_mode_from_codepoint_d;
+ }
+
+ data.mode |= utf8_mode_from_bytesequence_d;
+ }
+ else if (choice == utf8_parameter_from_codepoint_e) {
+ if (data.mode & utf8_mode_from_bytesequence_d) {
+ data.mode -= utf8_mode_from_bytesequence_d;
+ }
+
+ data.mode |= utf8_mode_from_codepoint_d;
+ }
+ }
+
+ // Identify and prioritize to mode parameters.
+ {
+ f_console_parameter_id_t ids[5] = { utf8_parameter_to_bytesequence_e, utf8_parameter_to_codepoint_e, utf8_parameter_to_combining_e, utf8_parameter_to_width_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5);
+
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
+
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+
+ return status;
+ }
+
+ if (choice == utf8_parameter_to_bytesequence_e) {
+ if (data.mode & utf8_mode_to_codepoint_d) {
+ data.mode -= utf8_mode_to_codepoint_d;
+ }
+
+ if (data.mode & utf8_mode_to_combining_d) {
+ data.mode -= utf8_mode_to_combining_d;
+ }
+
+ if (data.mode & utf8_mode_to_width_d) {
+ data.mode -= utf8_mode_to_width_d;
+ }
+
+ data.mode |= utf8_mode_to_bytesequence_d;
+ }
+ else if (choice == utf8_parameter_to_codepoint_e) {
+ if (data.mode & utf8_mode_to_bytesequence_d) {
+ data.mode -= utf8_mode_to_bytesequence_d;
+ }
+
+ if (data.mode & utf8_mode_to_combining_d) {
+ data.mode -= utf8_mode_to_combining_d;
+ }
+
+ if (data.mode & utf8_mode_to_width_d) {
+ data.mode -= utf8_mode_to_width_d;
+ }
+
+ data.mode |= utf8_mode_to_codepoint_d;
+ }
+ else if (choice == utf8_parameter_to_combining_e) {
+ if (data.mode & utf8_mode_to_bytesequence_d) {
+ data.mode -= utf8_mode_to_bytesequence_d;
+ }
+
+ if (data.mode & utf8_mode_to_codepoint_d) {
+ data.mode -= utf8_mode_to_codepoint_d;
+ }
+
+ // --to_width may be specified with --to_combining.
+ if (main->parameters.array[utf8_parameter_to_width_e].result == f_console_result_found_e) {
+ data.mode |= utf8_mode_to_width_d;
+ }
+
+ data.mode |= utf8_mode_to_combining_d;
+ }
+ else if (choice == utf8_parameter_to_width_e) {
+ if (data.mode & utf8_mode_to_bytesequence_d) {
+ data.mode -= utf8_mode_to_bytesequence_d;
+ }
+
+ if (data.mode & utf8_mode_to_codepoint_d) {
+ data.mode -= utf8_mode_to_codepoint_d;
+ }
+
+ // --to_width may be specified with --to_combining.
+ if (main->parameters.array[utf8_parameter_to_combining_e].result == f_console_result_found_e) {
+ data.mode |= utf8_mode_to_combining_d;
+ }
+
+ data.mode |= utf8_mode_to_width_d;
+ }
+ }
+
+ return F_none;
+ }
+#endif // _di_utf8_main_setting_load_
+
+#ifndef _di_utf8_main_setting_unload_
+ f_status_t utf8_main_setting_unload(fll_program_data_t * const main, utf8_main_setting_t * const setting) {
+
+ if (data->file.stream) {
+ if (data->file.stream != main->message.stream && data->file.stream != main->output.stream && data->file.stream != main->error.stream && data->file.stream != main->warning.stream && data->file.stream != main->debug.stream) {
+ f_file_stream_flush(&data->file);
+ f_file_stream_close(&data->file);
+ }
+ }
+ else if (data->file.id != -1) {
+ if (data->file.id != main->message.id && data->file.id != main->output.id && data->file.id != main->error.id && data->file.id != main->warning.id && data->file.id != main->debug.id) {
+ f_file_flush(&data->file);
+ f_file_close(&data->file);
+ }
+ }
+ }
+#endif // _di_utf8_main_setting_unload_
+
#ifdef __cplusplus
} // extern "C"
#endif
*
* @param main
* The main program data.
- * @param arguments
- * The parameters passed to the process.
+ * @param setting
+ * The main program setting data.
*
* @return
* F_none on success.
* F_false on success when performing verification and verify failed.
* F_interrupt on (exit) signal received.
*
- * Status codes (with error bit) are returned on any problem.
+ * F_parameter (with error bit) If main is NULL or setting is NULL.
*/
#ifndef _di_utf8_main_
- extern f_status_t utf8_main(fll_program_data_t * const main, const f_console_arguments_t *arguments);
+ extern f_status_t utf8_main(fll_program_data_t * const main, utf8_main_setting_t * const setting);
#endif // _di_utf8_main_
+/**
+ * Delete the program main setting data.
+ *
+ * @param setting
+ * The program main setting data.
+ *
+ * @return
+ * F_none on success.
+ */
+#ifndef _di_utf8_main_setting_delete_
+ extern f_status_t utf8_main_setting_delete(utf8_main_setting_t * const setting);
+#endif // _di_utf8_main_setting_delete_
+
+/**
+ * Perform the standard program setting load process.
+ *
+ * @param arguments
+ * The parameters passed to the process (often referred to as command line arguments).
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program setting data.
+ *
+ * @return
+ * F_none on success.
+ *
+ * Errors (with error bit) from: fll_program_parameter_process().
+ *
+ * @see fll_program_parameter_process()
+ */
+#ifndef _di_utf8_main_setting_load_
+ extern f_status_t utf8_main_setting_load(const f_console_arguments_t arguments, fll_program_data_t * const main, utf8_main_setting_t * const setting);
+#endif // _di_utf8_main_setting_load_
+
+/**
+ * Perform the standard program setting unload process.
+ *
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program setting data.
+ *
+ * @return
+ * F_none on success.
+ */
+#ifndef _di_utf8_main_setting_unload_
+ extern f_status_t utf8_main_setting_unload(fll_program_data_t * const main, utf8_main_setting_t * const setting);
+#endif // _di_utf8_main_setting_unload_
+
#ifdef __cplusplus
} // extern "C"
#endif