The common.h and related files are now broken up a little more.
There is now a common-string.h and common-type.h (with matching source files).
This should make it easier to navigate, particularly when there are a lot of functions, strings, and types.
Lots of tedious updates to the Featureless Make.
There are still a lot of structural changes to make.
Add more parameters to Featureless Make to address the documents and the licenses directories.
There is still more work to do with those parameters.
Fix some observed mistakes in the level_0 console code.
}
if (parameters->array[i].flag & f_console_flag_disable_e) continue;
- if (!(parameters->array[i].flag & f_console_result_alone_e)) continue;
+ if (!(parameters->array[i].flag & f_console_flag_simple_e)) continue;
if (!parameters->array[i].match_simple.used && !parameters->array[i].match_simple.string) continue;
if (strncmp(arguments.argv[state.location], parameters->array[i].match_simple.string, parameters->array[i].match_simple.used + 1)) continue;
* Provide a special type explicitly intended to be used for f_console_parameter_state_t.
*
* f_console_parameter_state_type_*_e:
- * - none: No type set.
- * - identify: Perform identify processing.
- * - match_normal: Perform short or long parameter match processing.
- * - match_not: Perform no parameter match processi
- * - match_other: Perform other parameter match processing.ng.
- * - need: Perform value is needed processing.
- * - wrap_up: Perform wrap up processing.
+ * - none: No type set.
+ * - identify: Perform identify processing.
+ * - long: Perform long parameter match processing.
+ * - miss: Perform no parameter match processi
+ * - short: Perform short parameter match processing.
+ * - short_preprocess: Perform short parameter match processing.
+ * - simple: Perform simple parameter match processing.
+ * - need: Perform value is needed processing.
+ * - wrap_up: Perform wrap up processing.
*/
#ifndef _di_f_console_parameter_state_type_e_
enum {
#endif
#ifndef _di_fll_error_print_
- f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback) {
+ f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) {
return private_fll_error_print(print, status, function, fallback);
}
#endif // _di_fll_error_print_
#ifndef _di_fll_error_file_print_
- f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+ f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
f_string_static_t type_name = fll_error_file_type_file_s;
#endif // _di_fll_error_file_print_
#ifndef _di_fll_error_parameter_integer_print_
- f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument) {
+ f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument) {
if (status == F_data_not) {
if (print.verbosity != f_console_verbosity_quiet_e) {
* F_true is returned if the status code is unknown.
*/
#ifndef _di_fll_error_print_
- extern f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback);
+ extern f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback);
#endif // _di_fll_error_print_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fll_error_file_print_
- extern f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
+ extern f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
#endif // _di_fll_error_file_print_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fll_error_parameter_integer_print_
- extern f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument);
+ extern f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument);
#endif // _di_fll_error_parameter_integer_print_
#ifdef __cplusplus
#endif
#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
- f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback) {
+ f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) {
if (status == F_access_denied) {
if (print.verbosity != f_console_verbosity_quiet_e) {
#endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
- void private_fll_error_print_function(const fl_print_t print, const char *function) {
+ void private_fll_error_print_function(const fl_print_t print, const f_string_t function) {
if (function) {
fl_print_format(" when calling function%] ", print.to, print.context);
* @see fll_error_file_print()
*/
#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
- extern f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback) F_attribute_visibility_internal_d;
+ extern f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
/**
* @see fll_error_file_print()
*/
#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
- extern void private_fll_error_print_function(const fl_print_t print, const char *function) F_attribute_visibility_internal_d;
+ extern void private_fll_error_print_function(const fl_print_t print, const f_string_t function) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_)
#ifdef __cplusplus
#endif
#ifndef _di_controller_print_error_
- void controller_print_error(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const char *function, const bool fallback) {
+ void controller_print_error(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) {
if (print.verbosity == f_console_verbosity_quiet_e) return;
if (status == F_interrupt) return;
#endif // _di_controller_print_error_
#ifndef _di_controller_print_error_file_
- void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+ void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
if (print.verbosity == f_console_verbosity_quiet_e) return;
if (status == F_interrupt) return;
* @see fll_error_print()
*/
#ifndef _di_controller_print_error_
- extern void controller_print_error(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const char *function, const bool fallback) F_attribute_visibility_internal_d;
+ extern void controller_print_error(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) F_attribute_visibility_internal_d;
#endif // _di_controller_print_error_
/**
* @see fll_error_file_print()
*/
#ifndef _di_controller_print_error_file_
- extern void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) F_attribute_visibility_internal_d;
+ extern void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) F_attribute_visibility_internal_d;
#endif // _di_controller_print_error_file_
#ifdef __cplusplus
#endif // _di_controller_entry_preprocess_print_simulate_setting_value_
#ifndef _di_controller_entry_print_error_
- void controller_entry_print_error(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const char *function, const bool fallback, controller_thread_t *thread) {
+ void controller_entry_print_error(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, controller_thread_t *thread) {
if (print.verbosity == f_console_verbosity_quiet_e) return;
if (status == F_interrupt) return;
#endif // _di_controller_entry_print_error_cache_
#ifndef _di_controller_entry_print_error_file_
- void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const char *function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) {
+ void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) {
if (print.verbosity == f_console_verbosity_quiet_e) return;
if (status == F_interrupt) return;
* @see controller_entry_print_error_cache()
*/
#ifndef _di_controller_entry_print_error_
- extern void controller_entry_print_error(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const char *function, const bool fallback, controller_thread_t *thread) F_attribute_visibility_internal_d;
+ extern void controller_entry_print_error(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, controller_thread_t *thread) F_attribute_visibility_internal_d;
#endif // _di_controller_entry_print_error_
/**
* @see controller_entry_print_error_cache()
*/
#ifndef _di_controller_entry_print_error_file_
- extern void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const char *function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) F_attribute_visibility_internal_d;
+ extern void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) F_attribute_visibility_internal_d;
#endif // _di_controller_entry_print_error_file_
/**
#endif // _di_controller_rule_print_string_s_
#ifndef _di_controller_rule_print_error_
- void controller_rule_print_error(controller_thread_t * const thread, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const char *function, const bool fallback, const bool item) {
+ void controller_rule_print_error(controller_thread_t * const thread, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const bool item) {
if (print.verbosity == f_console_verbosity_quiet_e) return;
if (status == F_interrupt) return;
* @see controller_rule_print_error_cache()
*/
#ifndef _di_controller_rule_print_error_
- extern void controller_rule_print_error(controller_thread_t * const thread, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const char *function, const bool fallback, const bool item) F_attribute_visibility_internal_d;
+ extern void controller_rule_print_error(controller_thread_t * const thread, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const bool item) F_attribute_visibility_internal_d;
#endif // _di_controller_rule_print_error_
/**
#ifndef _di_fake_f_a_
const f_string_t fake_f_a[] = {
+ "f_account_group_id_by_name",
+ "f_account_id_by_name",
+ "f_array_lengths_increase",
"f_console_parameter_prioritize_right",
"f_console_parameter_process",
+ "f_conversion_number_signed_to_string",
+ "f_directory_create",
+ "f_directory_exists",
+ "f_directory_is",
+ "f_directory_open",
+ "f_directory_remove",
+ "f_directory_touch",
+ "f_environment_get_all",
+ "f_environment_set",
+ "f_file_clone",
+ "f_file_copy",
+ "f_file_create",
+ "f_file_exists",
+ "f_file_group_read",
"f_file_is",
+ "f_file_link",
+ "f_file_mode_determine",
+ "f_file_mode_read",
+ "f_file_mode_set",
+ "f_file_mode_to_mode",
"f_file_name_base",
+ "f_file_name_directory",
+ "f_file_open",
+ "f_file_owner_read",
+ "f_file_read",
+ "f_file_remove",
+ "f_file_role_change",
+ "f_file_size",
+ "f_file_stat",
+ "f_file_stream_open",
+ "f_file_stream_read_block",
+ "f_file_stream_write",
+ "f_file_touch",
+ "f_file_write",
+ "f_fss_apply_delimit",
+ "f_path_current",
"f_path_directory_cleanup",
"f_string_append",
"f_string_dynamic_append",
+ "f_string_dynamic_append_assure",
"f_string_dynamic_append_nulless",
"f_string_dynamic_increase_by",
"f_string_dynamic_mash",
+ "f_string_dynamic_partial_append",
+ "f_string_dynamic_partial_append_nulless",
+ "f_string_dynamic_prepend",
"f_string_dynamic_resize",
+ "f_string_dynamics_increase",
"f_string_dynamics_increase_by",
+ "f_string_dynamics_resize",
+ "f_string_map_multis_resize",
"f_uint8s_increase",
"f_uint8s_increase_by",
"f_utf_is_word_dash_plus",
+ "fl_conversion_dynamic_to_unsigned_detect",
+ "fl_directory_clone",
"fl_directory_copy",
+ "fl_directory_create",
+ "fl_environment_load_name",
+ "fl_environment_load_names",
+ "fl_iki_read",
+ "fl_string_dynamic_partial_compare",
"fll_execute_arguments_add",
"fll_execute_arguments_add_parameter_set",
"fll_execute_program",
+ "fll_file_mode_set_all",
+ "fll_file_move",
+ "fll_file_role_change_all",
+ "fll_fss_extended_read",
+ "fll_fss_snatch_apart",
+ "fll_fss_snatch_map_apart",
"fll_program_parameter_additional_rip",
"fll_program_parameter_process_context",
"fll_program_parameter_process_verbosity",
+ "fake_build_arguments_standard_add",
+ "fake_build_get_file_name_without_extension",
+ "fake_build_load_setting",
+ "fake_build_objects_add",
+ "fake_build_sources_add",
+ "fake_build_sources_object_add",
+ "fake_execute",
+ "fake_make_assure_inside_project",
+ "fake_make_get_id_group",
+ "fake_make_get_id_mode",
+ "fake_make_get_id_owner",
+ "fake_make_operate_expand_build",
+ "fake_make_operate_expand_context",
+ "fake_make_operate_expand_environment",
+ "fake_make_operate_process_buffer_escape",
+ "fake_make_operate_section",
+ "fake_make_path_relative",
+ "fake_path_generate_string_dynamic",
+ "fake_skeleton_operate_directory_create",
+ "macro_f_fss_nameds_t_resize",
+ "macro_f_string_map_multis_t_resize",
};
#endif // _di_fake_f_a_
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common print functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
*/
#ifndef _di_fake_f_e_
enum {
+ fake_f_f_account_group_id_by_name_e,
+ fake_f_f_account_id_by_name_e,
+ fake_f_f_array_lengths_increase_e,
fake_f_f_console_parameter_prioritize_right_e,
fake_f_f_console_parameter_process_e,
+ fake_f_f_conversion_number_signed_to_string_e,
+ fake_f_f_directory_create_e,
+ fake_f_f_directory_exists_e,
+ fake_f_f_directory_is_e,
+ fake_f_f_directory_open_e,
+ fake_f_f_directory_remove_e,
+ fake_f_f_directory_touch_e,
+ fake_f_f_environment_get_all_e,
+ fake_f_f_environment_set_e,
+ fake_f_f_file_clone_e,
+ fake_f_f_file_copy_e,
+ fake_f_f_file_create_e,
+ fake_f_f_file_exists_e,
+ fake_f_f_file_group_read_e,
fake_f_f_file_is_e,
+ fake_f_f_file_link_e,
+ fake_f_f_file_mode_determine_e,
+ fake_f_f_file_mode_read_e,
+ fake_f_f_file_mode_set_e,
+ fake_f_f_file_mode_to_mode_e,
fake_f_f_file_name_base_e,
+ fake_f_f_file_name_directory_e,
+ fake_f_f_file_open_e,
+ fake_f_f_file_owner_read_e,
+ fake_f_f_file_read_e,
+ fake_f_f_file_remove_e,
+ fake_f_f_file_role_change_e,
+ fake_f_f_file_size_e,
+ fake_f_f_file_stat_e,
+ fake_f_f_file_stream_open_e,
+ fake_f_f_file_stream_read_block_e,
+ fake_f_f_file_stream_write_e,
+ fake_f_f_file_touch_e,
+ fake_f_f_file_write_e,
+ fake_f_f_fss_apply_delimit_e,
+ fake_f_f_path_current_e,
fake_f_f_path_directory_cleanup_e,
fake_f_f_string_append_e,
fake_f_f_string_dynamic_append_e,
+ fake_f_f_string_dynamic_append_assure_e,
fake_f_f_string_dynamic_append_nulless_e,
fake_f_f_string_dynamic_increase_by_e,
fake_f_f_string_dynamic_mash_e,
+ fake_f_f_string_dynamic_partial_append_e,
+ fake_f_f_string_dynamic_partial_append_nulless_e,
+ fake_f_f_string_dynamic_prepend_e,
fake_f_f_string_dynamic_resize_e,
+ fake_f_f_string_dynamics_increase_e,
fake_f_f_string_dynamics_increase_by_e,
+ fake_f_f_string_dynamics_resize_e,
+ fake_f_f_string_map_multis_resize_e,
fake_f_f_uint8s_increase_e,
fake_f_f_uint8s_increase_by_e,
fake_f_f_utf_is_word_dash_plus_e,
+ fake_f_fl_conversion_dynamic_to_unsigned_detect_e,
+ fake_f_fl_directory_clone_e,
fake_f_fl_directory_copy_e,
+ fake_f_fl_directory_create_e,
+ fake_f_fl_environment_load_name_e,
+ fake_f_fl_environment_load_names_e,
+ fake_f_fl_iki_read_e,
+ fake_f_fl_string_dynamic_partial_compare_e,
fake_f_fll_execute_arguments_add_e,
fake_f_fll_execute_arguments_add_parameter_set_e,
fake_f_fll_execute_program_e,
+ fake_f_fll_file_mode_set_all_e,
+ fake_f_fll_file_move_e,
+ fake_f_fll_file_role_change_all_e,
+ fake_f_fll_fss_extended_read_e,
+ fake_f_fll_fss_snatch_apart_e,
+ fake_f_fll_fss_snatch_map_apart_e,
fake_f_fll_program_parameter_additional_rip_e,
fake_f_fll_program_parameter_process_context_e,
fake_f_fll_program_parameter_process_verbosity_e,
+ fake_f_fake_build_arguments_standard_add_e,
+ fake_f_fake_build_get_file_name_without_extension_e,
+ fake_f_fake_build_load_setting_e,
+ fake_f_fake_build_objects_add_e,
+ fake_f_fake_build_sources_add_e,
+ fake_f_fake_build_sources_object_add_e,
+ fake_f_fake_execute_e,
+ fake_f_fake_make_assure_inside_project_e,
+ fake_f_fake_make_get_id_group_e,
+ fake_f_fake_make_get_id_mode_e,
+ fake_f_fake_make_get_id_owner_e,
+ fake_f_fake_make_operate_expand_build_e,
+ fake_f_fake_make_operate_expand_context_e,
+ fake_f_fake_make_operate_expand_environment_e,
+ fake_f_fake_make_operate_process_buffer_escape_e,
+ fake_f_fake_make_operate_section_e,
+ fake_f_fake_make_path_relative_e,
+ fake_f_fake_path_generate_string_dynamic_e,
+ fake_f_fake_skeleton_operate_directory_create_e,
+ fake_f_macro_f_fss_nameds_t_resize_e,
+ fake_f_macro_f_string_map_multis_t_resize_e,
}; // enum
#endif // _di_fake_f_e_
--- /dev/null
+#include "fake.h"
+#include "private-common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fake_program_version_s_
+ const f_string_static_t fake_program_version_s = macro_f_string_static_t_initialize(FAKE_program_version_s, 0, FAKE_program_version_s_length);
+#endif // _di_fake_program_version_s_
+
+#ifndef _di_fake_program_name_s_
+ const f_string_static_t fake_program_name_s = macro_f_string_static_t_initialize(FAKE_program_name_s, 0, FAKE_program_name_s_length);
+ const f_string_static_t fake_program_name_long_s = macro_f_string_static_t_initialize(FAKE_program_name_long_s, 0, FAKE_program_name_long_s_length);
+#endif // _di_fake_program_name_s_
+
+#ifndef _di_fake_program_help_parameter_s_
+ const f_string_static_t fake_program_help_parameters_s = macro_f_string_static_t_initialize(FAKE_program_help_parameters_s, 0, FAKE_program_help_parameters_s_length);
+#endif // _di_fake_program_help_parameter_s_
+
+#ifndef _di_fake_path_s_
+ const f_string_static_t fake_path_part_build_s = macro_f_string_static_t_initialize(FAKE_path_part_build_s, 0, FAKE_path_part_build_s_length);
+ const f_string_static_t fake_path_part_c_s = macro_f_string_static_t_initialize(FAKE_path_part_c_s, 0, FAKE_path_part_c_s_length);
+ const f_string_static_t fake_path_part_cpp_s = macro_f_string_static_t_initialize(FAKE_path_part_cpp_s, 0, FAKE_path_part_cpp_s_length);
+ const f_string_static_t fake_path_part_data_s = macro_f_string_static_t_initialize(FAKE_path_part_data_s, 0, FAKE_path_part_data_s_length);
+ const f_string_static_t fake_path_part_documentation_s = macro_f_string_static_t_initialize(FAKE_path_part_documentation_s, 0, FAKE_path_part_documentation_s_length);
+ const f_string_static_t fake_path_part_documents_s = macro_f_string_static_t_initialize(FAKE_path_part_documents_s, 0, FAKE_path_part_documents_s_length);
+ const f_string_static_t fake_path_part_includes_s = macro_f_string_static_t_initialize(FAKE_path_part_includes_s, 0, FAKE_path_part_includes_s_length);
+ const f_string_static_t fake_path_part_libraries_s = macro_f_string_static_t_initialize(FAKE_path_part_libraries_s, 0, FAKE_path_part_libraries_s_length);
+ const f_string_static_t fake_path_part_licenses_s = macro_f_string_static_t_initialize(FAKE_path_part_licenses_s, 0, FAKE_path_part_licenses_s_length);
+ const f_string_static_t fake_path_part_objects_s = macro_f_string_static_t_initialize(FAKE_path_part_objects_s, 0, FAKE_path_part_objects_s_length);
+ const f_string_static_t fake_path_part_process_s = macro_f_string_static_t_initialize(FAKE_path_part_process_s, 0, FAKE_path_part_process_s_length);
+ const f_string_static_t fake_path_part_programs_s = macro_f_string_static_t_initialize(FAKE_path_part_programs_s, 0, FAKE_path_part_programs_s_length);
+ const f_string_static_t fake_path_part_script_s = macro_f_string_static_t_initialize(FAKE_path_part_script_s, 0, FAKE_path_part_script_s_length);
+ const f_string_static_t fake_path_part_settings_s = macro_f_string_static_t_initialize(FAKE_path_part_settings_s, 0, FAKE_path_part_settings_s_length);
+ const f_string_static_t fake_path_part_shared_s = macro_f_string_static_t_initialize(FAKE_path_part_shared_s, 0, FAKE_path_part_shared_s_length);
+ const f_string_static_t fake_path_part_shell_s = macro_f_string_static_t_initialize(FAKE_path_part_shell_s, 0, FAKE_path_part_shell_s_length);
+ const f_string_static_t fake_path_part_specifications_s = macro_f_string_static_t_initialize(FAKE_path_part_specifications_s, 0, FAKE_path_part_specifications_s_length);
+ const f_string_static_t fake_path_part_stage_s = macro_f_string_static_t_initialize(FAKE_path_part_stage_s, 0, FAKE_path_part_stage_s_length);
+ const f_string_static_t fake_path_part_static_s = macro_f_string_static_t_initialize(FAKE_path_part_static_s, 0, FAKE_path_part_static_s_length);
+#endif // _di_fake_path_s_
+
+#ifndef _di_fake_file_s_
+ const f_string_static_t fake_file_defines_s = macro_f_string_static_t_initialize(FAKE_file_defines_s, 0, FAKE_file_defines_s_length);
+ const f_string_static_t fake_file_dependencies_s = macro_f_string_static_t_initialize(FAKE_file_dependencies_s, 0, FAKE_file_dependencies_s_length);
+ const f_string_static_t fake_file_process_pre_s = macro_f_string_static_t_initialize(FAKE_file_process_pre_s, 0, FAKE_file_process_pre_s_length);
+ const f_string_static_t fake_file_process_post_s = macro_f_string_static_t_initialize(FAKE_file_process_post_s, 0, FAKE_file_process_post_s_length);
+ const f_string_static_t fake_file_readme_s = macro_f_string_static_t_initialize(FAKE_file_readme_s, 0, FAKE_file_readme_s_length);
+#endif // _di_fake_file_s_
+
+#ifndef _di_fake_default_s_
+ const f_string_static_t fake_default_build_s = macro_f_string_static_t_initialize(FAKE_default_build_s, 0, FAKE_default_build_s_length);
+ const f_string_static_t fake_default_data_s = macro_f_string_static_t_initialize(FAKE_default_data_s, 0, FAKE_default_data_s_length);
+ const f_string_static_t fake_default_documents_s = macro_f_string_static_t_initialize(FAKE_default_documents_s, 0, FAKE_default_documents_s_length);
+ const f_string_static_t fake_default_fakefile_s = macro_f_string_static_t_initialize(FAKE_default_fakefile_s, 0, FAKE_default_fakefile_s_length);
+ const f_string_static_t fake_default_licenses_s = macro_f_string_static_t_initialize(FAKE_default_licenses_s, 0, FAKE_default_licenses_s_length);
+ const f_string_static_t fake_default_process_s = macro_f_string_static_t_initialize(FAKE_default_process_s, 0, FAKE_default_process_s_length);
+ const f_string_static_t fake_default_settings_s = macro_f_string_static_t_initialize(FAKE_default_settings_s, 0, FAKE_default_settings_s_length);
+ const f_string_static_t fake_default_sources_s = macro_f_string_static_t_initialize(FAKE_default_sources_s, 0, FAKE_default_sources_s_length);
+ const f_string_static_t fake_default_work_s = macro_f_string_static_t_initialize(FAKE_default_work_s, 0, FAKE_default_work_s_length);
+#endif // _di_fake_default_s_
+
+#ifndef _di_fake_build_language_s_
+ const f_string_static_t fake_build_language_bash_s = macro_f_string_static_t_initialize(FAKE_build_language_bash_s, 0, FAKE_build_language_bash_s_length);
+ const f_string_static_t fake_build_language_c_s = macro_f_string_static_t_initialize(FAKE_build_language_c_s, 0, FAKE_build_language_c_s_length);
+ const f_string_static_t fake_build_language_cpp_s = macro_f_string_static_t_initialize(FAKE_build_language_cpp_s, 0, FAKE_build_language_cpp_s_length);
+ const f_string_static_t fake_build_language_zsh_s = macro_f_string_static_t_initialize(FAKE_build_language_zsh_s, 0, FAKE_build_language_zsh_s_length);
+#endif // _di_fake_build_language_s_
+
+#ifndef _di_fake_build_version_s_
+ const f_string_static_t fake_build_version_major_s = macro_f_string_static_t_initialize(FAKE_build_version_major_s, 0, FAKE_build_version_major_s_length);
+ const f_string_static_t fake_build_version_minor_s = macro_f_string_static_t_initialize(FAKE_build_version_minor_s, 0, FAKE_build_version_minor_s_length);
+ const f_string_static_t fake_build_version_micro_s = macro_f_string_static_t_initialize(FAKE_build_version_micro_s, 0, FAKE_build_version_micro_s_length);
+ const f_string_static_t fake_build_version_nano_s = macro_f_string_static_t_initialize(FAKE_build_version_nano_s, 0, FAKE_build_version_nano_s_length);
+#endif // _di_fake_build_version_s_
+
+#ifndef _di_fake_parameter_s_
+ const f_string_static_t fake_short_define_s = macro_f_string_static_t_initialize(FAKE_short_define_s, 0, FAKE_short_define_s_length);
+ const f_string_static_t fake_short_fakefile_s = macro_f_string_static_t_initialize(FAKE_short_fakefile_s, 0, FAKE_short_fakefile_s_length);
+ const f_string_static_t fake_short_mode_s = macro_f_string_static_t_initialize(FAKE_short_mode_s, 0, FAKE_short_mode_s_length);
+ const f_string_static_t fake_short_process_s = macro_f_string_static_t_initialize(FAKE_short_process_s, 0, FAKE_short_process_s_length);
+ const f_string_static_t fake_short_settings_s = macro_f_string_static_t_initialize(FAKE_short_settings_s, 0, FAKE_short_settings_s_length);
+
+ const f_string_static_t fake_short_path_build_s = macro_f_string_static_t_initialize(FAKE_short_path_build_s, 0, FAKE_short_path_build_s_length);
+ const f_string_static_t fake_short_path_data_s = macro_f_string_static_t_initialize(FAKE_short_path_data_s, 0, FAKE_short_path_data_s_length);
+ const f_string_static_t fake_short_path_documents_s = macro_f_string_static_t_initialize(FAKE_short_path_documents_s, 0, FAKE_short_path_documents_s_length);
+ const f_string_static_t fake_short_path_licenses_s = macro_f_string_static_t_initialize(FAKE_short_path_licenses_s, 0, FAKE_short_path_licenses_s_length);
+ const f_string_static_t fake_short_path_sources_s = macro_f_string_static_t_initialize(FAKE_short_path_sources_s, 0, FAKE_short_path_sources_s_length);
+ const f_string_static_t fake_short_path_work_s = macro_f_string_static_t_initialize(FAKE_short_path_work_s, 0, FAKE_short_path_work_s_length);
+
+ const f_string_static_t fake_long_define_s = macro_f_string_static_t_initialize(FAKE_long_define_s, 0, FAKE_long_define_s_length);
+ const f_string_static_t fake_long_fakefile_s = macro_f_string_static_t_initialize(FAKE_long_fakefile_s, 0, FAKE_long_fakefile_s_length);
+ const f_string_static_t fake_long_mode_s = macro_f_string_static_t_initialize(FAKE_long_mode_s, 0, FAKE_long_mode_s_length);
+ const f_string_static_t fake_long_process_s = macro_f_string_static_t_initialize(FAKE_long_process_s, 0, FAKE_long_process_s_length);
+ const f_string_static_t fake_long_settings_s = macro_f_string_static_t_initialize(FAKE_long_settings_s, 0, FAKE_long_settings_s_length);
+
+ const f_string_static_t fake_long_path_build_s = macro_f_string_static_t_initialize(FAKE_long_path_build_s, 0, FAKE_long_path_build_s_length);
+ const f_string_static_t fake_long_path_data_s = macro_f_string_static_t_initialize(FAKE_long_path_data_s, 0, FAKE_long_path_data_s_length);
+ const f_string_static_t fake_long_path_documents_s = macro_f_string_static_t_initialize(FAKE_long_path_documents_s, 0, FAKE_long_path_documents_s_length);
+ const f_string_static_t fake_long_path_licenses_s = macro_f_string_static_t_initialize(FAKE_long_path_licenses_s, 0, FAKE_long_path_licenses_s_length);
+ const f_string_static_t fake_long_path_sources_s = macro_f_string_static_t_initialize(FAKE_long_path_sources_s, 0, FAKE_long_path_sources_s_length);
+ const f_string_static_t fake_long_path_work_s = macro_f_string_static_t_initialize(FAKE_long_path_work_s, 0, FAKE_long_path_work_s_length);
+
+ const f_string_static_t fake_long_documents_disabled_s = macro_f_string_static_t_initialize(FAKE_long_documents_disabled_s, 0, FAKE_long_documents_disabled_s_length);
+ const f_string_static_t fake_long_documents_enabled_s = macro_f_string_static_t_initialize(FAKE_long_documents_enabled_s, 0, FAKE_long_documents_enabled_s_length);
+ const f_string_static_t fake_long_shared_disabled_s = macro_f_string_static_t_initialize(FAKE_long_shared_disabled_s, 0, FAKE_long_shared_disabled_s_length);
+ const f_string_static_t fake_long_shared_enabled_s = macro_f_string_static_t_initialize(FAKE_long_shared_enabled_s, 0, FAKE_long_shared_enabled_s_length);
+ const f_string_static_t fake_long_static_disabled_s = macro_f_string_static_t_initialize(FAKE_long_static_disabled_s, 0, FAKE_long_static_disabled_s_length);
+ const f_string_static_t fake_long_static_enabled_s = macro_f_string_static_t_initialize(FAKE_long_static_enabled_s, 0, FAKE_long_static_enabled_s_length);
+
+ const f_string_static_t fake_other_operation_build_s = macro_f_string_static_t_initialize(FAKE_other_operation_build_s, 0, FAKE_other_operation_build_s_length);
+ const f_string_static_t fake_other_operation_clean_s = macro_f_string_static_t_initialize(FAKE_other_operation_clean_s, 0, FAKE_other_operation_clean_s_length);
+ const f_string_static_t fake_other_operation_make_s = macro_f_string_static_t_initialize(FAKE_other_operation_make_s, 0, FAKE_other_operation_make_s_length);
+ const f_string_static_t fake_other_operation_skeleton_s = macro_f_string_static_t_initialize(FAKE_other_operation_skeleton_s, 0, FAKE_other_operation_skeleton_s_length);
+#endif // _di_fake_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Featureless Make
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common string structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _fake_common_string_h
+#define _fake_common_string_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program version.
+ */
+#ifndef _di_fake_program_version_s_
+ #define FAKE_program_version_major_s F_string_ascii_0_s
+ #define FAKE_program_version_minor_s F_string_ascii_7_s
+ #define FAKE_program_version_micro_s F_string_ascii_0_s
+
+ #define FAKE_program_version_major_s_length F_string_ascii_0_s_length
+ #define FAKE_program_version_minor_s_length F_string_ascii_7_s_length
+ #define FAKE_program_version_micro_s_length F_string_ascii_0_s_length
+
+ #ifndef FAKE_program_version_nano_prefix_s
+ #define FAKE_program_version_nano_prefix_s
+ #define FAKE_program_version_nano_prefix_s_length 0
+ #endif // FAKE_program_version_major_s_length F_string_ascii_0_s_length
+
+ #ifndef FAKE_program_version_nano_s
+ #define FAKE_program_version_nano_s
+ #define FAKE_program_version_nano_s_length 0
+ #endif // FAKE_program_version_nano_s
+
+ #define FAKE_program_version_s FAKE_program_version_major_s F_string_ascii_period_s FAKE_program_version_minor_s F_string_ascii_period_s FAKE_program_version_micro_s FAKE_program_version_nano_prefix_s FAKE_program_version_nano_s
+
+ #define FAKE_program_version_s_length FAKE_program_version_major_s_length + F_string_ascii_period_s_length + FAKE_program_version_minor_s_length + F_string_ascii_period_s_length + FAKE_program_version_micro_s_length + FAKE_program_version_nano_prefix_s_length + FAKE_program_version_nano_s_length
+
+ extern const f_string_static_t fake_program_version_s;
+#endif // _di_fake_program_version_s_
+
+/**
+ * The program name.
+ */
+#ifndef _di_fake_program_name_s_
+ #define FAKE_program_name_s "fake"
+ #define FAKE_program_name_long_s "Featureless Make"
+
+ #define FAKE_program_name_s_length 4
+ #define FAKE_program_name_long_s_length 16
+
+ extern const f_string_static_t fake_program_name_s;
+ extern const f_string_static_t fake_program_name_long_s;
+#endif // _di_fake_program_name_s_
+
+/**
+ * The program help related data.
+ */
+#ifndef _di_fake_program_help_parameter_s_
+ #define FAKE_program_help_parameters_s "operation / section"
+
+ #define FAKE_program_help_parameters_s_length 19
+
+ extern const f_string_static_t fake_program_help_parameters_s;
+#endif // _di_fake_program_help_parameter_s_
+
+/**
+ * The build operation utilizes pre-defined path structures.
+ * These structures are hard-coded by their individual pieces to be constructed later on.
+ */
+#ifndef _di_fake_path_s_
+ #define FAKE_path_part_build_s "build" F_path_separator_s
+ #define FAKE_path_part_c_s "c" F_path_separator_s
+ #define FAKE_path_part_cpp_s "c++" F_path_separator_s
+ #define FAKE_path_part_data_s "data" F_path_separator_s
+ #define FAKE_path_part_documentation_s "documentation" F_path_separator_s
+ #define FAKE_path_part_documents_s "documents" F_path_separator_s
+ #define FAKE_path_part_includes_s "includes" F_path_separator_s
+ #define FAKE_path_part_libraries_s "libraries" F_path_separator_s
+ #define FAKE_path_part_licenses_s "licenses" F_path_separator_s
+ #define FAKE_path_part_objects_s "objects" F_path_separator_s
+ #define FAKE_path_part_process_s "process" F_path_separator_s
+ #define FAKE_path_part_programs_s "programs" F_path_separator_s
+ #define FAKE_path_part_script_s "script" F_path_separator_s
+ #define FAKE_path_part_settings_s "settings" F_path_separator_s
+ #define FAKE_path_part_shared_s "shared" F_path_separator_s
+ #define FAKE_path_part_shell_s "shell" F_path_separator_s
+ #define FAKE_path_part_specifications_s "specifications" F_path_separator_s
+ #define FAKE_path_part_stage_s "stage" F_path_separator_s
+ #define FAKE_path_part_static_s "static" F_path_separator_s
+
+ #define FAKE_path_part_build_s_length 5 + F_path_separator_s_length
+ #define FAKE_path_part_c_s_length 1 + F_path_separator_s_length
+ #define FAKE_path_part_cpp_s_length 3 + F_path_separator_s_length
+ #define FAKE_path_part_data_s_length 4 + F_path_separator_s_length
+ #define FAKE_path_part_documentation_s_length 13 + F_path_separator_s_length
+ #define FAKE_path_part_documents_s_length 9 + F_path_separator_s_length
+ #define FAKE_path_part_includes_s_length 8 + F_path_separator_s_length
+ #define FAKE_path_part_libraries_s_length 9 + F_path_separator_s_length
+ #define FAKE_path_part_licenses_s_length 8 + F_path_separator_s_length
+ #define FAKE_path_part_objects_s_length 7 + F_path_separator_s_length
+ #define FAKE_path_part_process_s_length 7 + F_path_separator_s_length
+ #define FAKE_path_part_programs_s_length 8 + F_path_separator_s_length
+ #define FAKE_path_part_script_s_length 6 + F_path_separator_s_length
+ #define FAKE_path_part_settings_s_length 8 + F_path_separator_s_length
+ #define FAKE_path_part_shared_s_length 6 + F_path_separator_s_length
+ #define FAKE_path_part_shell_s_length 5 + F_path_separator_s_length
+ #define FAKE_path_part_specifications_s_length 14 + F_path_separator_s_length
+ #define FAKE_path_part_stage_s_length 5 + F_path_separator_s_length
+ #define FAKE_path_part_static_s_length 6 + F_path_separator_s_length
+
+ extern const f_string_static_t fake_path_part_build_s;
+ extern const f_string_static_t fake_path_part_c_s;
+ extern const f_string_static_t fake_path_part_cpp_s;
+ extern const f_string_static_t fake_path_part_data_s;
+ extern const f_string_static_t fake_path_part_documentation_s;
+ extern const f_string_static_t fake_path_part_documents_s;
+ extern const f_string_static_t fake_path_part_includes_s;
+ extern const f_string_static_t fake_path_part_libraries_s;
+ extern const f_string_static_t fake_path_part_licenses_s;
+ extern const f_string_static_t fake_path_part_objects_s;
+ extern const f_string_static_t fake_path_part_process_s;
+ extern const f_string_static_t fake_path_part_programs_s;
+ extern const f_string_static_t fake_path_part_script_s;
+ extern const f_string_static_t fake_path_part_settings_s;
+ extern const f_string_static_t fake_path_part_shared_s;
+ extern const f_string_static_t fake_path_part_shell_s;
+ extern const f_string_static_t fake_path_part_specifications_s;
+ extern const f_string_static_t fake_path_part_stage_s;
+ extern const f_string_static_t fake_path_part_static_s;
+#endif // _di_fake_path_s_
+
+/**
+ * The file settings.
+ */
+#ifndef _di_fake_file_s_
+ #define FAKE_file_defines_s "defines"
+ #define FAKE_file_dependencies_s "dependencies"
+ #define FAKE_file_process_pre_s "process_pre.sh"
+ #define FAKE_file_process_post_s "process_post.sh"
+ #define FAKE_file_readme_s "readme.txt"
+
+ #define FAKE_file_defines_s_length 7
+ #define FAKE_file_dependencies_s_length 12
+ #define FAKE_file_process_pre_s_length 14
+ #define FAKE_file_process_post_s_length 15
+ #define FAKE_file_readme_s_length 10
+
+ extern const f_string_static_t fake_file_defines_s;
+ extern const f_string_static_t fake_file_dependencies_s;
+ extern const f_string_static_t fake_file_process_pre_s;
+ extern const f_string_static_t fake_file_process_post_s;
+ extern const f_string_static_t fake_file_readme_s;
+#endif // _di_fake_file_s_
+
+/**
+ * Provide default settings.
+ */
+#ifndef _di_fake_default_s_
+ #define FAKE_default_build_s "build" F_path_separator_s
+ #define FAKE_default_data_s "data" F_path_separator_s
+ #define FAKE_default_documents_s "documents" F_path_separator_s
+ #define FAKE_default_fakefile_s "fakefile"
+ #define FAKE_default_licenses_s "licenses" F_path_separator_s
+ #define FAKE_default_process_s ""
+ #define FAKE_default_settings_s "settings"
+ #define FAKE_default_sources_s "sources" F_path_separator_s
+ #define FAKE_default_work_s ""
+
+ #define FAKE_default_build_s_length 5 + F_path_separator_s_length
+ #define FAKE_default_data_s_length 4 + F_path_separator_s_length
+ #define FAKE_default_documents_s_length 9 + F_path_separator_s_length
+ #define FAKE_default_fakefile_s_length 8
+ #define FAKE_default_licenses_s_length 8 + F_path_separator_s_length
+ #define FAKE_default_process_s_length 0
+ #define FAKE_default_settings_s_length 8
+ #define FAKE_default_sources_s_length 7 + F_path_separator_s_length
+ #define FAKE_default_work_s_length 0
+
+ extern const f_string_static_t fake_default_build_s;
+ extern const f_string_static_t fake_default_data_s;
+ extern const f_string_static_t fake_default_documents_s;
+ extern const f_string_static_t fake_default_fakefile_s;
+ extern const f_string_static_t fake_default_licenses_s;
+ extern const f_string_static_t fake_default_process_s;
+ extern const f_string_static_t fake_default_settings_s;
+ extern const f_string_static_t fake_default_sources_s;
+ extern const f_string_static_t fake_default_work_s;
+#endif // _di_fake_default_s_
+
+/**
+ * The build language strings.
+ *
+ * fake_build_language_*_s:
+ * - bash: The GNU Bash language.
+ * - c: The C language.
+ * - cpp: The C++ language.
+ * - zsh: The ZSH language (Similar to and somewhat compatible with GNU Bash).
+ */
+#ifndef _di_fake_build_language_s_
+ #define FAKE_build_language_bash_s "bash"
+ #define FAKE_build_language_c_s "c"
+ #define FAKE_build_language_cpp_s "c++"
+ #define FAKE_build_language_zsh_s "zsh"
+
+ #define FAKE_build_language_bash_s_length 4
+ #define FAKE_build_language_c_s_length 1
+ #define FAKE_build_language_cpp_s_length 3
+ #define FAKE_build_language_zsh_s_length 3
+
+ extern const f_string_static_t fake_build_language_bash_s;
+ extern const f_string_static_t fake_build_language_c_s;
+ extern const f_string_static_t fake_build_language_cpp_s;
+ extern const f_string_static_t fake_build_language_zsh_s;
+#endif // _di_fake_build_language_s_
+
+/**
+ * The program version strings.
+ */
+#ifndef _di_fake_build_version_s_
+ #define FAKE_build_version_major_s "major"
+ #define FAKE_build_version_minor_s "minor"
+ #define FAKE_build_version_micro_s "micro"
+ #define FAKE_build_version_nano_s "nano"
+
+ #define FAKE_build_version_major_s_length 5
+ #define FAKE_build_version_minor_s_length 5
+ #define FAKE_build_version_micro_s_length 5
+ #define FAKE_build_version_nano_s_length 4
+
+ extern const f_string_static_t fake_build_version_major_s;
+ extern const f_string_static_t fake_build_version_minor_s;
+ extern const f_string_static_t fake_build_version_micro_s;
+ extern const f_string_static_t fake_build_version_nano_s;
+#endif // _di_fake_build_version_s_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fake_parameter_s_
+ #define FAKE_short_define_s "d"
+ #define FAKE_short_fakefile_s "f"
+ #define FAKE_short_mode_s "m"
+ #define FAKE_short_process_s "p"
+ #define FAKE_short_settings_s "s"
+
+ #define FAKE_short_path_build_s "b"
+ #define FAKE_short_path_data_s "D"
+ #define FAKE_short_path_documents_s "O"
+ #define FAKE_short_path_licenses_s "l"
+ #define FAKE_short_path_sources_s "S"
+ #define FAKE_short_path_work_s "w"
+
+ #define FAKE_long_define_s "define"
+ #define FAKE_long_fakefile_s "fakefile"
+ #define FAKE_long_mode_s "mode"
+ #define FAKE_long_process_s "process"
+ #define FAKE_long_settings_s "settings"
+
+ #define FAKE_long_path_build_s "build"
+ #define FAKE_long_path_data_s "data"
+ #define FAKE_long_path_documents_s "documents"
+ #define FAKE_long_path_licenses_s "licenses"
+ #define FAKE_long_path_sources_s "sources"
+ #define FAKE_long_path_work_s "work"
+
+ // These special parameters are provided in such a way that they mimic the traditional ./configure script.
+ #define FAKE_long_documents_disabled_s "disable-doc"
+ #define FAKE_long_documents_enabled_s "enable-doc"
+ #define FAKE_long_shared_disabled_s "disable-shared"
+ #define FAKE_long_shared_enabled_s "enable-shared"
+ #define FAKE_long_static_disabled_s "disable-static"
+ #define FAKE_long_static_enabled_s "enable-static"
+
+ #define FAKE_other_operation_build_s "build"
+ #define FAKE_other_operation_clean_s "clean"
+ #define FAKE_other_operation_make_s "make"
+ #define FAKE_other_operation_skeleton_s "skeleton"
+
+ #define FAKE_short_define_s_length 1
+ #define FAKE_short_fakefile_s_length 1
+ #define FAKE_short_mode_s_length 1
+ #define FAKE_short_process_s_length 1
+ #define FAKE_short_settings_s_length 1
+
+ #define FAKE_short_path_build_s_length 1
+ #define FAKE_short_path_data_s_length 1
+ #define FAKE_short_path_documents_s_length 1
+ #define FAKE_short_path_licenses_s_length 1
+ #define FAKE_short_path_sources_s_length 1
+ #define FAKE_short_path_work_s_length 1
+
+ #define FAKE_long_define_s_length 6
+ #define FAKE_long_fakefile_s_length 8
+ #define FAKE_long_mode_s_length 4
+ #define FAKE_long_process_s_length 7
+ #define FAKE_long_settings_s_length 8
+
+ #define FAKE_long_path_build_s_length 5
+ #define FAKE_long_path_data_s_length 4
+ #define FAKE_long_path_documents_s_length 9
+ #define FAKE_long_path_licenses_s_length 8
+ #define FAKE_long_path_sources_s_length 7
+ #define FAKE_long_path_work_s_length 4
+
+ #define FAKE_long_documents_disabled_s_length 11
+ #define FAKE_long_documents_enabled_s_length 10
+ #define FAKE_long_shared_disabled_s_length 14
+ #define FAKE_long_shared_enabled_s_length 13
+ #define FAKE_long_static_disabled_s_length 14
+ #define FAKE_long_static_enabled_s_length 13
+
+ #define FAKE_other_operation_build_s_length 5
+ #define FAKE_other_operation_clean_s_length 5
+ #define FAKE_other_operation_make_s_length 4
+ #define FAKE_other_operation_skeleton_s_length 8
+
+ extern const f_string_static_t fake_short_define_s;
+ extern const f_string_static_t fake_short_fakefile_s;
+ extern const f_string_static_t fake_short_mode_s;
+ extern const f_string_static_t fake_short_process_s;
+ extern const f_string_static_t fake_short_settings_s;
+
+ extern const f_string_static_t fake_short_path_build_s;
+ extern const f_string_static_t fake_short_path_data_s;
+ extern const f_string_static_t fake_short_path_documents_s;
+ extern const f_string_static_t fake_short_path_licenses_s;
+ extern const f_string_static_t fake_short_path_sources_s;
+ extern const f_string_static_t fake_short_path_work_s;
+
+ extern const f_string_static_t fake_long_define_s;
+ extern const f_string_static_t fake_long_fakefile_s;
+ extern const f_string_static_t fake_long_mode_s;
+ extern const f_string_static_t fake_long_process_s;
+ extern const f_string_static_t fake_long_settings_s;
+
+ extern const f_string_static_t fake_long_path_build_s;
+ extern const f_string_static_t fake_long_path_data_s;
+ extern const f_string_static_t fake_long_path_documents_s;
+ extern const f_string_static_t fake_long_path_licenses_s;
+ extern const f_string_static_t fake_long_path_sources_s;
+ extern const f_string_static_t fake_long_path_work_s;
+
+ extern const f_string_static_t fake_long_documents_disabled_s;
+ extern const f_string_static_t fake_long_documents_enabled_s;
+ extern const f_string_static_t fake_long_shared_disabled_s;
+ extern const f_string_static_t fake_long_shared_enabled_s;
+ extern const f_string_static_t fake_long_static_disabled_s;
+ extern const f_string_static_t fake_long_static_enabled_s;
+
+ extern const f_string_static_t fake_other_operation_build_s;
+ extern const f_string_static_t fake_other_operation_clean_s;
+ extern const f_string_static_t fake_other_operation_make_s;
+ extern const f_string_static_t fake_other_operation_skeleton_s;
+#endif // _di_fake_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fake_common_string_h
--- /dev/null
+#include "fake.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Featureless Make
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common type structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _fake_common_type_h
+#define _fake_common_type_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***
+ * Default allocations.
+ *
+ * Set to at least 4 to provide a UTF-8 friendly allocation step.
+ *
+ * fake_default_allocation_*_d:
+ * - large: A buffer size used for large allocations.
+ * - pipe: A buffer size used for processing piped data.
+ * - small: A buffer size used for small allocations.
+ */
+#ifndef _di_fake_default_d_
+ #define fake_default_allocation_large_d 64
+ #define fake_default_allocation_pipe_d 16384
+ #define fake_default_allocation_small_d 8
+#endif // _di_fake_default_d_
+
+/**
+ * The program defines.
+ *
+ * fake_signal_*_d:
+ * - check: The normal signal check (@fixme is needed anymore as-is?).
+ * - check_tiny: The tiny check (@fixme is needed anymore as-is?).
+ * - check_short: The short signal check (@fixme this is used everywhere).
+ */
+#ifndef _di_fake_signal_d_
+ #define fake_signal_check_d 500000
+ #define fake_signal_check_tiny_d 4
+ #define fake_signal_check_short_d 16
+#endif // _di_fake_signal_d_
+
+/**
+ * The build language enumerations.
+ *
+ * fake_build_language_type_*_e:
+ * - bash: The GNU Bash language.
+ * - c: The C language.
+ * - cpp: The C++ language.
+ * - zsh: The ZSH language (Similar to and somewhat compatible with GNU Bash).
+ */
+#ifndef _di_fake_build_language_e_
+ enum {
+ fake_build_language_type_bash_e = 1,
+ fake_build_language_type_c_e,
+ fake_build_language_type_cpp_e,
+ fake_build_language_type_zsh_e,
+ }; // enum
+#endif // _di_fake_build_language_e_
+
+/**
+ * The program version enumerations.
+ */
+#ifndef _di_fake_build_version_e_
+ enum {
+ fake_build_version_type_major_e = 1,
+ fake_build_version_type_minor_e,
+ fake_build_version_type_micro_e,
+ fake_build_version_type_nano_e,
+ }; // enum
+#endif // _di_fake_build_version_e_
+
+/**
+ * The program operation enumerations.
+ *
+ * fake_operation_*_e:
+ * - build: The build operation.
+ * - clean: The clean operation.
+ * - make: The make operation.
+ * - skeleton: The skeleton operation.
+ */
+#ifndef _di_fake_operation_e_
+ enum {
+ fake_operation_build_e = 1,
+ fake_operation_clean_e,
+ fake_operation_make_e,
+ fake_operation_skeleton_e,
+ }; // enum
+#endif // _di_fake_operation_e_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * fake_main_flag_*_e:
+ * - none: No flags set.
+ * - copyright: Print copyright.
+ * - enable_documents: Enable documents, as-in --enable-doc (not specifying means --disable-doc).
+ * - enable_shared: Enable shared, as-in --enable-shared (not specifying means --disable-shared).
+ * - enable_static: Enable static, as-in --enable-static (not specifying means --disable-static).
+ * - file_from: Using a specified source file.
+ * - file_to: Using a specified destination file.
+ * - header: Enable printing of headers.
+ * - help: Print help.
+ * - operation: Designate that an operation is explicitly passed.
+ * - operation_build: The build operation is designated.
+ * - 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.
+ * - separate: Enable printing of separators.
+ * - strip_invalid: Using strip invalid character mode.
+ * - verify: Using verify mode.
+ * - version: Print version.
+ */
+#ifndef _di_fake_main_flag_e_
+ enum {
+ fake_main_flag_none_e = 0x0,
+ fake_main_flag_copyright_e = 0x1,
+ fake_main_flag_enable_documents_e = 0x2,
+ fake_main_flag_enable_shared_e = 0x4,
+ fake_main_flag_enable_static_e = 0x8,
+ fake_main_flag_file_from_e = 0x10,
+ fake_main_flag_file_to_e = 0x20,
+ fake_main_flag_header_e = 0x40,
+ fake_main_flag_help_e = 0x80,
+ fake_main_flag_operation_e = 0x100,
+ fake_main_flag_operation_build_e = 0x200,
+ fake_main_flag_operation_clean_e = 0x400,
+ fake_main_flag_operation_make_e = 0x800,
+ fake_main_flag_operation_skeleton_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,
+ }; // enum
+#endif // _di_fake_main_flag_e_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fake_parameter_e_
+ enum {
+ fake_parameter_help_e,
+ fake_parameter_copyright_e,
+ fake_parameter_light_e,
+ fake_parameter_dark_e,
+ fake_parameter_no_color_e,
+ fake_parameter_verbosity_quiet_e,
+ fake_parameter_verbosity_error_e,
+ fake_parameter_verbosity_normal_e,
+ fake_parameter_verbosity_verbose_e,
+ fake_parameter_verbosity_debug_e,
+ fake_parameter_version_e,
+ fake_parameter_line_first_no_e,
+ fake_parameter_line_last_no_e,
+
+ fake_parameter_define_e,
+ fake_parameter_fakefile_e,
+ fake_parameter_mode_e,
+ fake_parameter_process_e,
+ fake_parameter_settings_e,
+
+ fake_parameter_path_build_e,
+ fake_parameter_path_data_e,
+ fake_parameter_path_documents_e,
+ fake_parameter_path_licenses_e,
+ fake_parameter_path_sources_e,
+ fake_parameter_path_work_e,
+
+ fake_parameter_documents_disable_e,
+ fake_parameter_documents_enable_e,
+ fake_parameter_shared_disable_e,
+ fake_parameter_shared_enable_e,
+ fake_parameter_static_disable_e,
+ fake_parameter_static_enable_e,
+
+ fake_parameter_operation_build_e,
+ fake_parameter_operation_clean_e,
+ fake_parameter_operation_make_e,
+ fake_parameter_operation_skeleton_e,
+ }; // enum
+
+ #define fake_console_parameter_t_initialize \
+ { \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
+ \
+ macro_f_console_parameter_t_initialize_3(fake_short_define_s, fake_long_define_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_fakefile_s, fake_long_fakefile_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_mode_s, fake_long_mode_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_process_s, fake_long_process_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_settings_s, fake_long_settings_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_path_build_s, fake_long_path_build_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_path_data_s, fake_long_path_data_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_path_documents_s, fake_long_path_documents_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_path_sources_s, fake_long_path_sources_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_path_licenses_s, fake_long_path_licenses_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fake_short_path_work_s, fake_long_path_work_s, 1, f_console_flag_normal_e), \
+ \
+ macro_f_console_parameter_t_initialize_5(fake_long_documents_disabled_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_5(fake_long_documents_enabled_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_5(fake_long_shared_disabled_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_5(fake_long_shared_enabled_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_5(fake_long_static_disabled_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_5(fake_long_static_enabled_s, 0, f_console_flag_normal_e), \
+ \
+ macro_f_console_parameter_t_initialize_6(fake_other_operation_build_s, 0, f_console_flag_simple_e), \
+ macro_f_console_parameter_t_initialize_6(fake_other_operation_clean_s, 0, f_console_flag_simple_e), \
+ macro_f_console_parameter_t_initialize_6(fake_other_operation_make_s, 0, f_console_flag_simple_e), \
+ macro_f_console_parameter_t_initialize_6(fake_other_operation_skeleton_s, 0, f_console_flag_simple_e), \
+ }
+
+ #define fake_total_parameters_d 34
+#endif // _di_fake_parameter_e_
+
+/**
+ * The fake 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).
+ *
+ * flag: Flags passed to the main function.
+ *
+ * state: The state data used when processing the FSS data.
+ * status: The main status code, generally used by the load settings and main functions.
+ *
+ * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
+ * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
+ *
+ * build: The build directory.
+ * data: The data directory.
+ * fakefile: The fakefile file path.
+ * process: The process name.
+ * settings: The settings file path.
+ * sources: The sources directory.
+ * work: The work directory.
+
+ * defines: The define data.
+ * modes: The mode data.
+ *
+ * operations: The operations, in the order in which they are given.
+ */
+#ifndef _di_fake_setting_t_
+ typedef struct {
+ uint32_t flag;
+
+ f_state_t state;
+ f_status_t status;
+
+ f_string_static_t line_first;
+ f_string_static_t line_last;
+
+ f_string_dynamic_t build;
+ f_string_dynamic_t data;
+ f_string_dynamic_t documents;
+ f_string_dynamic_t fakefile;
+ f_string_dynamic_t licenses;
+ f_string_dynamic_t process;
+ f_string_dynamic_t settings;
+ f_string_dynamic_t sources;
+ f_string_dynamic_t work;
+
+ f_string_dynamics_t defines;
+ f_string_dynamics_t modes;
+
+ f_uint8s_t operations;
+ } fake_setting_t;
+
+ #define fake_setting_t_initialize \
+ { \
+ fake_main_flag_none_e, \
+ f_state_t_initialize, \
+ F_none, \
+ f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_uint8s_t_initialize, \
+ }
+#endif // _di_fake_setting_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fake_common_type_h
#include "fake.h"
+#include "private-common.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_fake_program_version_s_
- const f_string_static_t fake_program_version_s = macro_f_string_static_t_initialize(FAKE_program_version_s, 0, FAKE_program_version_s_length);
-#endif // _di_fake_program_version_s_
-
-#ifndef _di_fake_program_name_s_
- const f_string_static_t fake_program_name_s = macro_f_string_static_t_initialize(FAKE_program_name_s, 0, FAKE_program_name_s_length);
- const f_string_static_t fake_program_name_long_s = macro_f_string_static_t_initialize(FAKE_program_name_long_s, 0, FAKE_program_name_long_s_length);
-#endif // _di_fake_program_name_s_
-
-#ifndef _di_fake_program_help_parameter_s_
- const f_string_static_t fake_program_help_parameters_s = macro_f_string_static_t_initialize(FAKE_program_help_parameters_s, 0, FAKE_program_help_parameters_s_length);
-#endif // _di_fake_program_help_parameter_s_
-
-#ifndef _di_fake_path_s_
- const f_string_static_t fake_path_part_build_s = macro_f_string_static_t_initialize(FAKE_path_part_build_s, 0, FAKE_path_part_build_s_length);
- const f_string_static_t fake_path_part_c_s = macro_f_string_static_t_initialize(FAKE_path_part_c_s, 0, FAKE_path_part_c_s_length);
- const f_string_static_t fake_path_part_cpp_s = macro_f_string_static_t_initialize(FAKE_path_part_cpp_s, 0, FAKE_path_part_cpp_s_length);
- const f_string_static_t fake_path_part_data_s = macro_f_string_static_t_initialize(FAKE_path_part_data_s, 0, FAKE_path_part_data_s_length);
- const f_string_static_t fake_path_part_documentation_s = macro_f_string_static_t_initialize(FAKE_path_part_documentation_s, 0, FAKE_path_part_documentation_s_length);
- const f_string_static_t fake_path_part_documents_s = macro_f_string_static_t_initialize(FAKE_path_part_documents_s, 0, FAKE_path_part_documents_s_length);
- const f_string_static_t fake_path_part_includes_s = macro_f_string_static_t_initialize(FAKE_path_part_includes_s, 0, FAKE_path_part_includes_s_length);
- const f_string_static_t fake_path_part_libraries_s = macro_f_string_static_t_initialize(FAKE_path_part_libraries_s, 0, FAKE_path_part_libraries_s_length);
- const f_string_static_t fake_path_part_licenses_s = macro_f_string_static_t_initialize(FAKE_path_part_licenses_s, 0, FAKE_path_part_licenses_s_length);
- const f_string_static_t fake_path_part_objects_s = macro_f_string_static_t_initialize(FAKE_path_part_objects_s, 0, FAKE_path_part_objects_s_length);
- const f_string_static_t fake_path_part_process_s = macro_f_string_static_t_initialize(FAKE_path_part_process_s, 0, FAKE_path_part_process_s_length);
- const f_string_static_t fake_path_part_programs_s = macro_f_string_static_t_initialize(FAKE_path_part_programs_s, 0, FAKE_path_part_programs_s_length);
- const f_string_static_t fake_path_part_script_s = macro_f_string_static_t_initialize(FAKE_path_part_script_s, 0, FAKE_path_part_script_s_length);
- const f_string_static_t fake_path_part_settings_s = macro_f_string_static_t_initialize(FAKE_path_part_settings_s, 0, FAKE_path_part_settings_s_length);
- const f_string_static_t fake_path_part_shared_s = macro_f_string_static_t_initialize(FAKE_path_part_shared_s, 0, FAKE_path_part_shared_s_length);
- const f_string_static_t fake_path_part_shell_s = macro_f_string_static_t_initialize(FAKE_path_part_shell_s, 0, FAKE_path_part_shell_s_length);
- const f_string_static_t fake_path_part_specifications_s = macro_f_string_static_t_initialize(FAKE_path_part_specifications_s, 0, FAKE_path_part_specifications_s_length);
- const f_string_static_t fake_path_part_stage_s = macro_f_string_static_t_initialize(FAKE_path_part_stage_s, 0, FAKE_path_part_stage_s_length);
- const f_string_static_t fake_path_part_static_s = macro_f_string_static_t_initialize(FAKE_path_part_static_s, 0, FAKE_path_part_static_s_length);
-#endif // _di_fake_path_s_
-
-#ifndef _di_fake_file_s_
- const f_string_static_t fake_file_defines_s = macro_f_string_static_t_initialize(FAKE_file_defines_s, 0, FAKE_file_defines_s_length);
- const f_string_static_t fake_file_dependencies_s = macro_f_string_static_t_initialize(FAKE_file_dependencies_s, 0, FAKE_file_dependencies_s_length);
- const f_string_static_t fake_file_process_pre_s = macro_f_string_static_t_initialize(FAKE_file_process_pre_s, 0, FAKE_file_process_pre_s_length);
- const f_string_static_t fake_file_process_post_s = macro_f_string_static_t_initialize(FAKE_file_process_post_s, 0, FAKE_file_process_post_s_length);
- const f_string_static_t fake_file_readme_s = macro_f_string_static_t_initialize(FAKE_file_readme_s, 0, FAKE_file_readme_s_length);
-#endif // _di_fake_file_s_
-
-/**
- * Provide default settings.
- */
-#ifndef _di_fake_default_s_
- const f_string_static_t fake_default_build_s = macro_f_string_static_t_initialize(FAKE_default_build_s, 0, FAKE_default_build_s_length);
- const f_string_static_t fake_default_data_s = macro_f_string_static_t_initialize(FAKE_default_data_s, 0, FAKE_default_data_s_length);
- const f_string_static_t fake_default_sources_s = macro_f_string_static_t_initialize(FAKE_default_sources_s, 0, FAKE_default_sources_s_length);
- const f_string_static_t fake_default_work_s = macro_f_string_static_t_initialize(FAKE_default_work_s, 0, FAKE_default_work_s_length);
-
- const f_string_static_t fake_default_fakefile_s = macro_f_string_static_t_initialize(FAKE_default_fakefile_s, 0, FAKE_default_fakefile_s_length);
- const f_string_static_t fake_default_process_s = macro_f_string_static_t_initialize(FAKE_default_process_s, 0, FAKE_default_process_s_length);
- const f_string_static_t fake_default_settings_s = macro_f_string_static_t_initialize(FAKE_default_settings_s, 0, FAKE_default_settings_s_length);
-#endif // _di_fake_default_s_
-
-#ifndef _di_fake_build_language_s_
- const f_string_static_t fake_build_language_bash_s = macro_f_string_static_t_initialize(FAKE_build_language_bash_s, 0, FAKE_build_language_bash_s_length);
- const f_string_static_t fake_build_language_c_s = macro_f_string_static_t_initialize(FAKE_build_language_c_s, 0, FAKE_build_language_c_s_length);
- const f_string_static_t fake_build_language_cpp_s = macro_f_string_static_t_initialize(FAKE_build_language_cpp_s, 0, FAKE_build_language_cpp_s_length);
- const f_string_static_t fake_build_language_zsh_s = macro_f_string_static_t_initialize(FAKE_build_language_zsh_s, 0, FAKE_build_language_zsh_s_length);
-#endif // _di_fake_build_language_s_
-
-#ifndef _di_fake_build_version_s_
- const f_string_static_t fake_build_version_major_s = macro_f_string_static_t_initialize(FAKE_build_version_major_s, 0, FAKE_build_version_major_s_length);
- const f_string_static_t fake_build_version_minor_s = macro_f_string_static_t_initialize(FAKE_build_version_minor_s, 0, FAKE_build_version_minor_s_length);
- const f_string_static_t fake_build_version_micro_s = macro_f_string_static_t_initialize(FAKE_build_version_micro_s, 0, FAKE_build_version_micro_s_length);
- const f_string_static_t fake_build_version_nano_s = macro_f_string_static_t_initialize(FAKE_build_version_nano_s, 0, FAKE_build_version_nano_s_length);
-#endif // _di_fake_build_version_s_
-
-#ifndef _di_fake_parameter_d_
- const f_string_static_t fake_short_define_s = macro_f_string_static_t_initialize(FAKE_short_define_s, 0, FAKE_short_define_s_length);
- const f_string_static_t fake_short_fakefile_s = macro_f_string_static_t_initialize(FAKE_short_fakefile_s, 0, FAKE_short_fakefile_s_length);
- const f_string_static_t fake_short_mode_s = macro_f_string_static_t_initialize(FAKE_short_mode_s, 0, FAKE_short_mode_s_length);
- const f_string_static_t fake_short_process_s = macro_f_string_static_t_initialize(FAKE_short_process_s, 0, FAKE_short_process_s_length);
- const f_string_static_t fake_short_settings_s = macro_f_string_static_t_initialize(FAKE_short_settings_s, 0, FAKE_short_settings_s_length);
-
- const f_string_static_t fake_short_path_build_s = macro_f_string_static_t_initialize(FAKE_short_path_build_s, 0, FAKE_short_path_build_s_length);
- const f_string_static_t fake_short_path_data_s = macro_f_string_static_t_initialize(FAKE_short_path_data_s, 0, FAKE_short_path_data_s_length);
- const f_string_static_t fake_short_path_sources_s = macro_f_string_static_t_initialize(FAKE_short_path_sources_s, 0, FAKE_short_path_sources_s_length);
- const f_string_static_t fake_short_path_work_s = macro_f_string_static_t_initialize(FAKE_short_path_work_s, 0, FAKE_short_path_work_s_length);
-
- const f_string_static_t fake_long_define_s = macro_f_string_static_t_initialize(FAKE_long_define_s, 0, FAKE_long_define_s_length);
- const f_string_static_t fake_long_fakefile_s = macro_f_string_static_t_initialize(FAKE_long_fakefile_s, 0, FAKE_long_fakefile_s_length);
- const f_string_static_t fake_long_mode_s = macro_f_string_static_t_initialize(FAKE_long_mode_s, 0, FAKE_long_mode_s_length);
- const f_string_static_t fake_long_process_s = macro_f_string_static_t_initialize(FAKE_long_process_s, 0, FAKE_long_process_s_length);
- const f_string_static_t fake_long_settings_s = macro_f_string_static_t_initialize(FAKE_long_settings_s, 0, FAKE_long_settings_s_length);
-
- const f_string_static_t fake_long_path_build_s = macro_f_string_static_t_initialize(FAKE_long_path_build_s, 0, FAKE_long_path_build_s_length);
- const f_string_static_t fake_long_path_data_s = macro_f_string_static_t_initialize(FAKE_long_path_data_s, 0, FAKE_long_path_data_s_length);
- const f_string_static_t fake_long_path_sources_s = macro_f_string_static_t_initialize(FAKE_long_path_sources_s, 0, FAKE_long_path_sources_s_length);
- const f_string_static_t fake_long_path_work_s = macro_f_string_static_t_initialize(FAKE_long_path_work_s, 0, FAKE_long_path_work_s_length);
-
- const f_string_static_t fake_long_documents_disabled_s = macro_f_string_static_t_initialize(FAKE_long_documents_disabled_s, 0, FAKE_long_documents_disabled_s_length);
- const f_string_static_t fake_long_documents_enabled_s = macro_f_string_static_t_initialize(FAKE_long_documents_enabled_s, 0, FAKE_long_documents_enabled_s_length);
- const f_string_static_t fake_long_shared_disabled_s = macro_f_string_static_t_initialize(FAKE_long_shared_disabled_s, 0, FAKE_long_shared_disabled_s_length);
- const f_string_static_t fake_long_shared_enabled_s = macro_f_string_static_t_initialize(FAKE_long_shared_enabled_s, 0, FAKE_long_shared_enabled_s_length);
- const f_string_static_t fake_long_static_disabled_s = macro_f_string_static_t_initialize(FAKE_long_static_disabled_s, 0, FAKE_long_static_disabled_s_length);
- const f_string_static_t fake_long_static_enabled_s = macro_f_string_static_t_initialize(FAKE_long_static_enabled_s, 0, FAKE_long_static_enabled_s_length);
-
- const f_string_static_t fake_other_operation_build_s = macro_f_string_static_t_initialize(FAKE_other_operation_build_s, 0, FAKE_other_operation_build_s_length);
- const f_string_static_t fake_other_operation_clean_s = macro_f_string_static_t_initialize(FAKE_other_operation_clean_s, 0, FAKE_other_operation_clean_s_length);
- const f_string_static_t fake_other_operation_make_s = macro_f_string_static_t_initialize(FAKE_other_operation_make_s, 0, FAKE_other_operation_make_s_length);
- const f_string_static_t fake_other_operation_skeleton_s = macro_f_string_static_t_initialize(FAKE_other_operation_skeleton_s, 0, FAKE_other_operation_skeleton_s_length);
-#endif // _di_fake_parameter_d_
-
#ifndef _di_fake_setting_delete_
f_status_t fake_setting_delete(fake_setting_t * const setting) {
f_string_dynamic_resize(0, &setting->build);
f_string_dynamic_resize(0, &setting->data);
+ f_string_dynamic_resize(0, &setting->documents);
f_string_dynamic_resize(0, &setting->fakefile);
+ f_string_dynamic_resize(0, &setting->licenses);
f_string_dynamic_resize(0, &setting->process);
f_string_dynamic_resize(0, &setting->settings);
f_string_dynamic_resize(0, &setting->sources);
if (!main || !setting) return;
- // Load parameters.
- setting->status = f_console_parameter_process(arguments, state, &main->parameters, (void *) setting);
+ main->output.to.id = F_type_descriptor_output_d;
+ main->output.to.stream = F_type_output_d;
+ main->output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
+
+ {
+ fake_data_t data = fake_data_t_initialize;
+ data.main = main;
+ data.setting = setting;
+
+ // Load parameters.
+ setting->status = f_console_parameter_process(state, arguments, &main->parameters, (void *) &data);
+ }
if (F_status_is_error(setting->status)) {
fake_print_error(setting, setting->status, main->error, macro_fake_f(f_console_parameter_process));
}
}
- main->output.to.id = F_type_descriptor_output_d;
- main->output.to.stream = F_type_output_d;
- main->output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
-
if (main->parameters.array[fake_parameter_help_e].result & f_console_result_found_e) {
setting->flag |= fake_main_flag_help_e;
}
if (main->parameters.array[parameters[i]].result & f_console_result_value_e) {
- index = data->main->parameters.array[parameters[i]].values.array[data->main->parameters.array[parameters[i]].values.used - 1];
+ index = main->parameters.array[parameters[i]].values.array[main->parameters.array[parameters[i]].values.used - 1];
- if (data->main->parameters.arguments.array[index].used) {
+ if (main->parameters.arguments.array[index].used) {
if (parameters[i] == fake_parameter_process_e) {
- for (j = 0; j < data->main->parameters.arguments.array[index].used; ++j) {
+ for (j = 0; j < main->parameters.arguments.array[index].used; ++j) {
- setting->status = f_utf_is_word_dash_plus(data->main->parameters.arguments.array[index].string + j, data->main->parameters.arguments.array[index].used - j, F_false);
+ setting->status = f_utf_is_word_dash_plus(main->parameters.arguments.array[index].string + j, main->parameters.arguments.array[index].used - j, F_false);
if (F_status_is_error(setting->status)) {
- if (print.verbosity > f_console_verbosity_quiet_e) {
- fake_print_line_first_locked(setting, print);
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fake_print_line_first_locked(setting, main->error);
- if (fll_error_print(data->main->error, F_status_set_fine(setting->status), macro_fake_f(f_utf_is_word_dash_plus), F_false) == F_false) {
- fll_program_print_error_parameter_process(data->main->error, F_status_set_fine(setting->status), f_console_symbol_long_normal_s, names[i]);
+ if (fake_print_error_fallback(setting, setting->status, main->error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
+ fll_program_print_error_parameter_process(main->error, f_console_symbol_long_normal_s, names[i]);
}
}
if (setting->status == F_false) {
setting->status = F_status_set_error(F_parameter);
- fake_print_error_parameter_not_word(setting, data->main->error, f_console_symbol_long_normal_s, names[i], data->main->parameters.arguments.array[index]);
+ fake_print_error_parameter_not_word(setting, main->error, f_console_symbol_long_normal_s, names[i], main->parameters.arguments.array[index]);
return;
}
}
if (cleanups[i]) {
- status = f_path_directory_cleanup(data->main->parameters.arguments.array[index], parameters_value[i]);
+ setting->status = f_path_directory_cleanup(main->parameters.arguments.array[index], variable[i]);
if (F_status_is_error(setting->status)) {
- if (print.verbosity > f_console_verbosity_quiet_e) {
- fake_print_line_first_locked(setting, print);
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fake_print_line_first_locked(setting, main->error);
- if (fll_error_print(data->main->error, F_status_set_fine(setting->status), macro_fake_f(f_path_directory_cleanup), F_false) == F_false) {
- fll_program_print_error_parameter_process(data->main->error, F_status_set_fine(setting->status), f_console_symbol_long_normal_s, names[i]);
+ if (fake_print_error_fallback(setting, setting->status, main->error, macro_fake_f(f_path_directory_cleanup)) == F_false) {
+ fll_program_print_error_parameter_process(main->error, f_console_symbol_long_normal_s, names[i]);
}
}
}
}
- variable[i]->string = data->main->parameters.arguments.array[index].string;
- variable[i]->used = data->main->parameters.arguments.array[index].used;
+ variable[i]->string = main->parameters.arguments.array[index].string;
+ variable[i]->used = main->parameters.arguments.array[index].used;
variable[i]->size = 0;
}
if (!variable[i]->used) {
setting->status = F_status_set_error(F_parameter);
- fake_print_error_parameter_not_empty(setting, data->main->error, f_console_symbol_long_normal_s, names[i], data->main->parameters.arguments.array[index]);
+ fake_print_error_parameter_not_empty(setting, main->error, f_console_symbol_long_normal_s, names[i], main->parameters.arguments.array[index]);
return;
}
};
f_string_dynamics_t * const variable[] = {
- &setting->define,
- &setting->mode,
+ &setting->defines,
+ &setting->modes,
};
for (i = 0; i < 2; ++i) {
}
if (main->parameters.array[parameters[i]].result & f_console_result_value_e) {
- setting->status = fll_program_parameter_additional_rip(data->main->parameters.arguments.array, data->main->parameters.array[parameters[i]].values, variable[i]);
+ setting->status = fll_program_parameter_additional_rip(main->parameters.arguments.array, main->parameters.array[parameters[i]].values, variable[i]);
if (F_status_is_error(setting->status)) {
- if (print.verbosity > f_console_verbosity_quiet_e) {
- fake_print_line_first_locked(setting, print);
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fake_print_line_first_locked(setting, main->error);
- if (fll_error_print(data->main->error, F_status_set_fine(setting->status), macro_fake_f(fll_program_parameter_additional_rip), F_false) == F_false) {
- fll_program_print_error_parameter_process(data->main->error, F_status_set_fine(setting->status), f_console_symbol_long_normal_s, names[i]);
+ if (fake_print_error_fallback(setting, setting->status, main->error, macro_fake_f(fll_program_parameter_additional_rip)) == F_false) {
+ fll_program_print_error_parameter_process(main->error, f_console_symbol_long_normal_s, names[i]);
}
}
f_array_length_t j = 0;
f_array_length_t width_max = 0;
- for (; i < data->mode.used; ++i) {
+ for (; i < setting->modes.used; ++i) {
- for (j = 0; j < data->mode.array[i].used; ++j) {
+ for (j = 0; j < setting->modes.array[i].used; ++j) {
- width_max = data->mode.array[i].used - j;
+ width_max = setting->modes.array[i].used - j;
- setting->status = f_utf_is_word_dash_plus(data->main->parameters.arguments.array[i].string + j, data->main->parameters.arguments.array[i].used - j, F_false);
+ setting->status = f_utf_is_word_dash_plus(main->parameters.arguments.array[i].string + j, main->parameters.arguments.array[i].used - j, F_false);
if (F_status_is_error(setting->status)) {
- if (print.verbosity > f_console_verbosity_quiet_e) {
- fake_print_line_first_locked(setting, print);
+ if (main->error.verbosity > f_console_verbosity_quiet_e) {
+ fake_print_line_first_locked(setting, main->error);
- if (fll_error_print(data->main->error, F_status_set_fine(setting->status), macro_fake_f(f_utf_is_word_dash_plus), F_false) == F_false) {
- fll_program_print_error_parameter_process(data->main->error, F_status_set_fine(setting->status), f_console_symbol_long_normal_s, names[i]);
+ if (fake_print_error_fallback(setting, setting->status, main->error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
+ fll_program_print_error_parameter_process(main->error, f_console_symbol_long_normal_s, names[i]);
}
}
if (setting->status == F_false) {
setting->status = F_status_set_error(F_parameter);
- fake_print_error_parameter_not_word(setting, data->main->error, f_console_symbol_long_normal_s, names[i], data->main->parameters.arguments.array[index]);
+ fake_print_error_parameter_not_word(setting, main->error, f_console_symbol_long_normal_s, names[i], main->parameters.arguments.array[index]);
return;
}
}
if (setting->operations.used) {
- setting->flag |= fake_data_flag_operation_e;
+ setting->flag |= fake_main_flag_operation_e;
}
else {
- setting->flag |= fake_data_flag_operation_make_e;
- setting->flag -= setting->flag & fake_data_flag_operation_e;
+ setting->flag |= fake_main_flag_operation_make_e;
+ setting->flag -= setting->flag & fake_main_flag_operation_e;
setting->status = f_uint8s_increase_by(1, &setting->operations);
if (!state) return;
- if (!parameters || !data || state->type != f_console_parameter_state_type_match_other_e)) {
+ if (!void_parameters || !void_data || (state->type != f_console_parameter_state_type_simple_e && state->type != f_console_parameter_state_type_miss_e)) {
state->status = F_process;
return;
}
f_console_parameters_t * const parameters = (f_console_parameters_t * const) void_parameters;
- fake_setting_t * const setting = (fake_setting_t * const) void_data;
+ fake_data_t * const data = (fake_data_t * const) void_data;
- state->status = f_uint8s_increase(fake_default_allocation_small_d, &setting->operations);
+ state->status = f_uint8s_increase(fake_default_allocation_small_d, &data->setting->operations);
if (F_status_is_error(state->status)) {
- fake_print_error(setting, state->status, main->error, macro_fake_f(f_uint8s_increase));
+ fake_print_error(data->setting, state->status, data->main->error, macro_fake_f(f_uint8s_increase));
return;
}
- switch (state.match) {
+ switch (state->at) {
case fake_parameter_operation_build_e:
- setting->operations.array[setting->operations.used++] = fake_operation_build_e;
- setting->flag |= fake_data_flag_operation_build_e;
+ data->setting->operations.array[data->setting->operations.used++] = fake_operation_build_e;
+ data->setting->flag |= fake_main_flag_operation_build_e;
break;
case fake_parameter_operation_clean_e:
- setting->operations.array[setting->operations.used++] = fake_operation_clean_e;
- setting->flag |= fake_data_flag_operation_clean_e;
+ data->setting->operations.array[data->setting->operations.used++] = fake_operation_clean_e;
+ data->setting->flag |= fake_main_flag_operation_clean_e;
break;
case fake_parameter_operation_make_e:
- setting->operations.array[setting->operations.used++] = fake_operation_make_e;
- setting->flag |= fake_data_flag_operation_make_e;
+ data->setting->operations.array[data->setting->operations.used++] = fake_operation_make_e;
+ data->setting->flag |= fake_main_flag_operation_make_e;
break;
case fake_parameter_operation_skeleton_e:
- setting->operations.array[setting->operations.used++] = fake_operation_skeleton_e;
- setting->flag |= fake_data_flag_operation_skeleton_e;
+ data->setting->operations.array[data->setting->operations.used++] = fake_operation_skeleton_e;
+ data->setting->flag |= fake_main_flag_operation_skeleton_e;
break;
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
#endif
/**
- * The program version.
- */
-#ifndef _di_fake_program_version_s_
- #define FAKE_program_version_major_s F_string_ascii_0_s
- #define FAKE_program_version_minor_s F_string_ascii_7_s
- #define FAKE_program_version_micro_s F_string_ascii_0_s
-
- #define FAKE_program_version_major_s_length F_string_ascii_0_s_length
- #define FAKE_program_version_minor_s_length F_string_ascii_7_s_length
- #define FAKE_program_version_micro_s_length F_string_ascii_0_s_length
-
- #ifndef FAKE_program_version_nano_prefix_s
- #define FAKE_program_version_nano_prefix_s
- #define FAKE_program_version_nano_prefix_s_length 0
- #endif // FAKE_program_version_major_s_length F_string_ascii_0_s_length
-
- #ifndef FAKE_program_version_nano_s
- #define FAKE_program_version_nano_s
- #define FAKE_program_version_nano_s_length 0
- #endif // FAKE_program_version_nano_s
-
- #define FAKE_program_version_s FAKE_program_version_major_s F_string_ascii_period_s FAKE_program_version_minor_s F_string_ascii_period_s FAKE_program_version_micro_s FAKE_program_version_nano_prefix_s FAKE_program_version_nano_s
-
- #define FAKE_program_version_s_length FAKE_program_version_major_s_length + F_string_ascii_period_s_length + FAKE_program_version_minor_s_length + F_string_ascii_period_s_length + FAKE_program_version_micro_s_length + FAKE_program_version_nano_prefix_s_length + FAKE_program_version_nano_s_length
-
- extern const f_string_static_t fake_program_version_s;
-#endif // _di_fake_program_version_s_
-
-/**
- * The program name.
- */
-#ifndef _di_fake_program_name_s_
- #define FAKE_program_name_s "fake"
- #define FAKE_program_name_long_s "Featureless Make"
-
- #define FAKE_program_name_s_length 4
- #define FAKE_program_name_long_s_length 16
-
- extern const f_string_static_t fake_program_name_s;
- extern const f_string_static_t fake_program_name_long_s;
-#endif // _di_fake_program_name_s_
-
-/**
- * The program help related data.
- */
-#ifndef _di_fake_program_help_parameter_s_
- #define FAKE_program_help_parameters_s "operation / section"
-
- #define FAKE_program_help_parameters_s_length 19
-
- extern const f_string_static_t fake_program_help_parameters_s;
-#endif // _di_fake_program_help_parameter_s_
-
-/**
- * The build operation utilizes pre-defined path structures.
- * These structures are hard-coded by their individual pieces to be constructed later on.
- */
-#ifndef _di_fake_path_s_
- #define FAKE_path_part_build_s "build" F_path_separator_s
- #define FAKE_path_part_c_s "c" F_path_separator_s
- #define FAKE_path_part_cpp_s "c++" F_path_separator_s
- #define FAKE_path_part_data_s "data" F_path_separator_s
- #define FAKE_path_part_documentation_s "documentation" F_path_separator_s
- #define FAKE_path_part_documents_s "documents" F_path_separator_s
- #define FAKE_path_part_includes_s "includes" F_path_separator_s
- #define FAKE_path_part_libraries_s "libraries" F_path_separator_s
- #define FAKE_path_part_licenses_s "licenses" F_path_separator_s
- #define FAKE_path_part_objects_s "objects" F_path_separator_s
- #define FAKE_path_part_process_s "process" F_path_separator_s
- #define FAKE_path_part_programs_s "programs" F_path_separator_s
- #define FAKE_path_part_script_s "script" F_path_separator_s
- #define FAKE_path_part_settings_s "settings" F_path_separator_s
- #define FAKE_path_part_shared_s "shared" F_path_separator_s
- #define FAKE_path_part_shell_s "shell" F_path_separator_s
- #define FAKE_path_part_specifications_s "specifications" F_path_separator_s
- #define FAKE_path_part_stage_s "stage" F_path_separator_s
- #define FAKE_path_part_static_s "static" F_path_separator_s
-
- #define FAKE_path_part_build_s_length 5 + F_path_separator_s_length
- #define FAKE_path_part_c_s_length 1 + F_path_separator_s_length
- #define FAKE_path_part_cpp_s_length 3 + F_path_separator_s_length
- #define FAKE_path_part_data_s_length 4 + F_path_separator_s_length
- #define FAKE_path_part_documentation_s_length 13 + F_path_separator_s_length
- #define FAKE_path_part_documents_s_length 9 + F_path_separator_s_length
- #define FAKE_path_part_includes_s_length 8 + F_path_separator_s_length
- #define FAKE_path_part_libraries_s_length 9 + F_path_separator_s_length
- #define FAKE_path_part_licenses_s_length 8 + F_path_separator_s_length
- #define FAKE_path_part_objects_s_length 7 + F_path_separator_s_length
- #define FAKE_path_part_process_s_length 7 + F_path_separator_s_length
- #define FAKE_path_part_programs_s_length 8 + F_path_separator_s_length
- #define FAKE_path_part_script_s_length 6 + F_path_separator_s_length
- #define FAKE_path_part_settings_s_length 8 + F_path_separator_s_length
- #define FAKE_path_part_shared_s_length 6 + F_path_separator_s_length
- #define FAKE_path_part_shell_s_length 5 + F_path_separator_s_length
- #define FAKE_path_part_specifications_s_length 14 + F_path_separator_s_length
- #define FAKE_path_part_stage_s_length 5 + F_path_separator_s_length
- #define FAKE_path_part_static_s_length 6 + F_path_separator_s_length
-
- extern const f_string_static_t fake_path_part_build_s;
- extern const f_string_static_t fake_path_part_c_s;
- extern const f_string_static_t fake_path_part_cpp_s;
- extern const f_string_static_t fake_path_part_data_s;
- extern const f_string_static_t fake_path_part_documentation_s;
- extern const f_string_static_t fake_path_part_documents_s;
- extern const f_string_static_t fake_path_part_includes_s;
- extern const f_string_static_t fake_path_part_libraries_s;
- extern const f_string_static_t fake_path_part_licenses_s;
- extern const f_string_static_t fake_path_part_objects_s;
- extern const f_string_static_t fake_path_part_process_s;
- extern const f_string_static_t fake_path_part_programs_s;
- extern const f_string_static_t fake_path_part_script_s;
- extern const f_string_static_t fake_path_part_settings_s;
- extern const f_string_static_t fake_path_part_shared_s;
- extern const f_string_static_t fake_path_part_shell_s;
- extern const f_string_static_t fake_path_part_specifications_s;
- extern const f_string_static_t fake_path_part_stage_s;
- extern const f_string_static_t fake_path_part_static_s;
-#endif // _di_fake_path_s_
-
-/**
- * The file settings.
- */
-#ifndef _di_fake_file_s_
- #define FAKE_file_defines_s "defines"
- #define FAKE_file_dependencies_s "dependencies"
- #define FAKE_file_process_pre_s "process_pre.sh"
- #define FAKE_file_process_post_s "process_post.sh"
- #define FAKE_file_readme_s "readme.txt"
-
- #define FAKE_file_defines_s_length 7
- #define FAKE_file_dependencies_s_length 12
- #define FAKE_file_process_pre_s_length 14
- #define FAKE_file_process_post_s_length 15
- #define FAKE_file_readme_s_length 10
-
- extern const f_string_static_t fake_file_defines_s;
- extern const f_string_static_t fake_file_dependencies_s;
- extern const f_string_static_t fake_file_process_pre_s;
- extern const f_string_static_t fake_file_process_post_s;
- extern const f_string_static_t fake_file_readme_s;
-#endif // _di_fake_file_s_
-
-/***
- * Default allocations.
- *
- * Set to at least 4 to provide a UTF-8 friendly allocation step.
- *
- * fake_default_allocation_*_d:
- * - large: A buffer size used for large allocations.
- * - pipe: A buffer size used for processing piped data.
- * - small: A buffer size used for small allocations.
- */
-#ifndef _di_fake_default_d_
- #define fake_default_allocation_large_d 64
- #define fake_default_allocation_pipe_d 16384
- #define fake_default_allocation_small_d 8
-#endif // _di_fake_default_d_
-
-/**
- * Provide default settings.
- */
-#ifndef _di_fake_default_s_
- #define FAKE_default_build_s "build" F_path_separator_s
- #define FAKE_default_data_s "data" F_path_separator_s
- #define FAKE_default_sources_s "sources" F_path_separator_s
- #define FAKE_default_work_s ""
-
- #define FAKE_default_fakefile_s "fakefile"
- #define FAKE_default_process_s ""
- #define FAKE_default_settings_s "settings"
-
- #define FAKE_default_build_s_length 5 + F_path_separator_s_length
- #define FAKE_default_data_s_length 4 + F_path_separator_s_length
- #define FAKE_default_sources_s_length 7 + F_path_separator_s_length
- #define FAKE_default_work_s_length 0
-
- #define FAKE_default_fakefile_s_length 8
- #define FAKE_default_process_s_length 0
- #define FAKE_default_settings_s_length 8
-
- extern const f_string_static_t fake_default_build_s;
- extern const f_string_static_t fake_default_data_s;
- extern const f_string_static_t fake_default_sources_s;
- extern const f_string_static_t fake_default_work_s;
-
- extern const f_string_static_t fake_default_fakefile_s;
- extern const f_string_static_t fake_default_process_s;
- extern const f_string_static_t fake_default_settings_s;
-#endif // _di_fake_default_s_
-
-/**
- * The build language enumerations.
- *
- * fake_build_language_type_*_e:
- * - bash: The GNU Bash language.
- * - c: The C language.
- * - cpp: The C++ language.
- * - zsh: The ZSH language (Similar to and somewhat compatible with GNU Bash).
- */
-#ifndef _di_fake_build_language_e_
- enum {
- fake_build_language_type_bash_e = 1,
- fake_build_language_type_c_e,
- fake_build_language_type_cpp_e,
- fake_build_language_type_zsh_e,
- }; // enum
-#endif // _di_fake_build_language_e_
-
-/**
- * The build language strings.
- *
- * fake_build_language_*_s:
- * - bash: The GNU Bash language.
- * - c: The C language.
- * - cpp: The C++ language.
- * - zsh: The ZSH language (Similar to and somewhat compatible with GNU Bash).
- */
-#ifndef _di_fake_build_language_s_
- #define FAKE_build_language_bash_s "bash"
- #define FAKE_build_language_c_s "c"
- #define FAKE_build_language_cpp_s "c++"
- #define FAKE_build_language_zsh_s "zsh"
-
- #define FAKE_build_language_bash_s_length 4
- #define FAKE_build_language_c_s_length 1
- #define FAKE_build_language_cpp_s_length 3
- #define FAKE_build_language_zsh_s_length 3
-
- extern const f_string_static_t fake_build_language_bash_s;
- extern const f_string_static_t fake_build_language_c_s;
- extern const f_string_static_t fake_build_language_cpp_s;
- extern const f_string_static_t fake_build_language_zsh_s;
-#endif // _di_fake_build_language_s_
-
-/**
- * The program version enumerations.
- */
-#ifndef _di_fake_build_version_e_
- enum {
- fake_build_version_type_major_e = 1,
- fake_build_version_type_minor_e,
- fake_build_version_type_micro_e,
- fake_build_version_type_nano_e,
- }; // enum
-#endif // _di_fake_build_version_e_
-
-/**
- * The program version strings.
- */
-#ifndef _di_fake_build_version_s_
- #define FAKE_build_version_major_s "major"
- #define FAKE_build_version_minor_s "minor"
- #define FAKE_build_version_micro_s "micro"
- #define FAKE_build_version_nano_s "nano"
-
- #define FAKE_build_version_major_s_length 5
- #define FAKE_build_version_minor_s_length 5
- #define FAKE_build_version_micro_s_length 5
- #define FAKE_build_version_nano_s_length 4
-
- extern const f_string_static_t fake_build_version_major_s;
- extern const f_string_static_t fake_build_version_minor_s;
- extern const f_string_static_t fake_build_version_micro_s;
- extern const f_string_static_t fake_build_version_nano_s;
-#endif // _di_fake_build_version_s_
-
-/**
- * The program operation enumerations.
- *
- * fake_operation_*_e:
- * - build: The build operation.
- * - clean: The clean operation.
- * - make: The make operation.
- * - skeleton: The skeleton operation.
- */
-#ifndef _di_fake_operation_e_
- enum {
- fake_operation_build_e = 1,
- fake_operation_clean_e,
- fake_operation_make_e,
- fake_operation_skeleton_e,
- }; // enum
-#endif // _di_fake_operation_e_
-
-/**
- * The program defines.
- *
- * fake_signal_*_d:
- * - check: The normal signal check (@fixme is needed anymore as-is?).
- * - check_tiny: The tiny check (@fixme is needed anymore as-is?).
- * - check_short: The short signal check (@fixme this is used everywhere).
- */
-#ifndef _di_fake_signal_d_
- #define fake_signal_check_d 500000
- #define fake_signal_check_tiny_d 4
- #define fake_signal_check_short_d 16
-#endif // _di_fake_signal_d_
-
-/**
- * The main program parameters.
- */
-#ifndef _di_fake_parameter_d_
- #define FAKE_short_define_s "d"
- #define FAKE_short_fakefile_s "f"
- #define FAKE_short_mode_s "m"
- #define FAKE_short_process_s "p"
- #define FAKE_short_settings_s "s"
-
- #define FAKE_short_path_build_s "b"
- #define FAKE_short_path_data_s "D"
- #define FAKE_short_path_sources_s "S"
- #define FAKE_short_path_work_s "w"
-
- #define FAKE_long_define_s "define"
- #define FAKE_long_fakefile_s "fakefile"
- #define FAKE_long_mode_s "mode"
- #define FAKE_long_process_s "process"
- #define FAKE_long_settings_s "settings"
-
- #define FAKE_long_path_build_s "build"
- #define FAKE_long_path_data_s "data"
- #define FAKE_long_path_sources_s "sources"
- #define FAKE_long_path_work_s "work"
-
- // These special parameters are provided in such a way that they mimic the traditional ./configure script.
- #define FAKE_long_documents_disabled_s "disable-doc"
- #define FAKE_long_documents_enabled_s "enable-doc"
- #define FAKE_long_shared_disabled_s "disable-shared"
- #define FAKE_long_shared_enabled_s "enable-shared"
- #define FAKE_long_static_disabled_s "disable-static"
- #define FAKE_long_static_enabled_s "enable-static"
-
- #define FAKE_other_operation_build_s "build"
- #define FAKE_other_operation_clean_s "clean"
- #define FAKE_other_operation_make_s "make"
- #define FAKE_other_operation_skeleton_s "skeleton"
-
- #define FAKE_short_define_s_length 1
- #define FAKE_short_fakefile_s_length 1
- #define FAKE_short_mode_s_length 1
- #define FAKE_short_process_s_length 1
- #define FAKE_short_settings_s_length 1
-
- #define FAKE_short_path_build_s_length 1
- #define FAKE_short_path_data_s_length 1
- #define FAKE_short_path_sources_s_length 1
- #define FAKE_short_path_work_s_length 1
-
- #define FAKE_long_define_s_length 6
- #define FAKE_long_fakefile_s_length 8
- #define FAKE_long_mode_s_length 4
- #define FAKE_long_process_s_length 7
- #define FAKE_long_settings_s_length 8
-
- #define FAKE_long_path_build_s_length 5
- #define FAKE_long_path_data_s_length 4
- #define FAKE_long_path_sources_s_length 7
- #define FAKE_long_path_work_s_length 4
-
- #define FAKE_long_documents_disabled_s_length 11
- #define FAKE_long_documents_enabled_s_length 10
- #define FAKE_long_shared_disabled_s_length 14
- #define FAKE_long_shared_enabled_s_length 13
- #define FAKE_long_static_disabled_s_length 14
- #define FAKE_long_static_enabled_s_length 13
-
- #define FAKE_other_operation_build_s_length 5
- #define FAKE_other_operation_clean_s_length 5
- #define FAKE_other_operation_make_s_length 4
- #define FAKE_other_operation_skeleton_s_length 8
-
- extern const f_string_static_t fake_short_define_s;
- extern const f_string_static_t fake_short_fakefile_s;
- extern const f_string_static_t fake_short_mode_s;
- extern const f_string_static_t fake_short_process_s;
- extern const f_string_static_t fake_short_settings_s;
-
- extern const f_string_static_t fake_short_path_build_s;
- extern const f_string_static_t fake_short_path_data_s;
- extern const f_string_static_t fake_short_path_sources_s;
- extern const f_string_static_t fake_short_path_work_s;
-
- extern const f_string_static_t fake_long_define_s;
- extern const f_string_static_t fake_long_fakefile_s;
- extern const f_string_static_t fake_long_mode_s;
- extern const f_string_static_t fake_long_process_s;
- extern const f_string_static_t fake_long_settings_s;
-
- extern const f_string_static_t fake_long_path_build_s;
- extern const f_string_static_t fake_long_path_data_s;
- extern const f_string_static_t fake_long_path_sources_s;
- extern const f_string_static_t fake_long_path_work_s;
-
- extern const f_string_static_t fake_long_documents_disabled_s;
- extern const f_string_static_t fake_long_documents_enabled_s;
- extern const f_string_static_t fake_long_shared_disabled_s;
- extern const f_string_static_t fake_long_shared_enabled_s;
- extern const f_string_static_t fake_long_static_disabled_s;
- extern const f_string_static_t fake_long_static_enabled_s;
-
- extern const f_string_static_t fake_other_operation_build_s;
- extern const f_string_static_t fake_other_operation_clean_s;
- extern const f_string_static_t fake_other_operation_make_s;
- extern const f_string_static_t fake_other_operation_skeleton_s;
-
- enum {
- fake_parameter_help_e,
- fake_parameter_copyright_e,
- fake_parameter_light_e,
- fake_parameter_dark_e,
- fake_parameter_no_color_e,
- fake_parameter_verbosity_quiet_e,
- fake_parameter_verbosity_error_e,
- fake_parameter_verbosity_normal_e,
- fake_parameter_verbosity_verbose_e,
- fake_parameter_verbosity_debug_e,
- fake_parameter_version_e,
- fake_parameter_line_first_no_e,
- fake_parameter_line_last_no_e,
-
- fake_parameter_define_e,
- fake_parameter_fakefile_e,
- fake_parameter_mode_e,
- fake_parameter_process_e,
- fake_parameter_settings_e,
-
- fake_parameter_path_build_e,
- fake_parameter_path_data_e,
- fake_parameter_path_sources_e,
- fake_parameter_path_work_e,
-
- fake_parameter_documents_disable_e,
- fake_parameter_documents_enable_e,
- fake_parameter_shared_disable_e,
- fake_parameter_shared_enable_e,
- fake_parameter_static_disable_e,
- fake_parameter_static_enable_e,
-
- fake_parameter_operation_build_e,
- fake_parameter_operation_clean_e,
- fake_parameter_operation_make_e,
- fake_parameter_operation_skeleton_e,
- }; // enum
-
- #define fake_console_parameter_t_initialize \
- { \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
- \
- macro_f_console_parameter_t_initialize_3(fake_short_define_s, fake_long_define_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fake_short_fakefile_s, fake_long_fakefile_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fake_short_mode_s, fake_long_mode_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fake_short_process_s, fake_long_process_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fake_short_settings_s, fake_long_settings_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fake_short_path_build_s, fake_long_path_build_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fake_short_path_data_s, fake_long_path_data_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fake_short_path_sources_s, fake_long_path_sources_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fake_short_path_work_s, fake_long_path_work_s, 1, f_console_flag_normal_e), \
- \
- macro_f_console_parameter_t_initialize_5(fake_long_documents_disabled_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_5(fake_long_documents_enabled_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_5(fake_long_shared_disabled_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_5(fake_long_shared_enabled_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_5(fake_long_static_disabled_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_5(fake_long_static_enabled_s, 0, f_console_flag_normal_e), \
- \
- macro_f_console_parameter_t_initialize_6(fake_other_operation_build_s, 0, f_console_flag_simple_e), \
- macro_f_console_parameter_t_initialize_6(fake_other_operation_clean_s, 0, f_console_flag_simple_e), \
- macro_f_console_parameter_t_initialize_6(fake_other_operation_make_s, 0, f_console_flag_simple_e), \
- macro_f_console_parameter_t_initialize_6(fake_other_operation_skeleton_s, 0, f_console_flag_simple_e), \
- }
-
- #define fake_total_parameters_d 32
-#endif // _di_fake_parameter_d_
-
-/**
- * Flags passed to the main function or program.
- *
- * fake_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print copyright.
- * - enable_documents: Enable documents, as-in --enable-doc (not specifying means --disable-doc).
- * - enable_shared: Enable shared, as-in --enable-shared (not specifying means --disable-shared).
- * - enable_static: Enable static, as-in --enable-static (not specifying means --disable-static).
- * - file_from: Using a specified source file.
- * - file_to: Using a specified destination file.
- * - header: Enable printing of headers.
- * - help: Print help.
- * - operation: Designate that an operation is explicitly passed.
- * - operation_build: The build operation is designated.
- * - 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.
- * - separate: Enable printing of separators.
- * - strip_invalid: Using strip invalid character mode.
- * - verify: Using verify mode.
- * - version: Print version.
- */
-#ifndef _di_fake_main_flag_e_
- enum {
- fake_main_flag_none_e = 0x0,
- fake_main_flag_copyright_e = 0x1,
- fake_main_flag_enable_documents_e = 0x2,
- fake_main_flag_enable_shared_e = 0x4,
- fake_main_flag_enable_static_e = 0x8,
- fake_main_flag_file_from_e = 0x10,
- fake_main_flag_file_to_e = 0x20,
- fake_main_flag_header_e = 0x40,
- fake_main_flag_help_e = 0x80,
- fake_data_flag_operation_e = 0x100,
- fake_data_flag_operation_build_e = 0x200,
- fake_data_flag_operation_clean_e = 0x400,
- fake_data_flag_operation_make_e = 0x800,
- fake_data_flag_operation_skeleton_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,
- }; // enum
-#endif // _di_fake_main_flag_e_
-
-/**
- * The fake 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).
- *
- * flag: Flags passed to the main function.
- *
- * state: The state data used when processing the FSS data.
- * status: The main status code, generally used by the load settings and main functions.
- *
- * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
- * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
- *
- * build: The build directory.
- * data: The data directory.
- * fakefile: The fakefile file path.
- * process: The process name.
- * settings: The settings file path.
- * sources: The sources directory.
- * work: The work directory.
-
- * defines: The define data.
- * modes: The mode data.
- *
- * operations: The operations, in the order in which they are given.
- */
-#ifndef _di_fake_setting_t_
- typedef struct {
- uint32_t flag;
-
- f_state_t state;
- f_status_t status;
-
- f_string_static_t line_first;
- f_string_static_t line_last;
-
- f_string_dynamic_t build;
- f_string_dynamic_t data;
- f_string_dynamic_t fakefile;
- f_string_dynamic_t process;
- f_string_dynamic_t settings;
- f_string_dynamic_t sources;
- f_string_dynamic_t work;
-
- f_string_dynamics_t defines;
- f_string_dynamics_t modes;
-
- f_uint8s_t operations;
- } fake_setting_t;
-
- #define fake_setting_t_initialize \
- { \
- fake_main_flag_none_e, \
- f_state_t_initialize, \
- F_none, \
- f_string_static_t_initialize, \
- f_string_static_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_uint8s_t_initialize, \
- }
-#endif // _di_fake_setting_t_
-
-/**
* Delete the program main setting data.
*
* @param setting
return;
}
- if ((setting->flag & fake_data_flag_operation_build_e) && (setting->flag & fake_data_flag_operation_make_e)) {
+ if ((setting->flag & fake_main_flag_operation_build_e) && (setting->flag & fake_main_flag_operation_make_e)) {
setting->status = F_status_set_error(F_parameter);
fake_print_error_parameter_operation_not_with(setting, main->error, fake_other_operation_build_s, fake_other_operation_make_s);
data.main = main;
data.setting = setting;
- setting->status = fake_path_generate(&data); // @todo needs to be updated regarding the new data structure.
+ setting->status = fake_path_generate(&data);
if (F_status_is_error(setting->status)) {
fake_data_delete(&data);
return;
}
- if ((main->pipe & fll_program_data_pipe_input_e) && !(data.setting->flag & fake_data_flag_operation_e)) {
+ if ((main->pipe & fll_program_data_pipe_input_e) && !(data.setting->flag & fake_main_flag_operation_e)) {
data.file_data_build_fakefile.used = 0;
setting->status = f_string_dynamic_append(f_string_ascii_minus_s, &data.file_data_build_fakefile);
#include <fll/level_2/program.h>
// Featureless Make includes.
-#include <program/fake/main/common.h>
#include <program/fake/main/common-print.h>
+#include <program/fake/main/common-string.h>
+#include <program/fake/main/common-type.h>
+#include <program/fake/main/common.h>
#include <program/fake/main/print.h>
#ifdef __cplusplus
}
#endif // _di_fake_print_error_
+#ifndef _di_fake_print_error_fallback_
+ f_status_t fake_print_error_fallback(fake_setting_t * const setting, const f_status_t status, const fl_print_t print, const f_string_t function) {
+
+ if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+
+ fake_print_line_first_locked(setting, print);
+
+ if (fll_error_print(print, F_status_set_fine(status), function, F_false) == F_known_not) return F_false;
+
+ return F_true;
+ }
+#endif // _di_fake_print_error_fallback_
+
#ifndef _di_fake_print_error_file_
f_status_t fake_print_error_file(fake_setting_t * const setting, const f_status_t status, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
}
#endif // _di_fake_print_error_file_
+#ifndef _di_fake_print_error_file_fallback_
+ f_status_t fake_print_error_file_fallback(fake_setting_t * const setting, const f_status_t status, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+
+ if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
+
+ fake_print_line_first_locked(setting, print);
+
+ if (fll_error_file_print(print, F_status_set_fine(status), function, F_false, name, operation, type) == F_known_not) return F_false;
+
+ return F_true;
+ }
+#endif // _di_fake_print_error_file_fallback_
+
#ifndef _di_fake_print_error_failure_operation_
f_status_t fake_print_error_failure_operation(fake_setting_t * const setting, const fl_print_t print, const uint8_t operation) {
fl_print_format("%[%QThe operation '%]%[", print.to, print.context, print.prefix, print.context, print.notable);
- if (data.operation == fake_operation_build_e) {
- f_print_dynamic(print.to, fake_other_operation_build_s);
+ if (operation == fake_operation_build_e) {
+ f_print_dynamic(fake_other_operation_build_s, print.to);
}
- else if (data.operation == fake_operation_clean_e) {
- f_print_dynamic(print.to, fake_other_operation_clean_s);
+ else if (operation == fake_operation_clean_e) {
+ f_print_dynamic(fake_other_operation_clean_s, print.to);
}
- else if (data.operation == fake_operation_make_e) {
- f_print_dynamic(print.to, fake_other_operation_make_s);
+ else if (operation == fake_operation_make_e) {
+ f_print_dynamic(fake_other_operation_make_s, print.to);
}
- else if (data.operation == fake_operation_skeleton_e) {
- f_print_dynamic(print.to, fake_other_operation_skeleton_s);
+ else if (operation == fake_operation_skeleton_e) {
+ f_print_dynamic(fake_other_operation_skeleton_s, print.to);
}
fl_print_format("%]%[' failed.%]%r", print.to, print.notable, print.context, print.context, f_string_eol_s);
}
#endif // _di_fake_print_error_parameter_operation_not_with_
-#ifndef _di_fake_print_error_parameter_value_too_long_
- f_status_t fake_print_error_parameter_value_too_long(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name, const f_string_static_t value) {
-
- if (!setting || print.verbosity == f_console_verbosity_quiet_e) return F_output_not;
-
- if (!F_status_is_error(setting->status)) {
- if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
- }
-
- f_file_stream_lock(print.to);
-
- fake_print_line_first_unlocked(setting, print);
-
- fl_print_format("%[%QThe value '%]", print.to, print.context, print.prefix, print.context);
- fl_print_format("%[%Q%]", print.to, print.notable, value, print.notable);
- fl_print_format("%[' for the parameter '%]", print.to, print.context, print.prefix, print.context);
- fl_print_format("%[%Q%Q%]", print.to, print.notable, symbol, name, print.notable);
- fl_print_format("%[' is too long.%]%r", print.to, print.context, print.context, f_string_eol_s);
-
- f_file_stream_unlock(print.to);
-
- return F_none;
- }
-#endif // _di_fake_print_error_parameter_too_value_long_
-
#ifndef _di_fake_print_help_
f_status_t fake_print_help(fake_setting_t * const setting, const fl_print_t print) {
f_print_dynamic_raw(f_string_eol_s, print.to);
- fll_program_print_help_option(print, fake_short_path_build_s, fake_long_path_build_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom build directory.");
- fll_program_print_help_option(print, fake_short_path_data_s, fake_long_path_data_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom path to the data files.");
- fll_program_print_help_option(print, fake_short_path_sources_s, fake_long_path_sources_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Specify a custom path to the source files.");
- fll_program_print_help_option(print, fake_short_path_work_s, fake_long_path_work_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use includes/libraries/programs from this directory instead of system.");
+ fll_program_print_help_option(print, fake_short_path_build_s, fake_long_path_build_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom build directory.");
+ fll_program_print_help_option(print, fake_short_path_data_s, fake_long_path_data_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom path to the data files.");
+ fll_program_print_help_option(print, fake_short_path_documents_s, fake_long_path_documents_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Specify a custom path to the documents files.");
+ fll_program_print_help_option(print, fake_short_path_licenses_s, fake_long_path_licenses_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom path to the licenses files.");
+ fll_program_print_help_option(print, fake_short_path_sources_s, fake_long_path_sources_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Specify a custom path to the source files.");
+ fll_program_print_help_option(print, fake_short_path_work_s, fake_long_path_work_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Use includes/libraries/programs from this directory instead of system.");
fl_print_format("%r%r %[Special Options:%] ", print.to, f_string_eol_s, f_string_eol_s, print.set->important, print.set->important);
fl_print_format(" For example, with '%[%r%r my_fakefile%]' the fakefile at", print.to, print.set->notable, f_console_symbol_long_normal_s, fake_long_fakefile_s, print.set->notable);
fl_print_format(" '%[./my_fakefile%]' is used if found, but if it is not found then", print.to, print.set->notable, print.set->notable);
- fl_print_format(" '%[./%r%rmy_fakefile%]' is used if found.%r", print.to, print.set->notable, fake_default_path_data_s, fake_default_path_build_s, print.set->notable, f_string_eol_s);
+ fl_print_format(" '%[./%r%rmy_fakefile%]' is used if found.%r", print.to, print.set->notable, fake_default_data_s, fake_default_build_s, print.set->notable, f_string_eol_s);
fl_print_format(" For example, with '%[%r%r ./my_fakefile%]' the fakefile at", print.to, print.set->notable, f_console_symbol_long_normal_s, fake_long_fakefile_s, print.set->notable);
fl_print_format(" '%[./my_fakefile%]' is used if found, but if it is not found then no other paths are attempted.%r%r", print.to, print.set->notable, print.set->notable, f_string_eol_s, f_string_eol_s);
#endif // _di_fake_print_error_
/**
+ * Print generic error message regarding a function failing in some way, setting fallback to F_false and returning result.
+ *
+ * @param setting
+ * The main program settings.
+ *
+ * This does not alter setting.status.
+ * @param status
+ * The status to use.
+ * This is provided, ignoring setting.status, for thread-safety reasons.
+ * @param print
+ * Designates the how and where to print.
+ *
+ * @return
+ * F_true is returned if the status code has no print message.
+ * F_false is returned on successful print of known errors.
+ * F_output_not on success, but no printing is performed.
+ *
+ * @see fll_error_print()
+ */
+#ifndef _di_fake_print_error_fallback_
+ extern f_status_t fake_print_error_fallback(fake_setting_t * const setting, const f_status_t status, const fl_print_t print, const f_string_t function);
+#endif // _di_fake_print_error_fallback_
+
+/**
* Print file related error message regarding a function failing in some way.
*
* @param setting
* A valid file type code from the fll_error_file_type enum.
*
* @return
- * F_true is returned if the status code has no print message.
- * F_false is returned on successful print of known errors.
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ *
+ * @see fll_error_file_print()
*/
#ifndef _di_fake_print_error_file_
extern f_status_t fake_print_error_file(fake_setting_t * const setting, const f_status_t status, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
#endif // _di_fake_print_error_file_
/**
+ * Print file related error message regarding a function failing in some way, setting fallback to F_false and returning result..
+ *
+ * @param setting
+ * The main program settings.
+ *
+ * This does not alter setting.status.
+ * @param status
+ * The status to use.
+ * This is provided, ignoring setting.status, for thread-safety reasons.
+ * @param print
+ * Designates the how and where to print.
+ * @param name
+ * The name of the file or directory.
+ * @param operation
+ * The operation that fails, such as 'create' or 'access'.
+ * @param type
+ * A valid file type code from the fll_error_file_type enum.
+ *
+ * @return
+ * F_true is returned if the status code has no print message.
+ * F_false is returned on successful print of known errors.
+ * F_output_not on success, but no printing is performed.
+ *
+ * @see fll_error_file_print()
+ */
+#ifndef _di_fake_print_error_file_fallback_
+ extern f_status_t fake_print_error_file_fallback(fake_setting_t * const setting, const f_status_t status, const fl_print_t print, const f_string_t function, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
+#endif // _di_fake_print_error_file_fallback_
+
+/**
* Print error message for when an operation fails.
*
* @param setting
#endif // _di_fake_print_error_parameter_operation_not_with_
/**
- * Print error message for when the parameter value is too long.
- *
- * @param setting
- * The main program settings.
- *
- * This does not alter setting.status.
- * @param print
- * Designates the how and where to print.
- * @param symbol
- * The symbol of the parameter.
- * @param name
- * The name of the parameter.
- * @param value
- * The value that is too long.
- *
- * @return
- * F_none on success.
- * F_output_not on success, but no printing is performed.
- */
-#ifndef _di_fake_print_error_parameter_value_too_long_
- extern f_status_t fake_print_error_parameter_value_too_long(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t symbol, const f_string_static_t name);
-#endif // _di_fake_print_error_parameter_too_value_long_
-
-/**
* Print help.
*
* @param setting
*status = fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_shared, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_objects_add));
f_string_dynamics_resize(0, &arguments);
*status = fake_build_sources_add(data, data_build, &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_shared, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_sources_add));
f_string_dynamics_resize(0, &arguments);
fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_library_e, &arguments, status);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fll_execute_arguments_add));
f_string_dynamics_resize(0, &arguments);
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_major, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_file_link), parameter_file_name_major, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->message.to, parameter_file_path, parameter_file_name_minor, f_string_eol_s);
}
else if (F_status_is_error(*status)) {
- if (F_status_set_fine(*status) == F_file_found) {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
-
- return 0;
- }
-
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_minor, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_file_link), F_status_set_fine(*status) == F_file_found ? parameter_file_path : parameter_file_name_minor, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_micro, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_file_link), parameter_file_name_micro, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_link", F_true, parameter_file_name_nano, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_file_link), parameter_file_name_nano, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
*status = fake_build_get_file_name_without_extension(data, sources[i]->array[j], &file_name);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_get_file_name_without_extension));
break;
}
*status = f_file_name_directory(sources[i]->array[j], &source_path);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_directory", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_file_name_directory));
break;
}
*status = f_string_dynamic_prepend(data->path_build_objects, &source_path);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_prepend", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_prepend));
break;
}
*status = f_string_dynamic_append_assure(f_path_separator_s, &source_path);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
*status = fll_execute_arguments_add(source, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fll_execute_arguments_add));
break;
}
*status = fl_environment_load_name(variables[i], environment);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fl_environment_load_name", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fl_environment_load_name));
return;
}
*status = fl_environment_load_names(data_build->setting.environment, environment);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fl_environment_load_names", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fl_environment_load_names));
}
}
#endif // _di_fake_build_load_environment_
if (build_arguments && build_arguments->used) {
path_file.used = data->path_data_build.used + build_arguments->array[0].used;
}
- else if (!process_pipe || (data->setting->flag & fake_data_flag_operation_e)) {
+ else if (!process_pipe || (data->setting->flag & fake_main_flag_operation_e)) {
path_file.used = data->file_data_build_settings.used;
}
else {
memcpy(path_file_string, data->path_data_build.string, sizeof(f_char_t) * data->path_data_build.used);
memcpy(path_file_string + data->path_data_build.used, build_arguments->array[0].string, sizeof(f_char_t) * build_arguments->array[0].used);
}
- else if (!process_pipe || (data->setting->flag & fake_data_flag_operation_e)) {
+ else if (!process_pipe || (data->setting->flag & fake_main_flag_operation_e)) {
memcpy(path_file_string, data->file_data_build_settings.string, sizeof(f_char_t) * data->file_data_build_settings.used);
}
else {
}
if (F_status_is_error_not(*status)) {
- if (build_arguments && build_arguments->used || !process_pipe || (data->setting->flag & fake_data_flag_operation_e)) {
+ if (build_arguments && build_arguments->used || !process_pipe || (data->setting->flag & fake_main_flag_operation_e)) {
*status = fake_file_buffer(data, path_file, process_pipe ? F_false : F_true, &buffer);
}
}
*status = fll_fss_extended_read(buffer, state, &range, &objects, &contents, 0, 0, &delimits, 0);
if (F_status_is_error(*status)) {
- fake_print_error_fss(data, F_status_set_fine(*status), "fll_fss_extended_read", data->file_data_build_settings, range, F_true);
+ fake_print_error_fss(data, F_status_set_fine(*status), macro_fake_f(fll_fss_extended_read), data->file_data_build_settings, range, F_true);
}
else {
*status = f_fss_apply_delimit(state, delimits, &buffer);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_fss_apply_delimit", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_fss_apply_delimit));
}
else {
fake_build_load_setting_process(
F_false, // version_target
};
- char *function = "fll_fss_snatch_apart";
+ f_string_t function = macro_fake_f(fll_fss_snatch_apart);
*status = fll_fss_snatch_apart(buffer, objects, contents, settings_name, fake_build_setting_total_d, settings_value, settings_matches, 0);
// Custom modes are always used if provided, otherwise if any mode is specified, the entire defaults is replaced.
const f_string_statics_t * const modes = modes_custom && modes_custom->used
? modes_custom
- : data->mode.used
- ? &data->mode
+ : data->setting->modes.used
+ ? &data->setting->modes
: &setting->modes_default;
f_string_dynamic_t settings_mode_names[fake_build_setting_total_d];
*status = f_string_dynamic_increase_by(settings_value[j]->used + f_string_ascii_minus_s.used + modes->array[i].used, &settings_mode_names[j]);
if (F_status_is_error(*status)) {
- function = "f_string_dynamic_increase_by";
+ function = macro_fake_f(f_string_dynamic_increase_by);
break;
}
}
if (F_status_is_error(*status)) {
- function = "f_string_dynamic_append";
+ function = macro_fake_f(f_string_dynamic_append);
break;
}
*status = fll_fss_snatch_apart(buffer, objects, contents, settings_mode_names, fake_build_setting_total_d, settings_value, 0, 0);
if (F_status_is_error(*status)) {
- function = "fll_fss_snatch_apart";
+ function = macro_fake_f(fll_fss_snatch_apart);
}
}
}
}
else if (!error_printed) {
- fll_error_print(data->main->error, F_status_set_fine(*status), function, F_true);
+ fake_print_error(data->setting, *status, data->main->error, function);
}
}
else {
fake_path_part_script_s, // path_program_script
fake_path_part_shared_s, // path_program_shared
fake_path_part_static_s, // path_program_static
- fake_default_path_sources_s, // path_sources
+ fake_default_sources_s, // path_sources
f_string_empty_s, // path_sources_object
f_string_empty_s, // preserve_path_headers
f_string_empty_s, // process_post
*status = f_string_dynamic_append(settings_single_string_default[i], settings_single_destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append));
break;
}
*status = f_path_directory_cleanup(settings_single_source[i]->array[settings_single_source[i]->used - 1], settings_single_destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_path_directory_cleanup", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_path_directory_cleanup));
break;
}
*status = f_string_dynamic_increase_by(settings_single_source[i]->array[settings_single_source[i]->used - 1].used + 1, settings_single_destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_increase_by", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
*status = f_string_dynamic_append_nulless(settings_single_source[i]->array[settings_single_source[i]->used - 1], settings_single_destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
if (F_status_is_error(*status)) return;
- if (data->main->parameters.array[fake_parameter_path_sources_e].result & f_console_result_value_e && data->path_sources.used) {
- *status = f_string_dynamic_append_assure(f_path_separator_s, &data->path_sources);
+ if (data->main->parameters.array[fake_parameter_path_sources_e].result & f_console_result_value_e && data->setting->sources.used) {
+ *status = f_string_dynamic_append_assure(f_path_separator_s, &data->setting->sources);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_assure));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_base", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_file_name_base));
return;
}
*status = f_string_dynamic_append_nulless(data->path_build_stage, values[i]);
- if (F_status_is_error_not(*status) && data->process.used) {
- *status = f_string_dynamic_append_nulless(data->process, values[i]);
+ if (F_status_is_error_not(*status) && data->setting->process.used) {
+ *status = f_string_dynamic_append_nulless(data->setting->process, values[i]);
*status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
*status = fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_shared, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_object_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_sources_object_add));
f_string_dynamics_resize(0, &arguments);
fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e, &arguments, status);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_arguments_standard_add));
macro_f_string_dynamics_t_delete_simple(arguments);
*status = fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_static, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_object_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_sources_object_add));
f_string_dynamics_resize(0, &arguments);
fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e, &arguments, status);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_arguments_standard_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_arguments_standard_add));
macro_f_string_dynamics_t_delete_simple(arguments);
*status = fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_static, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_objects_add));
f_string_dynamics_resize(0, &arguments);
*status = fake_build_get_file_name_without_extension(data, sources[i]->array[j], &file_name);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_get_file_name_without_extension));
break;
}
*status = f_file_name_directory(sources[i]->array[j], &destination_path);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_directory", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_file_name_directory));
break;
}
*status = f_string_dynamic_prepend(data->path_build_objects, &destination_path);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_prepend", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_prepend));
break;
}
*status = f_string_dynamic_append_assure(f_path_separator_s, &destination_path);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
f_file_stream_unlock(data->main->error.to);
}
else {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_directory_create), destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
}
break;
}
if (F_status_is_error(*status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_exists", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_directory_exists), destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
break;
}
fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_library_e, &arguments, status);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fll_execute_arguments_add));
break;
}
*status = fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_shared, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_objects_add));
f_string_dynamics_resize(0, &arguments);
*status = fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_shared, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_sources_add));
f_string_dynamics_resize(0, &arguments);
fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_program_e, &arguments, status);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fll_execute_arguments_add));
macro_f_string_dynamics_t_delete_simple(arguments);
*status = fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_static, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_objects_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_objects_add));
f_string_dynamics_resize(0, &arguments);
*status = fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_static, &arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fake_build_sources_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fake_build_sources_add));
f_string_dynamics_resize(0, &arguments);
fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_program_e, &arguments, status);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fll_execute_arguments_add));
macro_f_string_dynamics_t_delete_simple(arguments);
path_headers_string[path_headers.used] = 0;
- const f_string_static_t *directorys[] = {
- &data->path_build,
- &data->path_build_documentation,
- &data->path_build_documents,
- &data->path_build_includes,
- &data->path_build_libraries,
- &data->path_build_libraries_script,
- &data->path_build_libraries_shared,
- &data->path_build_libraries_static,
- &data->path_build_objects,
- &data->path_build_objects_script,
- &data->path_build_objects_shared,
- &data->path_build_objects_static,
- &data->path_build_programs,
- &data->path_build_programs_script,
- &data->path_build_programs_shared,
- &data->path_build_programs_static,
- &data->path_build_settings,
- &data->path_build_stage,
- &path_headers,
+ const f_string_static_t directorys[] = {
+ data->setting->build,
+ data->path_build_documentation,
+ data->path_build_documents,
+ data->path_build_includes,
+ data->path_build_libraries,
+ data->path_build_libraries_script,
+ data->path_build_libraries_shared,
+ data->path_build_libraries_static,
+ data->path_build_objects,
+ data->path_build_objects_script,
+ data->path_build_objects_shared,
+ data->path_build_objects_static,
+ data->path_build_programs,
+ data->path_build_programs_script,
+ data->path_build_programs_shared,
+ data->path_build_programs_static,
+ data->path_build_settings,
+ data->path_build_stage,
+ path_headers,
};
if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
for (uint8_t i = 0; i < 19; ++i) {
- if (!directorys[i]->used) continue;
+ if (!directorys[i].used) continue;
created = F_false;
- for (f_array_length_t j = 0; j < directorys[i]->used; ++j) {
+ for (f_array_length_t j = 0; j < directorys[i].used; ++j) {
- if (directorys[i]->string[j] != f_path_separator_s.string[0]) continue;
+ if (directorys[i].string[j] != f_path_separator_s.string[0]) continue;
- directorys[i]->string[j] = 0;
+ directorys[i].string[j] = 0;
- *status = f_directory_exists(*directorys[i]);
+ *status = f_directory_exists(directorys[i]);
if (F_status_is_error(*status) || *status == F_false) {
- directorys[i]->string[j] = f_path_separator_s.string[0];
+ directorys[i].string[j] = f_path_separator_s.string[0];
break;
}
if (*status == F_file_found_not) {
- *status = f_directory_create(*directorys[i], mode);
+ *status = f_directory_create(directorys[i], mode);
created = F_true;
}
- directorys[i]->string[j] = f_path_separator_s.string[0];
+ directorys[i].string[j] = f_path_separator_s.string[0];
if (F_status_is_error(*status)) break;
} // for
- if (F_status_is_fine(*status) && directorys[i]->string[directorys[i]->used - 1] != f_path_separator_s.string[0]) {
- *status = f_directory_exists(*directorys[i]);
+ if (F_status_is_fine(*status) && directorys[i].string[directorys[i].used - 1] != f_path_separator_s.string[0]) {
+ *status = f_directory_exists(directorys[i]);
if (F_status_is_error_not(*status)) {
if (*status == F_false) {
- *status = f_directory_create(*directorys[i], mode);
+ *status = f_directory_create(directorys[i], mode);
created = F_true;
}
continue;
}
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_create", F_true, *directorys[i], f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_directory_create), directorys[i], f_file_operation_create_s, fll_error_file_type_directory_e);
return;
}
if (created && data->main->error.verbosity >= f_console_verbosity_verbose_e) {
- fll_print_format("Created directory '%Q'.%r", data->main->message.to, *directorys[i], f_string_eol_s);
+ fll_print_format("Created directory '%Q'.%r", data->main->message.to, directorys[i], f_string_eol_s);
}
} // for
} // for
}
- if (data->path_work.used && F_status_is_error_not(*status)) {
+ if (data->setting->work.used && F_status_is_error_not(*status)) {
f_string_static_t buffer = f_string_static_t_initialize;
if (F_status_is_error_not(*status)) {
}
}
- for (i = 0; i < data->define.used && F_status_is_error_not(*status); ++i) {
+ for (i = 0; i < data->setting->defines.used && F_status_is_error_not(*status); ++i) {
- if (!data->define.array[i].used) continue;
+ if (!data->setting->defines.array[i].used) continue;
- *status = fll_execute_arguments_add(data->define.array[i], arguments);
+ *status = fll_execute_arguments_add(data->setting->defines.array[i], arguments);
} // for
}
#endif // _di_fake_build_arguments_standard_add_
break;
}
- main->signal_check = 0;
+ data->main->signal_check = 0;
}
if (!files.array[i].used) continue;
if (F_status_set_fine(*status) != F_failure) {
fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fl_directory_copy));
- fll_error_print(data->main->error, F_status_set_fine(*status), "", F_true);
}
-
- break;
}
else if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
- fake_print_error_build_operation_file(data, F_status_set_fine(*status), "fl_directory_copy", fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true);
+ fake_print_error_build_operation_file(data, F_status_set_fine(*status), macro_fake_f(fl_directory_copy), fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true);
}
break;
*status = f_string_dynamic_append_nulless(destination, &destination_file);
if (F_status_is_error(*status)) {
- fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize));
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
*status = f_string_dynamic_append_nulless(destination, &destination_directory);
if (F_status_is_error(*status)) {
- fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize));
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
*status = f_file_name_directory(buffer, &destination_directory);
if (F_status_is_error(*status)) {
- fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize));
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_directory", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_file_name_directory));
break;
}
*status = fl_directory_create(destination_directory, F_file_mode_all_rwx_d);
if (F_status_is_error(*status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "fl_directory_create", F_true, destination_directory, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(fl_directory_create), destination_directory, f_file_operation_create_s, fll_error_file_type_directory_e);
break;
}
*status = f_string_append(path_source.string + perserve_offset, path_source.used - perserve_offset, &destination_file);
if (F_status_is_error(*status)) {
- fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize));
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_string_append", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_append));
break;
}
*status = f_file_name_base(path_source, &destination_file);
if (F_status_is_error(*status)) {
- fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_string_dynamic_resize));
- fll_error_print(data->main->error, F_status_set_fine(*status), "f_file_name_base", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(f_file_name_base));
break;
}
}
}
else if (F_status_is_error(*status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_directory_is", F_true, path_source, f_file_operation_create_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_directory_is), path_source, f_file_operation_create_s, fll_error_file_type_file_e);
break;
}
{
f_string_dynamic_t defines = f_string_dynamic_t_initialize;
- if (data->define.used) {
- for (f_array_length_t i = 0; i < data->define.used; ++i) {
+ if (data->setting->defines.used) {
+ for (f_array_length_t i = 0; i < data->setting->defines.used; ++i) {
- *status = f_string_dynamic_mash(f_string_space_s, data->define.array[i], &defines);
+ *status = f_string_dynamic_mash(f_string_space_s, data->setting->defines.array[i], &defines);
if (F_status_is_error(*status)) break;
} // for
}
}
- const f_string_static_t parameters_prefix[] = {
+ const f_string_static_t prefixs[] = {
f_console_symbol_short_normal_s,
f_console_symbol_short_normal_s,
f_console_symbol_short_normal_s,
f_console_symbol_short_normal_s,
};
- const f_string_static_t parameters_name[] = {
+ const f_string_static_t names[] = {
fake_short_define_s,
fake_short_process_s,
fake_short_settings_s,
fake_short_path_work_s,
};
- const f_string_static_t parameters_value[] = {
+ const f_string_static_t values[] = {
defines,
- data->process,
- data->settings,
- data->path_build,
- data->path_data,
- data->path_sources,
- data->path_work,
+ data->setting->process,
+ data->setting->settings,
+ data->setting->build,
+ data->setting->data,
+ data->setting->sources,
+ data->setting->work,
};
- *status = fll_execute_arguments_add_parameter_set(parameters_prefix, parameters_name, parameters_value, 7, &arguments);
+ *status = fll_execute_arguments_add_parameter_set(prefixs, names, values, 7, &arguments);
f_string_dynamic_resize(0, &defines);
fl_print_format("%r%[Building%] ", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important);
fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data_build.setting.build_name, data->main->context.set.notable);
fl_print_format("%[ using '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important);
- fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->settings, data->main->context.set.notable);
+ fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->setting->settings, data->main->context.set.notable);
fl_print_format("%[' with modes '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important);
// Custom modes are always used if provided, otherwise if any mode is specified, the entire defaults is replaced.
const f_string_statics_t * const modes = modes_custom.used
? &modes_custom
- : data->mode.used
- ? &data->mode
+ : data->setting->modes.used
+ ? &data->setting->modes
: &data_build.setting.modes_default;
for (f_array_length_t i = 0; i < modes->used; ) {
#ifndef _di_fake_build_path_source_length_
void fake_build_path_source_length(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const setting_path_source, f_string_static_t * const source) {
- source->used = data->path_sources.used;
+ source->used = data->setting->sources.used;
if (setting_path_source->used) {
source->used += setting_path_source->used;
source->used = 0;
- memcpy(source->string, data->path_sources.string, sizeof(f_char_t) * data->path_sources.used);
- source->used += data->path_sources.used;
+ memcpy(source->string, data->setting->sources.string, sizeof(f_char_t) * data->setting->sources.used);
+ source->used += data->setting->sources.used;
memcpy(source->string + source->used, setting_path_source->string, sizeof(f_char_t) * setting_path_source->used);
source->used += setting_path_source->used;
*status = f_file_touch(file, mode.regular, F_false);
if (F_status_is_error(*status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(*status), "f_file_touch", F_true, file, f_file_operation_touch_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, *status, data->main->error, macro_fake_f(f_file_touch), file, f_file_operation_touch_s, fll_error_file_type_file_e);
}
}
#endif // _di_fake_build_touch_
f_file_stream_lock(data->main->message.to);
fl_print_format("%r%[Deleting all files within build directory '%]", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important);
- fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->path_build, data->main->context.set.notable);
+ fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->setting->build, data->main->context.set.notable);
fl_print_format("%['.%]%r", data->main->message.to, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
f_file_stream_unlock(data->main->message.to);
f_status_t status = F_none;
if (data->main->error.verbosity >= f_console_verbosity_verbose_e) {
- status = f_directory_remove_custom(data->path_build, F_directory_descriptors_max_d, F_true, fake_clean_remove_recursively_verbosely);
+ status = f_directory_remove_custom(data->setting->build, F_directory_descriptors_max_d, F_true, fake_clean_remove_recursively_verbosely);
}
else {
- status = f_directory_remove(data->path_build, F_directory_descriptors_max_d, F_true);
+ status = f_directory_remove(data->setting->build, F_directory_descriptors_max_d, F_true);
}
if (F_status_set_fine(status) == F_file_found_not || F_status_set_fine(status) == F_directory) {
if (data->main->error.verbosity >= f_console_verbosity_verbose_e) {
- fll_print_format("The build directory '%[%Q%]' does not exist.%r", data->main->warning.to, data->main->context.set.notable, data->path_build, data->main->context.set.notable, f_string_eol_s);
+ fll_print_format("The build directory '%[%Q%]' does not exist.%r", data->main->warning.to, data->main->context.set.notable, data->setting->build, data->main->context.set.notable, f_string_eol_s);
}
status = F_none;
}
if (F_status_is_error(status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(status), "f_directory_remove", F_true, data->path_build, f_file_operation_delete_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_directory_remove), data->setting->build, f_file_operation_delete_s, fll_error_file_type_directory_e);
return status;
}
#ifndef _di_fake_data_delete_
f_status_t fake_data_delete(fake_data_t * const data) {
- f_string_dynamic_resize(0, &data->path_build);
f_string_dynamic_resize(0, &data->path_build_documentation);
f_string_dynamic_resize(0, &data->path_build_documents);
f_string_dynamic_resize(0, &data->path_build_includes);
f_string_dynamic_resize(0, &data->path_build_programs_static);
f_string_dynamic_resize(0, &data->path_build_settings);
f_string_dynamic_resize(0, &data->path_build_stage);
- f_string_dynamic_resize(0, &data->path_work);
- f_string_dynamic_resize(0, &data->path_data);
f_string_dynamic_resize(0, &data->path_data_build);
f_string_dynamic_resize(0, &data->path_data_documentation);
f_string_dynamic_resize(0, &data->path_data_settings);
f_string_dynamic_resize(0, &data->path_licenses);
- f_string_dynamic_resize(0, &data->path_sources);
-
- f_string_dynamic_resize(0, &data->path_work);
f_string_dynamic_resize(0, &data->path_work_includes);
f_string_dynamic_resize(0, &data->path_work_libraries);
f_string_dynamic_resize(0, &data->path_work_libraries_script);
fll_program_data_t *main;
fake_setting_t *setting;
- f_string_dynamic_t path_build;
f_string_dynamic_t path_build_documentation;
f_string_dynamic_t path_build_documents;
f_string_dynamic_t path_build_includes;
f_string_dynamic_t path_build_settings;
f_string_dynamic_t path_build_stage;
- f_string_dynamic_t path_data;
f_string_dynamic_t path_data_build;
f_string_dynamic_t path_data_documentation;
f_string_dynamic_t path_data_settings;
- f_string_dynamic_t path_documents;
+ f_string_dynamic_t path_documents; // @todo: make this a settings configurable parameter, moving it to fake_setting_t.
- f_string_dynamic_t path_licenses;
+ f_string_dynamic_t path_licenses; // @todo: make this a settings configurable parameter, moving it to fake_setting_t.
- f_string_dynamic_t path_sources;
-
- f_string_dynamic_t path_work;
f_string_dynamic_t path_work_includes;
f_string_dynamic_t path_work_libraries;
f_string_dynamic_t path_work_libraries_script;
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
}
#endif // _di_fake_main_t_
* id_main: Index of the "main" Section.
* main: The main program data.
* data: The Fake make program data.
+ * setting: The settings data.
*/
#ifndef _di_fake_make_data_t_
typedef struct {
fll_program_data_t *main;
fake_data_t *data;
+ fake_setting_t *setting;
} fake_make_data_t;
#define fake_make_data_t_initialize { \
0, \
0, \
0, \
+ 0, \
}
#endif // _di_fake_make_data_t_
{
uint8_t j = 0;
- const f_string_dynamic_t *parameters_source[] = {
- &data->path_build,
- &data->path_data,
+ const f_string_dynamic_t sources[] = {
+ data->setting->build,
+ data->setting->data,
};
const uint8_t parameters_size[] = {
3,
};
- f_string_dynamic_t *parameters_value_0[] = {
+ f_string_dynamic_t *values_0[] = {
&data->path_build_documentation,
&data->path_build_documents,
&data->path_build_includes,
&data->path_build_stage,
};
- f_string_dynamic_t *parameters_value_1[] = {
+ f_string_dynamic_t *values_1[] = {
&data->path_data_build,
&data->path_data_documentation,
&data->path_data_settings,
};
- f_string_dynamic_t **const parameters_value[] = {
- parameters_value_0,
- parameters_value_1,
+ f_string_dynamic_t **const values[] = {
+ values_0,
+ values_1,
};
for (i = 0; i < 2; ++i) {
// Initialize all string lengths to 0.
for (j = 0; j < parameters_size[i]; ++j) {
- parameters_value[i][j]->used = 0;
+ values[i][j]->used = 0;
} // for
- status = fake_path_generate_string_dynamic(data, *parameters_source[i], parameters_value[i], parameters_size[i]);
+ status = fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "fake_path_generate_string_dynamic", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(fake_path_generate_string_dynamic));
return status;
}
}
{
- const f_string_static_t parameters_source[] = {
+ const f_string_static_t sources[] = {
fake_path_part_documentation_s,
fake_path_part_documents_s,
fake_path_part_includes_s,
fake_path_part_licenses_s,
};
- f_string_dynamic_t * const parameters_value[] = {
+ f_string_dynamic_t * const values[] = {
&data->path_build_documentation,
&data->path_build_documents,
&data->path_build_includes,
for (i = 0; i < 13; ++i) {
- status = f_string_dynamic_append_nulless(parameters_source[i], parameters_value[i]);
+ status = f_string_dynamic_append_nulless(sources[i], values[i]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return status;
}
}
{
- const f_string_dynamic_t *parameters_source[] = {
- &data->path_build_libraries,
- &data->path_build_objects,
- &data->path_build_programs,
- &data->path_data_build,
- &data->path_documents,
+ const f_string_dynamic_t sources[] = {
+ data->path_build_libraries,
+ data->path_build_objects,
+ data->path_build_programs,
+ data->path_data_build,
+ data->path_documents,
};
const uint8_t parameters_size[] = {
1,
};
- f_string_dynamic_t *parameters_value_0[] = {
+ f_string_dynamic_t *values_0[] = {
&data->path_build_libraries_script,
&data->path_build_libraries_shared,
&data->path_build_libraries_static,
};
- f_string_dynamic_t *parameters_value_1[] = {
+ f_string_dynamic_t *values_1[] = {
&data->path_build_objects_script,
&data->path_build_objects_shared,
&data->path_build_objects_static,
&data->file_documents_readme,
};
- f_string_dynamic_t **const parameters_value[] = {
- parameters_value_0,
- parameters_value_1,
+ f_string_dynamic_t **const values[] = {
+ values_0,
+ values_1,
parameters_value_2,
parameters_value_3,
parameters_value_4,
for (i = 0; i < 5; ++i) {
- status = fake_path_generate_string_dynamic(data, *parameters_source[i], parameters_value[i], parameters_size[i]);
+ status = fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "fake_path_generate_string_dynamic", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(fake_path_generate_string_dynamic));
return status;
}
}
// When custom fakefile or settings are used and they are paths to a file, remove the default path.
- if (f_path_is(data->fakefile) == F_true || f_file_exists(data->fakefile, F_true) == F_true) {
+ if (f_path_is(data->setting->fakefile) == F_true || f_file_exists(data->setting->fakefile, F_true) == F_true) {
data->file_data_build_fakefile.used = 0;
}
- if (f_path_is(data->settings) == F_true || f_file_exists(data->settings, F_true) == F_true) {
+ if (f_path_is(data->setting->settings) == F_true || f_file_exists(data->setting->settings, F_true) == F_true) {
data->file_data_build_settings.used = 0;
}
+
{
- const f_string_static_t parameters_source[] = {
+ const f_string_static_t sources[] = {
fake_path_part_script_s,
fake_path_part_shared_s,
fake_path_part_static_s,
fake_file_dependencies_s,
fake_file_process_post_s,
fake_file_process_pre_s,
- data->fakefile,
- data->settings,
+ data->setting->fakefile,
+ data->setting->settings,
fake_file_readme_s,
};
- f_string_dynamic_t * const parameters_value[] = {
+ f_string_dynamic_t * const values[] = {
&data->path_build_libraries_script,
&data->path_build_libraries_shared,
&data->path_build_libraries_static,
for (i = 0; i < 16; ++i) {
- status = f_string_dynamic_append_nulless(parameters_source[i], parameters_value[i]);
+ status = f_string_dynamic_append_nulless(sources[i], values[i]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return status;
}
} // for
}
- if (data->path_work.used) {
+ if (data->setting->work.used) {
{
- f_string_dynamic_t * const parameters_value[] = {
+ f_string_dynamic_t * const values[] = {
&data->path_work_includes,
&data->path_work_libraries,
&data->path_work_programs,
for (i = 0; i < 3; ++i) {
- parameters_value[i]->used = 0;
+ values[i]->used = 0;
- status = f_string_dynamic_append_nulless(data->path_work, parameters_value[i]);
+ status = f_string_dynamic_append_nulless(data->setting->work, values[i]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return status;
}
}
{
- const f_string_static_t parameters_source[] = {
+ const f_string_static_t sources[] = {
fake_path_part_includes_s,
fake_path_part_libraries_s,
fake_path_part_programs_s,
};
- f_string_dynamic_t * const parameters_value[] = {
+ f_string_dynamic_t * const values[] = {
&data->path_work_includes,
&data->path_work_libraries,
&data->path_work_programs,
for (i = 0; i < 3; ++i) {
- status = f_string_dynamic_append_nulless(parameters_source[i], parameters_value[i]);
+ status = f_string_dynamic_append_nulless(sources[i], values[i]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return status;
}
}
{
- const f_string_dynamic_t *parameters_source[] = {
- &data->path_work_libraries,
- &data->path_work_programs,
+ const f_string_dynamic_t sources[] = {
+ data->path_work_libraries,
+ data->path_work_programs,
};
const uint8_t parameters_size[] = {
3,
};
- f_string_dynamic_t *parameters_value_0[] = {
+ f_string_dynamic_t *values_0[] = {
&data->path_work_libraries_script,
&data->path_work_libraries_shared,
&data->path_work_libraries_static,
};
- f_string_dynamic_t *parameters_value_1[] = {
+ f_string_dynamic_t *values_1[] = {
&data->path_work_programs_script,
&data->path_work_programs_shared,
&data->path_work_programs_static,
};
- f_string_dynamic_t **const parameters_value[] = {
- parameters_value_0,
- parameters_value_1,
+ f_string_dynamic_t **const values[] = {
+ values_0,
+ values_1,
};
for (i = 0; i < 2; ++i) {
- status = fake_path_generate_string_dynamic(data, *parameters_source[i], parameters_value[i], parameters_size[i]);
+ status = fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "fake_path_generate_string_dynamic", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(fake_path_generate_string_dynamic));
return status;
}
}
{
- const f_string_static_t parameters_source[] = {
+ const f_string_static_t sources[] = {
fake_path_part_script_s,
fake_path_part_shared_s,
fake_path_part_static_s,
fake_path_part_static_s,
};
- f_string_dynamic_t * const parameters_value[] = {
+ f_string_dynamic_t * const values[] = {
&data->path_work_libraries_script,
&data->path_work_libraries_shared,
&data->path_work_libraries_static,
for (i = 0; i < 6; ++i) {
- status = f_string_dynamic_append_nulless(parameters_source[i], parameters_value[i]);
+ status = f_string_dynamic_append_nulless(sources[i], values[i]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return status;
}
}
}
else {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fll_execute_program", F_true);
+ fake_print_error(data->setting, *status, data->main->error, macro_fake_f(fll_execute_program));
}
}
return F_status_set_error(F_interrupt);
}
- f_file_t file = f_file_t_initialize;
- char *name_function = "f_file_exists";
-
f_status_t status = f_file_exists(path_file, F_true);
+ if (F_status_is_error(status)) {
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_exists), path_file, f_file_operation_find_s, fll_error_file_type_file_e);
+
+ return status;
+ }
+
if (status == F_true) {
{
off_t size_file = 0;
- name_function = "f_file_size";
status = f_file_size(path_file, F_true, &size_file);
- if (F_status_is_error_not(status)) {
- if (size_file > fake_common_initial_buffer_max_d) {
- size_file = fake_common_initial_buffer_max_d;
- }
+ if (F_status_is_error(status)) {
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_size), path_file, f_file_operation_read_s, fll_error_file_type_file_e);
- status = f_string_dynamic_increase_by(size_file, buffer);
+ return status;
+ }
- if (F_status_is_error(status)) {
- const f_string_static_t message = macro_f_string_static_t_initialize("allocate buffer size for", 0, 24);
- fll_error_file_print(data->main->error, F_status_set_fine(status), name_function, F_true, path_file, message, fll_error_file_type_file_e);
+ if (size_file > fake_common_initial_buffer_max_d) {
+ size_file = fake_common_initial_buffer_max_d;
+ }
- return status;
- }
+ status = f_string_dynamic_increase_by(size_file, buffer);
+
+ if (F_status_is_error(status)) {
+ const f_string_static_t message = macro_f_string_static_t_initialize("allocate buffer size for", 0, 24);
+
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_string_dynamic_increase_by), path_file, message, fll_error_file_type_file_e);
+
+ return status;
}
status = F_true;
}
- name_function = "f_file_open";
+ f_file_t file = f_file_t_initialize;
+
status = f_file_stream_open(path_file, f_string_empty_s, &file);
- if (F_status_is_error_not(status)) {
- name_function = "f_file_read";
- status = f_file_read(file, buffer);
+ if (F_status_is_error(status)) {
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_stream_open), path_file, f_file_operation_open_s, fll_error_file_type_file_e);
- f_file_stream_flush(file);
- f_file_stream_close(&file);
+ return status;
+ }
+
+ status = f_file_read(file, buffer);
+
+ f_file_stream_flush(file);
+ f_file_stream_close(&file);
+
+ if (F_status_is_error(status)) {
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_read), path_file, f_file_operation_read_s, fll_error_file_type_file_e);
}
}
- else if (status == F_false) {
+ else {
if (required) {
status = F_status_set_error(F_file_found_not);
- }
- }
- if (F_status_is_error(status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(status), name_function, F_true, path_file, f_file_operation_read_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_exists), path_file, f_file_operation_find_s, fll_error_file_type_file_e);
+ }
}
return status;
if (F_status_is_error(status)) {
const f_string_static_t message = macro_f_string_static_t_initialize("allocate buffer size for", 0, 24);
- fll_error_file_print(data->main->error, F_status_set_fine(status), "f_string_dynamic_increase_by", F_true, f_string_ascii_minus_s, message, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_string_dynamic_increase_by), f_string_ascii_minus_s, message, fll_error_file_type_file_e);
return status;
}
} while (F_status_is_fine(status) && status != F_interrupt && status != F_none_eof);
if (F_status_is_error(status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(status), "f_file_stream_read_block", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_stream_read_block), f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_file_e);
}
return status;
};
const f_string_dynamic_t values[] = {
- data->path_build,
- data->path_data,
- data->path_work,
+ data->setting->build,
+ data->setting->data,
+ data->setting->work,
};
uint8_t requireds[] = {
// Check only expected operations (fake_operation_clean_e and fake_operation_skeleton_e should not call this function).
if (data->operation == fake_operation_make_e) {
if (data->main->parameters.array[fake_parameter_fakefile_e].result == f_console_result_none_e) {
- if (data->path_build.used && f_file_exists(data->path_build, F_false) != F_true) {
+ if (data->setting->build.used && f_file_exists(data->setting->build, F_false) != F_true) {
if (f_file_exists(fake_default_fakefile_s, F_false) == F_true) {
requireds[1] = F_false;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_directory_found_not || requireds[i]) {
- fll_error_file_print(data->main->error, F_status_set_fine(status), "f_file_stat", F_true, values[i], f_file_operation_access_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_stat), values[i], f_file_operation_access_s, fll_error_file_type_directory_e);
return status;
}
*status = f_fss_apply_delimit(state, delimits, &data_make->buffer);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_fss_apply_delimit", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_fss_apply_delimit));
}
delimits.used = 0;
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "macro_f_fss_nameds_t_resize", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(macro_f_fss_nameds_t_resize));
macro_f_fss_set_t_delete_simple(settings);
macro_f_fss_objects_t_delete_simple(list_objects);
*status = f_fss_apply_delimit(state, delimits, &data_make->buffer);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_fss_apply_delimit", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_fss_apply_delimit));
break;
}
*status = f_fss_apply_delimit(state, delimits, &data_make->buffer);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_fss_apply_delimit", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_fss_apply_delimit));
break;
}
// Always have the parameter variable "return" map at index 0 and be pre-initialized.
{
- char *function_name = "macro_f_string_map_multis_t_resize";
+ f_string_t function_name = macro_fake_f(macro_f_string_map_multis_t_resize);
macro_f_string_map_multis_t_resize(*status, data_make->setting_make.parameter, fake_default_allocation_small_d);
if (F_status_is_error_not(*status)) {
data_make->setting_make.parameter.used = 1;
- function_name = "f_string_dynamic_append";
+ function_name = macro_fake_f(f_string_dynamic_append);
*status = f_string_dynamic_append(fake_make_setting_return_s, &data_make->setting_make.parameter.array[0].name);
}
if (F_status_is_error_not(*status)) {
- function_name = "f_string_dynamics_resize";
+ function_name = macro_fake_f(f_string_dynamics_resize);
*status = f_string_dynamics_resize(1, &data_make->setting_make.parameter.array[0].value);
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), function_name, F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, function_name);
macro_f_fss_set_t_delete_simple(settings);
fake_build_load_setting(data_make->data, 0, F_false, &data_make->setting_build, status);
if (F_status_is_error(*status) && *status != F_status_set_error(F_interrupt)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "fake_build_load_setting", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(fake_build_load_setting));
}
}
if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) != F_interrupt) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_partial_append", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append));
}
macro_f_fss_set_t_delete_simple(settings);
status = fll_fss_snatch_map_apart(data_make->buffer, settings->objects, settings->contents, settings_name, 2, settings_value, 0, 0);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "fll_fss_snatch_map_apart", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(fll_fss_snatch_map_apart));
macro_f_string_map_multis_t_delete_simple(define);
status = f_string_dynamic_mash(f_string_space_s, define.array[i].value.array[j], &combined);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_string_dynamic_mash", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_string_dynamic_mash));
break;
}
status = f_environment_set(define.array[i].name, combined, F_true);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_environment_set", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_environment_set));
break;
}
status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[i], &name_define);
if (F_status_is_error(status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->setting_build.environment);
if (F_status_is_error(status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
}
status = f_string_dynamic_increase_by(name_define.used + 1, &data_make->setting_build.environment.array[data_make->setting_build.environment.used]);
if (F_status_is_error(status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_increase_by", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
status = f_string_dynamic_append_nulless(name_define, &data_make->setting_build.environment.array[data_make->setting_build.environment.used]);
if (F_status_is_error(status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[i], &data_make->setting_make.parameter.array[0].value.array[0]);
if (F_status_is_error(status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
status = f_string_dynamic_append_assure(f_string_space_s, &data_make->setting_make.parameter.array[0].value.array[0]);
if (F_status_is_error(status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
return;
}
};
const f_string_dynamics_t *source[] = {
- &data_make->data->define,
- &data_make->data->mode,
+ &data_make->data->setting->defines,
+ &data_make->data->setting->modes,
};
f_string_dynamics_t * const destination[] = {
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
};
const f_string_dynamic_t *source[] = {
- &data_make->data->fakefile,
- &data_make->data->path_build,
- &data_make->data->path_data,
- &data_make->data->path_sources,
- &data_make->data->path_work,
- &data_make->data->process,
- &data_make->data->settings,
+ &data_make->data->setting->fakefile,
+ &data_make->data->setting->build,
+ &data_make->data->setting->data,
+ &data_make->data->setting->sources,
+ &data_make->data->setting->work,
+ &data_make->data->setting->process,
+ &data_make->data->setting->settings,
};
f_string_dynamics_t * const destination[] = {
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
f_file_stream_lock(data->main->message.to);
fl_print_format("%r%[Now making using '%]", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important);
- fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->fakefile, data->main->context.set.notable);
+ fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->setting->fakefile, data->main->context.set.notable);
- if (data->mode.used) {
+ if (data->setting->modes.used) {
fl_print_format("%[' with modes '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important);
- for (f_array_length_t i = 0; i < data->mode.used; ) {
+ for (f_array_length_t i = 0; i < data->setting->modes.used; ) {
- fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->mode.array[i], data->main->context.set.notable);
+ fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->setting->modes.array[i], data->main->context.set.notable);
- if (++i < data->mode.used) {
+ if (++i < data->setting->modes.used) {
fl_print_format("%[', '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important);
}
} // for
data_make.data = data;
data_make.main = data->main;
+ data_make.setting = data->setting;
status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make.path.stack);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true);
+ fake_print_error(data_make.setting, status, data_make.main->error, macro_fake_f(f_string_dynamics_increase));
return status;
}
status = f_path_current(F_true, &data_make.path.stack.array[0]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_path_current", F_true);
+ fake_print_error(data_make.setting, status, data_make.main->error, macro_fake_f(f_path_current));
fake_make_data_delete(&data_make);
status = f_directory_open(data_make.path.stack.array[0], F_false, &data_make.path.top.id);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "f_directory_open", F_true);
+ fake_print_error(data_make.setting, status, data_make.main->error, macro_fake_f(f_directory_open));
fake_make_data_delete(&data_make);
*status = f_string_dynamics_increase_by(content.used, &data_make->cache_arguments);
if (F_status_is_error(*status) || *status == F_string_too_large) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
*status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
}
if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) != F_interrupt) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fl_iki_read", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(fl_iki_read));
}
break;
*status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_partial_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamic_partial_compare", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(fl_string_dynamic_partial_compare));
break;
}
*status = f_string_dynamic_append_nulless(data_make->setting_make.parameter.array[0].value.array[0], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
*status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
}
*status = f_string_dynamic_increase_by(data_make->path.stack.array[0].used + f_path_separator_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
*status = f_string_dynamic_append(data_make->path.stack.array[0], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
}
*status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
*status = f_string_dynamic_increase_by(data_make->path.stack.array[data_make->path.stack.used - 1].used + f_path_separator_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
*status = f_string_dynamic_append(data_make->path.stack.array[data_make->path.stack.used - 1], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
}
*status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_assure", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
*status = f_string_dynamic_increase_by(l, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
*status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
}
*status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
*status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
}
*status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
*status = f_string_dynamic_increase_by(l, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_increase_by", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
*status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
}
*status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
}
*status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
*status = fake_make_operate_expand_build(data_make, quotes.array[i], iki_data->content.array[j]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_operate_expand_build", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(fake_make_operate_expand_build));
break;
}
*status = fake_make_operate_expand_environment(data_make, quotes.array[i], iki_data->content.array[j]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_operate_expand_environment", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(fake_make_operate_expand_environment));
break;
}
*status = fake_make_operate_expand_context(data_make, quotes.array[i], iki_data->content.array[j]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_operate_expand_context", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(fake_make_operate_expand_context));
break;
}
*status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_partial_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
*status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_partial_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
*status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
}
*status = f_string_dynamic_partial_append_nulless(data_make->buffer, content.array[i], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_partial_append_nulless", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
*status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
}
if (id_section >= data_make->fakefile.used) {
*status = F_status_set_error(F_parameter);
- fll_error_print(data_make->error, F_parameter, "fake_make_operate_section", F_true);
+ fake_print_error(data_make->setting, F_parameter, data_make->error, macro_fake_f(fake_make_operate_section));
return 0;
}
*status = f_array_lengths_increase(fake_default_allocation_small_d, section_stack);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_array_lengths_increase", F_true);
+ fake_print_error(data_make->setting, *status, data_make->error, macro_fake_f(f_array_lengths_increase));
return 0;
}
status = fl_environment_load_names(data_make->setting_build.environment, &data_make->environment);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "fl_environment_load_names", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(fl_environment_load_names));
return status;
}
status = f_environment_get_all(&data_make->environment);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_environment_get_all", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_environment_get_all));
return status;
}
}
}
else if (F_status_set_fine(status) != F_failure) {
- fll_error_print(data_make->error, F_status_set_fine(status), "fll_execute_program", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(fll_execute_program));
}
}
}
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
}
return status;
status = f_conversion_number_signed_to_string(WEXITSTATUS(return_code), f_conversion_data_base_10_c, &number);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_conversion_number_signed_to_string", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_conversion_number_signed_to_string));
f_string_dynamic_resize(0, &number);
}
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
return status;
}
const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_compiler, data_make->cache_arguments, status);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fake_execute", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(fake_execute));
}
else if (*status == F_child) {
return result;
status = f_directory_is(data_make->cache_arguments.array[1]);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, data_make->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_path_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_path_e);
return F_status_set_error(F_failure);
}
status = f_file_name_base(data_make->cache_arguments.array[i], &data_make->cache_path);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_name_base", F_true, data_make->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_name_base), data_make->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
return F_status_set_error(F_failure);
}
}
if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "fl_directory_clone" : "fl_directory_copy", F_true, data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status_file, data_make->main->error, clone ? macro_fake_f(fl_directory_clone) : macro_fake_f(fl_directory_copy), data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
status = F_status_set_error(F_failure);
}
}
if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "f_file_clone" : "f_file_copy", F_true, data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status_file, data_make->main->error, clone ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
}
}
else if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, data_make->cache_arguments.array[i], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status_file, data_make->main->error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[i], f_file_operation_identify_s, fll_error_file_type_directory_e);
return F_status_set_error(F_failure);
}
}
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_environment_set", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_environment_set));
}
else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) {
fll_print_format("%rDefined environment variable '%[%Q%]'.%r", data_make->main->message.to, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[0], data_make->main->context.set.notable, f_string_eol_s);
status = F_none;
}
else {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stat", F_true, data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stat), data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
}
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_remove", F_true, data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_directory_remove), data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_directory_e);
return F_status_set_error(F_failure);
}
}
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_remove", F_true, data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_remove), data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_message_section_operation_path_outside(data_make->data, data_make->error, status, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
continue;
}
}
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_exists", F_true, data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_exists), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, data_make->cache_arguments.array[i], f_file_operation_get_type_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_mode_read), data_make->cache_arguments.array[i], f_file_operation_get_type_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_get_id_group", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(fake_make_get_id_group));
return F_status_set_error(F_failure);
}
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_group_read", F_true, data_make->cache_arguments.array[i], f_file_operation_get_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_group_read), data_make->cache_arguments.array[i], f_file_operation_get_group_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_get_id_mode", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(fake_make_get_id_mode));
return F_status_set_error(F_failure);
}
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_print(data_make->error, F_status_set_fine(status), "f_file_mode_to_mode", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_mode_to_mode));
return F_status_set_error(F_failure);
}
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, data_make->cache_arguments.array[i], f_file_operation_get_mode_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_mode_read), data_make->cache_arguments.array[i], f_file_operation_get_mode_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_get_id_owner", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(fake_make_get_id_owner));
return F_status_set_error(F_failure);
}
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_owner_read", F_true, data_make->cache_arguments.array[i], f_file_operation_get_owner_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_owner_read), data_make->cache_arguments.array[i], f_file_operation_get_owner_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
};
const bool reserved_parameter[] = {
- data_make->data->path_build.used,
+ data_make->data->setting->build.used,
F_true,
- data_make->data->path_data.used,
- data_make->data->define.used,
- data_make->data->fakefile.used,
- data_make->data->mode.used,
- data_make->data->process.used,
- data_make->data->settings.used,
- data_make->data->path_sources.used,
+ data_make->data->setting->data.used,
+ data_make->data->setting->defines.used,
+ data_make->data->setting->fakefile.used,
+ data_make->data->setting->modes.used,
+ data_make->data->setting->process.used,
+ data_make->data->setting->settings.used,
+ data_make->data->setting->sources.used,
F_true,
- data_make->data->path_work.used,
+ data_make->data->setting->work.used,
data_make->main->parameters.array[fake_parameter_path_build_e].result & f_console_result_value_e,
(data_make->main->parameters.array[fake_parameter_light_e].result & f_console_result_found_e) || (data_make->main->parameters.array[fake_parameter_dark_e].result & f_console_result_found_e) || (data_make->main->parameters.array[fake_parameter_no_color_e].result & f_console_result_found_e),
data_make->main->parameters.array[fake_parameter_path_data_e].result & f_console_result_value_e,
const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_indexer, data_make->cache_arguments, status);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fake_execute", F_true);
+ fake_print_error(data_make->setting, *status, data_make->main->error, macro_fake_f(fake_execute));
}
if (*status == F_child) return result;
status = f_directory_remove(data_make->cache_arguments.array[data_make->cache_arguments.used - 1], F_directory_descriptors_max_d, F_false);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_remove", F_true, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_directory_remove), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_directory_e);
return F_status_set_error(F_failure);
}
status = f_file_remove(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_remove", F_true, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_remove), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
status = f_file_link(data_make->cache_arguments.array[0], data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_link", F_true, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_link), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_link_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
status = fake_make_get_id_mode(data_make->data, data_make->error, data_make->cache_arguments.array[0], &mode_rule, &replace);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_get_id_mode", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(fake_make_get_id_mode));
return F_status_set_error(F_failure);
}
status = f_file_mode_read(data_make->cache_arguments.array[i], F_true, &mode_file);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_mode_read), data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
status = f_file_mode_determine(mode_file, mode_rule, replace, macro_f_file_type_is_directory(mode_file), &mode);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_determine", F_true, data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_mode_determine), data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
}
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_mode_set_all" : "f_file_mode_set", F_true, data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, all ? macro_fake_f(fll_file_mode_set_all) : macro_fake_f(f_file_mode_set), data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
status = f_directory_is(data_make->cache_arguments.array[1]);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, data_make->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e);
return F_status_set_error(F_failure);
}
status = f_file_name_base(data_make->cache_arguments.array[i], &data_make->cache_path);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_name_base", F_true, data_make->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_name_base), data_make->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
return F_status_set_error(F_failure);
}
status = fll_file_move(data_make->cache_arguments.array[i], destination, recurse);
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "fll_file_move", F_true, data_make->cache_arguments.array[i], f_file_operation_move_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(fll_file_move), data_make->cache_arguments.array[i], f_file_operation_move_s, fll_error_file_type_directory_e);
return F_status_set_error(F_failure);
}
f_status_t status = fake_make_get_id_owner(data_make->data, data_make->error, data_make->cache_arguments.array[i++], &id);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_get_id_owner", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(fake_make_get_id_owner));
return F_status_set_error(F_failure);
}
status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_message_section_operation_path_outside(data_make->data, data_make->error, status, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
continue;
}
}
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, data_make->cache_arguments.array[i], f_file_operation_change_owner_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), data_make->cache_arguments.array[i], f_file_operation_change_owner_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
status = f_string_dynamic_resize(0, &data_make->setting_make.parameter.array[i].value.array[j]);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_resize));
return F_status_set_error(F_failure);
}
status = f_string_dynamics_resize(0, &data_make->setting_make.parameter.array[i].value);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamics_resize", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamics_resize));
return F_status_set_error(F_failure);
}
status = f_string_map_multis_resize(fake_default_allocation_small_d, &data_make->setting_make.parameter);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_map_multis_resize", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_map_multis_resize));
return F_status_set_error(F_failure);
}
status = f_string_dynamic_append_nulless(data_make->cache_arguments.array[0], &data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return F_status_set_error(F_failure);
}
status = f_string_dynamics_resize(data_make->cache_arguments.used - 1, &data_make->setting_make.parameter.array[i].value);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamics_resize", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamics_resize));
return F_status_set_error(F_failure);
}
status = f_string_dynamic_append_nulless(data_make->cache_arguments.array[j + 1], &data_make->setting_make.parameter.array[i].value.array[j]);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return F_status_set_error(F_failure);
}
// The created relative path is for verbosity purposes and as such its failure to be processed should not be treated as a failure of the function.
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_path_relative", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(fake_make_path_relative));
+
fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->message.to, data_make->main->context.set.notable, argument, data_make->main->context.set.notable, f_string_eol_s);
return F_status_set_error(F_failure);
status = f_string_dynamic_increase_by(total, &data_make->cache_1);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stream_open));
return F_status_set_error(F_failure);
}
status = f_string_dynamic_append(f_string_space_s, &data_make->cache_1);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_append));
return F_status_set_error(F_failure);
}
status = fake_make_operate_process_buffer_escape(data_make, data_make->cache_arguments.array[i], &data_make->cache_1);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stream_open));
return F_status_set_error(F_failure);
}
f_status_t status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]);
+ fake_print_message_section_operation_path_outside(data_make->data, data_make->error, status, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]);
if (F_status_set_fine(status) == F_false) {
status = F_status_set_error(F_failure);
return F_status_set_error(F_failure);
}
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamics_increase_by", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return F_status_set_error(F_failure);
}
status = f_string_dynamic_append_nulless(data_make->cache_path, &data_make->path.stack.array[data_make->path.stack.used]);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return F_status_set_error(F_failure);
}
// The created relative path is for verbosity purposes and as such its failure to be processed should not be treated as a failure of the function.
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_path_relative", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(fake_make_path_relative));
+
fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->message.to, data_make->main->context.set.notable, data_make->path.stack.array[data_make->path.stack.used], data_make->main->context.set.notable, f_string_eol_s);
}
else {
if (F_status_is_error(status)) {
if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_touch), data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_file_e);
}
else {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, data_make->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_touch), data_make->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_file_e);
}
return F_status_set_error(F_failure);
if (F_status_is_error(status)) {
if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_directory_touch), data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_directory_e);
}
else {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, data_make->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_directory_touch), data_make->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_directory_e);
}
return F_status_set_error(F_failure);
if (F_status_is_error(status)) {
if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stream_open), data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e);
}
else {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stream_open), data_make->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
}
return F_status_set_error(F_failure);
if (F_status_is_error(status)) {
if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stream_open), data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e);
}
else {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stream_open), data_make->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
if (F_status_is_error(status)) {
if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "fake_make_operate_process_buffer_escape", F_true, data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(fake_make_operate_process_buffer_escape), data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e);
}
else {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "fake_make_operate_process_buffer_escape", F_true, data_make->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(fake_make_operate_process_buffer_escape), data_make->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
}
break;
if (F_status_is_error(status)) {
if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_write", F_true, data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stream_write), data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e);
}
else {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_write", F_true, data_make->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stream_write), data_make->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
}
break;
status = f_file_stream_write(file, f_string_ascii_space_s, 0);
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_file_stream_write", F_true);
+ fake_print_error(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_stream_write));
break;
}
}
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_is", F_true, path_file, f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_is), path_file, f_file_operation_find_s, fll_error_file_type_file_e);
return F_status_set_error(F_failure);
}
}
if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_find_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status_file, data_make->main->error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_find_s, fll_error_file_type_directory_e);
status = F_status_set_error(F_failure);
}
}
if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_exists", F_true, data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status_file, data_make->main->error, macro_fake_f(f_file_exists), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
}
if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status_file, data_make->main->error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
status = F_status_set_error(F_failure);
}
status_file = f_file_name_directory(full, &data_make->cache_path);
if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_name_directory", F_true, full, f_file_operation_analyze_s, fll_error_file_type_path_e);
+ fake_print_error_file(data_make->setting, status_file, data_make->main->error, macro_fake_f(f_file_name_directory), full, f_file_operation_analyze_s, fll_error_file_type_path_e);
status = F_status_set_error(F_failure);
}
status_file = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_path);
if (F_status_is_error(status_file)) {
- fll_error_print(data_make->error, F_status_set_fine(status_file), "f_string_dynamic_append_assure", F_true);
+ fake_print_error(data_make->setting, status_file, data_make->main->error, macro_fake_f(f_string_dynamic_append_assure));
status = F_status_set_error(F_failure);
}
status_file = f_string_dynamic_append(data_make->cache_arguments.array[data_make->cache_arguments.used - 2], &data_make->cache_path);
if (F_status_is_error(status_file)) {
- fll_error_print(data_make->error, F_status_set_fine(status_file), "f_string_dynamic_append", F_true);
+ fake_print_error(data_make->setting, status_file, data_make->main->error, macro_fake_f(f_string_dynamic_append));
status = F_status_set_error(F_failure);
}
}
if (F_status_is_error(status)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
return F_status_set_error(F_failure);
}
if (F_status_is_error(status_file)) {
if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_is", F_true, data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data_make->setting, status_file, data_make->main->error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e);
}
status = F_status_set_error(F_failure);
if (F_status_is_error(status)) {
if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) {
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_is", F_true, data_make->data->file_data_build_fakefile, f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file(data_make->setting, status, data_make->main->error, macro_fake_f(f_file_is), data_make->data->file_data_build_fakefile, f_file_operation_find_s, fll_error_file_type_file_e);
}
return F_status_set_error(F_failure);
const f_status_t status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]);
+ fake_print_message_section_operation_path_outside(data_make->data, data_make->error, status, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]);
return F_status_set_error(F_failure);
}
status = f_account_group_id_by_name(buffer, id);
if (F_status_is_error(status)) {
- fll_error_print(print, F_status_set_fine(status), "f_account_group_id_by_name", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_account_group_id_by_name));
return F_status_set_error(status);
}
return F_none;
}
- fll_error_print(print, F_status_set_fine(status), "fl_conversion_dynamic_to_unsigned_detect", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(fl_conversion_dynamic_to_unsigned_detect));
return F_status_set_error(status);
}
f_status_t fake_make_get_id_mode(fake_data_t * const data, const fl_print_t print, const f_string_static_t buffer, f_file_mode_t *mode, uint8_t *replace) {
if (!buffer.used) {
- fll_error_print(print, F_parameter, "fake_make_get_id_mode", F_true);
+ fake_print_error(data->setting, F_parameter, data->main->error, macro_fake_f(fake_make_get_id_mode));
return F_status_set_error(F_parameter);
}
f_file_stream_unlock(data->main->error.to);
}
else {
- fll_error_print(print, status, "f_file_mode_from_string", F_true);
+ fake_print_error(data->setting, status, print, macro_fake_f(fll_execute_arguments_add));
}
}
status = f_account_id_by_name(buffer, id);
if (F_status_is_error(status)) {
- fll_error_print(print, status, "f_account_id_by_name", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(f_account_id_by_name));
return F_status_set_error(status);
}
return F_none;
}
- fll_error_print(print, status, "fl_conversion_dynamic_to_unsigned_detect", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(fl_conversion_dynamic_to_unsigned_detect));
return F_status_set_error(status);
}
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QFailed to find '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QFailed to find '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, data->main->error.context);
fake_print_error_build_operation_file_message(data, operation, source, destination, how);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QInvalid parameter when calling '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QInvalid parameter when calling '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, data->main->error.context);
fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, function, data->main->error.notable);
fl_print_format("%[() to %Q '%]", data->main->error.to, data->main->error.context, operation, data->main->error.context);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QInvalid name for '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QInvalid name for '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, data->main->error.context);
if (source.used) {
fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, source, data->main->error.notable);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QUnable to allocate memory, while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QUnable to allocate memory, while trying to %Q '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
fake_print_error_build_operation_file_message(data, operation, source, destination, how);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QOverflow while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QOverflow while trying to %Q '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
fake_print_error_build_operation_file_message(data, operation, source, destination, how);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QInvalid directory while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QInvalid directory while trying to %Q '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
fake_print_error_build_operation_file_message(data, operation, source, destination, how);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QAccess denied while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QAccess denied while trying to %Q '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
fake_print_error_build_operation_file_message(data, operation, source, destination, how);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QLoop while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QLoop while trying to %Q '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
fake_print_error_build_operation_file_message(data, operation, source, destination, how);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QProhibited by system while trying to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QProhibited by system while trying to %Q '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
fake_print_error_build_operation_file_message(data, operation, source, destination, how);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QFailed to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QFailed to %Q '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
fake_print_error_build_operation_file_message(data, operation, source, destination, how);
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[%QFailed to %Q '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QFailed to %Q '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, operation, data->main->error.context);
fake_print_error_build_operation_file_message(data, operation, source, destination, how);
if (fll_error_print(data->main->error, F_status_set_fine(status), function, F_false) == F_known_not && fallback && data->main->error.verbosity > f_console_verbosity_quiet_e) {
f_file_stream_lock(data->main->error.to);
- fl_print_format("%r%[UNKNOWN %Q(%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[UNKNOWN %Q(%]", data->main->error.to, data->main->error.context, data->main->error.prefix, data->main->error.context);
fl_print_format("%[%ui%]", data->main->error.to, data->main->error.notable, F_status_set_fine(status), data->main->error.notable);
fl_print_format("%[) occurred while trying to %Q '%]", data->main->error.to, data->main->error.context, operation, data->main->error.context);
#endif // _di_fake_print_error_build_operation_file_message_
#ifndef _di_fake_print_error_fss
- bool fake_print_error_fss(fake_data_t * const data, const f_status_t status, const char *function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback) {
+ bool fake_print_error_fss(fake_data_t * const data, const f_status_t status, const f_string_t function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback) {
if (status == F_file_found_not) {
if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
#endif // _di_fake_print_message_section_operation_link_target_exists_not_
#ifndef _di_fake_print_message_section_operation_path_outside_
- void fake_print_message_section_operation_path_outside(fake_data_t * const data, const fl_print_t print, const f_status_t status, const char *function, const f_string_static_t path) {
+ void fake_print_message_section_operation_path_outside(fake_data_t * const data, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path) {
- if (data->main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
+ if (print.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
- f_file_stream_lock(data->main->error.to);
+ f_file_stream_lock(print.to);
if (F_status_set_fine(status) == F_false) {
- fl_print_format("%r%[%QThe path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
- fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path, data->main->error.notable);
- fl_print_format("%[' is outside the project root.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
+ fake_print_line_first_locked(data->setting, data->main->error);
+
+ fl_print_format("%[%QThe path '%]", print.to, print.context, print.prefix, print.context);
+ fl_print_format("%[%Q%]", print.to, print.notable, path, print.notable);
+ fl_print_format("%[' is outside the project root.%]%r", print.to, print.context, print.context, f_string_eol_s);
}
else {
- fll_error_file_print(data->main->error, F_status_set_fine(status), function, F_true, path, fake_common_file_path_determine_real_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, status, print, function, path, fake_common_file_path_determine_real_s, fll_error_file_type_file_e);
}
- f_file_stream_unlock(data->main->error.to);
+ f_file_stream_unlock(print.to);
}
#endif // _di_fake_print_message_section_operation_path_outside_
#ifndef _di_fake_print_message_section_operation_path_stack_max_
- void fake_print_message_section_operation_path_stack_max(fake_data_t * const data, fl_print_t print, const f_status_t status, const char *function, const f_string_static_t path) {
+ void fake_print_message_section_operation_path_stack_max(fake_data_t * const data, fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path) {
- if (data->main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
+ if (print.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
if (status == F_array_too_large) {
- f_file_stream_lock(data->main->error.to);
+ f_file_stream_lock(print.to);
- fl_print_format("%r%[%QMaximum stack size reached while processing path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
- fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, path, data->main->error.notable);
- fl_print_format("%['", data->main->error.to, data->main->error.context);
+ fl_print_format("%r%[%QMaximum stack size reached while processing path '%]", print.to, f_string_eol_s, print.context, print.prefix, print.context);
+ fl_print_format("%[%Q%]", print.to, print.notable, path, print.notable);
+ fl_print_format("%['", print.to, print.context);
if (function) {
- fl_print_format(" while calling%] %[%S%]", data->main->error.to, data->main->error.context, data->main->error.notable, function, data->main->error.notable);
- fl_print_format("%[()", data->main->error.to, data->main->error.context);
+ fl_print_format(" while calling%] %[%S%]", print.to, print.context, print.notable, function, print.notable);
+ fl_print_format("%[()", print.to, print.context);
}
- fl_print_format(".%]%r", data->main->error.to, data->main->error.context, f_string_eol_s);
+ fl_print_format(".%]%r", print.to, print.context, f_string_eol_s);
- f_file_stream_unlock(data->main->error.to);
+ f_file_stream_unlock(print.to);
}
else {
- fll_error_file_print(print, status, function, F_true, path, fake_common_file_path_change_to_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, status, print, function, path, fake_common_file_path_change_to_s, fll_error_file_type_directory_e);
}
}
#endif // _di_fake_print_message_section_operation_path_stack_max_
#ifndef _di_fake_print_message_section_operation_stack_max_
void fake_print_message_section_operation_stack_max(fake_data_t * const data, fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const f_array_length_t stack_max) {
- if (data->main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
+ if (print.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
f_array_length_t line = 1;
f_state_t state = f_state_t_initialize;
f_fss_count_lines(state, buffer, operation_name.start, &line);
- f_file_stream_lock(data->main->error.to);
+ f_file_stream_lock(print.to);
- fl_print_format("%r%[%QThe section operation '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
- fl_print_format("%[%/Q%]", data->main->error.to, data->main->error.notable, buffer, operation_name, data->main->error.notable);
- fl_print_format("%[' from section '%]", data->main->error.to, data->main->error.context, buffer, data->main->error.context);
- fl_print_format("%[%/Q%]", data->main->error.to, data->main->error.notable, buffer, section_name, data->main->error.notable);
- fl_print_format("%[' on line%] ", data->main->error.to, data->main->error.context, data->main->error.context);
- fl_print_format("%[%ul%]", data->main->error.to, data->main->error.notable, line, data->main->error.notable);
- fl_print_format("%[' cannot be processed because the max stack depth of%] ", data->main->error.to, data->main->error.context, data->main->error.context);
- fl_print_format("%[%ul%]", data->main->error.to, data->main->error.notable, stack_max, data->main->error.notable);
- fl_print_format(" %[has been reached.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe section operation '%]", print.to, f_string_eol_s, print.context, print.prefix, print.context);
+ fl_print_format("%[%/Q%]", print.to, print.notable, buffer, operation_name, print.notable);
+ fl_print_format("%[' from section '%]", print.to, print.context, buffer, print.context);
+ fl_print_format("%[%/Q%]", print.to, print.notable, buffer, section_name, print.notable);
+ fl_print_format("%[' on line%] ", print.to, print.context, print.context);
+ fl_print_format("%[%ul%]", print.to, print.notable, line, print.notable);
+ fl_print_format("%[' cannot be processed because the max stack depth of%] ", print.to, print.context, print.context);
+ fl_print_format("%[%ul%]", print.to, print.notable, stack_max, print.notable);
+ fl_print_format(" %[has been reached.%]%r", print.to, print.context, print.context, f_string_eol_s);
- f_file_stream_unlock(data->main->error.to);
+ f_file_stream_unlock(print.to);
}
#endif // _di_fake_print_message_section_operation_stack_max_
#ifndef _di_fake_print_message_section_operation_unknown_
void fake_print_message_section_operation_unknown(fake_data_t * const data, const fl_print_t print, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) {
- if (data->main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
+ if (print.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
f_array_length_t line = 1;
f_state_t state = f_state_t_initialize;
f_fss_count_lines(state, buffer, operation_name.start, &line);
- f_file_stream_lock(data->main->error.to);
+ f_file_stream_lock(print.to);
- fl_print_format("%r%[%QThe section operation '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
- fl_print_format("%[%/Q%]", data->main->error.to, data->main->error.notable, buffer, operation_name, data->main->error.notable);
- fl_print_format("%[' from section '%]", data->main->error.to, data->main->error.context, buffer, data->main->error.context);
- fl_print_format("%[%/Q%]", data->main->error.to, data->main->error.notable, buffer, section_name, data->main->error.notable);
- fl_print_format("%[' on line%] ", data->main->error.to, data->main->error.context, data->main->error.context);
- fl_print_format("%[%ul%]", data->main->error.to, data->main->error.notable, line, data->main->error.notable);
- fl_print_format(" %[is not a known operation name.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
+ fl_print_format("%r%[%QThe section operation '%]", print.to, f_string_eol_s, print.context, print.prefix, print.context);
+ fl_print_format("%[%/Q%]", print.to, print.notable, buffer, operation_name, print.notable);
+ fl_print_format("%[' from section '%]", print.to, print.context, buffer, print.context);
+ fl_print_format("%[%/Q%]", print.to, print.notable, buffer, section_name, print.notable);
+ fl_print_format("%[' on line%] ", print.to, print.context, print.context);
+ fl_print_format("%[%ul%]", print.to, print.notable, line, print.notable);
+ fl_print_format(" %[is not a known operation name.%]%r", print.to, print.context, print.context, f_string_eol_s);
- f_file_stream_unlock(data->main->error.to);
+ f_file_stream_unlock(print.to);
}
#endif // _di_fake_print_message_section_operation_unknown_
* @see fl_print_format()
*/
#ifndef _di_fake_print_error_fss_
- extern bool fake_print_error_fss(fake_data_t * const data, const f_status_t status, const char *function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback) F_attribute_visibility_internal_d;
+ extern bool fake_print_error_fss(fake_data_t * const data, const f_status_t status, const f_string_t function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback) F_attribute_visibility_internal_d;
#endif // _di_fake_print_error_fss_
/**
* @see fll_error_file_print()
*/
#ifndef _di_fake_print_message_section_operation_path_outside_
- extern void fake_print_message_section_operation_path_outside(fake_data_t * const data, const fl_print_t print, const f_status_t status, const char *function, const f_string_static_t path) F_attribute_visibility_internal_d;
+ extern void fake_print_message_section_operation_path_outside(fake_data_t * const data, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path) F_attribute_visibility_internal_d;
#endif // _fake_print_message_section_operation_path_outside_
/**
* @see fll_error_file_print()
*/
#ifndef _di_fake_print_message_section_operation_path_stack_max_
- extern void fake_print_message_section_operation_path_stack_max(fake_data_t * const data, fl_print_t error, const f_status_t status, const char *function, const f_string_static_t path) F_attribute_visibility_internal_d;
+ extern void fake_print_message_section_operation_path_stack_max(fake_data_t * const data, fl_print_t error, const f_status_t status, const f_string_t function, const f_string_static_t path) F_attribute_visibility_internal_d;
#endif // _di_fake_print_message_section_operation_path_stack_max_
/**
fake_skeleton_path_source_string(data, &fake_path_part_script_s, &sources_script);
fake_skeleton_path_source_string(data, &fake_path_part_shell_s, &sources_bash);
- const f_string_static_t *parameters_value[] = {
- &data->path_build,
- &data->path_data,
- &data->path_data_build,
- &data->path_data_documentation,
- &data->path_data_settings,
- &data->path_documents,
- &data->path_licenses,
- &data->path_sources,
- &sources,
- &sources_bash,
- &sources_c,
- &sources_cpp,
- &sources_script,
- &data->path_work,
- &data->path_work_includes,
- &data->path_work_libraries,
- &data->path_work_libraries_script,
- &data->path_work_libraries_shared,
- &data->path_work_libraries_static,
- &data->path_work_programs,
- &data->path_work_programs_script,
- &data->path_work_programs_shared,
- &data->path_work_programs_static,
- &fake_path_part_specifications_s,
+ const f_string_static_t path[] = {
+ data->setting->build,
+ data->setting->data,
+ data->path_data_build,
+ data->path_data_documentation,
+ data->path_data_settings,
+ data->path_documents,
+ data->path_licenses,
+ data->setting->sources,
+ sources,
+ sources_bash,
+ sources_c,
+ sources_cpp,
+ sources_script,
+ data->setting->work,
+ data->path_work_includes,
+ data->path_work_libraries,
+ data->path_work_libraries_script,
+ data->path_work_libraries_shared,
+ data->path_work_libraries_static,
+ data->path_work_programs,
+ data->path_work_programs_script,
+ data->path_work_programs_shared,
+ data->path_work_programs_static,
+ fake_path_part_specifications_s,
};
for (uint8_t i = 0; i < 24; ++i) {
- status = fake_skeleton_operate_directory_create(data, *parameters_value[i]);
+ status = fake_skeleton_operate_directory_create(data, path[i]);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "fake_skeleton_operate_directory_create", F_true);
+ fake_print_error(data->setting, status, data->main->error, macro_fake_f(fake_skeleton_operate_directory_create));
return status;
}
f_file_stream_unlock(data->main->error.to);
}
else {
- fll_error_file_print(data->main->error, F_status_set_fine(status), "f_directory_create", F_true, path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_directory_create), path, f_file_operation_create_s, fll_error_file_type_directory_e);
}
return status;
}
}
else if (F_status_is_error(status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(status), "f_directory_exists", F_true, path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_directory_exists), path, f_file_operation_create_s, fll_error_file_type_directory_e);
return status;
}
f_file_stream_unlock(data->main->error.to);
}
else {
- fll_error_file_print(data->main->error, F_status_set_fine(status), "f_file_create", F_true, path, f_file_operation_create_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_create), path, f_file_operation_create_s, fll_error_file_type_file_e);
}
return status;
status = f_file_open(path, 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(status), "f_file_open", F_true, path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_open), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
return status;
}
status = f_file_write(file, content, 0);
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);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_write), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
f_file_stream_flush(file);
f_file_stream_close(&file);
}
}
else if (F_status_is_error(status)) {
- fll_error_file_print(data->main->error, F_status_set_fine(status), "f_file_is", F_true, path, f_file_operation_create_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, status, data->main->error, macro_fake_f(f_file_is), path, f_file_operation_create_s, fll_error_file_type_file_e);
return status;
}
#ifndef _di_fake_skeleton_path_source_length_
void fake_skeleton_path_source_length(fake_data_t * const data, const f_string_static_t *partial, f_string_static_t * const source) {
- source->used = data->path_sources.used + fake_default_path_sources_s.used + partial->used;
+ source->used = data->setting->sources.used + partial->used;
}
#endif // _di_fake_skeleton_path_source_length_
source->used = 0;
- memcpy(source->string, data->path_sources.string, sizeof(f_char_t) * data->path_sources.used);
- source->used += data->path_sources.used;
-
- memcpy(source->string, fake_default_path_sources_s.string, sizeof(f_char_t) * fake_default_path_sources_s.used);
- source->used += fake_default_path_sources_s.used;
+ memcpy(source->string, data->setting->sources.string, sizeof(f_char_t) * data->setting->sources.used);
+ source->used += data->setting->sources.used;
memcpy(source->string + source->used, partial->string, sizeof(f_char_t) * partial->used);
source->used += partial->used;
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/fake.c main/common.c main/common-print.c main/print.c
+build_sources_library main/fake.c main/common.c main/common-print.c main/common-string.c main/common-type.c main/print.c
build_sources_library main/private-build.c main/private-build-library.c main/private-build-load.c main/private-build-object.c main/private-build-objects.c main/private-build-program.c main/private-build-skeleton.c
build_sources_library main/private-clean.c main/private-common.c main/private-make.c main/private-print.c main/private-skeleton.c
build_sources_library main/private-make-load_fakefile.c main/private-make-load_parameters.c
build_sources_program main/main.c
-build_sources_headers main/fake.h main/common.h main/common-print.h main/print.h
+build_sources_headers main/fake.h main/common.h main/common-print.h main/common-string.h main/common-type.h main/print.h
build_sources_documentation man
- code:"current": The absolute path to the current working directory (present working directory) (Always has a trailing forward slash).
- code:"data": Associated with code:"-D/--data" parameter.
- code:"define": Associated with code:"-d/--define" parameter.
+ - code:"documents": Associated with code:"-O/--documents" parameter.
- code:"fakefile": Associated with code:"-f/--fakefile" parameter.
+ - code:"licenses": Associated with code:"-l/--licenses" parameter.
- code:"mode": Associated with code:"-m/--mode" parameter and possibly with the build settings default mode code:"modes_default".
- code:"process": Associated with code:"-p/--process" parameter.
- code:"return": Contains the return value of a previous operation that produces a return code.
This supports both code:":option" and code:":value".
- code:"define"\:
- This variable holds the code:"data" program parameters, such as code:"-d define/".
+ This variable holds the code:"define" program parameters, such as code:"-d define/".
+ This supports both code:":option" and code:":value".
+
+ - code:"documents"\:
+ This variable holds the code:"documents" program parameters, such as code:"-O documents/".
This supports both code:":option" and code:":value".
- code:"fakefile"\:
This variable holds the code:"fakefile" program parameters, such as code:"-f fakefile".
This supports both code:":option" and code:":value".
+ - code:"licenses"\:
+ This variable holds the code:"licenses" program parameters, such as code:"-l licenses/".
+ This supports both code:":option" and code:":value".
+
- code:"mode"\:
This variable holds the code:"fakefile" program parameters, such as code:"-m monolithic".
This supports both code:":option" and code:":value".
This supports both code:":option" and code:":value".
- code:"sources"\:
- This variable holds the code:"data" program parameters, such as code:"-S sources/".
+ This variable holds the code:"sources" program parameters, such as code:"-S sources/".
This supports both code:":option" and code:":value".
- code:"verbosity"\:
- code:"<="
The code:"if" bold:"Section Operation" condition code:"parameter"\:
- The following reserved words are available for parameter names: code:"build", code:"color", code:"current", code:"data", code:"define", code:"fakefile", code:"mode", code:"process", code:"return", code:"settings", code:"sources", code:"top", code:"verbosity", and code:"work".
+ The following reserved words are available for parameter names: code:"build", code:"color", code:"current", code:"data", code:"documents", code:"define", code:"fakefile", code:"licenses", code:"mode", code:"process", code:"return", code:"settings", code:"sources", code:"top", code:"verbosity", and code:"work".
Each of the reserved words supports having code:":option" and code:":value" appended, such as: code:"work:value".
fll_print_format("%r%[%QUnable to allocate memory.%]%r", output.to, f_string_eol_s, output.context, output.prefix, output.context, f_string_eol_s);
}
-void firewall_print_error_on_invalid_parameter(const fl_print_t output, const char *function) {
+void firewall_print_error_on_invalid_parameter(const fl_print_t output, const f_string_t function) {
if (output.verbosity == f_console_verbosity_quiet_e) return;
fll_print_format("%r%[%QInvalid parameter when calling %s().%]%r", output.to, f_string_eol_s, output.context, output.prefix, function, output.context, f_string_eol_s);
}
-void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const char *function, const f_string_static_t filename) {
+void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const f_string_t function, const f_string_static_t filename) {
if (output.verbosity == f_console_verbosity_quiet_e) return;
f_file_stream_unlock(output.to);
}
-void firewall_print_error_on_unhandled(const fl_print_t output, const char *function, const f_status_t status) {
+void firewall_print_error_on_unhandled(const fl_print_t output, const f_string_t function, const f_status_t status) {
if (output.verbosity == f_console_verbosity_quiet_e) return;
fll_print_format("%r%[%QAn unhandled error (%ui) has occurred while calling %s().%]%r", output.to, f_string_eol_s, output.context, output.prefix, status, function, output.context, f_string_eol_s);
}
-void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const char *function, const f_status_t status, const f_string_static_t filename) {
+void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const f_string_t function, const f_status_t status, const f_string_static_t filename) {
if (output.verbosity == f_console_verbosity_quiet_e) return;
* @param function
* The function that failed.
*/
-extern void firewall_print_error_on_invalid_parameter(const fl_print_t output, const char *function) F_attribute_visibility_internal_d;
+extern void firewall_print_error_on_invalid_parameter(const fl_print_t output, const f_string_t function) F_attribute_visibility_internal_d;
/**
* Print an invalid parameter error for the given function.
* @param filename
* The name of the file.
*/
-extern void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const char *function, const f_string_static_t filename) F_attribute_visibility_internal_d;
+extern void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const f_string_t function, const f_string_static_t filename) F_attribute_visibility_internal_d;
/**
* Print an error about the given operation failed.
* @param status
* The failure status code.
*/
-extern void firewall_print_error_on_unhandled(const fl_print_t output, const char *function, const f_status_t status) F_attribute_visibility_internal_d;
+extern void firewall_print_error_on_unhandled(const fl_print_t output, const f_string_t function, const f_status_t status) F_attribute_visibility_internal_d;
/**
* Print an unhandled error for the given function for some given file.
* @param filename
* The name of the file.
*/
-extern void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const char *function, const f_status_t status, const f_string_static_t filename) F_attribute_visibility_internal_d;
+extern void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const f_string_t function, const f_status_t status, const f_string_static_t filename) F_attribute_visibility_internal_d;
/**
* Check to see if a process signal is received.
f_file_stream_unlock(main->error.to);
status = F_status_set_error(F_parameter);
+
break;
}
} // for
#include <fll/level_2/program.h>
// FSS Write includes.
-#include <program/fss_write/main/common.h>
#include <program/fss_write/main/common-print.h>
+#include <program/fss_write/main/common-string.h>
+#include <program/fss_write/main/common-type.h>
+#include <program/fss_write/main/common.h>
#include <program/fss_write/basic/common.h>
#include <program/fss_write/main/print.h>
#include <program/fss_write/basic/print.h>
#include <fll/level_2/program.h>
// FSS Write includes.
-#include <program/fss_write/main/common.h>
#include <program/fss_write/main/common-print.h>
+#include <program/fss_write/main/common-string.h>
+#include <program/fss_write/main/common-type.h>
+#include <program/fss_write/main/common.h>
#include <program/fss_write/basic_list/common.h>
#include <program/fss_write/main/print.h>
#include <program/fss_write/basic_list/print.h>
#include <fll/level_2/program.h>
// FSS Write includes.
-#include <program/fss_write/main/common.h>
#include <program/fss_write/main/common-print.h>
+#include <program/fss_write/main/common-string.h>
+#include <program/fss_write/main/common-type.h>
+#include <program/fss_write/main/common.h>
#include <program/fss_write/embedded_list/common.h>
#include <program/fss_write/main/print.h>
#include <program/fss_write/embedded_list/print.h>
#include <fll/level_2/program.h>
// FSS Write includes.
-#include <program/fss_write/main/common.h>
#include <program/fss_write/main/common-print.h>
+#include <program/fss_write/main/common-string.h>
+#include <program/fss_write/main/common-type.h>
+#include <program/fss_write/main/common.h>
#include <program/fss_write/extended/common.h>
#include <program/fss_write/main/print.h>
#include <program/fss_write/extended/print.h>
#include <fll/level_2/program.h>
// FSS Write includes.
-#include <program/fss_write/main/common.h>
#include <program/fss_write/main/common-print.h>
+#include <program/fss_write/main/common-string.h>
+#include <program/fss_write/main/common-type.h>
+#include <program/fss_write/main/common.h>
#include <program/fss_write/extended_list/common.h>
#include <program/fss_write/main/print.h>
#include <program/fss_write/extended_list/print.h>
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common print functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
--- /dev/null
+#include "fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_program_version_s_
+ const f_string_static_t fss_write_program_version_s = macro_f_string_static_t_initialize(FSS_WRITE_program_version_s, 0, FSS_WRITE_program_version_s_length);
+#endif // _di_fss_write_program_version_s_
+
+#ifndef _di_fss_write_program_name_s_
+ const f_string_static_t fss_write_program_name_s = macro_f_string_static_t_initialize(FSS_WRITE_program_name_s, 0, FSS_WRITE_program_name_s_length);
+ const f_string_static_t fss_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_WRITE_program_name_long_s, 0, FSS_WRITE_program_name_long_s_length);
+#endif // _di_fss_write_program_name_s_
+
+#ifndef _di_fss_write_pipe_s_
+ const f_string_static_t fss_write_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_WRITE_pipe_content_end_s, 0, FSS_WRITE_pipe_content_end_s_length);
+ const f_string_static_t fss_write_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_WRITE_pipe_content_ignore_s, 0, FSS_WRITE_pipe_content_ignore_s_length);
+ const f_string_static_t fss_write_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_WRITE_pipe_content_start_s, 0, FSS_WRITE_pipe_content_start_s_length);
+#endif // _di_fss_write_pipe_s_
+
+#ifndef _di_fss_write_s_
+ const f_string_static_t fss_write_string_two_s = macro_f_string_static_t_initialize(FSS_WRITE_string_two_s, 0, FSS_WRITE_string_two_s_length);
+#endif // _di_fss_write_s_
+
+#ifndef _di_fss_write_parameter_s_
+ const f_string_static_t fss_write_short_as_s = macro_f_string_static_t_initialize(FSS_WRITE_short_as_s, 0, FSS_WRITE_short_as_s_length);
+ const f_string_static_t fss_write_short_backtick_s = macro_f_string_static_t_initialize(FSS_WRITE_short_backtick_s, 0, FSS_WRITE_short_backtick_s_length);
+ const f_string_static_t fss_write_short_content_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_s, 0, FSS_WRITE_short_content_s_length);
+ const f_string_static_t fss_write_short_content_end_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_end_s, 0, FSS_WRITE_short_content_end_s_length);
+ const f_string_static_t fss_write_short_content_next_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_next_s, 0, FSS_WRITE_short_content_next_s_length);
+ const f_string_static_t fss_write_short_double_s = macro_f_string_static_t_initialize(FSS_WRITE_short_double_s, 0, FSS_WRITE_short_double_s_length);
+ const f_string_static_t fss_write_short_file_s = macro_f_string_static_t_initialize(FSS_WRITE_short_file_s, 0, FSS_WRITE_short_file_s_length);
+ const f_string_static_t fss_write_short_ignore_s = macro_f_string_static_t_initialize(FSS_WRITE_short_ignore_s, 0, FSS_WRITE_short_ignore_s_length);
+ const f_string_static_t fss_write_short_object_s = macro_f_string_static_t_initialize(FSS_WRITE_short_object_s, 0, FSS_WRITE_short_object_s_length);
+ const f_string_static_t fss_write_short_object_open_s = macro_f_string_static_t_initialize(FSS_WRITE_short_object_open_s, 0, FSS_WRITE_short_object_open_s_length);
+ const f_string_static_t fss_write_short_partial_s = macro_f_string_static_t_initialize(FSS_WRITE_short_partial_s, 0, FSS_WRITE_short_partial_s_length);
+ const f_string_static_t fss_write_short_prepend_s = macro_f_string_static_t_initialize(FSS_WRITE_short_prepend_s, 0, FSS_WRITE_short_prepend_s_length);
+ const f_string_static_t fss_write_short_single_s = macro_f_string_static_t_initialize(FSS_WRITE_short_single_s, 0, FSS_WRITE_short_single_s_length);
+ const f_string_static_t fss_write_short_trim_s = macro_f_string_static_t_initialize(FSS_WRITE_short_trim_s, 0, FSS_WRITE_short_trim_s_length);
+
+ const f_string_static_t fss_write_long_as_s = macro_f_string_static_t_initialize(FSS_WRITE_long_as_s, 0, FSS_WRITE_long_as_s_length);
+ const f_string_static_t fss_write_long_backtick_s = macro_f_string_static_t_initialize(FSS_WRITE_long_backtick_s, 0, FSS_WRITE_long_backtick_s_length);
+ const f_string_static_t fss_write_long_content_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_s, 0, FSS_WRITE_long_content_s_length);
+ const f_string_static_t fss_write_long_content_end_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_end_s, 0, FSS_WRITE_long_content_end_s_length);
+ const f_string_static_t fss_write_long_content_next_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_next_s, 0, FSS_WRITE_long_content_next_s_length);
+ const f_string_static_t fss_write_long_double_s = macro_f_string_static_t_initialize(FSS_WRITE_long_double_s, 0, FSS_WRITE_long_double_s_length);
+ const f_string_static_t fss_write_long_file_s = macro_f_string_static_t_initialize(FSS_WRITE_long_file_s, 0, FSS_WRITE_long_file_s_length);
+ const f_string_static_t fss_write_long_ignore_s = macro_f_string_static_t_initialize(FSS_WRITE_long_ignore_s, 0, FSS_WRITE_long_ignore_s_length);
+ const f_string_static_t fss_write_long_object_s = macro_f_string_static_t_initialize(FSS_WRITE_long_object_s, 0, FSS_WRITE_long_object_s_length);
+ const f_string_static_t fss_write_long_object_open_s = macro_f_string_static_t_initialize(FSS_WRITE_long_object_open_s, 0, FSS_WRITE_long_object_open_s_length);
+ const f_string_static_t fss_write_long_partial_s = macro_f_string_static_t_initialize(FSS_WRITE_long_partial_s, 0, FSS_WRITE_long_partial_s_length);
+ const f_string_static_t fss_write_long_prepend_s = macro_f_string_static_t_initialize(FSS_WRITE_long_prepend_s, 0, FSS_WRITE_long_prepend_s_length);
+ const f_string_static_t fss_write_long_single_s = macro_f_string_static_t_initialize(FSS_WRITE_long_single_s, 0, FSS_WRITE_long_single_s_length);
+ const f_string_static_t fss_write_long_trim_s = macro_f_string_static_t_initialize(FSS_WRITE_long_trim_s, 0, FSS_WRITE_long_trim_s_length);
+#endif // _di_fss_write_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common data structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _fss_write_common_string_h
+#define _fss_write_common_string_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program version.
+ */
+#ifndef _di_fss_write_program_version_s_
+ #define FSS_WRITE_program_version_major_s F_string_ascii_0_s
+ #define FSS_WRITE_program_version_minor_s F_string_ascii_7_s
+ #define FSS_WRITE_program_version_micro_s F_string_ascii_0_s
+
+ #define FSS_WRITE_program_version_major_s_length F_string_ascii_0_s_length
+ #define FSS_WRITE_program_version_minor_s_length F_string_ascii_7_s_length
+ #define FSS_WRITE_program_version_micro_s_length F_string_ascii_0_s_length
+
+ #if !(defined(FSS_WRITE_program_version_nano_prefix_s) && defined(FSS_WRITE_program_version_nano_prefix_s_length))
+ #define FSS_WRITE_program_version_nano_prefix_s
+ #define FSS_WRITE_program_version_nano_prefix_s_length 0
+ #endif // !(defined(FSS_WRITE_program_version_nano_prefix_s) && defined(FSS_WRITE_program_version_nano_prefix_s_length))
+
+ #if !(defined(FSS_WRITE_program_version_nano_s) && defined(FSS_WRITE_program_version_nano_s_length))
+ #define FSS_WRITE_program_version_nano_s
+ #define FSS_WRITE_program_version_nano_s_length 0
+ #endif // !(defined(FSS_WRITE_program_version_nano_s) && defined(FSS_WRITE_program_version_nano_s_length))
+
+ #define FSS_WRITE_program_version_s FSS_WRITE_program_version_major_s F_string_ascii_period_s FSS_WRITE_program_version_minor_s F_string_ascii_period_s FSS_WRITE_program_version_micro_s FSS_WRITE_program_version_nano_prefix_s FSS_WRITE_program_version_nano_s
+
+ #define FSS_WRITE_program_version_s_length FSS_WRITE_program_version_major_s_length + F_string_ascii_period_s_length + FSS_WRITE_program_version_minor_s_length + F_string_ascii_period_s_length + FSS_WRITE_program_version_micro_s_length + FSS_WRITE_program_version_nano_prefix_s_length + FSS_WRITE_program_version_nano_s_length
+
+ extern const f_string_static_t fss_write_program_version_s;
+#endif // _di_fss_write_program_version_s_
+
+/**
+ * The program name.
+ */
+#ifndef _di_fss_write_program_name_s_
+ #define FSS_WRITE_program_name_s "fss_write"
+ #define FSS_WRITE_program_name_long_s "FSS Write"
+
+ #define FSS_WRITE_program_name_s_length 9
+ #define FSS_WRITE_program_name_long_s_length 9
+
+ extern const f_string_static_t fss_write_program_name_s;
+ extern const f_string_static_t fss_write_program_name_long_s;
+#endif // _di_fss_write_program_name_s_
+
+/**
+ * The program pipe strings.
+ *
+ * The fss_write_pipe_content_*_s strings are strings rather than characters to allow for wide characters.
+ *
+ * fss_write_pipe_content_*_s:
+ * - end: The character representing the end of content.
+ * - ignore: The character representing the start of or end of a set of characters to ignore.
+ * - start: The character representing the start of content.
+ *
+ * macro_fss_write_setting:
+ * - Used to represent a cast to ((fss_write_setting_t *) setting).
+ * - Simplifies the number of parenthesis used to make code slightly cleaner.
+ * - Is wrapped in a parenthesis and not a block.
+ */
+#ifndef _di_fss_write_pipe_s_
+ #define FSS_WRITE_pipe_content_end_s "\f"
+ #define FSS_WRITE_pipe_content_ignore_s "\v"
+ #define FSS_WRITE_pipe_content_start_s "\b"
+
+ #define FSS_WRITE_pipe_content_end_s_length 1
+ #define FSS_WRITE_pipe_content_ignore_s_length 1
+ #define FSS_WRITE_pipe_content_start_s_length 1
+
+ extern const f_string_static_t fss_write_pipe_content_end_s;
+ extern const f_string_static_t fss_write_pipe_content_ignore_s;
+ extern const f_string_static_t fss_write_pipe_content_start_s;
+#endif // _di_fss_write_pipe_s_
+
+/**
+ * A collection of static strings associated with FSS Payload Write.
+ */
+#ifndef _di_fss_write_s_
+ #define FSS_WRITE_string_two_s "two"
+
+ #define FSS_WRITE_string_two_s_length 3
+
+ extern const f_string_static_t fss_write_string_two_s;
+#endif // _di_fss_write_s_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_write_parameter_s_
+ #define FSS_WRITE_short_as_s "a"
+ #define FSS_WRITE_short_backtick_s "b"
+ #define FSS_WRITE_short_content_s "c"
+ #define FSS_WRITE_short_content_end_s "E"
+ #define FSS_WRITE_short_content_next_s "N"
+ #define FSS_WRITE_short_double_s "d"
+ #define FSS_WRITE_short_file_s "f"
+ #define FSS_WRITE_short_ignore_s "I"
+ #define FSS_WRITE_short_object_s "o"
+ #define FSS_WRITE_short_object_open_s "O"
+ #define FSS_WRITE_short_partial_s "p"
+ #define FSS_WRITE_short_prepend_s "P"
+ #define FSS_WRITE_short_single_s "s"
+ #define FSS_WRITE_short_trim_s "T"
+
+ #define FSS_WRITE_long_as_s "as"
+ #define FSS_WRITE_long_backtick_s "backtick"
+ #define FSS_WRITE_long_content_s "content"
+ #define FSS_WRITE_long_content_end_s "content_end"
+ #define FSS_WRITE_long_content_next_s "content_next"
+ #define FSS_WRITE_long_double_s "double"
+ #define FSS_WRITE_long_file_s "file"
+ #define FSS_WRITE_long_ignore_s "ignore"
+ #define FSS_WRITE_long_object_s "object"
+ #define FSS_WRITE_long_object_open_s "object_open"
+ #define FSS_WRITE_long_partial_s "partial"
+ #define FSS_WRITE_long_prepend_s "prepend"
+ #define FSS_WRITE_long_single_s "single"
+ #define FSS_WRITE_long_trim_s "trim"
+
+ #define FSS_WRITE_short_as_s_length 1
+ #define FSS_WRITE_short_backtick_s_length 1
+ #define FSS_WRITE_short_content_s_length 1
+ #define FSS_WRITE_short_content_end_s_length 1
+ #define FSS_WRITE_short_content_next_s_length 1
+ #define FSS_WRITE_short_double_s_length 1
+ #define FSS_WRITE_short_file_s_length 1
+ #define FSS_WRITE_short_ignore_s_length 1
+ #define FSS_WRITE_short_object_s_length 1
+ #define FSS_WRITE_short_object_open_s_length 1
+ #define FSS_WRITE_short_partial_s_length 1
+ #define FSS_WRITE_short_prepend_s_length 1
+ #define FSS_WRITE_short_single_s_length 1
+ #define FSS_WRITE_short_trim_s_length 1
+
+ #define FSS_WRITE_long_as_s_length 2
+ #define FSS_WRITE_long_backtick_s_length 8
+ #define FSS_WRITE_long_content_s_length 7
+ #define FSS_WRITE_long_content_end_s_length 11
+ #define FSS_WRITE_long_content_next_s_length 12
+ #define FSS_WRITE_long_double_s_length 6
+ #define FSS_WRITE_long_file_s_length 4
+ #define FSS_WRITE_long_ignore_s_length 6
+ #define FSS_WRITE_long_object_s_length 6
+ #define FSS_WRITE_long_object_open_s_length 11
+ #define FSS_WRITE_long_partial_s_length 7
+ #define FSS_WRITE_long_prepend_s_length 7
+ #define FSS_WRITE_long_single_s_length 6
+ #define FSS_WRITE_long_trim_s_length 4
+
+ extern const f_string_static_t fss_write_short_as_s;
+ extern const f_string_static_t fss_write_short_backtick_s;
+ extern const f_string_static_t fss_write_short_content_s;
+ extern const f_string_static_t fss_write_short_content_end_s;
+ extern const f_string_static_t fss_write_short_content_next_s;
+ extern const f_string_static_t fss_write_short_double_s;
+ extern const f_string_static_t fss_write_short_file_s;
+ extern const f_string_static_t fss_write_short_ignore_s;
+ extern const f_string_static_t fss_write_short_object_s;
+ extern const f_string_static_t fss_write_short_object_open_s;
+ extern const f_string_static_t fss_write_short_partial_s;
+ extern const f_string_static_t fss_write_short_prepend_s;
+ extern const f_string_static_t fss_write_short_single_s;
+ extern const f_string_static_t fss_write_short_trim_s;
+
+ extern const f_string_static_t fss_write_long_as_s;
+ extern const f_string_static_t fss_write_long_backtick_s;
+ extern const f_string_static_t fss_write_long_content_s;
+ extern const f_string_static_t fss_write_long_content_end_s;
+ extern const f_string_static_t fss_write_long_content_next_s;
+ extern const f_string_static_t fss_write_long_double_s;
+ extern const f_string_static_t fss_write_long_file_s;
+ extern const f_string_static_t fss_write_long_ignore_s;
+ extern const f_string_static_t fss_write_long_object_s;
+ extern const f_string_static_t fss_write_long_object_open_s;
+ extern const f_string_static_t fss_write_long_partial_s;
+ extern const f_string_static_t fss_write_long_prepend_s;
+ extern const f_string_static_t fss_write_long_single_s;
+ extern const f_string_static_t fss_write_long_trim_s;
+#endif // _di_fss_write_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fss_write_common_string_h
--- /dev/null
+#include "fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common data structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _fss_write_common_type_h
+#define _fss_write_common_type_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program default defines.
+ *
+ * fss_write_default_allocation_*:
+ * - large: An allocation step used for buffers that are anticipated to have large buffers.
+ * - small: An allocation step used for buffers that are anticipated to have small buffers.
+ */
+#ifndef _di_fss_write_default_d_
+ #define fss_write_default_allocation_large_d 2048
+ #define fss_write_default_allocation_small_d 128
+#endif // _di_fss_write_default_d_
+
+/**
+ * The program defines.
+ *
+ * macro_fss_write_setting:
+ * - Used to represent a cast to ((fss_write_setting_t *) setting).
+ * - Simplifies the number of parenthesis used to make code slightly cleaner.
+ * - Is wrapped in a parenthesis and not a block.
+ */
+#ifndef _di_fss_write_d_
+ #define fss_write_signal_check_d 20000
+
+ #define macro_fss_write_setting(setting) ((fss_write_setting_t *) setting)
+#endif // _di_fss_write_d_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * fss_write_flag_*_e:
+ * - none: No flags set.
+ * - content: The Content being written is specified.
+ * - content_end: The Content end characters are to be printed.
+ * - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
+ * - content_next: The Content next characters are to be printed.
+ * - copyright: Print copyright.
+ * - file_to: Using a specified destination file.
+ * - help: Print help.
+ * - ignore: Ignore a given range within a Content (specify flag before setting loading to designate ignores is supported by standard).
+ * - 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.
+ * - prepend: Prepend the given white space characters to the start of each multi-line Content.
+ * - trim: Trim Object names.
+ * - version: Print version.
+ */
+#ifndef _di_fss_write_flag_e_
+ enum {
+ fss_write_flag_none_e = 0x0,
+ fss_write_flag_content_e = 0x1,
+ fss_write_flag_content_end_e = 0x2,
+ fss_write_flag_content_multiple_e = 0x4,
+ fss_write_flag_content_next_e = 0x8,
+ fss_write_flag_copyright_e = 0x10,
+ fss_write_flag_file_to_e = 0x20,
+ fss_write_flag_help_e = 0x40,
+ fss_write_flag_ignore_e = 0x80,
+ fss_write_flag_object_e = 0x100,
+ fss_write_flag_object_open_e = 0x200,
+ fss_write_flag_partial_e = 0x400,
+ fss_write_flag_prepend_e = 0x800,
+ fss_write_flag_trim_e = 0x1000,
+ fss_write_flag_version_e = 0x2000,
+ }; // enum
+#endif // _di_fss_write_flag_e_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_fss_write_parameter_e_
+ enum {
+ fss_write_parameter_help_e,
+ fss_write_parameter_copyright_e,
+ fss_write_parameter_light_e,
+ fss_write_parameter_dark_e,
+ fss_write_parameter_no_color_e,
+ fss_write_parameter_verbosity_quiet_e,
+ fss_write_parameter_verbosity_error_e,
+ fss_write_parameter_verbosity_normal_e,
+ fss_write_parameter_verbosity_verbose_e,
+ fss_write_parameter_verbosity_debug_e,
+ fss_write_parameter_version_e,
+ fss_write_parameter_line_first_no_e,
+ fss_write_parameter_line_last_no_e,
+
+ fss_write_parameter_as_e,
+ fss_write_parameter_backtick_e,
+ fss_write_parameter_content_e,
+ fss_write_parameter_content_end_e,
+ fss_write_parameter_content_next_e,
+ fss_write_parameter_double_e,
+ fss_write_parameter_file_e,
+ fss_write_parameter_ignore_e,
+ fss_write_parameter_object_e,
+ fss_write_parameter_object_open_e,
+ fss_write_parameter_partial_e,
+ fss_write_parameter_prepend_e,
+ fss_write_parameter_single_e,
+ fss_write_parameter_trim_e,
+ }; // enum
+
+ #define fss_write_console_parameter_t_initialize \
+ { \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
+ \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_as_s, fss_write_long_as_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_backtick_s, fss_write_long_backtick_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_content_s, fss_write_long_content_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_content_end_s, fss_write_long_content_end_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_content_next_s, fss_write_long_content_next_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_double_s, fss_write_long_double_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_file_s, fss_write_long_file_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_ignore_s, fss_write_long_ignore_s, 2, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_object_s, fss_write_long_object_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_object_open_s, fss_write_long_object_open_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_partial_s, fss_write_long_partial_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_prepend_s, fss_write_long_prepend_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_single_s, fss_write_long_single_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(fss_write_short_trim_s, fss_write_long_trim_s, 0, f_console_flag_normal_e), \
+ }
+
+ #define fss_write_total_parameters_d 27
+#endif // _di_fss_write_parameter_e_
+
+/**
+ * The fss payload write 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).
+ *
+ * flag: Flags passed to the main function.
+ *
+ * status: The main status code, generally used by the load settings and main functions.
+ *
+ * state: The state data used when processing the FSS data.
+ * range: A range used as a buffer during processing.
+ *
+ * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
+ * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
+ *
+ * quote: This holds the quote used during processing.
+ * standard: A human-friendly string describing the standard in use, such as "FSS-0000 (Basic)".
+ *
+ * escaped: A buffer used for escaping strings during processing.
+ * block: A buffer used to storing one or more blocks while processing a file line by line.
+ * buffer: A buffer used during processing the file.
+ * prepend: A string to prepend to each multi-line Content.
+ *
+ * ignoress: An array of range sets passed as values to the "--ignore" parameter or via the input pipe.
+ * objects: An array of objects passed as values to the "--object" parameter or via the input pipe.
+ * contentss: An array of content sets passed as values to the "--content" parameter or via the input pipe.
+ *
+ * object: A pointer to a specific Object used during processing.
+ * content: A pointer to a specific Content used during processing.
+ * contents: A pointer to a specific set of Content used during processing.
+ *
+ * process_content: Process a single Content.
+ * process_help: Process help (generally printing help).
+ * process_normal: Process normally (data from parameters and files).
+ * process_object: Process a single Object.
+ * process_pipe: Process using the data from input pipe.
+ * process_set: Process a set of Object and one or more Content.
+ */
+#ifndef _di_fss_write_setting_t_
+ typedef struct {
+ uint16_t flag;
+
+ f_status_t status;
+
+ f_state_t state;
+ f_string_range_t range;
+
+ f_string_static_t line_first;
+ f_string_static_t line_last;
+
+ f_string_static_t quote;
+ f_string_static_t standard;
+
+ f_string_dynamic_t escaped;
+ f_string_dynamic_t block;
+ f_string_dynamic_t buffer;
+ f_string_dynamic_t prepend;
+
+ f_string_rangess_t ignoress;
+ f_string_dynamics_t objects;
+ f_string_dynamicss_t contentss;
+
+ f_string_ranges_t *ignores;
+ f_string_static_t *object;
+ f_string_static_t *content;
+ f_string_statics_t *contents;
+
+ void (*process_content)(fll_program_data_t * const main, void * const setting, const bool last);
+ void (*process_help)(fll_program_data_t * const main, void * const setting);
+ void (*process_normal)(fll_program_data_t * const main, void * const setting);
+ void (*process_object)(fll_program_data_t * const main, void * const setting);
+ void (*process_pipe)(fll_program_data_t * const main, void * const setting);
+ void (*process_set)(fll_program_data_t * const main, void * const setting);
+ } fss_write_setting_t;
+
+ #define fss_write_setting_t_initialize \
+ { \
+ fss_write_flag_none_e, \
+ F_none, \
+ macro_f_state_t_initialize(fss_write_default_allocation_large_d, fss_write_default_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, 0, 0), \
+ f_string_range_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_rangess_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamicss_t_initialize, \
+ 0, \
+ 0, \
+ 0, \
+ 0, \
+ 0, \
+ 0, \
+ 0, \
+ 0, \
+ 0, \
+ 0, \
+ }
+#endif // _di_fss_write_setting_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fss_write_common_type_h
extern "C" {
#endif
-#ifndef _di_fss_write_program_version_s_
- const f_string_static_t fss_write_program_version_s = macro_f_string_static_t_initialize(FSS_WRITE_program_version_s, 0, FSS_WRITE_program_version_s_length);
-#endif // _di_fss_write_program_version_s_
-
-#ifndef _di_fss_write_program_name_s_
- const f_string_static_t fss_write_program_name_s = macro_f_string_static_t_initialize(FSS_WRITE_program_name_s, 0, FSS_WRITE_program_name_s_length);
- const f_string_static_t fss_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_WRITE_program_name_long_s, 0, FSS_WRITE_program_name_long_s_length);
-#endif // _di_fss_write_program_name_s_
-
-#ifndef _di_fss_write_pipe_s_
- const f_string_static_t fss_write_pipe_content_end_s = macro_f_string_static_t_initialize(FSS_WRITE_pipe_content_end_s, 0, FSS_WRITE_pipe_content_end_s_length);
- const f_string_static_t fss_write_pipe_content_ignore_s = macro_f_string_static_t_initialize(FSS_WRITE_pipe_content_ignore_s, 0, FSS_WRITE_pipe_content_ignore_s_length);
- const f_string_static_t fss_write_pipe_content_start_s = macro_f_string_static_t_initialize(FSS_WRITE_pipe_content_start_s, 0, FSS_WRITE_pipe_content_start_s_length);
-#endif // _di_fss_write_pipe_s_
-
-#ifndef _di_fss_write_s_
- const f_string_static_t fss_write_string_two_s = macro_f_string_static_t_initialize(FSS_WRITE_string_two_s, 0, FSS_WRITE_string_two_s_length);
-#endif // _di_fss_write_s_
-
-#ifndef _di_fss_write_parameter_d_
- const f_string_static_t fss_write_short_as_s = macro_f_string_static_t_initialize(FSS_WRITE_short_as_s, 0, FSS_WRITE_short_as_s_length);
- const f_string_static_t fss_write_short_backtick_s = macro_f_string_static_t_initialize(FSS_WRITE_short_backtick_s, 0, FSS_WRITE_short_backtick_s_length);
- const f_string_static_t fss_write_short_content_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_s, 0, FSS_WRITE_short_content_s_length);
- const f_string_static_t fss_write_short_content_end_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_end_s, 0, FSS_WRITE_short_content_end_s_length);
- const f_string_static_t fss_write_short_content_next_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_next_s, 0, FSS_WRITE_short_content_next_s_length);
- const f_string_static_t fss_write_short_double_s = macro_f_string_static_t_initialize(FSS_WRITE_short_double_s, 0, FSS_WRITE_short_double_s_length);
- const f_string_static_t fss_write_short_file_s = macro_f_string_static_t_initialize(FSS_WRITE_short_file_s, 0, FSS_WRITE_short_file_s_length);
- const f_string_static_t fss_write_short_ignore_s = macro_f_string_static_t_initialize(FSS_WRITE_short_ignore_s, 0, FSS_WRITE_short_ignore_s_length);
- const f_string_static_t fss_write_short_object_s = macro_f_string_static_t_initialize(FSS_WRITE_short_object_s, 0, FSS_WRITE_short_object_s_length);
- const f_string_static_t fss_write_short_object_open_s = macro_f_string_static_t_initialize(FSS_WRITE_short_object_open_s, 0, FSS_WRITE_short_object_open_s_length);
- const f_string_static_t fss_write_short_partial_s = macro_f_string_static_t_initialize(FSS_WRITE_short_partial_s, 0, FSS_WRITE_short_partial_s_length);
- const f_string_static_t fss_write_short_prepend_s = macro_f_string_static_t_initialize(FSS_WRITE_short_prepend_s, 0, FSS_WRITE_short_prepend_s_length);
- const f_string_static_t fss_write_short_single_s = macro_f_string_static_t_initialize(FSS_WRITE_short_single_s, 0, FSS_WRITE_short_single_s_length);
- const f_string_static_t fss_write_short_trim_s = macro_f_string_static_t_initialize(FSS_WRITE_short_trim_s, 0, FSS_WRITE_short_trim_s_length);
-
- const f_string_static_t fss_write_long_as_s = macro_f_string_static_t_initialize(FSS_WRITE_long_as_s, 0, FSS_WRITE_long_as_s_length);
- const f_string_static_t fss_write_long_backtick_s = macro_f_string_static_t_initialize(FSS_WRITE_long_backtick_s, 0, FSS_WRITE_long_backtick_s_length);
- const f_string_static_t fss_write_long_content_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_s, 0, FSS_WRITE_long_content_s_length);
- const f_string_static_t fss_write_long_content_end_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_end_s, 0, FSS_WRITE_long_content_end_s_length);
- const f_string_static_t fss_write_long_content_next_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_next_s, 0, FSS_WRITE_long_content_next_s_length);
- const f_string_static_t fss_write_long_double_s = macro_f_string_static_t_initialize(FSS_WRITE_long_double_s, 0, FSS_WRITE_long_double_s_length);
- const f_string_static_t fss_write_long_file_s = macro_f_string_static_t_initialize(FSS_WRITE_long_file_s, 0, FSS_WRITE_long_file_s_length);
- const f_string_static_t fss_write_long_ignore_s = macro_f_string_static_t_initialize(FSS_WRITE_long_ignore_s, 0, FSS_WRITE_long_ignore_s_length);
- const f_string_static_t fss_write_long_object_s = macro_f_string_static_t_initialize(FSS_WRITE_long_object_s, 0, FSS_WRITE_long_object_s_length);
- const f_string_static_t fss_write_long_object_open_s = macro_f_string_static_t_initialize(FSS_WRITE_long_object_open_s, 0, FSS_WRITE_long_object_open_s_length);
- const f_string_static_t fss_write_long_partial_s = macro_f_string_static_t_initialize(FSS_WRITE_long_partial_s, 0, FSS_WRITE_long_partial_s_length);
- const f_string_static_t fss_write_long_prepend_s = macro_f_string_static_t_initialize(FSS_WRITE_long_prepend_s, 0, FSS_WRITE_long_prepend_s_length);
- const f_string_static_t fss_write_long_single_s = macro_f_string_static_t_initialize(FSS_WRITE_long_single_s, 0, FSS_WRITE_long_single_s_length);
- const f_string_static_t fss_write_long_trim_s = macro_f_string_static_t_initialize(FSS_WRITE_long_trim_s, 0, FSS_WRITE_long_trim_s_length);
-#endif // _di_fss_write_parameter_d_
-
#ifndef _di_fss_write_setting_delete_
f_status_t fss_write_setting_delete(fss_write_setting_t * const setting) {
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
#endif
/**
- * The program version.
- */
-#ifndef _di_fss_write_program_version_s_
- #define FSS_WRITE_program_version_major_s F_string_ascii_0_s
- #define FSS_WRITE_program_version_minor_s F_string_ascii_7_s
- #define FSS_WRITE_program_version_micro_s F_string_ascii_0_s
-
- #define FSS_WRITE_program_version_major_s_length F_string_ascii_0_s_length
- #define FSS_WRITE_program_version_minor_s_length F_string_ascii_7_s_length
- #define FSS_WRITE_program_version_micro_s_length F_string_ascii_0_s_length
-
- #if !(defined(FSS_WRITE_program_version_nano_prefix_s) && defined(FSS_WRITE_program_version_nano_prefix_s_length))
- #define FSS_WRITE_program_version_nano_prefix_s
- #define FSS_WRITE_program_version_nano_prefix_s_length 0
- #endif // !(defined(FSS_WRITE_program_version_nano_prefix_s) && defined(FSS_WRITE_program_version_nano_prefix_s_length))
-
- #if !(defined(FSS_WRITE_program_version_nano_s) && defined(FSS_WRITE_program_version_nano_s_length))
- #define FSS_WRITE_program_version_nano_s
- #define FSS_WRITE_program_version_nano_s_length 0
- #endif // !(defined(FSS_WRITE_program_version_nano_s) && defined(FSS_WRITE_program_version_nano_s_length))
-
- #define FSS_WRITE_program_version_s FSS_WRITE_program_version_major_s F_string_ascii_period_s FSS_WRITE_program_version_minor_s F_string_ascii_period_s FSS_WRITE_program_version_micro_s FSS_WRITE_program_version_nano_prefix_s FSS_WRITE_program_version_nano_s
-
- #define FSS_WRITE_program_version_s_length FSS_WRITE_program_version_major_s_length + F_string_ascii_period_s_length + FSS_WRITE_program_version_minor_s_length + F_string_ascii_period_s_length + FSS_WRITE_program_version_micro_s_length + FSS_WRITE_program_version_nano_prefix_s_length + FSS_WRITE_program_version_nano_s_length
-
- extern const f_string_static_t fss_write_program_version_s;
-#endif // _di_fss_write_program_version_s_
-
-/**
- * The program name.
- */
-#ifndef _di_fss_write_program_name_s_
- #define FSS_WRITE_program_name_s "fss_write"
- #define FSS_WRITE_program_name_long_s "FSS Write"
-
- #define FSS_WRITE_program_name_s_length 9
- #define FSS_WRITE_program_name_long_s_length 9
-
- extern const f_string_static_t fss_write_program_name_s;
- extern const f_string_static_t fss_write_program_name_long_s;
-#endif // _di_fss_write_program_name_s_
-
-/**
- * The program default defines.
- *
- * fss_write_default_allocation_*:
- * - large: An allocation step used for buffers that are anticipated to have large buffers.
- * - small: An allocation step used for buffers that are anticipated to have small buffers.
- */
-#ifndef _di_fss_write_default_d_
- #define fss_write_default_allocation_large_d 2048
- #define fss_write_default_allocation_small_d 128
-#endif // _di_fss_write_default_d_
-
-/**
- * The program defines.
- *
- * macro_fss_write_setting:
- * - Used to represent a cast to ((fss_write_setting_t *) setting).
- * - Simplifies the number of parenthesis used to make code slightly cleaner.
- * - Is wrapped in a parenthesis and not a block.
- */
-#ifndef _di_fss_write_d_
- #define fss_write_signal_check_d 20000
-
- #define macro_fss_write_setting(setting) ((fss_write_setting_t *) setting)
-#endif // _di_fss_write_d_
-
-/**
- * The program pipe strings.
- *
- * The fss_write_pipe_content_*_s strings are strings rather than characters to allow for wide characters.
- *
- * fss_write_pipe_content_*_s:
- * - end: The character representing the end of content.
- * - ignore: The character representing the start of or end of a set of characters to ignore.
- * - start: The character representing the start of content.
- *
- * macro_fss_write_setting:
- * - Used to represent a cast to ((fss_write_setting_t *) setting).
- * - Simplifies the number of parenthesis used to make code slightly cleaner.
- * - Is wrapped in a parenthesis and not a block.
- */
-#ifndef _di_fss_write_pipe_s_
- #define FSS_WRITE_pipe_content_end_s "\f"
- #define FSS_WRITE_pipe_content_ignore_s "\v"
- #define FSS_WRITE_pipe_content_start_s "\b"
-
- #define FSS_WRITE_pipe_content_end_s_length 1
- #define FSS_WRITE_pipe_content_ignore_s_length 1
- #define FSS_WRITE_pipe_content_start_s_length 1
-
- extern const f_string_static_t fss_write_pipe_content_end_s;
- extern const f_string_static_t fss_write_pipe_content_ignore_s;
- extern const f_string_static_t fss_write_pipe_content_start_s;
-#endif // _di_fss_write_pipe_s_
-
-/**
- * A collection of static strings associated with FSS Payload Write.
- */
-#ifndef _di_fss_write_s_
- #define FSS_WRITE_string_two_s "two"
-
- #define FSS_WRITE_string_two_s_length 3
-
- extern const f_string_static_t fss_write_string_two_s;
-#endif // _di_fss_write_s_
-
-/**
- * The main program parameters.
- */
-#ifndef _di_fss_write_parameter_d_
- #define FSS_WRITE_short_as_s "a"
- #define FSS_WRITE_short_backtick_s "b"
- #define FSS_WRITE_short_content_s "c"
- #define FSS_WRITE_short_content_end_s "E"
- #define FSS_WRITE_short_content_next_s "N"
- #define FSS_WRITE_short_double_s "d"
- #define FSS_WRITE_short_file_s "f"
- #define FSS_WRITE_short_ignore_s "I"
- #define FSS_WRITE_short_object_s "o"
- #define FSS_WRITE_short_object_open_s "O"
- #define FSS_WRITE_short_partial_s "p"
- #define FSS_WRITE_short_prepend_s "P"
- #define FSS_WRITE_short_single_s "s"
- #define FSS_WRITE_short_trim_s "T"
-
- #define FSS_WRITE_long_as_s "as"
- #define FSS_WRITE_long_backtick_s "backtick"
- #define FSS_WRITE_long_content_s "content"
- #define FSS_WRITE_long_content_end_s "content_end"
- #define FSS_WRITE_long_content_next_s "content_next"
- #define FSS_WRITE_long_double_s "double"
- #define FSS_WRITE_long_file_s "file"
- #define FSS_WRITE_long_ignore_s "ignore"
- #define FSS_WRITE_long_object_s "object"
- #define FSS_WRITE_long_object_open_s "object_open"
- #define FSS_WRITE_long_partial_s "partial"
- #define FSS_WRITE_long_prepend_s "prepend"
- #define FSS_WRITE_long_single_s "single"
- #define FSS_WRITE_long_trim_s "trim"
-
- #define FSS_WRITE_short_as_s_length 1
- #define FSS_WRITE_short_backtick_s_length 1
- #define FSS_WRITE_short_content_s_length 1
- #define FSS_WRITE_short_content_end_s_length 1
- #define FSS_WRITE_short_content_next_s_length 1
- #define FSS_WRITE_short_double_s_length 1
- #define FSS_WRITE_short_file_s_length 1
- #define FSS_WRITE_short_ignore_s_length 1
- #define FSS_WRITE_short_object_s_length 1
- #define FSS_WRITE_short_object_open_s_length 1
- #define FSS_WRITE_short_partial_s_length 1
- #define FSS_WRITE_short_prepend_s_length 1
- #define FSS_WRITE_short_single_s_length 1
- #define FSS_WRITE_short_trim_s_length 1
-
- #define FSS_WRITE_long_as_s_length 2
- #define FSS_WRITE_long_backtick_s_length 8
- #define FSS_WRITE_long_content_s_length 7
- #define FSS_WRITE_long_content_end_s_length 11
- #define FSS_WRITE_long_content_next_s_length 12
- #define FSS_WRITE_long_double_s_length 6
- #define FSS_WRITE_long_file_s_length 4
- #define FSS_WRITE_long_ignore_s_length 6
- #define FSS_WRITE_long_object_s_length 6
- #define FSS_WRITE_long_object_open_s_length 11
- #define FSS_WRITE_long_partial_s_length 7
- #define FSS_WRITE_long_prepend_s_length 7
- #define FSS_WRITE_long_single_s_length 6
- #define FSS_WRITE_long_trim_s_length 4
-
- extern const f_string_static_t fss_write_short_as_s;
- extern const f_string_static_t fss_write_short_backtick_s;
- extern const f_string_static_t fss_write_short_content_s;
- extern const f_string_static_t fss_write_short_content_end_s;
- extern const f_string_static_t fss_write_short_content_next_s;
- extern const f_string_static_t fss_write_short_double_s;
- extern const f_string_static_t fss_write_short_file_s;
- extern const f_string_static_t fss_write_short_ignore_s;
- extern const f_string_static_t fss_write_short_object_s;
- extern const f_string_static_t fss_write_short_object_open_s;
- extern const f_string_static_t fss_write_short_partial_s;
- extern const f_string_static_t fss_write_short_prepend_s;
- extern const f_string_static_t fss_write_short_single_s;
- extern const f_string_static_t fss_write_short_trim_s;
-
- extern const f_string_static_t fss_write_long_as_s;
- extern const f_string_static_t fss_write_long_backtick_s;
- extern const f_string_static_t fss_write_long_content_s;
- extern const f_string_static_t fss_write_long_content_end_s;
- extern const f_string_static_t fss_write_long_content_next_s;
- extern const f_string_static_t fss_write_long_double_s;
- extern const f_string_static_t fss_write_long_file_s;
- extern const f_string_static_t fss_write_long_ignore_s;
- extern const f_string_static_t fss_write_long_object_s;
- extern const f_string_static_t fss_write_long_object_open_s;
- extern const f_string_static_t fss_write_long_partial_s;
- extern const f_string_static_t fss_write_long_prepend_s;
- extern const f_string_static_t fss_write_long_single_s;
- extern const f_string_static_t fss_write_long_trim_s;
-
- enum {
- fss_write_parameter_help_e,
- fss_write_parameter_copyright_e,
- fss_write_parameter_light_e,
- fss_write_parameter_dark_e,
- fss_write_parameter_no_color_e,
- fss_write_parameter_verbosity_quiet_e,
- fss_write_parameter_verbosity_error_e,
- fss_write_parameter_verbosity_normal_e,
- fss_write_parameter_verbosity_verbose_e,
- fss_write_parameter_verbosity_debug_e,
- fss_write_parameter_version_e,
- fss_write_parameter_line_first_no_e,
- fss_write_parameter_line_last_no_e,
-
- fss_write_parameter_as_e,
- fss_write_parameter_backtick_e,
- fss_write_parameter_content_e,
- fss_write_parameter_content_end_e,
- fss_write_parameter_content_next_e,
- fss_write_parameter_double_e,
- fss_write_parameter_file_e,
- fss_write_parameter_ignore_e,
- fss_write_parameter_object_e,
- fss_write_parameter_object_open_e,
- fss_write_parameter_partial_e,
- fss_write_parameter_prepend_e,
- fss_write_parameter_single_e,
- fss_write_parameter_trim_e,
- }; // enum
-
- #define fss_write_console_parameter_t_initialize \
- { \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
- \
- macro_f_console_parameter_t_initialize_3(fss_write_short_as_s, fss_write_long_as_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_backtick_s, fss_write_long_backtick_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_content_s, fss_write_long_content_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_content_end_s, fss_write_long_content_end_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_content_next_s, fss_write_long_content_next_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_double_s, fss_write_long_double_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_file_s, fss_write_long_file_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_ignore_s, fss_write_long_ignore_s, 2, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_object_s, fss_write_long_object_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_object_open_s, fss_write_long_object_open_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_partial_s, fss_write_long_partial_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_prepend_s, fss_write_long_prepend_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_single_s, fss_write_long_single_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(fss_write_short_trim_s, fss_write_long_trim_s, 0, f_console_flag_normal_e), \
- }
-
- #define fss_write_total_parameters_d 27
-#endif // _di_fss_write_parameter_d_
-
-/**
- * Flags passed to the main function or program.
- *
- * fss_write_flag_*_e:
- * - none: No flags set.
- * - content: The Content being written is specified.
- * - content_end: The Content end characters are to be printed.
- * - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
- * - content_next: The Content next characters are to be printed.
- * - copyright: Print copyright.
- * - file_to: Using a specified destination file.
- * - help: Print help.
- * - ignore: Ignore a given range within a Content (specify flag before setting loading to designate ignores is supported by standard).
- * - 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.
- * - prepend: Prepend the given white space characters to the start of each multi-line Content.
- * - trim: Trim Object names.
- * - version: Print version.
- */
-#ifndef _di_fss_write_flag_e_
- enum {
- fss_write_flag_none_e = 0x0,
- fss_write_flag_content_e = 0x1,
- fss_write_flag_content_end_e = 0x2,
- fss_write_flag_content_multiple_e = 0x4,
- fss_write_flag_content_next_e = 0x8,
- fss_write_flag_copyright_e = 0x10,
- fss_write_flag_file_to_e = 0x20,
- fss_write_flag_help_e = 0x40,
- fss_write_flag_ignore_e = 0x80,
- fss_write_flag_object_e = 0x100,
- fss_write_flag_object_open_e = 0x200,
- fss_write_flag_partial_e = 0x400,
- fss_write_flag_prepend_e = 0x800,
- fss_write_flag_trim_e = 0x1000,
- fss_write_flag_version_e = 0x2000,
- }; // enum
-#endif // _di_fss_write_flag_e_
-
-/**
- * The fss payload write 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).
- *
- * flag: Flags passed to the main function.
- *
- * status: The main status code, generally used by the load settings and main functions.
- *
- * state: The state data used when processing the FSS data.
- * range: A range used as a buffer during processing.
- *
- * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
- * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
- *
- * quote: This holds the quote used during processing.
- * standard: A human-friendly string describing the standard in use, such as "FSS-0000 (Basic)".
- *
- * escaped: A buffer used for escaping strings during processing.
- * block: A buffer used to storing one or more blocks while processing a file line by line.
- * buffer: A buffer used during processing the file.
- * prepend: A string to prepend to each multi-line Content.
- *
- * ignoress: An array of range sets passed as values to the "--ignore" parameter or via the input pipe.
- * objects: An array of objects passed as values to the "--object" parameter or via the input pipe.
- * contentss: An array of content sets passed as values to the "--content" parameter or via the input pipe.
- *
- * object: A pointer to a specific Object used during processing.
- * content: A pointer to a specific Content used during processing.
- * contents: A pointer to a specific set of Content used during processing.
- *
- * process_content: Process a single Content.
- * process_help: Process help (generally printing help).
- * process_normal: Process normally (data from parameters and files).
- * process_object: Process a single Object.
- * process_pipe: Process using the data from input pipe.
- * process_set: Process a set of Object and one or more Content.
- */
-#ifndef _di_fss_write_setting_t_
- typedef struct {
- uint16_t flag;
-
- f_status_t status;
-
- f_state_t state;
- f_string_range_t range;
-
- f_string_static_t line_first;
- f_string_static_t line_last;
-
- f_string_static_t quote;
- f_string_static_t standard;
-
- f_string_dynamic_t escaped;
- f_string_dynamic_t block;
- f_string_dynamic_t buffer;
- f_string_dynamic_t prepend;
-
- f_string_rangess_t ignoress;
- f_string_dynamics_t objects;
- f_string_dynamicss_t contentss;
-
- f_string_ranges_t *ignores;
- f_string_static_t *object;
- f_string_static_t *content;
- f_string_statics_t *contents;
-
- void (*process_content)(fll_program_data_t * const main, void * const setting, const bool last);
- void (*process_help)(fll_program_data_t * const main, void * const setting);
- void (*process_normal)(fll_program_data_t * const main, void * const setting);
- void (*process_object)(fll_program_data_t * const main, void * const setting);
- void (*process_pipe)(fll_program_data_t * const main, void * const setting);
- void (*process_set)(fll_program_data_t * const main, void * const setting);
- } fss_write_setting_t;
-
- #define fss_write_setting_t_initialize \
- { \
- fss_write_flag_none_e, \
- F_none, \
- macro_f_state_t_initialize(fss_write_default_allocation_large_d, fss_write_default_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, 0, 0), \
- f_string_range_t_initialize, \
- f_string_static_t_initialize, \
- f_string_static_t_initialize, \
- f_string_static_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_rangess_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamicss_t_initialize, \
- 0, \
- 0, \
- 0, \
- 0, \
- 0, \
- 0, \
- 0, \
- 0, \
- 0, \
- 0, \
- }
-#endif // _di_fss_write_setting_t_
-
-/**
* Delete the program main setting data.
*
* @param setting
#include <fll/level_2/program.h>
// FSS Write includes.
-#include <program/fss_write/main/common.h>
#include <program/fss_write/main/common-print.h>
+#include <program/fss_write/main/common-string.h>
+#include <program/fss_write/main/common-type.h>
+#include <program/fss_write/main/common.h>
#include <program/fss_write/main/print.h>
#ifdef __cplusplus
#include <fll/level_2/program.h>
// FSS Write includes.
-#include <program/fss_write/main/common.h>
#include <program/fss_write/main/common-print.h>
+#include <program/fss_write/main/common-string.h>
+#include <program/fss_write/main/common-type.h>
+#include <program/fss_write/main/common.h>
#include <program/fss_write/payload/common.h>
#include <program/fss_write/main/print.h>
#include <program/fss_write/payload/print.h>
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/fss_write.c main/common.c main/common-print.c main/print.c
+build_sources_library main/fss_write.c main/common.c main/common-print.c main/common-string.c main/common-type.c main/print.c
build_sources_library basic/fss_write.c basic/common.c basic/print.c
build_sources_library basic_list/fss_write.c basic_list/common.c basic_list/print.c
build_sources_library embedded_list/fss_write.c embedded_list/common.c embedded_list/print.c
build_sources_library extended_list/fss_write.c extended_list/common.c extended_list/print.c
build_sources_library payload/fss_write.c payload/common.c payload/print.c
-build_sources_headers main/fss_write.h main/common.h main/common-print.h main/print.h main/private-common.h
+build_sources_headers main/fss_write.h main/common.h main/common-print.h main/common-string.h main/common-type.h main/print.h main/private-common.h
build_sources_headers basic/fss_write.h basic/common.h basic/print.h basic/private-common.h
build_sources_headers basic_list/fss_write.h basic_list/common.h basic_list/print.h
build_sources_headers embedded_list/fss_write.h embedded_list/common.h embedded_list/print.h
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common print functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
--- /dev/null
+#include "iki_read.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_iki_read_program_version_s_
+ const f_string_static_t iki_read_program_version_s = macro_f_string_static_t_initialize(IKI_READ_program_version_s, 0, IKI_READ_program_version_s_length);
+#endif // _di_iki_read_program_version_s_
+
+#ifndef _di_iki_read_program_name_s_
+ const f_string_static_t iki_read_program_name_s = macro_f_string_static_t_initialize(IKI_READ_program_name_s, 0, IKI_READ_program_name_s_length);
+ const f_string_static_t iki_read_program_name_long_s = macro_f_string_static_t_initialize(IKI_READ_program_name_long_s, 0, IKI_READ_program_name_long_s_length);
+#endif // _di_iki_read_program_name_s_
+
+#ifndef _di_iki_read_s_
+ const f_string_static_t iki_read_string_two_s = macro_f_string_static_t_initialize(IKI_READ_string_two_s, 0, IKI_READ_string_two_s_length);
+ const f_string_static_t iki_read_string_three_s = macro_f_string_static_t_initialize(IKI_READ_string_three_s, 0, IKI_READ_string_three_s_length);
+#endif // _di_iki_read_s_
+
+#ifndef _di_iki_read_substitution_s_
+ const f_string_static_t iki_read_substitution_after_s = macro_f_string_static_t_initialize(IKI_READ_substitution_after_s, 0, IKI_READ_substitution_after_s_length);
+ const f_string_static_t iki_read_substitution_before_s = macro_f_string_static_t_initialize(IKI_READ_substitution_before_s, 0, IKI_READ_substitution_before_s_length);
+ const f_string_static_t iki_read_substitution_replace_s = macro_f_string_static_t_initialize(IKI_READ_substitution_replace_s, 0, IKI_READ_substitution_replace_s_length);
+ const f_string_static_t iki_read_substitution_vocabulary_s = macro_f_string_static_t_initialize(IKI_READ_substitution_vocabulary_s, 0, IKI_READ_substitution_vocabulary_s_length);
+ const f_string_static_t iki_read_substitution_with_s = macro_f_string_static_t_initialize(IKI_READ_substitution_with_s, 0, IKI_READ_substitution_with_s_length);
+#endif // _di_iki_read_substitution_s_
+
+#ifndef _di_iki_read_parameter_s_
+ const f_string_static_t iki_read_short_at_s = macro_f_string_static_t_initialize(IKI_READ_short_at_s, 0, IKI_READ_short_at_s_length);
+ const f_string_static_t iki_read_short_content_s = macro_f_string_static_t_initialize(IKI_READ_short_content_s, 0, IKI_READ_short_content_s_length);
+ const f_string_static_t iki_read_short_line_s = macro_f_string_static_t_initialize(IKI_READ_short_line_s, 0, IKI_READ_short_line_s_length);
+ const f_string_static_t iki_read_short_literal_s = macro_f_string_static_t_initialize(IKI_READ_short_literal_s, 0, IKI_READ_short_literal_s_length);
+ const f_string_static_t iki_read_short_name_s = macro_f_string_static_t_initialize(IKI_READ_short_name_s, 0, IKI_READ_short_name_s_length);
+ const f_string_static_t iki_read_short_object_s = macro_f_string_static_t_initialize(IKI_READ_short_object_s, 0, IKI_READ_short_object_s_length);
+ const f_string_static_t iki_read_short_reassign_s = macro_f_string_static_t_initialize(IKI_READ_short_reassign_s, 0, IKI_READ_short_reassign_s_length);
+ const f_string_static_t iki_read_short_replace_s = macro_f_string_static_t_initialize(IKI_READ_short_replace_s, 0, IKI_READ_short_replace_s_length);
+ const f_string_static_t iki_read_short_substitute_s = macro_f_string_static_t_initialize(IKI_READ_short_substitute_s, 0, IKI_READ_short_substitute_s_length);
+ const f_string_static_t iki_read_short_total_s = macro_f_string_static_t_initialize(IKI_READ_short_total_s, 0, IKI_READ_short_total_s_length);
+ const f_string_static_t iki_read_short_whole_s = macro_f_string_static_t_initialize(IKI_READ_short_whole_s, 0, IKI_READ_short_whole_s_length);
+ const f_string_static_t iki_read_short_wrap_s = macro_f_string_static_t_initialize(IKI_READ_short_wrap_s, 0, IKI_READ_short_wrap_s_length);
+
+ const f_string_static_t iki_read_long_at_s = macro_f_string_static_t_initialize(IKI_READ_long_at_s, 0, IKI_READ_long_at_s_length);
+ const f_string_static_t iki_read_long_content_s = macro_f_string_static_t_initialize(IKI_READ_long_content_s, 0, IKI_READ_long_content_s_length);
+ const f_string_static_t iki_read_long_line_s = macro_f_string_static_t_initialize(IKI_READ_long_line_s, 0, IKI_READ_long_line_s_length);
+ const f_string_static_t iki_read_long_literal_s = macro_f_string_static_t_initialize(IKI_READ_long_literal_s, 0, IKI_READ_long_literal_s_length);
+ const f_string_static_t iki_read_long_name_s = macro_f_string_static_t_initialize(IKI_READ_long_name_s, 0, IKI_READ_long_name_s_length);
+ const f_string_static_t iki_read_long_object_s = macro_f_string_static_t_initialize(IKI_READ_long_object_s, 0, IKI_READ_long_object_s_length);
+ const f_string_static_t iki_read_long_reassign_s = macro_f_string_static_t_initialize(IKI_READ_long_reassign_s, 0, IKI_READ_long_reassign_s_length);
+ const f_string_static_t iki_read_long_replace_s = macro_f_string_static_t_initialize(IKI_READ_long_replace_s, 0, IKI_READ_long_replace_s_length);
+ const f_string_static_t iki_read_long_substitute_s = macro_f_string_static_t_initialize(IKI_READ_long_substitute_s, 0, IKI_READ_long_substitute_s_length);
+ const f_string_static_t iki_read_long_total_s = macro_f_string_static_t_initialize(IKI_READ_long_total_s, 0, IKI_READ_long_total_s_length);
+ const f_string_static_t iki_read_long_whole_s = macro_f_string_static_t_initialize(IKI_READ_long_whole_s, 0, IKI_READ_long_whole_s_length);
+ const f_string_static_t iki_read_long_wrap_s = macro_f_string_static_t_initialize(IKI_READ_long_wrap_s, 0, IKI_READ_long_wrap_s_length);
+#endif // _di_iki_read_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common string structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_read_common_string_h
+#define _iki_read_common_string_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program version.
+ */
+#ifndef _di_iki_read_program_version_s_
+ #define IKI_READ_program_version_major_s F_string_ascii_0_s
+ #define IKI_READ_program_version_minor_s F_string_ascii_7_s
+ #define IKI_READ_program_version_micro_s F_string_ascii_0_s
+
+ #define IKI_READ_program_version_major_s_length F_string_ascii_0_s_length
+ #define IKI_READ_program_version_minor_s_length F_string_ascii_7_s_length
+ #define IKI_READ_program_version_micro_s_length F_string_ascii_0_s_length
+
+ #if !(defined(IKI_READ_program_version_nano_prefix_s) && defined(IKI_READ_program_version_nano_prefix_s_length))
+ #define IKI_READ_program_version_nano_prefix_s
+ #define IKI_READ_program_version_nano_prefix_s_length 0
+ #endif // !(defined(IKI_READ_program_version_nano_prefix_s) && defined(IKI_READ_program_version_nano_prefix_s_length))
+
+ #if !(defined(IKI_READ_program_version_nano_s) && defined(IKI_READ_program_version_nano_s_length))
+ #define IKI_READ_program_version_nano_s
+ #define IKI_READ_program_version_nano_s_length 0
+ #endif // !(defined(IKI_READ_program_version_nano_s) && defined(IKI_READ_program_version_nano_s_length))
+
+ #define IKI_READ_program_version_s IKI_READ_program_version_major_s F_string_ascii_period_s IKI_READ_program_version_minor_s F_string_ascii_period_s IKI_READ_program_version_micro_s IKI_READ_program_version_nano_prefix_s IKI_READ_program_version_nano_s
+
+ #define IKI_READ_program_version_s_length IKI_READ_program_version_major_s_length + F_string_ascii_period_s_length + IKI_READ_program_version_minor_s_length + F_string_ascii_period_s_length + IKI_READ_program_version_micro_s_length + IKI_READ_program_version_nano_prefix_s_length + IKI_READ_program_version_nano_s_length
+
+ extern const f_string_static_t iki_read_program_version_s;
+#endif // _di_iki_read_program_version_s_
+
+/**
+ * The program name.
+ */
+#ifndef _di_iki_read_program_name_s_
+ #define IKI_READ_program_name_s "iki_read"
+ #define IKI_READ_program_name_long_s "IKI Read"
+
+ #define IKI_READ_program_name_s_length 8
+ #define IKI_READ_program_name_long_s_length 8
+
+ extern const f_string_static_t iki_read_program_name_s;
+ extern const f_string_static_t iki_read_program_name_long_s;
+#endif // _di_iki_read_program_name_s_
+
+/**
+ * The program defines.
+ */
+#ifndef _di_iki_read_d_
+ #define iki_read_signal_check_d 20000
+#endif // _di_iki_read_d_
+
+/**
+ * A collection of static strings associated with IKI Read.
+ */
+#ifndef _di_iki_read_s_
+ #define IKI_READ_string_two_s "two"
+ #define IKI_READ_string_three_s "three"
+
+ #define IKI_READ_string_two_s_length 3
+ #define IKI_READ_string_three_s_length 5
+
+ extern const f_string_static_t iki_read_string_two_s;
+ extern const f_string_static_t iki_read_string_three_s;
+#endif // _di_iki_read_s_
+
+#ifndef _di_iki_read_substitution_s_
+ #define IKI_READ_substitution_after_s "after"
+ #define IKI_READ_substitution_before_s "before"
+ #define IKI_READ_substitution_replace_s "replace"
+ #define IKI_READ_substitution_vocabulary_s "vocabulary"
+ #define IKI_READ_substitution_with_s "with"
+
+ #define IKI_READ_substitution_after_s_length 5
+ #define IKI_READ_substitution_before_s_length 6
+ #define IKI_READ_substitution_replace_s_length 7
+ #define IKI_READ_substitution_vocabulary_s_length 10
+ #define IKI_READ_substitution_with_s_length 4
+
+ extern const f_string_static_t iki_read_substitution_after_s;
+ extern const f_string_static_t iki_read_substitution_before_s;
+ extern const f_string_static_t iki_read_substitution_replace_s;
+ extern const f_string_static_t iki_read_substitution_vocabulary_s;
+ extern const f_string_static_t iki_read_substitution_with_s;
+#endif // _di_iki_read_substitution_s_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_iki_read_parameter_s_
+ #define IKI_READ_short_at_s "a"
+ #define IKI_READ_short_content_s "c"
+ #define IKI_READ_short_line_s "l"
+ #define IKI_READ_short_literal_s "L"
+ #define IKI_READ_short_name_s "n"
+ #define IKI_READ_short_object_s "o"
+ #define IKI_READ_short_reassign_s "R"
+ #define IKI_READ_short_replace_s "r"
+ #define IKI_READ_short_substitute_s "s"
+ #define IKI_READ_short_total_s "t"
+ #define IKI_READ_short_whole_s "w"
+ #define IKI_READ_short_wrap_s "W"
+
+ #define IKI_READ_long_at_s "at"
+ #define IKI_READ_long_content_s "content"
+ #define IKI_READ_long_line_s "line"
+ #define IKI_READ_long_literal_s "literal"
+ #define IKI_READ_long_name_s "name"
+ #define IKI_READ_long_object_s "object"
+ #define IKI_READ_long_reassign_s "reassign"
+ #define IKI_READ_long_replace_s "replace"
+ #define IKI_READ_long_substitute_s "substitute"
+ #define IKI_READ_long_total_s "total"
+ #define IKI_READ_long_whole_s "whole"
+ #define IKI_READ_long_wrap_s "wrap"
+
+ #define IKI_READ_short_at_s_length 1
+ #define IKI_READ_short_content_s_length 1
+ #define IKI_READ_short_line_s_length 1
+ #define IKI_READ_short_literal_s_length 1
+ #define IKI_READ_short_name_s_length 1
+ #define IKI_READ_short_object_s_length 1
+ #define IKI_READ_short_reassign_s_length 1
+ #define IKI_READ_short_replace_s_length 1
+ #define IKI_READ_short_substitute_s_length 1
+ #define IKI_READ_short_total_s_length 1
+ #define IKI_READ_short_whole_s_length 1
+ #define IKI_READ_short_wrap_s_length 1
+
+ #define IKI_READ_long_at_s_length 2
+ #define IKI_READ_long_content_s_length 7
+ #define IKI_READ_long_line_s_length 4
+ #define IKI_READ_long_literal_s_length 7
+ #define IKI_READ_long_name_s_length 4
+ #define IKI_READ_long_object_s_length 6
+ #define IKI_READ_long_reassign_s_length 8
+ #define IKI_READ_long_replace_s_length 7
+ #define IKI_READ_long_substitute_s_length 10
+ #define IKI_READ_long_total_s_length 5
+ #define IKI_READ_long_whole_s_length 5
+ #define IKI_READ_long_wrap_s_length 4
+
+ extern const f_string_static_t iki_read_short_at_s;
+ extern const f_string_static_t iki_read_short_content_s;
+ extern const f_string_static_t iki_read_short_line_s;
+ extern const f_string_static_t iki_read_short_literal_s;
+ extern const f_string_static_t iki_read_short_name_s;
+ extern const f_string_static_t iki_read_short_object_s;
+ extern const f_string_static_t iki_read_short_reassign_s;
+ extern const f_string_static_t iki_read_short_replace_s;
+ extern const f_string_static_t iki_read_short_substitute_s;
+ extern const f_string_static_t iki_read_short_total_s;
+ extern const f_string_static_t iki_read_short_whole_s;
+ extern const f_string_static_t iki_read_short_wrap_s;
+
+ extern const f_string_static_t iki_read_long_at_s;
+ extern const f_string_static_t iki_read_long_content_s;
+ extern const f_string_static_t iki_read_long_line_s;
+ extern const f_string_static_t iki_read_long_literal_s;
+ extern const f_string_static_t iki_read_long_name_s;
+ extern const f_string_static_t iki_read_long_object_s;
+ extern const f_string_static_t iki_read_long_reassign_s;
+ extern const f_string_static_t iki_read_long_replace_s;
+ extern const f_string_static_t iki_read_long_substitute_s;
+ extern const f_string_static_t iki_read_long_total_s;
+ extern const f_string_static_t iki_read_long_whole_s;
+ extern const f_string_static_t iki_read_long_wrap_s;
+#endif // _di_iki_read_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_read_common_string_h
--- /dev/null
+#include "iki_read.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Read
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common type structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_read_common_type_h
+#define _iki_read_common_type_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program defines.
+ */
+#ifndef _di_iki_read_d_
+ #define iki_read_signal_check_d 20000
+#endif // _di_iki_read_d_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * iki_read_main_flag_*_e:
+ * - none: No flags set.
+ * - at: Selecting at a specific index.
+ * - content: Print Contents.
+ * - copyright: Print copyright.
+ * - help: Print help.
+ * - literal: Print as literal data (printing entire variable).
+ * - line: Selecting at a specific line.
+ * - name: Selecting using a specific Vocabulary name.
+ * - object: Print Objects.
+ * - replace: Using re-assignments.
+ * - replace: Using replacements.
+ * - substitute: Using substitutions.
+ * - total: Enable printing of "total" count.
+ * - version: Print version.
+ * - whole: Print all data.
+ * - wrap: Using wrapping.
+ */
+#ifndef _di_iki_read_main_flag_e_
+ enum {
+ iki_read_main_flag_none_e = 0x0,
+ iki_read_main_flag_at_e = 0x1,
+ iki_read_main_flag_content_e = 0x2,
+ iki_read_main_flag_copyright_e = 0x4,
+ iki_read_main_flag_help_e = 0x8,
+ iki_read_main_flag_literal_e = 0x10,
+ 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_reassign_e = 0x100,
+ iki_read_main_flag_replace_e = 0x200,
+ iki_read_main_flag_substitute_e = 0x400,
+ iki_read_main_flag_total_e = 0x800,
+ iki_read_main_flag_version_e = 0x1000,
+ iki_read_main_flag_whole_e = 0x2000,
+ iki_read_main_flag_wrap_e = 0x4000,
+ };
+#endif // _di_iki_read_main_flag_e_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_iki_read_parameter_e_
+ enum {
+ iki_read_parameter_help_e,
+ iki_read_parameter_copyright_e,
+ iki_read_parameter_light_e,
+ iki_read_parameter_dark_e,
+ iki_read_parameter_no_color_e,
+ iki_read_parameter_verbosity_quiet_e,
+ iki_read_parameter_verbosity_error_e,
+ iki_read_parameter_verbosity_normal_e,
+ iki_read_parameter_verbosity_verbose_e,
+ iki_read_parameter_verbosity_debug_e,
+ iki_read_parameter_version_e,
+ iki_read_parameter_line_first_no_e,
+ iki_read_parameter_line_last_no_e,
+
+ iki_read_parameter_at_e,
+ iki_read_parameter_content_e,
+ iki_read_parameter_line_e,
+ iki_read_parameter_literal_e,
+ iki_read_parameter_name_e,
+ iki_read_parameter_object_e,
+ iki_read_parameter_reassign_e,
+ iki_read_parameter_replace_e,
+ iki_read_parameter_substitute_e,
+ iki_read_parameter_total_e,
+ iki_read_parameter_whole_e,
+ iki_read_parameter_wrap_e,
+ }; // enum
+
+ #define iki_read_console_parameter_t_initialize \
+ { \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
+ \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_at_s, iki_read_long_at_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_content_s, iki_read_long_content_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_line_s, iki_read_long_line_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_literal_s, iki_read_long_literal_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_name_s, iki_read_long_name_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_object_s, iki_read_long_object_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_reassign_s, iki_read_long_reassign_s, 3, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_replace_s, iki_read_long_replace_s, 2, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_substitute_s, iki_read_long_substitute_s, 3, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_total_s, iki_read_long_total_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_whole_s, iki_read_long_whole_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_read_short_wrap_s, iki_read_long_wrap_s, 3, f_console_flag_normal_e), \
+ }
+
+ #define iki_read_total_parameters_d 25
+#endif // _di_iki_read_parameter_e_
+
+/**
+ * The iki read 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).
+ *
+ * flag: Flags passed to the main function.
+ *
+ * status: The main status code, generally used by the load settings and main functions.
+ *
+ * at: The position representing the "at" index.
+ * line: The position representing the "line" index.
+ *
+ * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
+ * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
+ *
+ * buffer: A buffer used for loading the files and other miscellaneous tasks.
+ * name: A string representing the IKI vocabulary name being selected.
+ * files: An array of all files to process (except for the input pipe).
+ *
+ * replace: A map containing the Vocabulary name and its replacement as the value.
+ * reassign: A triple containing the Vocabulary name (a), Content to match (b), and the string used as the reassign (c).
+ * substitute: A triple containing the Vocabulary name (a), Content to match (b), and the string used as the substitute (c).
+ * wrap: A triple containing the Vocabulary name (a), the string to prepend (b), and the string to append (c).
+ *
+ * map_replaces: A pointer representing an array with length of setting->data.vocabulary.used mapping the vocabulary location to a replace array location.
+ * map_wraps: A pointer representing an array with length of setting->data.vocabulary.used mapping the vocabulary location to a wrap array location.
+ *
+ * data: The loaded IKI data.
+ */
+#ifndef _di_iki_read_setting_t_
+ typedef struct {
+ uint16_t flag;
+
+ f_status_t status;
+
+ f_array_length_t at;
+ f_array_length_t line;
+
+ f_string_static_t line_first;
+ f_string_static_t line_last;
+
+ f_string_dynamic_t buffer;
+ f_string_dynamics_t names;
+ f_string_dynamics_t files;
+
+ f_string_maps_t replace;
+ f_string_triples_t reassign;
+ f_string_triples_t substitute;
+ f_string_triples_t wrap;
+
+ f_array_length_t *map_replaces;
+ f_array_length_t *map_wraps;
+
+ f_iki_data_t data;
+ } iki_read_setting_t;
+
+ #define iki_read_setting_t_initialize \
+ { \
+ iki_read_main_flag_none_e, \
+ F_none, \
+ 0, \
+ 0, \
+ f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_maps_t_initialize, \
+ f_string_triples_t_initialize, \
+ f_string_triples_t_initialize, \
+ f_string_triples_t_initialize, \
+ 0, \
+ 0, \
+ f_iki_data_t_initialize, \
+ }
+#endif // _di_iki_read_setting_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_read_common_type_h
extern "C" {
#endif
-#ifndef _di_iki_read_program_version_s_
- const f_string_static_t iki_read_program_version_s = macro_f_string_static_t_initialize(IKI_READ_program_version_s, 0, IKI_READ_program_version_s_length);
-#endif // _di_iki_read_program_version_s_
-
-#ifndef _di_iki_read_program_name_s_
- const f_string_static_t iki_read_program_name_s = macro_f_string_static_t_initialize(IKI_READ_program_name_s, 0, IKI_READ_program_name_s_length);
- const f_string_static_t iki_read_program_name_long_s = macro_f_string_static_t_initialize(IKI_READ_program_name_long_s, 0, IKI_READ_program_name_long_s_length);
-#endif // _di_iki_read_program_name_s_
-
-#ifndef _di_iki_read_s_
- const f_string_static_t iki_read_string_two_s = macro_f_string_static_t_initialize(IKI_READ_string_two_s, 0, IKI_READ_string_two_s_length);
- const f_string_static_t iki_read_string_three_s = macro_f_string_static_t_initialize(IKI_READ_string_three_s, 0, IKI_READ_string_three_s_length);
-#endif // _di_iki_read_s_
-
-#ifndef _di_iki_read_parameter_d_
- const f_string_static_t iki_read_short_at_s = macro_f_string_static_t_initialize(IKI_READ_short_at_s, 0, IKI_READ_short_at_s_length);
- const f_string_static_t iki_read_short_content_s = macro_f_string_static_t_initialize(IKI_READ_short_content_s, 0, IKI_READ_short_content_s_length);
- const f_string_static_t iki_read_short_line_s = macro_f_string_static_t_initialize(IKI_READ_short_line_s, 0, IKI_READ_short_line_s_length);
- const f_string_static_t iki_read_short_literal_s = macro_f_string_static_t_initialize(IKI_READ_short_literal_s, 0, IKI_READ_short_literal_s_length);
- const f_string_static_t iki_read_short_name_s = macro_f_string_static_t_initialize(IKI_READ_short_name_s, 0, IKI_READ_short_name_s_length);
- const f_string_static_t iki_read_short_object_s = macro_f_string_static_t_initialize(IKI_READ_short_object_s, 0, IKI_READ_short_object_s_length);
- const f_string_static_t iki_read_short_reassign_s = macro_f_string_static_t_initialize(IKI_READ_short_reassign_s, 0, IKI_READ_short_reassign_s_length);
- const f_string_static_t iki_read_short_replace_s = macro_f_string_static_t_initialize(IKI_READ_short_replace_s, 0, IKI_READ_short_replace_s_length);
- const f_string_static_t iki_read_short_substitute_s = macro_f_string_static_t_initialize(IKI_READ_short_substitute_s, 0, IKI_READ_short_substitute_s_length);
- const f_string_static_t iki_read_short_total_s = macro_f_string_static_t_initialize(IKI_READ_short_total_s, 0, IKI_READ_short_total_s_length);
- const f_string_static_t iki_read_short_whole_s = macro_f_string_static_t_initialize(IKI_READ_short_whole_s, 0, IKI_READ_short_whole_s_length);
- const f_string_static_t iki_read_short_wrap_s = macro_f_string_static_t_initialize(IKI_READ_short_wrap_s, 0, IKI_READ_short_wrap_s_length);
-
- const f_string_static_t iki_read_long_at_s = macro_f_string_static_t_initialize(IKI_READ_long_at_s, 0, IKI_READ_long_at_s_length);
- const f_string_static_t iki_read_long_content_s = macro_f_string_static_t_initialize(IKI_READ_long_content_s, 0, IKI_READ_long_content_s_length);
- const f_string_static_t iki_read_long_line_s = macro_f_string_static_t_initialize(IKI_READ_long_line_s, 0, IKI_READ_long_line_s_length);
- const f_string_static_t iki_read_long_literal_s = macro_f_string_static_t_initialize(IKI_READ_long_literal_s, 0, IKI_READ_long_literal_s_length);
- const f_string_static_t iki_read_long_name_s = macro_f_string_static_t_initialize(IKI_READ_long_name_s, 0, IKI_READ_long_name_s_length);
- const f_string_static_t iki_read_long_object_s = macro_f_string_static_t_initialize(IKI_READ_long_object_s, 0, IKI_READ_long_object_s_length);
- const f_string_static_t iki_read_long_reassign_s = macro_f_string_static_t_initialize(IKI_READ_long_reassign_s, 0, IKI_READ_long_reassign_s_length);
- const f_string_static_t iki_read_long_replace_s = macro_f_string_static_t_initialize(IKI_READ_long_replace_s, 0, IKI_READ_long_replace_s_length);
- const f_string_static_t iki_read_long_substitute_s = macro_f_string_static_t_initialize(IKI_READ_long_substitute_s, 0, IKI_READ_long_substitute_s_length);
- const f_string_static_t iki_read_long_total_s = macro_f_string_static_t_initialize(IKI_READ_long_total_s, 0, IKI_READ_long_total_s_length);
- const f_string_static_t iki_read_long_whole_s = macro_f_string_static_t_initialize(IKI_READ_long_whole_s, 0, IKI_READ_long_whole_s_length);
- const f_string_static_t iki_read_long_wrap_s = macro_f_string_static_t_initialize(IKI_READ_long_wrap_s, 0, IKI_READ_long_wrap_s_length);
-#endif // _di_iki_read_parameter_d_
-
-#ifndef _di_iki_read_substitution_t_
- const f_string_static_t iki_read_substitution_after_s = macro_f_string_static_t_initialize(IKI_READ_substitution_after_s, 0, IKI_READ_substitution_after_s_length);
- const f_string_static_t iki_read_substitution_before_s = macro_f_string_static_t_initialize(IKI_READ_substitution_before_s, 0, IKI_READ_substitution_before_s_length);
- const f_string_static_t iki_read_substitution_replace_s = macro_f_string_static_t_initialize(IKI_READ_substitution_replace_s, 0, IKI_READ_substitution_replace_s_length);
- const f_string_static_t iki_read_substitution_vocabulary_s = macro_f_string_static_t_initialize(IKI_READ_substitution_vocabulary_s, 0, IKI_READ_substitution_vocabulary_s_length);
- const f_string_static_t iki_read_substitution_with_s = macro_f_string_static_t_initialize(IKI_READ_substitution_with_s, 0, IKI_READ_substitution_with_s_length);
-#endif // _di_iki_read_substitution_t_
-
#ifndef _di_iki_read_setting_delete_
f_status_t iki_read_setting_delete(iki_read_setting_t * const setting) {
#endif
/**
- * The program version.
- */
-#ifndef _di_iki_read_program_version_s_
- #define IKI_READ_program_version_major_s F_string_ascii_0_s
- #define IKI_READ_program_version_minor_s F_string_ascii_7_s
- #define IKI_READ_program_version_micro_s F_string_ascii_0_s
-
- #define IKI_READ_program_version_major_s_length F_string_ascii_0_s_length
- #define IKI_READ_program_version_minor_s_length F_string_ascii_7_s_length
- #define IKI_READ_program_version_micro_s_length F_string_ascii_0_s_length
-
- #if !(defined(IKI_READ_program_version_nano_prefix_s) && defined(IKI_READ_program_version_nano_prefix_s_length))
- #define IKI_READ_program_version_nano_prefix_s
- #define IKI_READ_program_version_nano_prefix_s_length 0
- #endif // !(defined(IKI_READ_program_version_nano_prefix_s) && defined(IKI_READ_program_version_nano_prefix_s_length))
-
- #if !(defined(IKI_READ_program_version_nano_s) && defined(IKI_READ_program_version_nano_s_length))
- #define IKI_READ_program_version_nano_s
- #define IKI_READ_program_version_nano_s_length 0
- #endif // !(defined(IKI_READ_program_version_nano_s) && defined(IKI_READ_program_version_nano_s_length))
-
- #define IKI_READ_program_version_s IKI_READ_program_version_major_s F_string_ascii_period_s IKI_READ_program_version_minor_s F_string_ascii_period_s IKI_READ_program_version_micro_s IKI_READ_program_version_nano_prefix_s IKI_READ_program_version_nano_s
-
- #define IKI_READ_program_version_s_length IKI_READ_program_version_major_s_length + F_string_ascii_period_s_length + IKI_READ_program_version_minor_s_length + F_string_ascii_period_s_length + IKI_READ_program_version_micro_s_length + IKI_READ_program_version_nano_prefix_s_length + IKI_READ_program_version_nano_s_length
-
- extern const f_string_static_t iki_read_program_version_s;
-#endif // _di_iki_read_program_version_s_
-
-/**
- * The program name.
- */
-#ifndef _di_iki_read_program_name_s_
- #define IKI_READ_program_name_s "iki_read"
- #define IKI_READ_program_name_long_s "IKI Read"
-
- #define IKI_READ_program_name_s_length 8
- #define IKI_READ_program_name_long_s_length 8
-
- extern const f_string_static_t iki_read_program_name_s;
- extern const f_string_static_t iki_read_program_name_long_s;
-#endif // _di_iki_read_program_name_s_
-
-/**
- * The program defines.
- */
-#ifndef _di_iki_read_d_
- #define iki_read_signal_check_d 20000
-#endif // _di_iki_read_d_
-
-/**
- * A collection of static strings associated with IKI Read.
- */
-#ifndef _di_iki_read_s_
- #define IKI_READ_string_two_s "two"
- #define IKI_READ_string_three_s "three"
-
- #define IKI_READ_string_two_s_length 3
- #define IKI_READ_string_three_s_length 5
-
- extern const f_string_static_t iki_read_string_two_s;
- extern const f_string_static_t iki_read_string_three_s;
-#endif // _di_iki_read_s_
-
-/**
- * The main program parameters.
- */
-#ifndef _di_iki_read_parameter_d_
- #define IKI_READ_short_at_s "a"
- #define IKI_READ_short_content_s "c"
- #define IKI_READ_short_line_s "l"
- #define IKI_READ_short_literal_s "L"
- #define IKI_READ_short_name_s "n"
- #define IKI_READ_short_object_s "o"
- #define IKI_READ_short_reassign_s "R"
- #define IKI_READ_short_replace_s "r"
- #define IKI_READ_short_substitute_s "s"
- #define IKI_READ_short_total_s "t"
- #define IKI_READ_short_whole_s "w"
- #define IKI_READ_short_wrap_s "W"
-
- #define IKI_READ_long_at_s "at"
- #define IKI_READ_long_content_s "content"
- #define IKI_READ_long_line_s "line"
- #define IKI_READ_long_literal_s "literal"
- #define IKI_READ_long_name_s "name"
- #define IKI_READ_long_object_s "object"
- #define IKI_READ_long_reassign_s "reassign"
- #define IKI_READ_long_replace_s "replace"
- #define IKI_READ_long_substitute_s "substitute"
- #define IKI_READ_long_total_s "total"
- #define IKI_READ_long_whole_s "whole"
- #define IKI_READ_long_wrap_s "wrap"
-
- #define IKI_READ_short_at_s_length 1
- #define IKI_READ_short_content_s_length 1
- #define IKI_READ_short_line_s_length 1
- #define IKI_READ_short_literal_s_length 1
- #define IKI_READ_short_name_s_length 1
- #define IKI_READ_short_object_s_length 1
- #define IKI_READ_short_reassign_s_length 1
- #define IKI_READ_short_replace_s_length 1
- #define IKI_READ_short_substitute_s_length 1
- #define IKI_READ_short_total_s_length 1
- #define IKI_READ_short_whole_s_length 1
- #define IKI_READ_short_wrap_s_length 1
-
- #define IKI_READ_long_at_s_length 2
- #define IKI_READ_long_content_s_length 7
- #define IKI_READ_long_line_s_length 4
- #define IKI_READ_long_literal_s_length 7
- #define IKI_READ_long_name_s_length 4
- #define IKI_READ_long_object_s_length 6
- #define IKI_READ_long_reassign_s_length 8
- #define IKI_READ_long_replace_s_length 7
- #define IKI_READ_long_substitute_s_length 10
- #define IKI_READ_long_total_s_length 5
- #define IKI_READ_long_whole_s_length 5
- #define IKI_READ_long_wrap_s_length 4
-
- extern const f_string_static_t iki_read_short_at_s;
- extern const f_string_static_t iki_read_short_content_s;
- extern const f_string_static_t iki_read_short_line_s;
- extern const f_string_static_t iki_read_short_literal_s;
- extern const f_string_static_t iki_read_short_name_s;
- extern const f_string_static_t iki_read_short_object_s;
- extern const f_string_static_t iki_read_short_reassign_s;
- extern const f_string_static_t iki_read_short_replace_s;
- extern const f_string_static_t iki_read_short_substitute_s;
- extern const f_string_static_t iki_read_short_total_s;
- extern const f_string_static_t iki_read_short_whole_s;
- extern const f_string_static_t iki_read_short_wrap_s;
-
- extern const f_string_static_t iki_read_long_at_s;
- extern const f_string_static_t iki_read_long_content_s;
- extern const f_string_static_t iki_read_long_line_s;
- extern const f_string_static_t iki_read_long_literal_s;
- extern const f_string_static_t iki_read_long_name_s;
- extern const f_string_static_t iki_read_long_object_s;
- extern const f_string_static_t iki_read_long_reassign_s;
- extern const f_string_static_t iki_read_long_replace_s;
- extern const f_string_static_t iki_read_long_substitute_s;
- extern const f_string_static_t iki_read_long_total_s;
- extern const f_string_static_t iki_read_long_whole_s;
- extern const f_string_static_t iki_read_long_wrap_s;
-
- enum {
- iki_read_parameter_help_e,
- iki_read_parameter_copyright_e,
- iki_read_parameter_light_e,
- iki_read_parameter_dark_e,
- iki_read_parameter_no_color_e,
- iki_read_parameter_verbosity_quiet_e,
- iki_read_parameter_verbosity_error_e,
- iki_read_parameter_verbosity_normal_e,
- iki_read_parameter_verbosity_verbose_e,
- iki_read_parameter_verbosity_debug_e,
- iki_read_parameter_version_e,
- iki_read_parameter_line_first_no_e,
- iki_read_parameter_line_last_no_e,
-
- iki_read_parameter_at_e,
- iki_read_parameter_content_e,
- iki_read_parameter_line_e,
- iki_read_parameter_literal_e,
- iki_read_parameter_name_e,
- iki_read_parameter_object_e,
- iki_read_parameter_reassign_e,
- iki_read_parameter_replace_e,
- iki_read_parameter_substitute_e,
- iki_read_parameter_total_e,
- iki_read_parameter_whole_e,
- iki_read_parameter_wrap_e,
- }; // enum
-
- #define iki_read_console_parameter_t_initialize \
- { \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
- \
- macro_f_console_parameter_t_initialize_3(iki_read_short_at_s, iki_read_long_at_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_content_s, iki_read_long_content_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_line_s, iki_read_long_line_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_literal_s, iki_read_long_literal_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_name_s, iki_read_long_name_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_object_s, iki_read_long_object_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_reassign_s, iki_read_long_reassign_s, 3, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_replace_s, iki_read_long_replace_s, 2, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_substitute_s, iki_read_long_substitute_s, 3, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_total_s, iki_read_long_total_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_whole_s, iki_read_long_whole_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_read_short_wrap_s, iki_read_long_wrap_s, 3, f_console_flag_normal_e), \
- }
-
- #define iki_read_total_parameters_d 25
-#endif // _di_iki_read_parameter_d_
-
-#ifndef _di_iki_read_substitution_t_
- #define IKI_READ_substitution_after_s "after"
- #define IKI_READ_substitution_before_s "before"
- #define IKI_READ_substitution_replace_s "replace"
- #define IKI_READ_substitution_vocabulary_s "vocabulary"
- #define IKI_READ_substitution_with_s "with"
-
- #define IKI_READ_substitution_after_s_length 5
- #define IKI_READ_substitution_before_s_length 6
- #define IKI_READ_substitution_replace_s_length 7
- #define IKI_READ_substitution_vocabulary_s_length 10
- #define IKI_READ_substitution_with_s_length 4
-
- extern const f_string_static_t iki_read_substitution_after_s;
- extern const f_string_static_t iki_read_substitution_before_s;
- extern const f_string_static_t iki_read_substitution_replace_s;
- extern const f_string_static_t iki_read_substitution_vocabulary_s;
- extern const f_string_static_t iki_read_substitution_with_s;
-#endif // _di_iki_read_substitution_t_
-
-/**
- * Flags passed to the main function or program.
- *
- * iki_read_main_flag_*_e:
- * - none: No flags set.
- * - at: Selecting at a specific index.
- * - content: Print Contents.
- * - copyright: Print copyright.
- * - help: Print help.
- * - literal: Print as literal data (printing entire variable).
- * - line: Selecting at a specific line.
- * - name: Selecting using a specific Vocabulary name.
- * - object: Print Objects.
- * - replace: Using re-assignments.
- * - replace: Using replacements.
- * - substitute: Using substitutions.
- * - total: Enable printing of "total" count.
- * - version: Print version.
- * - whole: Print all data.
- * - wrap: Using wrapping.
- */
-#ifndef _di_iki_read_main_flag_e_
- enum {
- iki_read_main_flag_none_e = 0x0,
- iki_read_main_flag_at_e = 0x1,
- iki_read_main_flag_content_e = 0x2,
- iki_read_main_flag_copyright_e = 0x4,
- iki_read_main_flag_help_e = 0x8,
- iki_read_main_flag_literal_e = 0x10,
- 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_reassign_e = 0x100,
- iki_read_main_flag_replace_e = 0x200,
- iki_read_main_flag_substitute_e = 0x400,
- iki_read_main_flag_total_e = 0x800,
- iki_read_main_flag_version_e = 0x1000,
- iki_read_main_flag_whole_e = 0x2000,
- iki_read_main_flag_wrap_e = 0x4000,
- };
-#endif // _di_iki_read_main_flag_e_
-
-/**
- * The iki read 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).
- *
- * flag: Flags passed to the main function.
- *
- * status: The main status code, generally used by the load settings and main functions.
- *
- * at: The position representing the "at" index.
- * line: The position representing the "line" index.
- *
- * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
- * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
- *
- * buffer: A buffer used for loading the files and other miscellaneous tasks.
- * name: A string representing the IKI vocabulary name being selected.
- * files: An array of all files to process (except for the input pipe).
- *
- * replace: A map containing the Vocabulary name and its replacement as the value.
- * reassign: A triple containing the Vocabulary name (a), Content to match (b), and the string used as the reassign (c).
- * substitute: A triple containing the Vocabulary name (a), Content to match (b), and the string used as the substitute (c).
- * wrap: A triple containing the Vocabulary name (a), the string to prepend (b), and the string to append (c).
- *
- * map_replaces: A pointer representing an array with length of setting->data.vocabulary.used mapping the vocabulary location to a replace array location.
- * map_wraps: A pointer representing an array with length of setting->data.vocabulary.used mapping the vocabulary location to a wrap array location.
- *
- * data: The loaded IKI data.
- */
-#ifndef _di_iki_read_setting_t_
- typedef struct {
- uint16_t flag;
-
- f_status_t status;
-
- f_array_length_t at;
- f_array_length_t line;
-
- f_string_static_t line_first;
- f_string_static_t line_last;
-
- f_string_dynamic_t buffer;
- f_string_dynamics_t names;
- f_string_dynamics_t files;
-
- f_string_maps_t replace;
- f_string_triples_t reassign;
- f_string_triples_t substitute;
- f_string_triples_t wrap;
-
- f_array_length_t *map_replaces;
- f_array_length_t *map_wraps;
-
- f_iki_data_t data;
- } iki_read_setting_t;
-
- #define iki_read_setting_t_initialize \
- { \
- iki_read_main_flag_none_e, \
- F_none, \
- 0, \
- 0, \
- f_string_static_t_initialize, \
- f_string_static_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_maps_t_initialize, \
- f_string_triples_t_initialize, \
- f_string_triples_t_initialize, \
- f_string_triples_t_initialize, \
- 0, \
- 0, \
- f_iki_data_t_initialize, \
- }
-#endif // _di_iki_read_setting_t_
-
-/**
* Delete the program main setting data.
*
* @param setting
#include <fll/level_2/program.h>
// IKI Read includes.
-#include <program/iki_read/main/common.h>
#include <program/iki_read/main/common-print.h>
+#include <program/iki_read/main/common-string.h>
+#include <program/iki_read/main/common-type.h>
+#include <program/iki_read/main/common.h>
#include <program/iki_read/main/print.h>
#ifdef __cplusplus
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/iki_read.c main/common.c main/common-print.c main/print.c main/private-common.c main/private-print.c main/private-read.c
+build_sources_library main/iki_read.c main/common.c main/common-print.c main/common-string.c main/common-type.c main/print.c main/private-common.c main/private-print.c main/private-read.c
build_sources_program main/main.c
-build_sources_headers main/iki_read.h main/common.h main/common-print.h main/print.h
+build_sources_headers main/iki_read.h main/common.h main/common-print.h main/common-string.h main/common-type.h main/print.h
build_sources_documentation man
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common print functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
--- /dev/null
+#include "iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_iki_write_program_version_s_
+ const f_string_static_t iki_write_program_version_s = macro_f_string_static_t_initialize(IKI_WRITE_program_version_s, 0, IKI_WRITE_program_version_s_length);
+#endif // _di_iki_write_program_version_s_
+
+#ifndef _di_iki_write_program_name_s_
+ const f_string_static_t iki_write_program_name_s = macro_f_string_static_t_initialize(IKI_WRITE_program_name_s, 0, IKI_WRITE_program_name_s_length);
+ const f_string_static_t iki_write_program_name_long_s = macro_f_string_static_t_initialize(IKI_WRITE_program_name_long_s, 0, IKI_WRITE_program_name_long_s_length);
+#endif // _di_iki_write_program_name_s_
+
+#ifndef _di_iki_write_s_
+ const f_string_static_t iki_write_object_s = macro_f_string_static_t_initialize(IKI_WRITE_object_s, 0, IKI_WRITE_object_s_length);
+#endif // _di_iki_write_s_
+
+#ifndef _di_iki_write_parameter_s_
+ const f_string_static_t iki_write_short_backtick_s = macro_f_string_static_t_initialize(IKI_WRITE_short_backtick_s, 0, IKI_WRITE_short_backtick_s_length);
+ const f_string_static_t iki_write_short_content_s = macro_f_string_static_t_initialize(IKI_WRITE_short_content_s, 0, IKI_WRITE_short_content_s_length);
+ const f_string_static_t iki_write_short_double_s = macro_f_string_static_t_initialize(IKI_WRITE_short_double_s, 0, IKI_WRITE_short_double_s_length);
+ const f_string_static_t iki_write_short_file_s = macro_f_string_static_t_initialize(IKI_WRITE_short_file_s, 0, IKI_WRITE_short_file_s_length);
+ const f_string_static_t iki_write_short_object_s = macro_f_string_static_t_initialize(IKI_WRITE_short_object_s, 0, IKI_WRITE_short_object_s_length);
+ const f_string_static_t iki_write_short_single_s = macro_f_string_static_t_initialize(IKI_WRITE_short_single_s, 0, IKI_WRITE_short_single_s_length);
+
+ const f_string_static_t iki_write_long_backtick_s = macro_f_string_static_t_initialize(IKI_WRITE_long_backtick_s, 0, IKI_WRITE_long_backtick_s_length);
+ const f_string_static_t iki_write_long_content_s = macro_f_string_static_t_initialize(IKI_WRITE_long_content_s, 0, IKI_WRITE_long_content_s_length);
+ const f_string_static_t iki_write_long_double_s = macro_f_string_static_t_initialize(IKI_WRITE_long_double_s, 0, IKI_WRITE_long_double_s_length);
+ const f_string_static_t iki_write_long_file_s = macro_f_string_static_t_initialize(IKI_WRITE_long_file_s, 0, IKI_WRITE_long_file_s_length);
+ const f_string_static_t iki_write_long_object_s = macro_f_string_static_t_initialize(IKI_WRITE_long_object_s, 0, IKI_WRITE_long_object_s_length);
+ const f_string_static_t iki_write_long_single_s = macro_f_string_static_t_initialize(IKI_WRITE_long_single_s, 0, IKI_WRITE_long_single_s_length);
+#endif // _di_iki_write_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common string structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_common_string_h
+#define _iki_write_common_string_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program version.
+ */
+#ifndef _di_iki_write_program_version_s_
+ #define IKI_WRITE_program_version_major_s F_string_ascii_0_s
+ #define IKI_WRITE_program_version_minor_s F_string_ascii_7_s
+ #define IKI_WRITE_program_version_micro_s F_string_ascii_0_s
+
+ #define IKI_WRITE_program_version_major_s_length F_string_ascii_0_s_length
+ #define IKI_WRITE_program_version_minor_s_length F_string_ascii_7_s_length
+ #define IKI_WRITE_program_version_micro_s_length F_string_ascii_0_s_length
+
+ #if !(defined(IKI_WRITE_program_version_nano_prefix_s) && defined(IKI_WRITE_program_version_nano_prefix_s_length))
+ #define IKI_WRITE_program_version_nano_prefix_s
+ #define IKI_WRITE_program_version_nano_prefix_s_length 0
+ #endif // !(defined(IKI_WRITE_program_version_nano_prefix_s) && defined(IKI_WRITE_program_version_nano_prefix_s_length))
+
+ #if !(defined(IKI_WRITE_program_version_nano_s) && defined(IKI_WRITE_program_version_nano_s_length))
+ #define IKI_WRITE_program_version_nano_s
+ #define IKI_WRITE_program_version_nano_s_length 0
+ #endif // !(defined(IKI_WRITE_program_version_nano_s) && defined(IKI_WRITE_program_version_nano_s_length))
+
+ #define IKI_WRITE_program_version_s IKI_WRITE_program_version_major_s F_string_ascii_period_s IKI_WRITE_program_version_minor_s F_string_ascii_period_s IKI_WRITE_program_version_micro_s IKI_WRITE_program_version_nano_prefix_s IKI_WRITE_program_version_nano_s
+
+ #define IKI_WRITE_program_version_s_length IKI_WRITE_program_version_major_s_length + F_string_ascii_period_s_length + IKI_WRITE_program_version_minor_s_length + F_string_ascii_period_s_length + IKI_WRITE_program_version_micro_s_length + IKI_WRITE_program_version_nano_prefix_s_length + IKI_WRITE_program_version_nano_s_length
+
+ extern const f_string_static_t iki_write_program_version_s;
+#endif // _di_iki_write_program_version_s_
+
+/**
+ * The program name.
+ */
+#ifndef _di_iki_write_program_name_s_
+ #define IKI_WRITE_program_name_s "iki_write"
+ #define IKI_WRITE_program_name_long_s "IKI Write"
+
+ #define IKI_WRITE_program_name_s_length 9
+ #define IKI_WRITE_program_name_long_s_length 9
+
+ extern const f_string_static_t iki_write_program_name_s;
+ extern const f_string_static_t iki_write_program_name_long_s;
+#endif // _di_iki_write_program_name_s_
+
+/**
+ * Special strings used by this program.
+ */
+#ifndef _di_iki_write_s_
+ #define IKI_WRITE_object_s "object"
+
+ #define IKI_WRITE_object_s_length 6
+
+ extern const f_string_static_t iki_write_object_s;
+#endif // _di_iki_write_s_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_iki_write_parameter_s_
+ #define IKI_WRITE_short_backtick_s "b"
+ #define IKI_WRITE_short_content_s "c"
+ #define IKI_WRITE_short_double_s "d"
+ #define IKI_WRITE_short_file_s "f"
+ #define IKI_WRITE_short_object_s "o"
+ #define IKI_WRITE_short_single_s "s"
+
+ #define IKI_WRITE_long_backtick_s "backtick"
+ #define IKI_WRITE_long_content_s "content"
+ #define IKI_WRITE_long_double_s "double"
+ #define IKI_WRITE_long_file_s "file"
+ #define IKI_WRITE_long_object_s "object"
+ #define IKI_WRITE_long_single_s "single"
+
+ #define IKI_WRITE_short_backtick_s_length 1
+ #define IKI_WRITE_short_content_s_length 1
+ #define IKI_WRITE_short_double_s_length 1
+ #define IKI_WRITE_short_file_s_length 1
+ #define IKI_WRITE_short_object_s_length 1
+ #define IKI_WRITE_short_single_s_length 1
+
+ #define IKI_WRITE_long_backtick_s_length 8
+ #define IKI_WRITE_long_content_s_length 7
+ #define IKI_WRITE_long_double_s_length 6
+ #define IKI_WRITE_long_file_s_length 4
+ #define IKI_WRITE_long_object_s_length 6
+ #define IKI_WRITE_long_single_s_length 6
+
+ extern const f_string_static_t iki_write_short_backtick_s;
+ extern const f_string_static_t iki_write_short_content_s;
+ extern const f_string_static_t iki_write_short_double_s;
+ extern const f_string_static_t iki_write_short_file_s;
+ extern const f_string_static_t iki_write_short_object_s;
+ extern const f_string_static_t iki_write_short_single_s;
+
+ extern const f_string_static_t iki_write_long_backtick_s;
+ extern const f_string_static_t iki_write_long_content_s;
+ extern const f_string_static_t iki_write_long_double_s;
+ extern const f_string_static_t iki_write_long_file_s;
+ extern const f_string_static_t iki_write_long_object_s;
+ extern const f_string_static_t iki_write_long_single_s;
+#endif // _di_iki_write_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_common_string_h
--- /dev/null
+#include "iki_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: IKI Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common type structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _iki_write_common_type_h
+#define _iki_write_common_type_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program defines.
+ */
+#ifndef _di_iki_write_d_
+ #define iki_write_signal_check_d 20000
+#endif // _di_iki_write_d_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * iki_write_main_flag_*_e:
+ * - none: No flags set.
+ * - content: The Content being written is specified.
+ * - copyright: Print copyright.
+ * - file_to: Using a specified destination file.
+ * - help: Print help.
+ * - object: The Object being written is specified.
+ * - version: Print version.
+ */
+#ifndef _di_iki_write_main_flag_e_
+ enum {
+ iki_write_main_flag_none_e = 0x0,
+ iki_write_main_flag_content_e = 0x1,
+ iki_write_main_flag_copyright_e = 0x2,
+ 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_version_e = 0x20,
+ };
+#endif // _di_iki_write_main_flag_e_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_iki_write_parameter_e_
+ enum {
+ iki_write_parameter_help_e,
+ iki_write_parameter_copyright_e,
+ iki_write_parameter_light_e,
+ iki_write_parameter_dark_e,
+ iki_write_parameter_no_color_e,
+ iki_write_parameter_verbosity_quiet_e,
+ iki_write_parameter_verbosity_error_e,
+ iki_write_parameter_verbosity_normal_e,
+ iki_write_parameter_verbosity_verbose_e,
+ iki_write_parameter_verbosity_debug_e,
+ iki_write_parameter_version_e,
+ iki_write_parameter_line_first_no_e,
+ iki_write_parameter_line_last_no_e,
+
+ iki_write_parameter_backtick_e,
+ iki_write_parameter_content_e,
+ iki_write_parameter_double_e,
+ iki_write_parameter_file_e,
+ iki_write_parameter_object_e,
+ iki_write_parameter_single_e,
+ }; // enum
+
+ #define iki_write_console_parameter_t_initialize \
+ { \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
+ \
+ macro_f_console_parameter_t_initialize_3(iki_write_short_backtick_s, iki_write_long_backtick_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_write_short_content_s, iki_write_long_content_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_write_short_double_s, iki_write_long_double_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_write_short_file_s, iki_write_long_file_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_write_short_object_s, iki_write_long_object_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(iki_write_short_single_s, iki_write_long_single_s, 0, f_console_flag_normal_e), \
+ }
+
+ #define iki_write_total_parameters_d 19
+#endif // _di_iki_write_parameter_e_
+
+/**
+ * The iki write 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).
+ *
+ * flag: Flags passed to the main function.
+ *
+ * status: The main status code, generally used by the load settings and main functions.
+ *
+ * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
+ * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
+ *
+ * quote: This holds the quote used during processing.
+ *
+ * escaped: A buffer used for escaping strings during processing.
+ * buffer: A buffer used during processing the file.
+ * object: A buffer used to hold an Object during processing.
+ * content: A buffer used to hold a Content during processing.
+ *
+ * objects: An array of objects passed as values to the "--object" parameter.
+ * contents: An array of objects passed as values to the "--content" parameter and must match the length of objects.
+ */
+#ifndef _di_iki_write_setting_t_
+ typedef struct {
+ uint16_t flag;
+
+ f_status_t status;
+
+ f_string_static_t line_first;
+ f_string_static_t line_last;
+
+ f_string_static_t quote;
+
+ f_string_dynamic_t escaped;
+ f_string_dynamic_t buffer;
+ f_string_dynamic_t object;
+ f_string_dynamic_t content;
+
+ f_string_dynamics_t objects;
+ f_string_dynamics_t contents;
+ } iki_write_setting_t;
+
+ #define iki_write_setting_t_initialize \
+ { \
+ iki_write_main_flag_none_e, \
+ F_none, \
+ f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ }
+#endif // _di_iki_write_setting_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _iki_write_common_type_h
extern "C" {
#endif
-#ifndef _di_iki_write_program_version_s_
- const f_string_static_t iki_write_program_version_s = macro_f_string_static_t_initialize(IKI_WRITE_program_version_s, 0, IKI_WRITE_program_version_s_length);
-#endif // _di_iki_write_program_version_s_
-
-#ifndef _di_iki_write_program_name_s_
- const f_string_static_t iki_write_program_name_s = macro_f_string_static_t_initialize(IKI_WRITE_program_name_s, 0, IKI_WRITE_program_name_s_length);
- const f_string_static_t iki_write_program_name_long_s = macro_f_string_static_t_initialize(IKI_WRITE_program_name_long_s, 0, IKI_WRITE_program_name_long_s_length);
-#endif // _di_iki_write_program_name_s_
-
-#ifndef _di_iki_write_s_
- const f_string_static_t iki_write_object_s = macro_f_string_static_t_initialize(IKI_WRITE_object_s, 0, IKI_WRITE_object_s_length);
-#endif // _di_iki_write_s_
-
-#ifndef _di_iki_write_parameter_d_
- const f_string_static_t iki_write_short_backtick_s = macro_f_string_static_t_initialize(IKI_WRITE_short_backtick_s, 0, IKI_WRITE_short_backtick_s_length);
- const f_string_static_t iki_write_short_content_s = macro_f_string_static_t_initialize(IKI_WRITE_short_content_s, 0, IKI_WRITE_short_content_s_length);
- const f_string_static_t iki_write_short_double_s = macro_f_string_static_t_initialize(IKI_WRITE_short_double_s, 0, IKI_WRITE_short_double_s_length);
- const f_string_static_t iki_write_short_file_s = macro_f_string_static_t_initialize(IKI_WRITE_short_file_s, 0, IKI_WRITE_short_file_s_length);
- const f_string_static_t iki_write_short_object_s = macro_f_string_static_t_initialize(IKI_WRITE_short_object_s, 0, IKI_WRITE_short_object_s_length);
- const f_string_static_t iki_write_short_single_s = macro_f_string_static_t_initialize(IKI_WRITE_short_single_s, 0, IKI_WRITE_short_single_s_length);
-
- const f_string_static_t iki_write_long_backtick_s = macro_f_string_static_t_initialize(IKI_WRITE_long_backtick_s, 0, IKI_WRITE_long_backtick_s_length);
- const f_string_static_t iki_write_long_content_s = macro_f_string_static_t_initialize(IKI_WRITE_long_content_s, 0, IKI_WRITE_long_content_s_length);
- const f_string_static_t iki_write_long_double_s = macro_f_string_static_t_initialize(IKI_WRITE_long_double_s, 0, IKI_WRITE_long_double_s_length);
- const f_string_static_t iki_write_long_file_s = macro_f_string_static_t_initialize(IKI_WRITE_long_file_s, 0, IKI_WRITE_long_file_s_length);
- const f_string_static_t iki_write_long_object_s = macro_f_string_static_t_initialize(IKI_WRITE_long_object_s, 0, IKI_WRITE_long_object_s_length);
- const f_string_static_t iki_write_long_single_s = macro_f_string_static_t_initialize(IKI_WRITE_long_single_s, 0, IKI_WRITE_long_single_s_length);
-#endif // _di_iki_write_parameter_d_
-
#ifndef _di_iki_write_setting_delete_
f_status_t iki_write_setting_delete(iki_write_setting_t * const setting) {
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
#endif
/**
- * The program version.
- */
-#ifndef _di_iki_write_program_version_s_
- #define IKI_WRITE_program_version_major_s F_string_ascii_0_s
- #define IKI_WRITE_program_version_minor_s F_string_ascii_7_s
- #define IKI_WRITE_program_version_micro_s F_string_ascii_0_s
-
- #define IKI_WRITE_program_version_major_s_length F_string_ascii_0_s_length
- #define IKI_WRITE_program_version_minor_s_length F_string_ascii_7_s_length
- #define IKI_WRITE_program_version_micro_s_length F_string_ascii_0_s_length
-
- #if !(defined(IKI_WRITE_program_version_nano_prefix_s) && defined(IKI_WRITE_program_version_nano_prefix_s_length))
- #define IKI_WRITE_program_version_nano_prefix_s
- #define IKI_WRITE_program_version_nano_prefix_s_length 0
- #endif // !(defined(IKI_WRITE_program_version_nano_prefix_s) && defined(IKI_WRITE_program_version_nano_prefix_s_length))
-
- #if !(defined(IKI_WRITE_program_version_nano_s) && defined(IKI_WRITE_program_version_nano_s_length))
- #define IKI_WRITE_program_version_nano_s
- #define IKI_WRITE_program_version_nano_s_length 0
- #endif // !(defined(IKI_WRITE_program_version_nano_s) && defined(IKI_WRITE_program_version_nano_s_length))
-
- #define IKI_WRITE_program_version_s IKI_WRITE_program_version_major_s F_string_ascii_period_s IKI_WRITE_program_version_minor_s F_string_ascii_period_s IKI_WRITE_program_version_micro_s IKI_WRITE_program_version_nano_prefix_s IKI_WRITE_program_version_nano_s
-
- #define IKI_WRITE_program_version_s_length IKI_WRITE_program_version_major_s_length + F_string_ascii_period_s_length + IKI_WRITE_program_version_minor_s_length + F_string_ascii_period_s_length + IKI_WRITE_program_version_micro_s_length + IKI_WRITE_program_version_nano_prefix_s_length + IKI_WRITE_program_version_nano_s_length
-
- extern const f_string_static_t iki_write_program_version_s;
-#endif // _di_iki_write_program_version_s_
-
-/**
- * The program name.
- */
-#ifndef _di_iki_write_program_name_s_
- #define IKI_WRITE_program_name_s "iki_write"
- #define IKI_WRITE_program_name_long_s "IKI Write"
-
- #define IKI_WRITE_program_name_s_length 9
- #define IKI_WRITE_program_name_long_s_length 9
-
- extern const f_string_static_t iki_write_program_name_s;
- extern const f_string_static_t iki_write_program_name_long_s;
-#endif // _di_iki_write_program_name_s_
-
-/**
- * The program defines.
- */
-#ifndef _di_iki_write_d_
- #define iki_write_signal_check_d 20000
-#endif // _di_iki_write_d_
-
-/**
- * Special strings used by this program.
- */
-#ifndef _di_iki_write_s_
- #define IKI_WRITE_object_s "object"
-
- #define IKI_WRITE_object_s_length 6
-
- extern const f_string_static_t iki_write_object_s;
-#endif // _di_iki_write_s_
-
-/**
- * The main program parameters.
- */
-#ifndef _di_iki_write_parameter_d_
- #define IKI_WRITE_short_backtick_s "b"
- #define IKI_WRITE_short_content_s "c"
- #define IKI_WRITE_short_double_s "d"
- #define IKI_WRITE_short_file_s "f"
- #define IKI_WRITE_short_object_s "o"
- #define IKI_WRITE_short_single_s "s"
-
- #define IKI_WRITE_long_backtick_s "backtick"
- #define IKI_WRITE_long_content_s "content"
- #define IKI_WRITE_long_double_s "double"
- #define IKI_WRITE_long_file_s "file"
- #define IKI_WRITE_long_object_s "object"
- #define IKI_WRITE_long_single_s "single"
-
- #define IKI_WRITE_short_backtick_s_length 1
- #define IKI_WRITE_short_content_s_length 1
- #define IKI_WRITE_short_double_s_length 1
- #define IKI_WRITE_short_file_s_length 1
- #define IKI_WRITE_short_object_s_length 1
- #define IKI_WRITE_short_single_s_length 1
-
- #define IKI_WRITE_long_backtick_s_length 8
- #define IKI_WRITE_long_content_s_length 7
- #define IKI_WRITE_long_double_s_length 6
- #define IKI_WRITE_long_file_s_length 4
- #define IKI_WRITE_long_object_s_length 6
- #define IKI_WRITE_long_single_s_length 6
-
- extern const f_string_static_t iki_write_short_backtick_s;
- extern const f_string_static_t iki_write_short_content_s;
- extern const f_string_static_t iki_write_short_double_s;
- extern const f_string_static_t iki_write_short_file_s;
- extern const f_string_static_t iki_write_short_object_s;
- extern const f_string_static_t iki_write_short_single_s;
-
- extern const f_string_static_t iki_write_long_backtick_s;
- extern const f_string_static_t iki_write_long_content_s;
- extern const f_string_static_t iki_write_long_double_s;
- extern const f_string_static_t iki_write_long_file_s;
- extern const f_string_static_t iki_write_long_object_s;
- extern const f_string_static_t iki_write_long_single_s;
-
- enum {
- iki_write_parameter_help_e,
- iki_write_parameter_copyright_e,
- iki_write_parameter_light_e,
- iki_write_parameter_dark_e,
- iki_write_parameter_no_color_e,
- iki_write_parameter_verbosity_quiet_e,
- iki_write_parameter_verbosity_error_e,
- iki_write_parameter_verbosity_normal_e,
- iki_write_parameter_verbosity_verbose_e,
- iki_write_parameter_verbosity_debug_e,
- iki_write_parameter_version_e,
- iki_write_parameter_line_first_no_e,
- iki_write_parameter_line_last_no_e,
-
- iki_write_parameter_backtick_e,
- iki_write_parameter_content_e,
- iki_write_parameter_double_e,
- iki_write_parameter_file_e,
- iki_write_parameter_object_e,
- iki_write_parameter_single_e,
- }; // enum
-
- #define iki_write_console_parameter_t_initialize \
- { \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
- \
- macro_f_console_parameter_t_initialize_3(iki_write_short_backtick_s, iki_write_long_backtick_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_write_short_content_s, iki_write_long_content_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_write_short_double_s, iki_write_long_double_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_write_short_file_s, iki_write_long_file_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_write_short_object_s, iki_write_long_object_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(iki_write_short_single_s, iki_write_long_single_s, 0, f_console_flag_normal_e), \
- }
-
- #define iki_write_total_parameters_d 19
-#endif // _di_iki_write_parameter_d_
-
-/**
- * Flags passed to the main function or program.
- *
- * iki_write_main_flag_*_e:
- * - none: No flags set.
- * - content: The Content being written is specified.
- * - copyright: Print copyright.
- * - file_to: Using a specified destination file.
- * - help: Print help.
- * - object: The Object being written is specified.
- * - version: Print version.
- */
-#ifndef _di_iki_write_main_flag_e_
- enum {
- iki_write_main_flag_none_e = 0x0,
- iki_write_main_flag_content_e = 0x1,
- iki_write_main_flag_copyright_e = 0x2,
- 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_version_e = 0x20,
- };
-#endif // _di_iki_write_main_flag_e_
-
-/**
- * The iki write 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).
- *
- * flag: Flags passed to the main function.
- *
- * status: The main status code, generally used by the load settings and main functions.
- *
- * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
- * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
- *
- * quote: This holds the quote used during processing.
- *
- * escaped: A buffer used for escaping strings during processing.
- * buffer: A buffer used during processing the file.
- * object: A buffer used to hold an Object during processing.
- * content: A buffer used to hold a Content during processing.
- *
- * objects: An array of objects passed as values to the "--object" parameter.
- * contents: An array of objects passed as values to the "--content" parameter and must match the length of objects.
- */
-#ifndef _di_iki_write_setting_t_
- typedef struct {
- uint16_t flag;
-
- f_status_t status;
-
- f_string_static_t line_first;
- f_string_static_t line_last;
-
- f_string_static_t quote;
-
- f_string_dynamic_t escaped;
- f_string_dynamic_t buffer;
- f_string_dynamic_t object;
- f_string_dynamic_t content;
-
- f_string_dynamics_t objects;
- f_string_dynamics_t contents;
- } iki_write_setting_t;
-
- #define iki_write_setting_t_initialize \
- { \
- iki_write_main_flag_none_e, \
- F_none, \
- f_string_static_t_initialize, \
- f_string_static_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- }
-#endif // _di_iki_write_setting_t_
-
-/**
* Delete the program main setting data.
*
* @param setting
#include <fll/level_2/program.h>
// IKI Write includes.
-#include <program/iki_write/main/common.h>
#include <program/iki_write/main/common-print.h>
+#include <program/iki_write/main/common-string.h>
+#include <program/iki_write/main/common-type.h>
+#include <program/iki_write/main/common.h>
#include <program/iki_write/main/print.h>
#ifdef __cplusplus
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/iki_write.c main/common.c main/common-print.c main/print.c main/private-common.c main/private-write.c
+build_sources_library main/iki_write.c main/common.c main/common-print.c main/common-string.c main/common-type.c main/print.c main/private-common.c main/private-write.c
build_sources_program main/main.c
-build_sources_headers main/iki_write.h main/common.h main/common-print.h main/print.h
+build_sources_headers main/iki_write.h main/common.h main/common-print.h main/common-string.h main/common-type.h main/print.h
build_sources_documentation man
#include <fll/level_2/program.h>
// Status Code includes.
-#include <program/status_code/main/common.h>
#include <program/status_code/main/common-print.h>
+#include <program/status_code/main/common-string.h>
+#include <program/status_code/main/common-type.h>
+#include <program/status_code/main/common.h>
#include <program/status_code/fss/common.h>
#include <program/status_code/main/print.h>
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common print functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
--- /dev/null
+#include "status_code.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_status_code_program_version_s_
+ const f_string_static_t status_code_program_version_s = macro_f_string_static_t_initialize(STATUS_CODE_program_version_s, 0, STATUS_CODE_program_version_s_length);
+#endif // _di_status_code_program_version_s_
+
+#ifndef _di_status_code_program_name_s_
+ const f_string_static_t status_code_program_name_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_s, 0, STATUS_CODE_program_name_s_length);
+ const f_string_static_t status_code_program_name_long_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_long_s, 0, STATUS_CODE_program_name_long_s_length);
+#endif // _di_status_code_program_name_s_
+
+#ifndef _di_status_code_program_help_parameters_s_
+ const f_string_static_t status_code_program_help_parameters_s = macro_f_string_static_t_initialize(STATUS_CODE_program_help_parameters_s, 0, STATUS_CODE_program_help_parameters_s_length);
+#endif // _di_status_code_program_help_parameters_s_
+
+#ifndef _di_status_code_s_
+ const f_string_static_t status_code_failed_to_convert_s = macro_f_string_static_t_initialize(STATUS_CODE_failed_to_convert_s, 0, STATUS_CODE_failed_to_convert_s_length);
+ const f_string_static_t status_code_invalid_number_s = macro_f_string_static_t_initialize(STATUS_CODE_invalid_number_s, 0, STATUS_CODE_invalid_number_s_length);
+ const f_string_static_t status_code_invalid_name_s = macro_f_string_static_t_initialize(STATUS_CODE_invalid_number_s, 0, STATUS_CODE_invalid_number_s_length);
+ const f_string_static_t status_code_invalid_main_s = macro_f_string_static_t_initialize(STATUS_CODE_invalid_main_s, 0, STATUS_CODE_invalid_main_s_length);
+ const f_string_static_t status_code_out_of_range_s = macro_f_string_static_t_initialize(STATUS_CODE_out_of_range_s, 0, STATUS_CODE_out_of_range_s_length);
+ const f_string_static_t status_code_unknown_code_s = macro_f_string_static_t_initialize(STATUS_CODE_unknown_code_s, 0, STATUS_CODE_unknown_code_s_length);
+ const f_string_static_t status_code_unknown_name_s = macro_f_string_static_t_initialize(STATUS_CODE_unknown_name_s, 0, STATUS_CODE_unknown_name_s_length);
+#endif // _di_status_code_s_
+
+#ifndef _di_status_code_parameter_s_
+ const f_string_static_t status_code_short_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_short_fine_s, 0, STATUS_CODE_short_fine_s_length);
+ const f_string_static_t status_code_short_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_short_warning_s, 0, STATUS_CODE_short_warning_s_length);
+ const f_string_static_t status_code_short_error_s = macro_f_string_static_t_initialize(STATUS_CODE_short_error_s, 0, STATUS_CODE_short_error_s_length);
+ const f_string_static_t status_code_short_number_s = macro_f_string_static_t_initialize(STATUS_CODE_short_number_s, 0, STATUS_CODE_short_number_s_length);
+
+ const f_string_static_t status_code_long_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_long_fine_s, 0, STATUS_CODE_long_fine_s_length);
+ const f_string_static_t status_code_long_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_long_warning_s, 0, STATUS_CODE_long_warning_s_length);
+ const f_string_static_t status_code_long_error_s = macro_f_string_static_t_initialize(STATUS_CODE_long_error_s, 0, STATUS_CODE_long_error_s_length);
+ const f_string_static_t status_code_long_number_s = macro_f_string_static_t_initialize(STATUS_CODE_long_number_s, 0, STATUS_CODE_long_number_s_length);
+#endif // _di_status_code_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Status Code
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common string structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _status_code_common_string_h
+#define _status_code_common_string_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program version.
+ */
+#ifndef _di_status_code_program_version_s_
+ #define STATUS_CODE_program_version_major_s F_string_ascii_0_s
+ #define STATUS_CODE_program_version_minor_s F_string_ascii_7_s
+ #define STATUS_CODE_program_version_micro_s F_string_ascii_0_s
+
+ #define STATUS_CODE_program_version_major_s_length F_string_ascii_0_s_length
+ #define STATUS_CODE_program_version_minor_s_length F_string_ascii_7_s_length
+ #define STATUS_CODE_program_version_micro_s_length F_string_ascii_0_s_length
+
+ #if !(defined(STATUS_CODE_program_version_nano_prefix_s) && defined(STATUS_CODE_program_version_nano_prefix_s_length))
+ #define STATUS_CODE_program_version_nano_prefix_s
+ #define STATUS_CODE_program_version_nano_prefix_s_length 0
+ #endif // !(defined(STATUS_CODE_program_version_nano_prefix_s) && defined(STATUS_CODE_program_version_nano_prefix_s_length))
+
+ #if !(defined(STATUS_CODE_program_version_nano_s) && defined(STATUS_CODE_program_version_nano_s_length))
+ #define STATUS_CODE_program_version_nano_s
+ #define STATUS_CODE_program_version_nano_s_length 0
+ #endif // !(defined(STATUS_CODE_program_version_nano_s) && defined(STATUS_CODE_program_version_nano_s_length))
+
+ #define STATUS_CODE_program_version_s STATUS_CODE_program_version_major_s F_string_ascii_period_s STATUS_CODE_program_version_minor_s F_string_ascii_period_s STATUS_CODE_program_version_micro_s STATUS_CODE_program_version_nano_prefix_s STATUS_CODE_program_version_nano_s
+
+ #define STATUS_CODE_program_version_s_length STATUS_CODE_program_version_major_s_length + F_string_ascii_period_s_length + STATUS_CODE_program_version_minor_s_length + F_string_ascii_period_s_length + STATUS_CODE_program_version_micro_s_length + STATUS_CODE_program_version_nano_prefix_s_length + STATUS_CODE_program_version_nano_s_length
+
+ extern const f_string_static_t status_code_program_version_s;
+#endif // _di_status_code_program_version_s_
+
+/**
+ * The program name.
+ */
+#ifndef _di_status_code_program_name_s_
+ #define STATUS_CODE_program_name_s "status_code"
+ #define STATUS_CODE_program_name_long_s "Status Code"
+
+ #define STATUS_CODE_program_name_s_length 11
+ #define STATUS_CODE_program_name_long_s_length 11
+
+ extern const f_string_static_t status_code_program_name_s;
+ extern const f_string_static_t status_code_program_name_long_s;
+#endif // _di_status_code_program_name_s_
+
+/**
+ * The program help related data.
+ */
+#ifndef _di_status_code_program_help_parameters_s_
+ #define STATUS_CODE_program_help_parameters_s "status code(s)"
+ #define STATUS_CODE_program_help_parameters_s_length 14
+
+ extern const f_string_static_t status_code_program_help_parameters_s;
+#endif // _di_status_code_program_help_parameters_s_
+
+/**
+ * Special strings used by this program.
+ */
+#ifndef _di_status_code_s_
+ #define STATUS_CODE_failed_to_convert_s "failed to convert"
+ #define STATUS_CODE_invalid_number_s "invalid number"
+ #define STATUS_CODE_invalid_name_s "invalid name"
+ #define STATUS_CODE_invalid_main_s "invalid main"
+ #define STATUS_CODE_out_of_range_s "out of range"
+ #define STATUS_CODE_unknown_code_s "unknown code"
+ #define STATUS_CODE_unknown_name_s "unknown name"
+
+ #define STATUS_CODE_failed_to_convert_s_length 17
+ #define STATUS_CODE_invalid_number_s_length 14
+ #define STATUS_CODE_invalid_name_s_length 12
+ #define STATUS_CODE_invalid_main_s_length 12
+ #define STATUS_CODE_out_of_range_s_length 12
+ #define STATUS_CODE_unknown_code_s_length 12
+ #define STATUS_CODE_unknown_name_s_length 12
+
+ extern const f_string_static_t status_code_failed_to_convert_s;
+ extern const f_string_static_t status_code_invalid_number_s;
+ extern const f_string_static_t status_code_invalid_name_s;
+ extern const f_string_static_t status_code_invalid_main_s;
+ extern const f_string_static_t status_code_out_of_range_s;
+ extern const f_string_static_t status_code_unknown_code_s;
+ extern const f_string_static_t status_code_unknown_name_s;
+#endif // _di_status_code_s_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_status_code_parameter_s_
+ #define STATUS_CODE_short_fine_s "f"
+ #define STATUS_CODE_short_warning_s "w"
+ #define STATUS_CODE_short_error_s "e"
+ #define STATUS_CODE_short_number_s "n"
+
+ #define STATUS_CODE_long_fine_s "fine"
+ #define STATUS_CODE_long_warning_s "warning"
+ #define STATUS_CODE_long_error_s "error"
+ #define STATUS_CODE_long_number_s "number"
+
+ #define STATUS_CODE_short_fine_s_length 1
+ #define STATUS_CODE_short_warning_s_length 1
+ #define STATUS_CODE_short_error_s_length 1
+ #define STATUS_CODE_short_number_s_length 1
+
+ #define STATUS_CODE_long_fine_s_length 4
+ #define STATUS_CODE_long_warning_s_length 7
+ #define STATUS_CODE_long_error_s_length 5
+ #define STATUS_CODE_long_number_s_length 6
+
+ extern const f_string_static_t status_code_short_fine_s;
+ extern const f_string_static_t status_code_short_warning_s;
+ extern const f_string_static_t status_code_short_error_s;
+ extern const f_string_static_t status_code_short_number_s;
+
+ extern const f_string_static_t status_code_long_fine_s;
+ extern const f_string_static_t status_code_long_warning_s;
+ extern const f_string_static_t status_code_long_error_s;
+ extern const f_string_static_t status_code_long_number_s;
+#endif // _di_status_code_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _status_code_common_string_h
--- /dev/null
+#include "status_code.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: Status Code
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common type structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _status_code_common_type_h
+#define _status_code_common_type_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program defines.
+ *
+ * macro_status_code_setting:
+ * - Used to represent a cast to ((status_code_setting_t *) setting).
+ * - Simplifies the number of parenthesis used to make code slightly cleaner.
+ * - Is wrapped in a parenthesis and not a block.
+ */
+#ifndef _di_status_code_d_
+ #define status_code_signal_check_d 20000
+
+ #define macro_status_code_setting(setting) ((status_code_setting_t *) setting)
+#endif // _di_status_code_d_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
+ *
+ * status_code_main_flag_*_e:
+ * - none: No flags set.
+ * - copyright: Print copyright.
+ * - error: Check if status is "error".
+ * - fine: Check if status is "fine".
+ * - help: Print help.
+ * - number: Operate in number mode.
+ * - version: Print version.
+ * - warning: Check if status is "warning".
+ */
+#ifndef _di_status_code_main_flag_e_
+ enum {
+ status_code_main_flag_none_e = 0x0,
+ status_code_main_flag_copyright_e = 0x1,
+ status_code_main_flag_error_e = 0x2,
+ 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_version_e = 0x20,
+ status_code_main_flag_warning_e = 0x40,
+ };
+#endif // _di_status_code_main_flag_e_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_status_code_parameter_e_
+ enum {
+ status_code_parameter_help_e,
+ status_code_parameter_copyright_e,
+ status_code_parameter_light_e,
+ status_code_parameter_dark_e,
+ status_code_parameter_no_color_e,
+ status_code_parameter_verbosity_quiet_e,
+ status_code_parameter_verbosity_error_e,
+ status_code_parameter_verbosity_normal_e,
+ status_code_parameter_verbosity_verbose_e,
+ status_code_parameter_verbosity_debug_e,
+ status_code_parameter_version_e,
+ status_code_parameter_line_first_no_e,
+ status_code_parameter_line_last_no_e,
+
+ status_code_parameter_fine_e,
+ status_code_parameter_warning_e,
+ status_code_parameter_error_e,
+ status_code_parameter_number_e,
+ }; // enum
+
+ #define status_code_console_parameter_t_initialize \
+ { \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
+ \
+ macro_f_console_parameter_t_initialize_3(status_code_short_fine_s, status_code_long_fine_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(status_code_short_warning_s, status_code_long_warning_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(status_code_short_error_s, status_code_long_error_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(status_code_short_number_s, status_code_long_number_s, 0, f_console_flag_normal_e), \
+ }
+
+ #define status_code_total_parameters_d 17
+#endif // _di_status_code_parameter_e_
+
+/**
+ * The status code 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).
+ *
+ * flag: Flags passed to the main function.
+ *
+ * status: The main status code, generally used by the load settings and main functions.
+ *
+ * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
+ * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
+ *
+ * status_string_from: A pointer to the status string function (usually either fll_status_string_from() or fll_fss_status_string_from()).
+ * status_string_to: A pointer to the status string function (usually either f_status_string_to() or fll_fss_status_string_to()).
+ * status_string_help_detail: Print additional, more detailed help, in the help page (The setting paramete must be of type status_code_setting_t).
+ */
+#ifndef _di_status_code_setting_t_
+ typedef struct {
+ uint16_t flag;
+
+ f_status_t status;
+
+ f_string_static_t line_first;
+ f_string_static_t line_last;
+
+ const f_string_static_t *program_name;
+ const f_string_static_t *program_name_long;
+
+ f_status_t (*status_string_from)(const f_string_static_t name, f_status_t * const code);
+ f_status_t (*status_string_to)(const f_status_t code, f_string_static_t * const name);
+ void (*status_string_help_detail)(void * const setting, const fl_print_t print);
+ } status_code_setting_t;
+
+ #define status_code_setting_t_initialize \
+ { \
+ status_code_main_flag_none_e, \
+ F_none, \
+ f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
+ 0, \
+ 0, \
+ 0, \
+ 0, \
+ 0, \
+ }
+#endif // _di_status_code_setting_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _status_code_common_type_h
extern "C" {
#endif
-#ifndef _di_status_code_program_version_s_
- const f_string_static_t status_code_program_version_s = macro_f_string_static_t_initialize(STATUS_CODE_program_version_s, 0, STATUS_CODE_program_version_s_length);
-#endif // _di_status_code_program_version_s_
-
-#ifndef _di_status_code_program_name_s_
- const f_string_static_t status_code_program_name_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_s, 0, STATUS_CODE_program_name_s_length);
- const f_string_static_t status_code_program_name_long_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_long_s, 0, STATUS_CODE_program_name_long_s_length);
-#endif // _di_status_code_program_name_s_
-
-#ifndef _di_status_code_program_help_parameters_s_
- const f_string_static_t status_code_program_help_parameters_s = macro_f_string_static_t_initialize(STATUS_CODE_program_help_parameters_s, 0, STATUS_CODE_program_help_parameters_s_length);
-#endif // _di_status_code_program_help_parameters_s_
-
-#ifndef _di_status_code_s_
- const f_string_static_t status_code_failed_to_convert_s = macro_f_string_static_t_initialize(STATUS_CODE_failed_to_convert_s, 0, STATUS_CODE_failed_to_convert_s_length);
- const f_string_static_t status_code_invalid_number_s = macro_f_string_static_t_initialize(STATUS_CODE_invalid_number_s, 0, STATUS_CODE_invalid_number_s_length);
- const f_string_static_t status_code_invalid_name_s = macro_f_string_static_t_initialize(STATUS_CODE_invalid_number_s, 0, STATUS_CODE_invalid_number_s_length);
- const f_string_static_t status_code_invalid_main_s = macro_f_string_static_t_initialize(STATUS_CODE_invalid_main_s, 0, STATUS_CODE_invalid_main_s_length);
- const f_string_static_t status_code_out_of_range_s = macro_f_string_static_t_initialize(STATUS_CODE_out_of_range_s, 0, STATUS_CODE_out_of_range_s_length);
- const f_string_static_t status_code_unknown_code_s = macro_f_string_static_t_initialize(STATUS_CODE_unknown_code_s, 0, STATUS_CODE_unknown_code_s_length);
- const f_string_static_t status_code_unknown_name_s = macro_f_string_static_t_initialize(STATUS_CODE_unknown_name_s, 0, STATUS_CODE_unknown_name_s_length);
-#endif // _di_status_code_s_
-
-#ifndef _di_status_code_parameter_d_
- const f_string_static_t status_code_short_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_short_fine_s, 0, STATUS_CODE_short_fine_s_length);
- const f_string_static_t status_code_short_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_short_warning_s, 0, STATUS_CODE_short_warning_s_length);
- const f_string_static_t status_code_short_error_s = macro_f_string_static_t_initialize(STATUS_CODE_short_error_s, 0, STATUS_CODE_short_error_s_length);
- const f_string_static_t status_code_short_number_s = macro_f_string_static_t_initialize(STATUS_CODE_short_number_s, 0, STATUS_CODE_short_number_s_length);
-
- const f_string_static_t status_code_long_fine_s = macro_f_string_static_t_initialize(STATUS_CODE_long_fine_s, 0, STATUS_CODE_long_fine_s_length);
- const f_string_static_t status_code_long_warning_s = macro_f_string_static_t_initialize(STATUS_CODE_long_warning_s, 0, STATUS_CODE_long_warning_s_length);
- const f_string_static_t status_code_long_error_s = macro_f_string_static_t_initialize(STATUS_CODE_long_error_s, 0, STATUS_CODE_long_error_s_length);
- const f_string_static_t status_code_long_number_s = macro_f_string_static_t_initialize(STATUS_CODE_long_number_s, 0, STATUS_CODE_long_number_s_length);
-#endif // _di_status_code_parameter_d_
-
#ifndef _di_status_code_setting_delete_
f_status_t status_code_setting_delete(status_code_setting_t * const setting) {
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
#endif
/**
- * The program version.
- */
-#ifndef _di_status_code_program_version_s_
- #define STATUS_CODE_program_version_major_s F_string_ascii_0_s
- #define STATUS_CODE_program_version_minor_s F_string_ascii_7_s
- #define STATUS_CODE_program_version_micro_s F_string_ascii_0_s
-
- #define STATUS_CODE_program_version_major_s_length F_string_ascii_0_s_length
- #define STATUS_CODE_program_version_minor_s_length F_string_ascii_7_s_length
- #define STATUS_CODE_program_version_micro_s_length F_string_ascii_0_s_length
-
- #if !(defined(STATUS_CODE_program_version_nano_prefix_s) && defined(STATUS_CODE_program_version_nano_prefix_s_length))
- #define STATUS_CODE_program_version_nano_prefix_s
- #define STATUS_CODE_program_version_nano_prefix_s_length 0
- #endif // !(defined(STATUS_CODE_program_version_nano_prefix_s) && defined(STATUS_CODE_program_version_nano_prefix_s_length))
-
- #if !(defined(STATUS_CODE_program_version_nano_s) && defined(STATUS_CODE_program_version_nano_s_length))
- #define STATUS_CODE_program_version_nano_s
- #define STATUS_CODE_program_version_nano_s_length 0
- #endif // !(defined(STATUS_CODE_program_version_nano_s) && defined(STATUS_CODE_program_version_nano_s_length))
-
- #define STATUS_CODE_program_version_s STATUS_CODE_program_version_major_s F_string_ascii_period_s STATUS_CODE_program_version_minor_s F_string_ascii_period_s STATUS_CODE_program_version_micro_s STATUS_CODE_program_version_nano_prefix_s STATUS_CODE_program_version_nano_s
-
- #define STATUS_CODE_program_version_s_length STATUS_CODE_program_version_major_s_length + F_string_ascii_period_s_length + STATUS_CODE_program_version_minor_s_length + F_string_ascii_period_s_length + STATUS_CODE_program_version_micro_s_length + STATUS_CODE_program_version_nano_prefix_s_length + STATUS_CODE_program_version_nano_s_length
-
- extern const f_string_static_t status_code_program_version_s;
-#endif // _di_status_code_program_version_s_
-
-/**
- * The program name.
- */
-#ifndef _di_status_code_program_name_s_
- #define STATUS_CODE_program_name_s "status_code"
- #define STATUS_CODE_program_name_long_s "Status Code"
-
- #define STATUS_CODE_program_name_s_length 11
- #define STATUS_CODE_program_name_long_s_length 11
-
- extern const f_string_static_t status_code_program_name_s;
- extern const f_string_static_t status_code_program_name_long_s;
-#endif // _di_status_code_program_name_s_
-
-/**
- * The program help related data.
- */
-#ifndef _di_status_code_program_help_parameters_s_
- #define STATUS_CODE_program_help_parameters_s "status code(s)"
- #define STATUS_CODE_program_help_parameters_s_length 14
-
- extern const f_string_static_t status_code_program_help_parameters_s;
-#endif // _di_status_code_program_help_parameters_s_
-
-/**
- * The program defines.
- *
- * macro_status_code_setting:
- * - Used to represent a cast to ((status_code_setting_t *) setting).
- * - Simplifies the number of parenthesis used to make code slightly cleaner.
- * - Is wrapped in a parenthesis and not a block.
- */
-#ifndef _di_status_code_d_
- #define status_code_signal_check_d 20000
-
- #define macro_status_code_setting(setting) ((status_code_setting_t *) setting)
-#endif // _di_status_code_d_
-
-/**
- * Special strings used by this program.
- */
-#ifndef _di_status_code_s_
- #define STATUS_CODE_failed_to_convert_s "failed to convert"
- #define STATUS_CODE_invalid_number_s "invalid number"
- #define STATUS_CODE_invalid_name_s "invalid name"
- #define STATUS_CODE_invalid_main_s "invalid main"
- #define STATUS_CODE_out_of_range_s "out of range"
- #define STATUS_CODE_unknown_code_s "unknown code"
- #define STATUS_CODE_unknown_name_s "unknown name"
-
- #define STATUS_CODE_failed_to_convert_s_length 17
- #define STATUS_CODE_invalid_number_s_length 14
- #define STATUS_CODE_invalid_name_s_length 12
- #define STATUS_CODE_invalid_main_s_length 12
- #define STATUS_CODE_out_of_range_s_length 12
- #define STATUS_CODE_unknown_code_s_length 12
- #define STATUS_CODE_unknown_name_s_length 12
-
- extern const f_string_static_t status_code_failed_to_convert_s;
- extern const f_string_static_t status_code_invalid_number_s;
- extern const f_string_static_t status_code_invalid_name_s;
- extern const f_string_static_t status_code_invalid_main_s;
- extern const f_string_static_t status_code_out_of_range_s;
- extern const f_string_static_t status_code_unknown_code_s;
- extern const f_string_static_t status_code_unknown_name_s;
-#endif // _di_status_code_s_
-
-/**
- * The main program parameters.
- */
-#ifndef _di_status_code_parameter_d_
- #define STATUS_CODE_short_fine_s "f"
- #define STATUS_CODE_short_warning_s "w"
- #define STATUS_CODE_short_error_s "e"
- #define STATUS_CODE_short_number_s "n"
-
- #define STATUS_CODE_long_fine_s "fine"
- #define STATUS_CODE_long_warning_s "warning"
- #define STATUS_CODE_long_error_s "error"
- #define STATUS_CODE_long_number_s "number"
-
- #define STATUS_CODE_short_fine_s_length 1
- #define STATUS_CODE_short_warning_s_length 1
- #define STATUS_CODE_short_error_s_length 1
- #define STATUS_CODE_short_number_s_length 1
-
- #define STATUS_CODE_long_fine_s_length 4
- #define STATUS_CODE_long_warning_s_length 7
- #define STATUS_CODE_long_error_s_length 5
- #define STATUS_CODE_long_number_s_length 6
-
- extern const f_string_static_t status_code_short_fine_s;
- extern const f_string_static_t status_code_short_warning_s;
- extern const f_string_static_t status_code_short_error_s;
- extern const f_string_static_t status_code_short_number_s;
-
- extern const f_string_static_t status_code_long_fine_s;
- extern const f_string_static_t status_code_long_warning_s;
- extern const f_string_static_t status_code_long_error_s;
- extern const f_string_static_t status_code_long_number_s;
-
- enum {
- status_code_parameter_help_e,
- status_code_parameter_copyright_e,
- status_code_parameter_light_e,
- status_code_parameter_dark_e,
- status_code_parameter_no_color_e,
- status_code_parameter_verbosity_quiet_e,
- status_code_parameter_verbosity_error_e,
- status_code_parameter_verbosity_normal_e,
- status_code_parameter_verbosity_verbose_e,
- status_code_parameter_verbosity_debug_e,
- status_code_parameter_version_e,
- status_code_parameter_line_first_no_e,
- status_code_parameter_line_last_no_e,
-
- status_code_parameter_fine_e,
- status_code_parameter_warning_e,
- status_code_parameter_error_e,
- status_code_parameter_number_e,
- }; // enum
-
- #define status_code_console_parameter_t_initialize \
- { \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
- \
- macro_f_console_parameter_t_initialize_3(status_code_short_fine_s, status_code_long_fine_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(status_code_short_warning_s, status_code_long_warning_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(status_code_short_error_s, status_code_long_error_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(status_code_short_number_s, status_code_long_number_s, 0, f_console_flag_normal_e), \
- }
-
- #define status_code_total_parameters_d 17
-#endif // _di_status_code_parameter_d_
-
-/**
- * Flags passed to the main function or program.
- *
- * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
- *
- * status_code_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print copyright.
- * - error: Check if status is "error".
- * - fine: Check if status is "fine".
- * - help: Print help.
- * - number: Operate in number mode.
- * - version: Print version.
- * - warning: Check if status is "warning".
- */
-#ifndef _di_status_code_main_flag_e_
- enum {
- status_code_main_flag_none_e = 0x0,
- status_code_main_flag_copyright_e = 0x1,
- status_code_main_flag_error_e = 0x2,
- 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_version_e = 0x20,
- status_code_main_flag_warning_e = 0x40,
- };
-#endif // _di_status_code_main_flag_e_
-
-/**
- * The status code 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).
- *
- * flag: Flags passed to the main function.
- *
- * status: The main status code, generally used by the load settings and main functions.
- *
- * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
- * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
- *
- * status_string_from: A pointer to the status string function (usually either fll_status_string_from() or fll_fss_status_string_from()).
- * status_string_to: A pointer to the status string function (usually either f_status_string_to() or fll_fss_status_string_to()).
- * status_string_help_detail: Print additional, more detailed help, in the help page (The setting paramete must be of type status_code_setting_t).
- */
-#ifndef _di_status_code_setting_t_
- typedef struct {
- uint16_t flag;
-
- f_status_t status;
-
- f_string_static_t line_first;
- f_string_static_t line_last;
-
- const f_string_static_t *program_name;
- const f_string_static_t *program_name_long;
-
- f_status_t (*status_string_from)(const f_string_static_t name, f_status_t * const code);
- f_status_t (*status_string_to)(const f_status_t code, f_string_static_t * const name);
- void (*status_string_help_detail)(void * const setting, const fl_print_t print);
- } status_code_setting_t;
-
- #define status_code_setting_t_initialize \
- { \
- status_code_main_flag_none_e, \
- F_none, \
- f_string_static_t_initialize, \
- f_string_static_t_initialize, \
- 0, \
- 0, \
- 0, \
- 0, \
- 0, \
- }
-#endif // _di_status_code_setting_t_
-
-/**
* Delete the program main setting data.
*
* @param setting
#include <fll/level_2/status_string.h>
// Status Code includes.
-#include <program/status_code/main/common.h>
#include <program/status_code/main/common-print.h>
+#include <program/status_code/main/common-string.h>
+#include <program/status_code/main/common-type.h>
+#include <program/status_code/main/common.h>
#include <program/status_code/main/print.h>
#ifdef __cplusplus
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/status_code.c main/common.c main/common-print.c main/print.c main/private-status_code.c
+build_sources_library main/status_code.c main/common.c main/common-print.c main/common-string.c main/common-type.c main/print.c main/private-status_code.c
build_sources_library fss/status_code.c fss/common.c
-build_sources_headers main/status_code.h main/common.h main/common-print.h main/print.h
+build_sources_headers main/status_code.h main/common.h main/common-print.h main/common-string.h main/common-type.h main/print.h
build_sources_headers fss/status_code.h fss/common.h
build_sources_documentation man
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common print functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
--- /dev/null
+#include "utf8.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_utf8_program_version_s_
+ const f_string_static_t utf8_program_version_s = macro_f_string_static_t_initialize(UTF8_program_version_s, 0, UTF8_program_version_s_length);
+#endif // _di_utf8_program_version_s_
+
+#ifndef _di_utf8_program_name_s_
+ const f_string_static_t utf8_program_name_s = macro_f_string_static_t_initialize(UTF8_program_name_s, 0, UTF8_program_name_s_length);
+ const f_string_static_t utf8_program_name_long_s = macro_f_string_static_t_initialize(UTF8_program_name_long_s, 0, UTF8_program_name_long_s_length);
+#endif // _di_utf8_program_name_s_
+
+#ifndef _di_utf8_program_help_parameters_s_
+ const f_string_static_t utf8_program_help_parameters_s = macro_f_string_static_t_initialize(UTF8_program_help_parameters_s, 0, UTF8_program_help_parameters_s_length);
+#endif // _di_utf8_program_help_parameters_s_
+
+#ifndef _di_utf8_s_
+ const f_string_static_t utf8_string_combining_is_s = macro_f_string_static_t_initialize(UTF8_string_combining_is_s, 0, UTF8_string_combining_is_s_length);
+ const f_string_static_t utf8_string_combining_not_s = macro_f_string_static_t_initialize(UTF8_string_combining_not_s, 0, UTF8_string_combining_not_s_length);
+ const f_string_static_t utf8_string_unknown_s = macro_f_string_static_t_initialize(UTF8_string_unknown_s, 0, UTF8_string_unknown_s_length);
+
+ const f_string_static_t utf8_string_from_s = macro_f_string_static_t_initialize(UTF8_string_from_s, 0, UTF8_string_from_s_length);
+ const f_string_static_t utf8_string_to_s = macro_f_string_static_t_initialize(UTF8_string_to_s, 0, UTF8_string_to_s_length);
+
+ const f_string_static_t utf8_string_prepend_padding_s = macro_f_string_static_t_initialize(UTF8_string_prepend_padding_s, 0, UTF8_string_prepend_padding_s_length);
+
+ const f_string_static_t utf8_string_valid_not_s = macro_f_string_static_t_initialize(UTF8_string_valid_not_s, 0, UTF8_string_valid_not_s_length);
+
+ const f_string_static_t utf8_string_verified_valid_s = macro_f_string_static_t_initialize(UTF8_string_verified_valid_s, 0, UTF8_string_verified_valid_s_length);
+ const f_string_static_t utf8_string_verified_valid_not_s = macro_f_string_static_t_initialize(UTF8_string_verified_valid_not_s, 0, UTF8_string_verified_valid_not_s_length);
+
+ const f_string_static_t utf8_string_width_0_s = macro_f_string_static_t_initialize(UTF8_string_width_0_s, 0, UTF8_string_width_0_s_length);
+ const f_string_static_t utf8_string_width_1_s = macro_f_string_static_t_initialize(UTF8_string_width_1_s, 0, UTF8_string_width_1_s_length);
+ const f_string_static_t utf8_string_width_2_s = macro_f_string_static_t_initialize(UTF8_string_width_2_s, 0, UTF8_string_width_2_s_length);
+ const f_string_static_t utf8_string_width_3_s = macro_f_string_static_t_initialize(UTF8_string_width_3_s, 0, UTF8_string_width_3_s_length);
+ const f_string_static_t utf8_string_width_4_s = macro_f_string_static_t_initialize(UTF8_string_width_4_s, 0, UTF8_string_width_4_s_length);
+#endif // _di_utf8_s_
+
+#ifndef _di_utf8_parameter_s_
+ const f_string_static_t utf8_short_from_bytesequence_s = macro_f_string_static_t_initialize(UTF8_short_from_bytesequence_s, 0, UTF8_short_from_bytesequence_s_length);
+ const f_string_static_t utf8_short_from_codepoint_s = macro_f_string_static_t_initialize(UTF8_short_from_codepoint_s, 0, UTF8_short_from_codepoint_s_length);
+ const f_string_static_t utf8_short_from_file_s = macro_f_string_static_t_initialize(UTF8_short_from_file_s, 0, UTF8_short_from_file_s_length);
+
+ const f_string_static_t utf8_short_headers_s = macro_f_string_static_t_initialize(UTF8_short_headers_s, 0, UTF8_short_headers_s_length);
+ const f_string_static_t utf8_short_separate_s = macro_f_string_static_t_initialize(UTF8_short_separate_s, 0, UTF8_short_separate_s_length);
+ const f_string_static_t utf8_short_strip_invalid_s = macro_f_string_static_t_initialize(UTF8_short_strip_invalid_s, 0, UTF8_short_strip_invalid_s_length);
+ const f_string_static_t utf8_short_verify_s = macro_f_string_static_t_initialize(UTF8_short_verify_s, 0, UTF8_short_verify_s_length);
+
+ const f_string_static_t utf8_short_to_bytesequence_s = macro_f_string_static_t_initialize(UTF8_short_to_bytesequence_s, 0, UTF8_short_to_bytesequence_s_length);
+ const f_string_static_t utf8_short_to_codepoint_s = macro_f_string_static_t_initialize(UTF8_short_to_codepoint_s, 0, UTF8_short_to_codepoint_s_length);
+ const f_string_static_t utf8_short_to_combining_s = macro_f_string_static_t_initialize(UTF8_short_to_combining_s, 0, UTF8_short_to_combining_s_length);
+ const f_string_static_t utf8_short_to_file_s = macro_f_string_static_t_initialize(UTF8_short_to_file_s, 0, UTF8_short_to_file_s_length);
+ const f_string_static_t utf8_short_to_width_s = macro_f_string_static_t_initialize(UTF8_short_to_width_s, 0, UTF8_short_to_width_s_length);
+
+ const f_string_static_t utf8_long_from_bytesequence_s = macro_f_string_static_t_initialize(UTF8_long_from_bytesequence_s, 0, UTF8_long_from_bytesequence_s_length);
+ const f_string_static_t utf8_long_from_codepoint_s = macro_f_string_static_t_initialize(UTF8_long_from_codepoint_s, 0, UTF8_long_from_codepoint_s_length);
+ const f_string_static_t utf8_long_from_file_s = macro_f_string_static_t_initialize(UTF8_long_from_file_s, 0, UTF8_long_from_file_s_length);
+
+ const f_string_static_t utf8_long_headers_s = macro_f_string_static_t_initialize(UTF8_long_headers_s, 0, UTF8_long_headers_s_length);
+ const f_string_static_t utf8_long_separate_s = macro_f_string_static_t_initialize(UTF8_long_separate_s, 0, UTF8_long_separate_s_length);
+ const f_string_static_t utf8_long_strip_invalid_s = macro_f_string_static_t_initialize(UTF8_long_strip_invalid_s, 0, UTF8_long_strip_invalid_s_length);
+ const f_string_static_t utf8_long_verify_s = macro_f_string_static_t_initialize(UTF8_long_verify_s, 0, UTF8_long_verify_s_length);
+
+ const f_string_static_t utf8_long_to_bytesequence_s = macro_f_string_static_t_initialize(UTF8_long_to_bytesequence_s, 0, UTF8_long_to_bytesequence_s_length);
+ const f_string_static_t utf8_long_to_codepoint_s = macro_f_string_static_t_initialize(UTF8_long_to_codepoint_s, 0, UTF8_long_to_codepoint_s_length);
+ const f_string_static_t utf8_long_to_combining_s = macro_f_string_static_t_initialize(UTF8_long_to_combining_s, 0, UTF8_long_to_combining_s_length);
+ const f_string_static_t utf8_long_to_file_s = macro_f_string_static_t_initialize(UTF8_long_to_file_s, 0, UTF8_long_to_file_s_length);
+ const f_string_static_t utf8_long_to_width_s = macro_f_string_static_t_initialize(UTF8_long_to_width_s, 0, UTF8_long_to_width_s_length);
+#endif // _di_utf8_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: UTF8
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common string structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _utf8_common_string_h
+#define _utf8_common_string_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * The program version.
+ */
+#ifndef _di_utf8_program_version_s_
+ #define UTF8_program_version_major_s F_string_ascii_0_s
+ #define UTF8_program_version_minor_s F_string_ascii_7_s
+ #define UTF8_program_version_micro_s F_string_ascii_0_s
+
+ #define UTF8_program_version_major_s_length F_string_ascii_0_s_length
+ #define UTF8_program_version_minor_s_length F_string_ascii_7_s_length
+ #define UTF8_program_version_micro_s_length F_string_ascii_0_s_length
+
+ #if !(defined(UTF8_program_version_nano_prefix_s) && defined(UTF8_program_version_nano_prefix_s_length))
+ #define UTF8_program_version_nano_prefix_s
+ #define UTF8_program_version_nano_prefix_s_length 0
+ #endif // !(defined(UTF8_program_version_nano_prefix_s) && defined(UTF8_program_version_nano_prefix_s_length))
+
+ #if !(defined(UTF8_program_version_nano_s) && defined(UTF8_program_version_nano_s_length))
+ #define UTF8_program_version_nano_s
+ #define UTF8_program_version_nano_s_length 0
+ #endif // !(defined(UTF8_program_version_nano_s) && defined(UTF8_program_version_nano_s_length))
+
+ #define UTF8_program_version_s UTF8_program_version_major_s F_string_ascii_period_s UTF8_program_version_minor_s F_string_ascii_period_s UTF8_program_version_micro_s UTF8_program_version_nano_prefix_s UTF8_program_version_nano_s
+
+ #define UTF8_program_version_s_length UTF8_program_version_major_s_length + F_string_ascii_period_s_length + UTF8_program_version_minor_s_length + F_string_ascii_period_s_length + UTF8_program_version_micro_s_length + UTF8_program_version_nano_prefix_s_length + UTF8_program_version_nano_s_length
+
+ extern const f_string_static_t utf8_program_version_s;
+#endif // _di_utf8_program_version_s_
+
+/**
+ * The program name.
+ */
+#ifndef _di_utf8_program_name_s_
+ #define UTF8_program_name_s "utf8"
+ #define UTF8_program_name_long_s "UTF-8"
+
+ #define UTF8_program_name_s_length 4
+ #define UTF8_program_name_long_s_length 5
+
+ extern const f_string_static_t utf8_program_name_s;
+ extern const f_string_static_t utf8_program_name_long_s;
+#endif // _di_utf8_program_name_s_
+
+/**
+ * The program help related data.
+ */
+#ifndef _di_utf8_program_help_parameters_s_
+ #define UTF8_program_help_parameters_s "character(s)"
+ #define UTF8_program_help_parameters_s_length 12
+
+ extern const f_string_static_t utf8_program_help_parameters_s;
+#endif // _di_utf8_program_help_parameters_s_
+
+/**
+ * The program strings.
+ */
+#ifndef _di_utf8_s_
+ #define UTF8_string_combining_is_s "C"
+ #define UTF8_string_combining_not_s "N"
+ #define UTF8_string_unknown_s "?"
+
+ #define UTF8_string_from_s "from"
+ #define UTF8_string_to_s "to"
+
+ #define UTF8_string_prepend_padding_s " "
+
+ #define UTF8_string_valid_not_s "�"
+
+ #define UTF8_string_verified_valid_s "Verified Valid"
+ #define UTF8_string_verified_valid_not_s "Verified Invalid"
+
+ #define UTF8_string_width_0_s "0"
+ #define UTF8_string_width_1_s "1"
+ #define UTF8_string_width_2_s "2"
+ #define UTF8_string_width_3_s "3"
+ #define UTF8_string_width_4_s "4"
+
+ #define UTF8_string_combining_is_s_length 1
+ #define UTF8_string_combining_not_s_length 1
+ #define UTF8_string_unknown_s_length 1
+
+ #define UTF8_string_from_s_length 4
+ #define UTF8_string_to_s_length 2
+
+ #define UTF8_string_prepend_padding_s_length 2
+
+ #define UTF8_string_valid_not_s_length 3
+
+ #define UTF8_string_verified_valid_s_length 14
+ #define UTF8_string_verified_valid_not_s_length 16
+
+ #define UTF8_string_width_0_s_length 1
+ #define UTF8_string_width_1_s_length 1
+ #define UTF8_string_width_2_s_length 1
+ #define UTF8_string_width_3_s_length 1
+ #define UTF8_string_width_4_s_length 1
+
+ extern const f_string_static_t utf8_string_combining_is_s;
+ extern const f_string_static_t utf8_string_combining_not_s;
+ extern const f_string_static_t utf8_string_unknown_s;
+
+ extern const f_string_static_t utf8_string_from_s;
+ extern const f_string_static_t utf8_string_to_s;
+
+ extern const f_string_static_t utf8_string_prepend_padding_s;
+
+ extern const f_string_static_t utf8_string_verified_valid_s;
+ extern const f_string_static_t utf8_string_verified_valid_not_s;
+
+ extern const f_string_static_t utf8_string_width_0_s;
+ extern const f_string_static_t utf8_string_width_1_s;
+ extern const f_string_static_t utf8_string_width_2_s;
+ extern const f_string_static_t utf8_string_width_3_s;
+ extern const f_string_static_t utf8_string_width_4_s;
+
+ extern const f_string_static_t utf8_string_valid_not_s;
+#endif // _di_utf8_s_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_utf8_parameter_s_
+ #define UTF8_short_from_bytesequence_s "b"
+ #define UTF8_short_from_codepoint_s "c"
+ #define UTF8_short_from_file_s "f"
+
+ #define UTF8_short_headers_s "H"
+ #define UTF8_short_separate_s "S"
+ #define UTF8_short_strip_invalid_s "s"
+ #define UTF8_short_verify_s "v"
+
+ #define UTF8_short_to_bytesequence_s "B"
+ #define UTF8_short_to_codepoint_s "C"
+ #define UTF8_short_to_combining_s "O"
+ #define UTF8_short_to_file_s "F"
+ #define UTF8_short_to_width_s "W"
+
+ #define UTF8_long_from_bytesequence_s "from_bytesequence"
+ #define UTF8_long_from_codepoint_s "from_codepoint"
+ #define UTF8_long_from_file_s "from_file"
+
+ #define UTF8_long_headers_s "headers"
+ #define UTF8_long_separate_s "separate"
+ #define UTF8_long_strip_invalid_s "strip_invalid"
+ #define UTF8_long_verify_s "verify"
+
+ #define UTF8_long_to_bytesequence_s "to_bytesequence"
+ #define UTF8_long_to_codepoint_s "to_codepoint"
+ #define UTF8_long_to_combining_s "to_combining"
+ #define UTF8_long_to_file_s "to_file"
+ #define UTF8_long_to_width_s "to_width"
+
+ #define UTF8_short_from_bytesequence_s_length 1
+ #define UTF8_short_from_codepoint_s_length 1
+ #define UTF8_short_from_file_s_length 1
+
+ #define UTF8_short_headers_s_length 1
+ #define UTF8_short_separate_s_length 1
+ #define UTF8_short_strip_invalid_s_length 1
+ #define UTF8_short_verify_s_length 1
+
+ #define UTF8_short_to_bytesequence_s_length 1
+ #define UTF8_short_to_codepoint_s_length 1
+ #define UTF8_short_to_combining_s_length 1
+ #define UTF8_short_to_file_s_length 1
+ #define UTF8_short_to_width_s_length 1
+
+ #define UTF8_long_from_bytesequence_s_length 17
+ #define UTF8_long_from_codepoint_s_length 14
+ #define UTF8_long_from_file_s_length 9
+
+ #define UTF8_long_headers_s_length 7
+ #define UTF8_long_separate_s_length 8
+ #define UTF8_long_strip_invalid_s_length 13
+ #define UTF8_long_verify_s_length 6
+
+ #define UTF8_long_to_bytesequence_s_length 15
+ #define UTF8_long_to_codepoint_s_length 12
+ #define UTF8_long_to_combining_s_length 12
+ #define UTF8_long_to_file_s_length 7
+ #define UTF8_long_to_width_s_length 8
+
+ extern const f_string_static_t utf8_short_from_bytesequence_s;
+ extern const f_string_static_t utf8_short_from_codepoint_s;
+ extern const f_string_static_t utf8_short_from_file_s;
+
+ extern const f_string_static_t utf8_short_headers_s;
+ extern const f_string_static_t utf8_short_separate_s;
+ extern const f_string_static_t utf8_short_strip_invalid_s;
+ extern const f_string_static_t utf8_short_verify_s;
+
+ extern const f_string_static_t utf8_short_to_bytesequence_s;
+ extern const f_string_static_t utf8_short_to_codepoint_s;
+ extern const f_string_static_t utf8_short_to_combining_s;
+ extern const f_string_static_t utf8_short_to_file_s;
+ extern const f_string_static_t utf8_short_to_width_s;
+
+ extern const f_string_static_t utf8_long_from_bytesequence_s;
+ extern const f_string_static_t utf8_long_from_codepoint_s;
+ extern const f_string_static_t utf8_long_from_file_s;
+
+ extern const f_string_static_t utf8_long_headers_s;
+ extern const f_string_static_t utf8_long_separate_s;
+ extern const f_string_static_t utf8_long_strip_invalid_s;
+ extern const f_string_static_t utf8_long_verify_s;
+
+ extern const f_string_static_t utf8_long_to_bytesequence_s;
+ extern const f_string_static_t utf8_long_to_codepoint_s;
+ extern const f_string_static_t utf8_long_to_combining_s;
+ extern const f_string_static_t utf8_long_to_file_s;
+ extern const f_string_static_t utf8_long_to_width_s;
+#endif // _di_utf8_parameter_s_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _utf8_common_string_h
--- /dev/null
+#include "utf8.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: UTF8
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Provides the common type structures.
+ *
+ * This is auto-included and should not need to be explicitly included.
+ */
+#ifndef _utf8_common_type_h
+#define _utf8_common_type_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Set to at least 4 to provide a UTF-8 friendly allocation step.
+ */
+#ifndef _di_utf8_default_d_
+ #define utf8_default_allocation_step_d 16
+#endif // _di_utf8_default_d_
+
+/**
+ * The program defines.
+ */
+#ifndef _di_utf8_d_
+ #define utf8_signal_check_d 20000
+#endif // _di_utf8_d_
+
+/**
+ * Modes used to designate how to the input and output are to be processed.
+ *
+ * utf8_mode_*_e:
+ * - none: No flags set.
+ *
+ * utf8_mode_from_*_e:
+ * - bytesequence: The input format is bytesequence.
+ * - codepoint: The input format is codepoint (U+XXXX or U+XXXXXX).
+ *
+ * utf8_mode_to_*_e:
+ * - bytesequence: The output format is bytesequence.
+ * - codepoint: The output format is codepoint (U+XXXX or U+XXXXXX).
+ * - combining: The output format is whether or not character is combining (may be used with "width").
+ * - width: The output format is how wide the character is (may be used with "combining").
+ */
+#ifndef _di_utf8_modes_e_
+ enum {
+ utf8_mode_none_e = 0x0,
+ utf8_mode_from_bytesequence_e = 0x1,
+ utf8_mode_from_codepoint_e = 0x2,
+ utf8_mode_to_bytesequence_e = 0x4,
+ utf8_mode_to_codepoint_e = 0x8,
+ utf8_mode_to_combining_e = 0x10,
+ utf8_mode_to_width_e = 0x20,
+ }; // enum
+#endif // _di_utf8_modes_e_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * utf8_main_flag_*_e:
+ * - none: No flags set.
+ * - copyright: Print the copyright.
+ * - file_from: Using a specified source file.
+ * - file_to: Using a specified destination file.
+ * - header: Enable printing of headers.
+ * - help: Print help.
+ * - pipe: Use the input pipe.
+ * - separate: Enable printing of separators.
+ * - strip_invalid: Using strip invalid character mode.
+ * - verify: Using verify mode.
+ * - version: Print version.
+ */
+#ifndef _di_utf8_main_flag_e_
+ enum {
+ utf8_main_flag_none_e = 0x0,
+ utf8_main_flag_copyright_e = 0x1,
+ utf8_main_flag_file_from_e = 0x2,
+ utf8_main_flag_file_to_e = 0x4,
+ utf8_main_flag_header_e = 0x8,
+ utf8_main_flag_help_e = 0x10,
+ utf8_main_flag_pipe_e = 0x20,
+ utf8_main_flag_separate_e = 0x40,
+ utf8_main_flag_strip_invalid_e = 0x80,
+ utf8_main_flag_verify_e = 0x100,
+ utf8_main_flag_version_e = 0x200,
+ }; // enum
+#endif // _di_utf8_main_flag_e_
+
+/**
+ * The main program parameters.
+ */
+#ifndef _di_utf8_parameter_e_
+ enum {
+ utf8_parameter_help_e,
+ utf8_parameter_copyright_e,
+ utf8_parameter_light_e,
+ utf8_parameter_dark_e,
+ utf8_parameter_no_color_e,
+ 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,
+ utf8_parameter_version_e,
+ utf8_parameter_line_first_no_e,
+ utf8_parameter_line_last_no_e,
+
+ utf8_parameter_from_bytesequence_e,
+ utf8_parameter_from_codepoint_e,
+ utf8_parameter_from_file_e,
+
+ utf8_parameter_headers_e,
+ utf8_parameter_separate_e,
+ utf8_parameter_strip_invalid_e,
+
+ utf8_parameter_to_bytesequence_e,
+ utf8_parameter_to_codepoint_e,
+ utf8_parameter_to_combining_e,
+ utf8_parameter_to_file_e,
+ utf8_parameter_to_width_e,
+
+ utf8_parameter_verify_e,
+ }; // enum
+
+ #define utf8_console_parameter_t_initialize \
+ { \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
+ \
+ macro_f_console_parameter_t_initialize_3(utf8_short_from_bytesequence_s, utf8_long_from_bytesequence_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_from_file_s, utf8_long_from_file_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_headers_s, utf8_long_headers_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_separate_s, utf8_long_separate_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_to_bytesequence_s, utf8_long_to_bytesequence_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_to_combining_s, utf8_long_to_combining_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_to_file_s, utf8_long_to_file_s, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_to_width_s, utf8_long_to_width_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(utf8_short_verify_s, utf8_long_verify_s, 0, f_console_flag_normal_e), \
+ }
+
+ #define utf8_total_parameters_d 25
+#endif // _di_utf8_parameter_e_
+
+/**
+ * The utf8 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).
+ * flag: Flags passed to the main function.
+ *
+ * status: The main status code, generally used by the load settings and main functions.
+ *
+ * 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.
+ * prepend: A string to prepend. A value of NULL results in not prepending.
+ *
+ * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
+ * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
+ *
+ * buffer: A buffer to use for printing output (generally for storing a block of input from an input file).
+ * text: A buffer for storing a series of characters for processing (generally for code point processing).
+ *
+ * path_files_from: An array of all "from" file paths for when the flag utf8_main_flag_file_from_e is set.
+ * path_files_to: An array of all "to" file paths for when the flag utf8_main_flag_file_to_e is set.
+ * remaining: An array containing all remaining arguments passed to the program.
+ */
+#ifndef _di_utf8_setting_t_
+ typedef struct {
+ uint8_t mode;
+ uint16_t flag;
+
+ f_status_t status;
+
+ f_color_set_t valid;
+ f_color_set_t valid_not;
+
+ f_string_static_t append;
+ f_string_static_t prepend;
+
+ f_string_static_t line_first;
+ f_string_static_t line_last;
+
+ f_string_dynamic_t buffer;
+ f_string_dynamic_t text;
+
+ f_string_dynamics_t path_files_from;
+ f_string_dynamics_t path_files_to;
+ f_string_dynamics_t remaining;
+ } utf8_setting_t;
+
+ #define utf8_setting_t_initialize \
+ { \
+ utf8_mode_from_bytesequence_e | utf8_mode_to_codepoint_e, \
+ utf8_main_flag_none_e, \
+ F_none, \
+ f_color_set_t_initialize, \
+ f_color_set_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
+ f_string_eol_s, \
+ f_string_eol_s, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ }
+#endif // _di_utf8_setting_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _utf8_common_type_h
extern "C" {
#endif
-#ifndef _di_utf8_program_version_s_
- const f_string_static_t utf8_program_version_s = macro_f_string_static_t_initialize(UTF8_program_version_s, 0, UTF8_program_version_s_length);
-#endif // _di_utf8_program_version_s_
-
-#ifndef _di_utf8_program_name_s_
- const f_string_static_t utf8_program_name_s = macro_f_string_static_t_initialize(UTF8_program_name_s, 0, UTF8_program_name_s_length);
- const f_string_static_t utf8_program_name_long_s = macro_f_string_static_t_initialize(UTF8_program_name_long_s, 0, UTF8_program_name_long_s_length);
-#endif // _di_utf8_program_name_s_
-
-#ifndef _di_utf8_program_help_parameters_s_
- const f_string_static_t utf8_program_help_parameters_s = macro_f_string_static_t_initialize(UTF8_program_help_parameters_s, 0, UTF8_program_help_parameters_s_length);
-#endif // _di_utf8_program_help_parameters_s_
-
-#ifndef _di_utf8_s_
- const f_string_static_t utf8_string_combining_is_s = macro_f_string_static_t_initialize(UTF8_string_combining_is_s, 0, UTF8_string_combining_is_s_length);
- const f_string_static_t utf8_string_combining_not_s = macro_f_string_static_t_initialize(UTF8_string_combining_not_s, 0, UTF8_string_combining_not_s_length);
- const f_string_static_t utf8_string_unknown_s = macro_f_string_static_t_initialize(UTF8_string_unknown_s, 0, UTF8_string_unknown_s_length);
-
- const f_string_static_t utf8_string_from_s = macro_f_string_static_t_initialize(UTF8_string_from_s, 0, UTF8_string_from_s_length);
- const f_string_static_t utf8_string_to_s = macro_f_string_static_t_initialize(UTF8_string_to_s, 0, UTF8_string_to_s_length);
-
- const f_string_static_t utf8_string_prepend_padding_s = macro_f_string_static_t_initialize(UTF8_string_prepend_padding_s, 0, UTF8_string_prepend_padding_s_length);
-
- const f_string_static_t utf8_string_valid_not_s = macro_f_string_static_t_initialize(UTF8_string_valid_not_s, 0, UTF8_string_valid_not_s_length);
-
- const f_string_static_t utf8_string_verified_valid_s = macro_f_string_static_t_initialize(UTF8_string_verified_valid_s, 0, UTF8_string_verified_valid_s_length);
- const f_string_static_t utf8_string_verified_valid_not_s = macro_f_string_static_t_initialize(UTF8_string_verified_valid_not_s, 0, UTF8_string_verified_valid_not_s_length);
-
- const f_string_static_t utf8_string_width_0_s = macro_f_string_static_t_initialize(UTF8_string_width_0_s, 0, UTF8_string_width_0_s_length);
- const f_string_static_t utf8_string_width_1_s = macro_f_string_static_t_initialize(UTF8_string_width_1_s, 0, UTF8_string_width_1_s_length);
- const f_string_static_t utf8_string_width_2_s = macro_f_string_static_t_initialize(UTF8_string_width_2_s, 0, UTF8_string_width_2_s_length);
- const f_string_static_t utf8_string_width_3_s = macro_f_string_static_t_initialize(UTF8_string_width_3_s, 0, UTF8_string_width_3_s_length);
- const f_string_static_t utf8_string_width_4_s = macro_f_string_static_t_initialize(UTF8_string_width_4_s, 0, UTF8_string_width_4_s_length);
-#endif // _di_utf8_s_
-
-#ifndef _di_utf8_parameter_d_
- const f_string_static_t utf8_short_from_bytesequence_s = macro_f_string_static_t_initialize(UTF8_short_from_bytesequence_s, 0, UTF8_short_from_bytesequence_s_length);
- const f_string_static_t utf8_short_from_codepoint_s = macro_f_string_static_t_initialize(UTF8_short_from_codepoint_s, 0, UTF8_short_from_codepoint_s_length);
- const f_string_static_t utf8_short_from_file_s = macro_f_string_static_t_initialize(UTF8_short_from_file_s, 0, UTF8_short_from_file_s_length);
-
- const f_string_static_t utf8_short_headers_s = macro_f_string_static_t_initialize(UTF8_short_headers_s, 0, UTF8_short_headers_s_length);
- const f_string_static_t utf8_short_separate_s = macro_f_string_static_t_initialize(UTF8_short_separate_s, 0, UTF8_short_separate_s_length);
- const f_string_static_t utf8_short_strip_invalid_s = macro_f_string_static_t_initialize(UTF8_short_strip_invalid_s, 0, UTF8_short_strip_invalid_s_length);
- const f_string_static_t utf8_short_verify_s = macro_f_string_static_t_initialize(UTF8_short_verify_s, 0, UTF8_short_verify_s_length);
-
- const f_string_static_t utf8_short_to_bytesequence_s = macro_f_string_static_t_initialize(UTF8_short_to_bytesequence_s, 0, UTF8_short_to_bytesequence_s_length);
- const f_string_static_t utf8_short_to_codepoint_s = macro_f_string_static_t_initialize(UTF8_short_to_codepoint_s, 0, UTF8_short_to_codepoint_s_length);
- const f_string_static_t utf8_short_to_combining_s = macro_f_string_static_t_initialize(UTF8_short_to_combining_s, 0, UTF8_short_to_combining_s_length);
- const f_string_static_t utf8_short_to_file_s = macro_f_string_static_t_initialize(UTF8_short_to_file_s, 0, UTF8_short_to_file_s_length);
- const f_string_static_t utf8_short_to_width_s = macro_f_string_static_t_initialize(UTF8_short_to_width_s, 0, UTF8_short_to_width_s_length);
-
- const f_string_static_t utf8_long_from_bytesequence_s = macro_f_string_static_t_initialize(UTF8_long_from_bytesequence_s, 0, UTF8_long_from_bytesequence_s_length);
- const f_string_static_t utf8_long_from_codepoint_s = macro_f_string_static_t_initialize(UTF8_long_from_codepoint_s, 0, UTF8_long_from_codepoint_s_length);
- const f_string_static_t utf8_long_from_file_s = macro_f_string_static_t_initialize(UTF8_long_from_file_s, 0, UTF8_long_from_file_s_length);
-
- const f_string_static_t utf8_long_headers_s = macro_f_string_static_t_initialize(UTF8_long_headers_s, 0, UTF8_long_headers_s_length);
- const f_string_static_t utf8_long_separate_s = macro_f_string_static_t_initialize(UTF8_long_separate_s, 0, UTF8_long_separate_s_length);
- const f_string_static_t utf8_long_strip_invalid_s = macro_f_string_static_t_initialize(UTF8_long_strip_invalid_s, 0, UTF8_long_strip_invalid_s_length);
- const f_string_static_t utf8_long_verify_s = macro_f_string_static_t_initialize(UTF8_long_verify_s, 0, UTF8_long_verify_s_length);
-
- const f_string_static_t utf8_long_to_bytesequence_s = macro_f_string_static_t_initialize(UTF8_long_to_bytesequence_s, 0, UTF8_long_to_bytesequence_s_length);
- const f_string_static_t utf8_long_to_codepoint_s = macro_f_string_static_t_initialize(UTF8_long_to_codepoint_s, 0, UTF8_long_to_codepoint_s_length);
- const f_string_static_t utf8_long_to_combining_s = macro_f_string_static_t_initialize(UTF8_long_to_combining_s, 0, UTF8_long_to_combining_s_length);
- const f_string_static_t utf8_long_to_file_s = macro_f_string_static_t_initialize(UTF8_long_to_file_s, 0, UTF8_long_to_file_s_length);
- const f_string_static_t utf8_long_to_width_s = macro_f_string_static_t_initialize(UTF8_long_to_width_s, 0, UTF8_long_to_width_s_length);
-#endif // _di_utf8_parameter_d_
-
#ifndef _di_utf8_setting_delete_
f_status_t utf8_setting_delete(utf8_setting_t * const setting) {
* API Version: 0.7
* Licenses: lgpl-2.1-or-later
*
- * Provides the common data structures.
+ * Provides the common functionality.
*
* This is auto-included and should not need to be explicitly included.
*/
#endif
/**
- * The program version.
- */
-#ifndef _di_utf8_program_version_s_
- #define UTF8_program_version_major_s F_string_ascii_0_s
- #define UTF8_program_version_minor_s F_string_ascii_7_s
- #define UTF8_program_version_micro_s F_string_ascii_0_s
-
- #define UTF8_program_version_major_s_length F_string_ascii_0_s_length
- #define UTF8_program_version_minor_s_length F_string_ascii_7_s_length
- #define UTF8_program_version_micro_s_length F_string_ascii_0_s_length
-
- #if !(defined(UTF8_program_version_nano_prefix_s) && defined(UTF8_program_version_nano_prefix_s_length))
- #define UTF8_program_version_nano_prefix_s
- #define UTF8_program_version_nano_prefix_s_length 0
- #endif // !(defined(UTF8_program_version_nano_prefix_s) && defined(UTF8_program_version_nano_prefix_s_length))
-
- #if !(defined(UTF8_program_version_nano_s) && defined(UTF8_program_version_nano_s_length))
- #define UTF8_program_version_nano_s
- #define UTF8_program_version_nano_s_length 0
- #endif // !(defined(UTF8_program_version_nano_s) && defined(UTF8_program_version_nano_s_length))
-
- #define UTF8_program_version_s UTF8_program_version_major_s F_string_ascii_period_s UTF8_program_version_minor_s F_string_ascii_period_s UTF8_program_version_micro_s UTF8_program_version_nano_prefix_s UTF8_program_version_nano_s
-
- #define UTF8_program_version_s_length UTF8_program_version_major_s_length + F_string_ascii_period_s_length + UTF8_program_version_minor_s_length + F_string_ascii_period_s_length + UTF8_program_version_micro_s_length + UTF8_program_version_nano_prefix_s_length + UTF8_program_version_nano_s_length
-
- extern const f_string_static_t utf8_program_version_s;
-#endif // _di_utf8_program_version_s_
-
-/**
- * The program name.
- */
-#ifndef _di_utf8_program_name_s_
- #define UTF8_program_name_s "utf8"
- #define UTF8_program_name_long_s "UTF-8"
-
- #define UTF8_program_name_s_length 4
- #define UTF8_program_name_long_s_length 5
-
- extern const f_string_static_t utf8_program_name_s;
- extern const f_string_static_t utf8_program_name_long_s;
-#endif // _di_utf8_program_name_s_
-
-/**
- * The program help related data.
- */
-#ifndef _di_utf8_program_help_parameters_s_
- #define UTF8_program_help_parameters_s "character(s)"
- #define UTF8_program_help_parameters_s_length 12
-
- extern const f_string_static_t utf8_program_help_parameters_s;
-#endif // _di_utf8_program_help_parameters_s_
-
-/**
- * Set to at least 4 to provide a UTF-8 friendly allocation step.
- */
-#ifndef _di_utf8_default_d_
- #define utf8_default_allocation_step_d 16
-#endif // _di_utf8_default_d_
-
-/**
- * The program defines.
- */
-#ifndef _di_utf8_d_
- #define utf8_signal_check_d 20000
-#endif // _di_utf8_d_
-
-/**
- * The program strings.
- */
-#ifndef _di_utf8_s_
- #define UTF8_string_combining_is_s "C"
- #define UTF8_string_combining_not_s "N"
- #define UTF8_string_unknown_s "?"
-
- #define UTF8_string_from_s "from"
- #define UTF8_string_to_s "to"
-
- #define UTF8_string_prepend_padding_s " "
-
- #define UTF8_string_valid_not_s "�"
-
- #define UTF8_string_verified_valid_s "Verified Valid"
- #define UTF8_string_verified_valid_not_s "Verified Invalid"
-
- #define UTF8_string_width_0_s "0"
- #define UTF8_string_width_1_s "1"
- #define UTF8_string_width_2_s "2"
- #define UTF8_string_width_3_s "3"
- #define UTF8_string_width_4_s "4"
-
- #define UTF8_string_combining_is_s_length 1
- #define UTF8_string_combining_not_s_length 1
- #define UTF8_string_unknown_s_length 1
-
- #define UTF8_string_from_s_length 4
- #define UTF8_string_to_s_length 2
-
- #define UTF8_string_prepend_padding_s_length 2
-
- #define UTF8_string_valid_not_s_length 3
-
- #define UTF8_string_verified_valid_s_length 14
- #define UTF8_string_verified_valid_not_s_length 16
-
- #define UTF8_string_width_0_s_length 1
- #define UTF8_string_width_1_s_length 1
- #define UTF8_string_width_2_s_length 1
- #define UTF8_string_width_3_s_length 1
- #define UTF8_string_width_4_s_length 1
-
- extern const f_string_static_t utf8_string_combining_is_s;
- extern const f_string_static_t utf8_string_combining_not_s;
- extern const f_string_static_t utf8_string_unknown_s;
-
- extern const f_string_static_t utf8_string_from_s;
- extern const f_string_static_t utf8_string_to_s;
-
- extern const f_string_static_t utf8_string_prepend_padding_s;
-
- extern const f_string_static_t utf8_string_verified_valid_s;
- extern const f_string_static_t utf8_string_verified_valid_not_s;
-
- extern const f_string_static_t utf8_string_width_0_s;
- extern const f_string_static_t utf8_string_width_1_s;
- extern const f_string_static_t utf8_string_width_2_s;
- extern const f_string_static_t utf8_string_width_3_s;
- extern const f_string_static_t utf8_string_width_4_s;
-
- extern const f_string_static_t utf8_string_valid_not_s;
-#endif // _di_utf8_s_
-
-/**
- * The main program parameters.
- */
-#ifndef _di_utf8_parameter_d_
- #define UTF8_short_from_bytesequence_s "b"
- #define UTF8_short_from_codepoint_s "c"
- #define UTF8_short_from_file_s "f"
-
- #define UTF8_short_headers_s "H"
- #define UTF8_short_separate_s "S"
- #define UTF8_short_strip_invalid_s "s"
- #define UTF8_short_verify_s "v"
-
- #define UTF8_short_to_bytesequence_s "B"
- #define UTF8_short_to_codepoint_s "C"
- #define UTF8_short_to_combining_s "O"
- #define UTF8_short_to_file_s "F"
- #define UTF8_short_to_width_s "W"
-
- #define UTF8_long_from_bytesequence_s "from_bytesequence"
- #define UTF8_long_from_codepoint_s "from_codepoint"
- #define UTF8_long_from_file_s "from_file"
-
- #define UTF8_long_headers_s "headers"
- #define UTF8_long_separate_s "separate"
- #define UTF8_long_strip_invalid_s "strip_invalid"
- #define UTF8_long_verify_s "verify"
-
- #define UTF8_long_to_bytesequence_s "to_bytesequence"
- #define UTF8_long_to_codepoint_s "to_codepoint"
- #define UTF8_long_to_combining_s "to_combining"
- #define UTF8_long_to_file_s "to_file"
- #define UTF8_long_to_width_s "to_width"
-
- #define UTF8_short_from_bytesequence_s_length 1
- #define UTF8_short_from_codepoint_s_length 1
- #define UTF8_short_from_file_s_length 1
-
- #define UTF8_short_headers_s_length 1
- #define UTF8_short_separate_s_length 1
- #define UTF8_short_strip_invalid_s_length 1
- #define UTF8_short_verify_s_length 1
-
- #define UTF8_short_to_bytesequence_s_length 1
- #define UTF8_short_to_codepoint_s_length 1
- #define UTF8_short_to_combining_s_length 1
- #define UTF8_short_to_file_s_length 1
- #define UTF8_short_to_width_s_length 1
-
- #define UTF8_long_from_bytesequence_s_length 17
- #define UTF8_long_from_codepoint_s_length 14
- #define UTF8_long_from_file_s_length 9
-
- #define UTF8_long_headers_s_length 7
- #define UTF8_long_separate_s_length 8
- #define UTF8_long_strip_invalid_s_length 13
- #define UTF8_long_verify_s_length 6
-
- #define UTF8_long_to_bytesequence_s_length 15
- #define UTF8_long_to_codepoint_s_length 12
- #define UTF8_long_to_combining_s_length 12
- #define UTF8_long_to_file_s_length 7
- #define UTF8_long_to_width_s_length 8
-
- extern const f_string_static_t utf8_short_from_bytesequence_s;
- extern const f_string_static_t utf8_short_from_codepoint_s;
- extern const f_string_static_t utf8_short_from_file_s;
-
- extern const f_string_static_t utf8_short_headers_s;
- extern const f_string_static_t utf8_short_separate_s;
- extern const f_string_static_t utf8_short_strip_invalid_s;
- extern const f_string_static_t utf8_short_verify_s;
-
- extern const f_string_static_t utf8_short_to_bytesequence_s;
- extern const f_string_static_t utf8_short_to_codepoint_s;
- extern const f_string_static_t utf8_short_to_combining_s;
- extern const f_string_static_t utf8_short_to_file_s;
- extern const f_string_static_t utf8_short_to_width_s;
-
- extern const f_string_static_t utf8_long_from_bytesequence_s;
- extern const f_string_static_t utf8_long_from_codepoint_s;
- extern const f_string_static_t utf8_long_from_file_s;
-
- extern const f_string_static_t utf8_long_headers_s;
- extern const f_string_static_t utf8_long_separate_s;
- extern const f_string_static_t utf8_long_strip_invalid_s;
- extern const f_string_static_t utf8_long_verify_s;
-
- extern const f_string_static_t utf8_long_to_bytesequence_s;
- extern const f_string_static_t utf8_long_to_codepoint_s;
- extern const f_string_static_t utf8_long_to_combining_s;
- extern const f_string_static_t utf8_long_to_file_s;
- extern const f_string_static_t utf8_long_to_width_s;
-
- enum {
- utf8_parameter_help_e,
- utf8_parameter_copyright_e,
- utf8_parameter_light_e,
- utf8_parameter_dark_e,
- utf8_parameter_no_color_e,
- 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,
- utf8_parameter_version_e,
- utf8_parameter_line_first_no_e,
- utf8_parameter_line_last_no_e,
-
- utf8_parameter_from_bytesequence_e,
- utf8_parameter_from_codepoint_e,
- utf8_parameter_from_file_e,
-
- utf8_parameter_headers_e,
- utf8_parameter_separate_e,
- utf8_parameter_strip_invalid_e,
-
- utf8_parameter_to_bytesequence_e,
- utf8_parameter_to_codepoint_e,
- utf8_parameter_to_combining_e,
- utf8_parameter_to_file_e,
- utf8_parameter_to_width_e,
-
- utf8_parameter_verify_e,
- }; // enum
-
- #define utf8_console_parameter_t_initialize \
- { \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
- \
- macro_f_console_parameter_t_initialize_3(utf8_short_from_bytesequence_s, utf8_long_from_bytesequence_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_from_file_s, utf8_long_from_file_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_headers_s, utf8_long_headers_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_separate_s, utf8_long_separate_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_strip_invalid_s, utf8_long_strip_invalid_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_to_bytesequence_s, utf8_long_to_bytesequence_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_to_combining_s, utf8_long_to_combining_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_to_file_s, utf8_long_to_file_s, 1, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_to_width_s, utf8_long_to_width_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(utf8_short_verify_s, utf8_long_verify_s, 0, f_console_flag_normal_e), \
- }
-
- #define utf8_total_parameters_d 25
-#endif // _di_utf8_parameter_d_
-
-/**
- * Modes used to designate how to the input and output are to be processed.
- *
- * utf8_mode_*_e:
- * - none: No flags set.
- *
- * utf8_mode_from_*_e:
- * - bytesequence: The input format is bytesequence.
- * - codepoint: The input format is codepoint (U+XXXX or U+XXXXXX).
- *
- * utf8_mode_to_*_e:
- * - bytesequence: The output format is bytesequence.
- * - codepoint: The output format is codepoint (U+XXXX or U+XXXXXX).
- * - combining: The output format is whether or not character is combining (may be used with "width").
- * - width: The output format is how wide the character is (may be used with "combining").
- */
-#ifndef _di_utf8_modes_e_
- enum {
- utf8_mode_none_e = 0x0,
- utf8_mode_from_bytesequence_e = 0x1,
- utf8_mode_from_codepoint_e = 0x2,
- utf8_mode_to_bytesequence_e = 0x4,
- utf8_mode_to_codepoint_e = 0x8,
- utf8_mode_to_combining_e = 0x10,
- utf8_mode_to_width_e = 0x20,
- }; // enum
-#endif // _di_utf8_modes_e_
-
-/**
- * Flags passed to the main function or program.
- *
- * utf8_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print the copyright.
- * - file_from: Using a specified source file.
- * - file_to: Using a specified destination file.
- * - header: Enable printing of headers.
- * - help: Print help.
- * - pipe: Use the input pipe.
- * - separate: Enable printing of separators.
- * - strip_invalid: Using strip invalid character mode.
- * - verify: Using verify mode.
- * - version: Print version.
- */
-#ifndef _di_utf8_main_flag_e_
- enum {
- utf8_main_flag_none_e = 0x0,
- utf8_main_flag_copyright_e = 0x1,
- utf8_main_flag_file_from_e = 0x2,
- utf8_main_flag_file_to_e = 0x4,
- utf8_main_flag_header_e = 0x8,
- utf8_main_flag_help_e = 0x10,
- utf8_main_flag_pipe_e = 0x20,
- utf8_main_flag_separate_e = 0x40,
- utf8_main_flag_strip_invalid_e = 0x80,
- utf8_main_flag_verify_e = 0x100,
- utf8_main_flag_version_e = 0x200,
- }; // enum
-#endif // _di_utf8_main_flag_e_
-
-/**
- * The utf8 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).
- * flag: Flags passed to the main function.
- *
- * status: The main status code, generally used by the load settings and main functions.
- *
- * 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.
- * prepend: A string to prepend. A value of NULL results in not prepending.
- *
- * line_first: A string expected to represent either "\n" or NULL to allow for easy handling of when to print first new line or not.
- * line_last: A string expected to represent either "\n" or NULL to allow for easy handling of when to print last new line or not.
- *
- * buffer: A buffer to use for printing output (generally for storing a block of input from an input file).
- * text: A buffer for storing a series of characters for processing (generally for code point processing).
- *
- * path_files_from: An array of all "from" file paths for when the flag utf8_main_flag_file_from_e is set.
- * path_files_to: An array of all "to" file paths for when the flag utf8_main_flag_file_to_e is set.
- * remaining: An array containing all remaining arguments passed to the program.
- */
-#ifndef _di_utf8_setting_t_
- typedef struct {
- uint8_t mode;
- uint16_t flag;
-
- f_status_t status;
-
- f_color_set_t valid;
- f_color_set_t valid_not;
-
- f_string_static_t append;
- f_string_static_t prepend;
-
- f_string_static_t line_first;
- f_string_static_t line_last;
-
- f_string_dynamic_t buffer;
- f_string_dynamic_t text;
-
- f_string_dynamics_t path_files_from;
- f_string_dynamics_t path_files_to;
- f_string_dynamics_t remaining;
- } utf8_setting_t;
-
- #define utf8_setting_t_initialize \
- { \
- utf8_mode_from_bytesequence_e | utf8_mode_to_codepoint_e, \
- utf8_main_flag_none_e, \
- F_none, \
- f_color_set_t_initialize, \
- f_color_set_t_initialize, \
- f_string_static_t_initialize, \
- f_string_static_t_initialize, \
- f_string_eol_s, \
- f_string_eol_s, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_string_dynamics_t_initialize, \
- }
-#endif // _di_utf8_setting_t_
-
-/**
* Delete the program main setting data.
*
* @param setting
#include <fll/level_2/program.h>
// UTF-8 includes.
-#include <program/utf8/main/common.h>
#include <program/utf8/main/common-print.h>
+#include <program/utf8/main/common-string.h>
+#include <program/utf8/main/common-type.h>
+#include <program/utf8/main/common.h>
#include <program/utf8/main/print.h>
#ifdef __cplusplus
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
-build_sources_library main/common.c main/common-print.c main/print.c main/utf8.c
+build_sources_library main/common.c main/common-print.c main/common-string.c main/common-type.c main/print.c main/utf8.c
build_sources_library main/private-common.c main/private-utf8.c main/private-utf8_bytesequence.c main/private-utf8_codepoint.c
build_sources_program main/main.c
-build_sources_headers main/common.h main/common-print.h main/print.h main/utf8.h
+build_sources_headers main/common.h main/common-print.h main/common-string.h main/common-type.h main/print.h main/utf8.h
build_sources_documentation man