From: Kevin Day Date: Thu, 16 Feb 2023 05:57:51 +0000 (-0600) Subject: Progress: Continue work on Featureless Make. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=e3d52d508065cf357e344db82cfb34831b5b3e13;p=fll Progress: Continue work on Featureless Make. Primary focus remains on printing. Add a new setting flag to assist in first line printing logic. --- diff --git a/build/stand_alone/fake.settings b/build/stand_alone/fake.settings index 6a9eead..15179dd 100644 --- a/build/stand_alone/fake.settings +++ b/build/stand_alone/fake.settings @@ -70,9 +70,9 @@ build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/lev build_sources_library program/fake/main/build.c program/fake/main/clean.c program/fake/main/common.c program/fake/main/fake.c program/fake/main/make.c program/fake/main/print.c program/fake/main/private-common.c program/fake/main/private-fake.c program/fake/main/private-print.c program/fake/main/skeleton.c build_sources_library program/fake/main/build/library.c program/fake/main/build/load.c program/fake/main/build/object.c program/fake/main/build/objects.c program/fake/main/build/print.c program/fake/main/build/program.c program/fake/main/build/skeleton.c build_sources_library program/fake/main/clean/print.c -build_sources_library program/fake/main/common/print.c program/fake/main/common/string.c program/fake/main/common/type.c +build_sources_library program/fake/main/common/define.c program/fake/main/common/enumeration.c program/fake/main/common/print.c program/fake/main/common/string.c program/fake/main/common/type.c build_sources_library program/fake/main/fake/path_generate.c program/fake/main/fake/print.c -build_sources_library program/fake/main/make/load_fakefile.c program/fake/main/make/load_parameters.c program/fake/main/make/operate_block.c program/fake/main/make/operate.c program/fake/main/make/operate_process.c program/fake/main/make/operate_process_type.c program/fake/main/make/operate_validate.c program/fake/main/make/operate_validate_type.c program/fake/main/make/print.c +build_sources_library program/fake/main/make/load_fakefile.c program/fake/main/make/load_parameters.c program/fake/main/make/operate_block.c program/fake/main/make/operate.c program/fake/main/make/operate_process.c program/fake/main/make/operate_process_type.c program/fake/main/make/operate_validate.c program/fake/main/make/operate_validate_type.c program/fake/main/make/print.c program/fake/main/make/print-error.c program/fake/main/make/print-warning.c build_sources_library program/fake/main/skeleton/print.c build_sources_program program/fake/main/main.c diff --git a/level_3/fake/c/main/build.c b/level_3/fake/c/main/build.c index 53c0e1c..618924f 100644 --- a/level_3/fake/c/main/build.c +++ b/level_3/fake/c/main/build.c @@ -879,7 +879,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static fake_build_copy(data, mode, fake_build_setting_files_s, data->path_data_settings, data->path_build_settings, data_build.setting.build_sources_setting, stage.file_sources_settings, 0, &status); - if (data_build.setting.build_language == fake_build_language_type_bash_e) { + if (data_build.setting.build_language == fake_build_language_bash_e) { fake_build_object_script(data, &data_build, mode, stage.file_object_script, &status); fake_build_library_script(data, &data_build, mode, stage.file_library_script, &status); @@ -994,13 +994,13 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static } if (data_build->setting.has_path_standard) { - if (data_build->setting.build_language == fake_build_language_type_c_e) { + if (data_build->setting.build_language == fake_build_language_c_e) { source->used += fake_build_language_c_s.used; } - else if (data_build->setting.build_language == fake_build_language_type_cpp_e) { + else if (data_build->setting.build_language == fake_build_language_cpp_e) { source->used += fake_build_language_cpp_s.used; } - else if (data_build->setting.build_language == fake_build_language_type_bash_e) { + else if (data_build->setting.build_language == fake_build_language_bash_e) { source->used += fake_build_language_bash_s.used; } @@ -1018,15 +1018,15 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static source->used += setting_path_source->used; if (data_build->setting.has_path_standard) { - if (data_build->setting.build_language == fake_build_language_type_c_e) { + if (data_build->setting.build_language == fake_build_language_c_e) { memcpy(source->string + source->used, fake_build_language_c_s.string, sizeof(f_char_t) * fake_build_language_c_s.used); source->used += fake_build_language_c_s.used; } - else if (data_build->setting.build_language == fake_build_language_type_cpp_e) { + else if (data_build->setting.build_language == fake_build_language_cpp_e) { memcpy(source->string + source->used, fake_build_language_cpp_s.string, sizeof(f_char_t) * fake_build_language_cpp_s.used); source->used += fake_build_language_cpp_s.used; } - else if (data_build->setting.build_language == fake_build_language_type_bash_e) { + else if (data_build->setting.build_language == fake_build_language_bash_e) { memcpy(source->string + source->used, fake_build_language_bash_s.string, sizeof(f_char_t) * fake_build_language_bash_s.used); source->used += fake_build_language_bash_s.used; } diff --git a/level_3/fake/c/main/build.h b/level_3/fake/c/main/build.h index 2808300..c51a008 100644 --- a/level_3/fake/c/main/build.h +++ b/level_3/fake/c/main/build.h @@ -71,7 +71,7 @@ extern "C" { * @see fll_execute_arguments_add() */ #ifndef _di_fake_build_arguments_standard_add_ - extern void fake_build_arguments_standard_add(fake_data_t * const data, fake_build_data_t * const data_build, const bool is_shared, const uint8_t type, f_string_dynamics_t *arguments, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_arguments_standard_add(fake_data_t * const data, fake_build_data_t * const data_build, const bool is_shared, const uint8_t type, f_string_dynamics_t *arguments, f_status_t *status); #endif // _di_fake_build_arguments_standard_add_ /** @@ -109,7 +109,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_copy_ - extern void fake_build_copy(fake_data_t * const data, const f_mode_t mode, const f_string_static_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_array_length_t perserve_offset, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_copy(fake_data_t * const data, const f_mode_t mode, const f_string_static_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_array_length_t perserve_offset, f_status_t *status); #endif // _di_fake_build_copy_ /** @@ -134,7 +134,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_execute_process_script_ - extern int fake_build_execute_process_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) F_attribute_visibility_internal_d; + extern int fake_build_execute_process_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status); #endif // _di_fake_build_execute_process_script_ /** @@ -178,7 +178,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_objects_add_ - extern f_status_t fake_build_objects_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *path, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_build_objects_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *path, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments); #endif // _di_fake_build_objects_add_ /** @@ -207,7 +207,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_operate_ - extern f_status_t fake_build_operate(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe) F_attribute_visibility_internal_d; + extern f_status_t fake_build_operate(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe); #endif // _di_fake_build_operate_ /** @@ -226,7 +226,7 @@ extern "C" { * The path_sources.size is ignored. */ #ifndef _di_fake_build_path_source_length_ - extern 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) F_attribute_visibility_internal_d; + extern 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); #endif // _di_fake_build_path_source_length_ /** @@ -245,7 +245,7 @@ extern "C" { * The path_sources.size is ignored. */ #ifndef _di_fake_build_path_source_string_ - extern void fake_build_path_source_string(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) F_attribute_visibility_internal_d; + extern void fake_build_path_source_string(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); #endif // _di_fake_build_path_source_string_ /** @@ -268,7 +268,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_sources_add_ - extern f_status_t fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments); #endif // _di_fake_build_sources_add_ /** @@ -291,7 +291,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_sources_object_add_ - extern f_status_t fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *generic, const f_string_static_t *specific, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *generic, const f_string_static_t *specific, f_string_dynamics_t *arguments); #endif // _di_fake_build_sources_object_add_ /** @@ -307,7 +307,7 @@ extern "C" { * @see f_file_touch() */ #ifndef _di_fake_build_touch_ - extern void fake_build_touch(fake_data_t * const data, const f_string_dynamic_t file, f_status_t *status) F_attribute_visibility_internal_d; + extern void fake_build_touch(fake_data_t * const data, const f_string_dynamic_t file, f_status_t *status); #endif // _di_fake_build_touch_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/build/library.c b/level_3/fake/c/main/build/library.c index 95f5feb..0861170 100644 --- a/level_3/fake/c/main/build/library.c +++ b/level_3/fake/c/main/build/library.c @@ -214,29 +214,29 @@ extern "C" { parameter_file_path.used = data->path_build_libraries_shared.used; parameter_linker.used = fake_build_parameter_library_shared_prefix_s.used; - if (data_build->setting.version_file == fake_build_version_type_major_e) { + if (data_build->setting.version_file == fake_build_version_major_e) { parameter_file_path.used += parameter_file_name_major.used; } - else if (data_build->setting.version_file == fake_build_version_type_minor_e) { + else if (data_build->setting.version_file == fake_build_version_minor_e) { parameter_file_path.used += parameter_file_name_minor.used; } - else if (data_build->setting.version_file == fake_build_version_type_micro_e) { + else if (data_build->setting.version_file == fake_build_version_micro_e) { parameter_file_path.used += parameter_file_name_micro.used; } - else if (data_build->setting.version_file == fake_build_version_type_nano_e) { + else if (data_build->setting.version_file == fake_build_version_nano_e) { parameter_file_path.used += parameter_file_name_nano.used; } - if (data_build->setting.version_target == fake_build_version_type_major_e) { + if (data_build->setting.version_target == fake_build_version_major_e) { parameter_linker.used += parameter_file_name_major.used; } - else if (data_build->setting.version_target == fake_build_version_type_minor_e) { + else if (data_build->setting.version_target == fake_build_version_minor_e) { parameter_linker.used += parameter_file_name_minor.used; } - else if (data_build->setting.version_target == fake_build_version_type_micro_e) { + else if (data_build->setting.version_target == fake_build_version_micro_e) { parameter_linker.used += parameter_file_name_micro.used; } - else if (data_build->setting.version_target == fake_build_version_type_nano_e) { + else if (data_build->setting.version_target == fake_build_version_nano_e) { parameter_linker.used += parameter_file_name_nano.used; } @@ -252,29 +252,29 @@ extern "C" { memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used); memcpy(parameter_linker_string, fake_build_parameter_library_shared_prefix_s.string, sizeof(f_char_t) * fake_build_parameter_library_shared_prefix_s.used); - if (data_build->setting.version_file == fake_build_version_type_major_e) { + if (data_build->setting.version_file == fake_build_version_major_e) { memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_major_string, sizeof(f_char_t) * parameter_file_name_major.used); } - else if (data_build->setting.version_file == fake_build_version_type_minor_e) { + else if (data_build->setting.version_file == fake_build_version_minor_e) { memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_minor_string, sizeof(f_char_t) * parameter_file_name_minor.used); } - else if (data_build->setting.version_file == fake_build_version_type_micro_e) { + else if (data_build->setting.version_file == fake_build_version_micro_e) { memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_micro_string, sizeof(f_char_t) * parameter_file_name_micro.used); } - else if (data_build->setting.version_file == fake_build_version_type_nano_e) { + else if (data_build->setting.version_file == fake_build_version_nano_e) { memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_nano_string, sizeof(f_char_t) * parameter_file_name_nano.used); } - if (data_build->setting.version_target == fake_build_version_type_major_e) { + if (data_build->setting.version_target == fake_build_version_major_e) { memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_major_string, sizeof(f_char_t) * parameter_file_name_major.used); } - else if (data_build->setting.version_target == fake_build_version_type_minor_e) { + else if (data_build->setting.version_target == fake_build_version_minor_e) { memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_minor_string, sizeof(f_char_t) * parameter_file_name_minor.used); } - else if (data_build->setting.version_target == fake_build_version_type_micro_e) { + else if (data_build->setting.version_target == fake_build_version_micro_e) { memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_micro_string, sizeof(f_char_t) * parameter_file_name_micro.used); } - else if (data_build->setting.version_target == fake_build_version_type_nano_e) { + else if (data_build->setting.version_target == fake_build_version_nano_e) { memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_nano_string, sizeof(f_char_t) * parameter_file_name_nano.used); } @@ -342,7 +342,7 @@ extern "C" { } } - if (data_build->setting.version_file != fake_build_version_type_major_e && parameter_file_name_major.used) { + if (data_build->setting.version_file != fake_build_version_major_e && parameter_file_name_major.used) { f_string_static_t parameter_file_path = f_string_static_t_initialize; { @@ -367,7 +367,7 @@ extern "C" { } } - if (data_build->setting.version_file != fake_build_version_type_minor_e && parameter_file_name_minor.used) { + if (data_build->setting.version_file != fake_build_version_minor_e && parameter_file_name_minor.used) { { parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name_minor.used; @@ -396,7 +396,7 @@ extern "C" { } } - if (data_build->setting.version_file != fake_build_version_type_micro_e && parameter_file_name_micro.used) { + if (data_build->setting.version_file != fake_build_version_micro_e && parameter_file_name_micro.used) { parameter_file_path.used = data->path_build_libraries_shared.used + parameter_file_name_micro.used; f_char_t parameter_file_path_string[parameter_file_path.used + 1]; diff --git a/level_3/fake/c/main/build/library.h b/level_3/fake/c/main/build/library.h index e223822..cde67f3 100644 --- a/level_3/fake/c/main/build/library.h +++ b/level_3/fake/c/main/build/library.h @@ -38,7 +38,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_library_script_ - extern int fake_build_library_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_library_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_library_script_ /** @@ -62,7 +62,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_library_shared_ - extern int fake_build_library_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_library_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_library_shared_ /** @@ -86,7 +86,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_library_static_ - extern int fake_build_library_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_library_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_library_static_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/build/load.c b/level_3/fake/c/main/build/load.c index a3eae98..da76063 100644 --- a/level_3/fake/c/main/build/load.c +++ b/level_3/fake/c/main/build/load.c @@ -1030,7 +1030,7 @@ extern "C" { 0, // search_exclusive 0, // search_shared 0, // search_static - fake_build_version_type_micro_e, // version_file + fake_build_version_micro_e, // version_file 0, // version_major 0, // version_major_prefix 0, // version_micro @@ -1039,7 +1039,7 @@ extern "C" { 0, // version_minor_prefix 0, // version_nano 0, // version_nano_prefix - fake_build_version_type_major_e, // version_target + fake_build_version_major_e, // version_target }; const f_string_static_t settings_single_version_default_name[] = { @@ -1177,16 +1177,16 @@ extern "C" { } else if (settings_single_type[i] == 4) { if (fl_string_dynamic_compare_trim(settings_single_source[i]->array[settings_single_source[i]->used - 1], fake_build_language_bash_s) == F_equal_to) { - *settings_single_language[i] = fake_build_language_type_bash_e; + *settings_single_language[i] = fake_build_language_bash_e; } else if (fl_string_dynamic_compare_trim(settings_single_source[i]->array[settings_single_source[i]->used - 1], fake_build_language_c_s) == F_equal_to) { - *settings_single_language[i] = fake_build_language_type_c_e; + *settings_single_language[i] = fake_build_language_c_e; } else if (fl_string_dynamic_compare_trim(settings_single_source[i]->array[settings_single_source[i]->used - 1], fake_build_language_cpp_s) == F_equal_to) { - *settings_single_language[i] = fake_build_language_type_cpp_e; + *settings_single_language[i] = fake_build_language_cpp_e; } else { - *settings_single_language[i] = fake_build_language_type_c_e; + *settings_single_language[i] = fake_build_language_c_e; if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) { f_file_stream_lock(data->main->warning.to); @@ -1211,16 +1211,16 @@ extern "C" { } else if (settings_single_type[i] == 5) { if (fl_string_dynamic_compare_trim(settings_single_source[i]->array[settings_single_source[i]->used - 1], fake_build_version_major_s) == F_equal_to) { - *settings_single_version[i] = fake_build_version_type_major_e; + *settings_single_version[i] = fake_build_version_major_e; } else if (fl_string_dynamic_compare_trim(settings_single_source[i]->array[settings_single_source[i]->used - 1], fake_build_version_minor_s) == F_equal_to) { - *settings_single_version[i] = fake_build_version_type_minor_e; + *settings_single_version[i] = fake_build_version_minor_e; } else if (fl_string_dynamic_compare_trim(settings_single_source[i]->array[settings_single_source[i]->used - 1], fake_build_version_micro_s) == F_equal_to) { - *settings_single_version[i] = fake_build_version_type_micro_e; + *settings_single_version[i] = fake_build_version_micro_e; } else if (fl_string_dynamic_compare_trim(settings_single_source[i]->array[settings_single_source[i]->used - 1], fake_build_version_nano_s) == F_equal_to) { - *settings_single_version[i] = fake_build_version_type_nano_e; + *settings_single_version[i] = fake_build_version_nano_e; } else { *settings_single_version[i] = settings_single_version_default[i]; @@ -1284,7 +1284,7 @@ extern "C" { if (F_status_is_error_not(*status)) { if (checks && !setting->version_file) { - setting->version_file = fake_build_version_type_micro_e; + setting->version_file = fake_build_version_micro_e; if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) { f_file_stream_lock(data->main->warning.to); @@ -1302,7 +1302,7 @@ extern "C" { } if (checks && !setting->version_target) { - setting->version_target = fake_build_version_type_major_e; + setting->version_target = fake_build_version_major_e; if (data->main->warning.verbosity >= f_console_verbosity_verbose_e) { f_file_stream_lock(data->main->warning.to); @@ -1449,7 +1449,7 @@ extern "C" { setting->search_static = F_true; } - if (setting->build_language == fake_build_language_type_c_e || setting->build_language == fake_build_language_type_cpp_e) { + if (setting->build_language == fake_build_language_c_e || setting->build_language == fake_build_language_cpp_e) { if (setting->build_shared == F_false && setting->build_static == F_false) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(data->main->error.to); @@ -1459,7 +1459,7 @@ extern "C" { fl_print_format("%[' and '%]", data->main->error.to, data->main->error.context, data->main->error.context); fl_print_format("%[%r%]", data->main->error.to, data->main->error.notable, fake_build_setting_name_build_static_s, data->main->error.notable); fl_print_format("%[' cannot both be false when using the language '%]", data->main->error.to, data->main->error.context, data->main->error.context); - fl_print_format("%[%r%]", data->main->error.to, data->main->error.notable, setting->build_language == fake_build_language_type_c_e ? fake_build_language_c_s : fake_build_language_cpp_s, data->main->error.notable); + fl_print_format("%[%r%]", data->main->error.to, data->main->error.notable, setting->build_language == fake_build_language_c_e ? fake_build_language_c_s : fake_build_language_cpp_s, data->main->error.notable); fl_print_format("%['.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); f_file_stream_unlock(data->main->error.to); diff --git a/level_3/fake/c/main/build/load.h b/level_3/fake/c/main/build/load.h index 622c6b4..03377ef 100644 --- a/level_3/fake/c/main/build/load.h +++ b/level_3/fake/c/main/build/load.h @@ -40,7 +40,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_setting_ - extern void fake_build_load_setting(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe, fake_build_setting_t * const setting, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_build_load_setting(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe, fake_build_setting_t * const setting, f_status_t * const status); #endif // _di_fake_build_load_setting_ /** @@ -64,7 +64,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_setting_override_ - extern void fake_build_load_setting_override(fake_data_t * const data, fake_build_setting_t * const setting, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_build_load_setting_override(fake_data_t * const data, fake_build_setting_t * const setting, f_status_t * const status); #endif // _di_fake_build_load_setting_override_ /** @@ -106,7 +106,7 @@ extern "C" { * @see fll_fss_snatch_apart() */ #ifndef _di_fake_build_load_setting_process_ - extern void fake_build_load_setting_process(fake_data_t * const data, const bool checks, const f_string_static_t path_file, const f_string_statics_t * const modes_custom, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t * const setting, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_build_load_setting_process(fake_data_t * const data, const bool checks, const f_string_static_t path_file, const f_string_statics_t * const modes_custom, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t * const setting, f_status_t * const status); #endif // _di_fake_build_load_setting_process_ /** @@ -127,7 +127,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_environment_ - extern void fake_build_load_environment(fake_data_t * const data, fake_build_data_t * const data_build, f_string_maps_t * const environment, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_build_load_environment(fake_data_t * const data, fake_build_data_t * const data_build, f_string_maps_t * const environment, f_status_t * const status); #endif // _di_fake_build_load_environment_ /** @@ -148,7 +148,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_load_stage_ - extern void fake_build_load_stage(fake_data_t * const data, const f_string_static_t settings_file, fake_build_stage_t * const stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_build_load_stage(fake_data_t * const data, const f_string_static_t settings_file, fake_build_stage_t * const stage, f_status_t * const status); #endif // _di_fake_build_load_stage_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/build/object.h b/level_3/fake/c/main/build/object.h index c8da478..3fc58b6 100644 --- a/level_3/fake/c/main/build/object.h +++ b/level_3/fake/c/main/build/object.h @@ -38,7 +38,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_object_script_ - extern int fake_build_object_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_object_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_object_script_ /** @@ -65,7 +65,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_object_shared_ - extern int fake_build_object_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_object_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_object_shared_ /** @@ -92,7 +92,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_object_static_ - extern int fake_build_object_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_object_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_object_static_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/build/objects.h b/level_3/fake/c/main/build/objects.h index b3ee848..c4f5ac5 100644 --- a/level_3/fake/c/main/build/objects.h +++ b/level_3/fake/c/main/build/objects.h @@ -36,7 +36,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_objects_static_ - extern int fake_build_objects_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_objects_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_objects_static_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/build/program.h b/level_3/fake/c/main/build/program.h index aafbd4a..517b045 100644 --- a/level_3/fake/c/main/build/program.h +++ b/level_3/fake/c/main/build/program.h @@ -39,7 +39,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_program_script_ - extern int fake_build_program_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_program_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_program_script_ /** @@ -63,7 +63,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_program_shared_ - extern int fake_build_program_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_program_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_program_shared_ /** @@ -87,7 +87,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_build_program_static_ - extern int fake_build_program_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_build_program_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_program_static_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/build/skeleton.h b/level_3/fake/c/main/build/skeleton.h index 783bf0c..ab39895 100644 --- a/level_3/fake/c/main/build/skeleton.h +++ b/level_3/fake/c/main/build/skeleton.h @@ -32,7 +32,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_build_skeleton_ - extern void fake_build_skeleton(fake_data_t * const data, fake_build_data_t * const data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_build_skeleton(fake_data_t * const data, fake_build_data_t * const data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t * const status); #endif // _di_fake_build_skeleton_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/clean.h b/level_3/fake/c/main/clean.h index b2572ca..ed42d02 100644 --- a/level_3/fake/c/main/clean.h +++ b/level_3/fake/c/main/clean.h @@ -26,7 +26,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_clean_operate_ - extern f_status_t fake_clean_operate(fake_data_t * const data) F_attribute_visibility_internal_d; + extern f_status_t fake_clean_operate(fake_data_t * const data); #endif // _di_fake_clean_operate_ /** @@ -55,7 +55,7 @@ extern "C" { * @see remove() */ #if !defined(_di_fake_clean_operate_) - extern int fake_clean_remove_recursively_verbosely(const char * const path, const struct stat *file_stat, int type, struct FTW *entity) F_attribute_visibility_internal_d; + extern int fake_clean_remove_recursively_verbosely(const char * const path, const struct stat *file_stat, int type, struct FTW *entity); #endif // !defined(_di_fake_clean_operate_) #ifdef __cplusplus diff --git a/level_3/fake/c/main/common.c b/level_3/fake/c/main/common.c index ab1c448..275b3cf 100644 --- a/level_3/fake/c/main/common.c +++ b/level_3/fake/c/main/common.c @@ -261,13 +261,11 @@ extern "C" { 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 (main->error.verbosity > f_console_verbosity_quiet_e) { - fake_print_line_first_locked(setting, main->error); + // @todo fix this to print an error about the actual invalid character so that it can be investigated. - 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 (F_status_is_error(setting->status)) { + 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]); } return; @@ -404,12 +402,10 @@ extern "C" { 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 (main->error.verbosity > f_console_verbosity_quiet_e) { - fake_print_line_first_locked(setting, main->error); + // @todo fix this to print an error about the actual invalid character so that it can be investigated. - 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 (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]); } return; diff --git a/level_3/fake/c/main/common.h b/level_3/fake/c/main/common.h index 95a0add..1fb9156 100644 --- a/level_3/fake/c/main/common.h +++ b/level_3/fake/c/main/common.h @@ -12,978 +12,6 @@ #ifndef _fake_common_h #define _fake_common_h -/** - * The program data. - * - * operation: A code representing the currrent operation. - * - * main: The main program data. - * setting: The settings data. - * - * path_build: The build path. - * path_build_documentation: The build documentation path. - * path_build_documents: The build documents path. - * path_build_includes: The build includes path. - * path_build_libraries: The build libraries path. - * path_build_libraries_script: The build libraries_script path. - * path_build_libraries_shared: The build libraries_shared path. - * path_build_libraries_static: The build libraries_static path. - * path_build_objects: The build objects path. - * path_build_objects_script: The build objects_script path. - * path_build_objects_shared: The build objects_shared path. - * path_build_objects_static: The build objects_static path. - * path_build_programs: The build programs path. - * path_build_programs_script: The build programs_script path. - * path_build_programs_shared: The build programs_shared path. - * path_build_programs_static: The build programs_static path. - * path_build_settings: The build settings path. - * path_build_stage: The build stage path. - * - * path_data_build: The build data path. - * path_data_documentation: The documentation data path. - * path_data_settings: The settings data path. - * - * path_documents: The documents path. - * path_licenses: The licenses path. - * path_sources: The sources path. - * - * path_work_includes: The includes work path. - * path_work_libraries: The libraries work path. - * path_work_libraries_script: The libraries_script work path. - * path_work_libraries_shared: The libraries_shared work path. - * path_work_libraries_static: The libraries_static work path. - * path_work_programs: The programs work path. - * path_work_programs_script: The programs_script work path. - * path_work_programs_shared: The programs_shared work path. - * path_work_programs_static: The programs_static work path. - * - * file_data_build_defines: The defines build file data. - * file_data_build_dependencies: The dependencies build file data. - * file_data_build_fakefile: The fakefile build file data. - * file_data_build_process_post: The process_post_s build file data. - * file_data_build_process_pre: The process_pre_s build file data. - * file_data_build_settings: The settings build file data. - * - * file_documents_readme: The documents readme file data. - */ -#ifndef _di_fake_data_t_ - typedef struct { - uint8_t operation; - - 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_libraries; - f_string_dynamic_t path_build_libraries_script; - f_string_dynamic_t path_build_libraries_shared; - f_string_dynamic_t path_build_libraries_static; - f_string_dynamic_t path_build_objects; - f_string_dynamic_t path_build_objects_script; - f_string_dynamic_t path_build_objects_shared; - f_string_dynamic_t path_build_objects_static; - f_string_dynamic_t path_build_programs; - f_string_dynamic_t path_build_programs_script; - f_string_dynamic_t path_build_programs_shared; - f_string_dynamic_t path_build_programs_static; - f_string_dynamic_t path_build_settings; - f_string_dynamic_t path_build_stage; - - 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; // @todo: make this a settings configurable parameter, moving it to fake_setting_t. - - f_string_dynamic_t path_licenses; // @todo: make this a settings configurable parameter, moving it to fake_setting_t. - - 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 path_work_libraries_shared; - f_string_dynamic_t path_work_libraries_static; - f_string_dynamic_t path_work_programs; - f_string_dynamic_t path_work_programs_script; - f_string_dynamic_t path_work_programs_shared; - f_string_dynamic_t path_work_programs_static; - - f_string_dynamic_t file_data_build_defines; - f_string_dynamic_t file_data_build_dependencies; - f_string_dynamic_t file_data_build_fakefile; - f_string_dynamic_t file_data_build_process_post; - f_string_dynamic_t file_data_build_process_pre; - f_string_dynamic_t file_data_build_settings; - - f_string_dynamic_t file_documents_readme; - } fake_data_t; - - #define fake_data_t_initialize \ - { \ - 0, \ - 0, \ - 0, \ - 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_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_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_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_dynamic_t_initialize, \ - f_string_dynamic_t_initialize, \ - f_string_dynamic_t_initialize, \ - } -#endif // _di_fake_main_t_ - -/** - * Build settings flag enumeration. - * - * data_build_setting_flag_*: - * - has_environment: Designate that the "environment" is specified in the "settings" Section of the Fakefile. - */ -#ifndef _di_fake_build_setting_e_ - enum { - data_build_setting_flag_has_environment_e = 0x1, - }; -#endif // _di_fake_build_setting_e_ - -/** - * Build settings data. - * - * flag: Flags from data_build_setting_flag_* (Not strictly part of the build settings file). - * - * build_language: The build_language setting. - * - * version_file: The version_file setting. - * version_target: The version_target setting. - * - * build_script: The build_script setting. - * build_shared: The build_shared setting. - * build_static: The build_static setting. - * - * has_path_standard: The has_path_standard setting. - * preserve_path_headers: The preserve_path_headers setting. - * - * search_exclusive: The search_exclusive setting. - * search_shared: The search_shared setting. - * search_static: The search_static setting. - * - * build_compiler: The build_compiler setting. - * build_indexer: The build_indexer setting. - * build_name: The build_name setting. - * build_sources_object: The build_sources_object setting. - * build_sources_object_shared: The build_sources_object_shared setting. - * build_sources_object_static: The build_sources_object_static setting. - * path_headers: The path_headers setting. - * path_language: The path_language setting. - * path_library_script: The path_library_script setting. - * path_library_shared: The path_library_shared setting. - * path_library_static: The path_library_static setting. - * path_object_script: The path_object_script setting. - * path_object_shared: The path_object_shared setting. - * path_object_static: The path_object_static setting. - * path_program_script: The path_program_script setting. - * path_program_shared: The path_program_shared setting. - * path_program_static: The path_program_static setting. - * path_sources: The path_sources setting. - * path_sources_object: The path_sources_object setting. - * process_post: The process_post setting. - * process_pre: The process_pre setting. - * version_major: The version_major setting. - * version_major_prefix: The version_major_prefix setting. - * version_micro: The version_micro setting. - * version_micro_prefix: The version_micro_prefix setting. - * version_minor: The version_minor setting. - * version_minor_prefix: The version_minor_prefix setting. - * version_nano: The version_nano setting. - * version_nano_prefix: The version_nano_prefix setting. - * - * build_indexer_arguments: The build_indexer_arguments setting. - * build_libraries: The build_libraries setting. - * build_libraries_shared: The build_libraries_shared setting. - * build_libraries_static: The build_libraries_static setting. - * build_objects_library: The build_objects_library setting. - * build_objects_library_shared: The build_objects_library_shared setting. - * build_objects_library_static: The build_objects_library_static setting. - * build_objects_program: The build_objects_program setting. - * build_objects_program_shared: The build_objects_program_shared setting. - * build_objects_program_static: The build_objects_program_static setting. - * build_sources_documentation: The build_sources_documentation setting. - * build_sources_headers: The build_sources_headers setting. - * build_sources_headers_shared: The build_sources_headers_shared setting. - * build_sources_headers_static: The build_sources_headers_static setting. - * build_sources_library: The build_sources_library setting. - * build_sources_library_shared: The build_sources_library_shared setting. - * build_sources_library_static: The build_sources_library_static setting. - * build_sources_program: The build_sources_program setting. - * build_sources_program_shared: The build_sources_program_shared setting. - * build_sources_program_static: The build_sources_program_static setting. - * build_sources_script: The build_sources_script setting. - * build_sources_setting: The build_sources_setting setting. - * defines: The defines setting. - * defines_library: The defines_library setting. - * defines_library_shared: The defines_library_shared setting. - * defines_library_static: The defines_library_static setting. - * defines_object: The defines_object setting. - * defines_object_shared: The defines_object_shared setting. - * defines_object_static: The defines_object_static setting. - * defines_program: The defines_program setting. - * defines_program_shared: The defines_program_shared setting. - * defines_program_static: The defines_program_static setting. - * defines_shared: The defines_shared setting. - * defines_static: The defines_static setting. - * environment: The environment setting. - * flags: The flags setting. - * flags_library: The flags_library setting. - * flags_library_shared: The flags_library_shared setting. - * flags_library_static: The flags_library_static setting. - * flags_object: The flags_object setting. - * flags_object_shared: The flags_object_shared setting. - * flags_object_static: The flags_object_static setting. - * flags_program: The flags_program setting. - * flags_program_shared: The flags_program_shared setting. - * flags_program_static: The flags_program_static setting. - * flags_shared: The flags_shared setting. - * flags_static: The flags_static setting. - * modes: The modes setting. - * modes_default: The modes_default setting. - */ -#ifndef _di_fake_build_setting_t_ - typedef struct { - uint8_t flag; - - uint8_t build_language; - - uint8_t version_file; - uint8_t version_target; - - bool build_script; - bool build_shared; - bool build_static; - - bool has_path_standard; - bool preserve_path_headers; - - bool search_exclusive; - bool search_shared; - bool search_static; - - f_string_dynamic_t build_compiler; - f_string_dynamic_t build_indexer; - f_string_dynamic_t build_name; - f_string_dynamic_t build_sources_object; - f_string_dynamic_t build_sources_object_shared; - f_string_dynamic_t build_sources_object_static; - f_string_dynamic_t path_headers; - f_string_dynamic_t path_language; - f_string_dynamic_t path_library_script; - f_string_dynamic_t path_library_shared; - f_string_dynamic_t path_library_static; - f_string_dynamic_t path_object_script; - f_string_dynamic_t path_object_shared; - f_string_dynamic_t path_object_static; - f_string_dynamic_t path_program_script; - f_string_dynamic_t path_program_shared; - f_string_dynamic_t path_program_static; - f_string_dynamic_t path_sources; - f_string_dynamic_t path_sources_object; - f_string_dynamic_t process_post; - f_string_dynamic_t process_pre; - f_string_dynamic_t version_major; - f_string_dynamic_t version_major_prefix; - f_string_dynamic_t version_micro; - f_string_dynamic_t version_micro_prefix; - f_string_dynamic_t version_minor; - f_string_dynamic_t version_minor_prefix; - f_string_dynamic_t version_nano; - f_string_dynamic_t version_nano_prefix; - - f_string_dynamics_t build_indexer_arguments; - f_string_dynamics_t build_libraries; - f_string_dynamics_t build_libraries_shared; - f_string_dynamics_t build_libraries_static; - f_string_dynamics_t build_objects_library; - f_string_dynamics_t build_objects_library_shared; - f_string_dynamics_t build_objects_library_static; - f_string_dynamics_t build_objects_program; - f_string_dynamics_t build_objects_program_shared; - f_string_dynamics_t build_objects_program_static; - f_string_dynamics_t build_sources_documentation; - f_string_dynamics_t build_sources_headers; - f_string_dynamics_t build_sources_headers_shared; - f_string_dynamics_t build_sources_headers_static; - f_string_dynamics_t build_sources_library; - f_string_dynamics_t build_sources_library_shared; - f_string_dynamics_t build_sources_library_static; - f_string_dynamics_t build_sources_program; - f_string_dynamics_t build_sources_program_shared; - f_string_dynamics_t build_sources_program_static; - f_string_dynamics_t build_sources_script; - f_string_dynamics_t build_sources_setting; - f_string_dynamics_t defines; - f_string_dynamics_t defines_library; - f_string_dynamics_t defines_library_shared; - f_string_dynamics_t defines_library_static; - f_string_dynamics_t defines_object; - f_string_dynamics_t defines_object_shared; - f_string_dynamics_t defines_object_static; - f_string_dynamics_t defines_program; - f_string_dynamics_t defines_program_shared; - f_string_dynamics_t defines_program_static; - f_string_dynamics_t defines_shared; - f_string_dynamics_t defines_static; - f_string_dynamics_t environment; - f_string_dynamics_t flags; - f_string_dynamics_t flags_library; - f_string_dynamics_t flags_library_shared; - f_string_dynamics_t flags_library_static; - f_string_dynamics_t flags_object; - f_string_dynamics_t flags_object_shared; - f_string_dynamics_t flags_object_static; - f_string_dynamics_t flags_program; - f_string_dynamics_t flags_program_shared; - f_string_dynamics_t flags_program_static; - f_string_dynamics_t flags_shared; - f_string_dynamics_t flags_static; - f_string_dynamics_t modes; - f_string_dynamics_t modes_default; - } fake_build_setting_t; - - #define fake_build_setting_t_initialize { \ - 0, \ - 0, \ - 0, \ - 0, \ - F_true, \ - F_true, \ - F_true, \ - F_true, \ - F_true, \ - F_true, \ - F_true, \ - F_true, \ - 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_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_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_dynamic_t_initialize, \ - f_string_dynamic_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - } - - #define macro_fake_build_setting_t_delete_simple(setting) \ - macro_f_string_dynamic_t_delete_simple(setting.build_compiler) \ - macro_f_string_dynamic_t_delete_simple(setting.build_indexer) \ - macro_f_string_dynamic_t_delete_simple(setting.build_name) \ - macro_f_string_dynamic_t_delete_simple(setting.build_sources_object) \ - macro_f_string_dynamic_t_delete_simple(setting.build_sources_object_shared) \ - macro_f_string_dynamic_t_delete_simple(setting.build_sources_object_static) \ - macro_f_string_dynamic_t_delete_simple(setting.path_headers) \ - macro_f_string_dynamic_t_delete_simple(setting.path_language) \ - macro_f_string_dynamic_t_delete_simple(setting.path_library_script) \ - macro_f_string_dynamic_t_delete_simple(setting.path_library_shared) \ - macro_f_string_dynamic_t_delete_simple(setting.path_library_static) \ - macro_f_string_dynamic_t_delete_simple(setting.path_object_script) \ - macro_f_string_dynamic_t_delete_simple(setting.path_object_shared) \ - macro_f_string_dynamic_t_delete_simple(setting.path_object_static) \ - macro_f_string_dynamic_t_delete_simple(setting.path_program_script) \ - macro_f_string_dynamic_t_delete_simple(setting.path_program_shared) \ - macro_f_string_dynamic_t_delete_simple(setting.path_program_static) \ - macro_f_string_dynamic_t_delete_simple(setting.path_sources) \ - macro_f_string_dynamic_t_delete_simple(setting.path_sources_object) \ - macro_f_string_dynamic_t_delete_simple(setting.process_post) \ - macro_f_string_dynamic_t_delete_simple(setting.process_pre) \ - macro_f_string_dynamic_t_delete_simple(setting.version_major) \ - macro_f_string_dynamic_t_delete_simple(setting.version_major_prefix) \ - macro_f_string_dynamic_t_delete_simple(setting.version_micro) \ - macro_f_string_dynamic_t_delete_simple(setting.version_micro_prefix) \ - macro_f_string_dynamic_t_delete_simple(setting.version_minor) \ - macro_f_string_dynamic_t_delete_simple(setting.version_minor_prefix) \ - macro_f_string_dynamic_t_delete_simple(setting.version_nano) \ - macro_f_string_dynamic_t_delete_simple(setting.version_nano_prefix) \ - macro_f_string_dynamics_t_delete_simple(setting.build_indexer_arguments) \ - macro_f_string_dynamics_t_delete_simple(setting.build_libraries) \ - macro_f_string_dynamics_t_delete_simple(setting.build_libraries_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.build_libraries_static) \ - macro_f_string_dynamics_t_delete_simple(setting.build_objects_library) \ - macro_f_string_dynamics_t_delete_simple(setting.build_objects_library_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.build_objects_library_static) \ - macro_f_string_dynamics_t_delete_simple(setting.build_objects_program) \ - macro_f_string_dynamics_t_delete_simple(setting.build_objects_program_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.build_objects_program_static) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_documentation) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers_static) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_library) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_library_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_library_static) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_program) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_program_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_program_static) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_script) \ - macro_f_string_dynamics_t_delete_simple(setting.build_sources_setting) \ - macro_f_string_dynamics_t_delete_simple(setting.defines) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_library) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_library_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_library_static) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_object) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_object_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_object_static) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_program) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_program_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_program_static) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.defines_static) \ - macro_f_string_dynamics_t_delete_simple(setting.environment) \ - macro_f_string_dynamics_t_delete_simple(setting.flags) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_library) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_library_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_library_static) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_object) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_object_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_object_static) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_program) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_program_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_program_static) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_shared) \ - macro_f_string_dynamics_t_delete_simple(setting.flags_static) \ - macro_f_string_dynamics_t_delete_simple(setting.modes) \ - macro_f_string_dynamics_t_delete_simple(setting.modes_default) - - #define fake_build_setting_total_d 89 -#endif // _di_fake_build_setting_t_ - -#ifndef _di_fake_build_stage_t_ - typedef struct { - f_string_dynamic_t file_library_script; - f_string_dynamic_t file_library_shared; - f_string_dynamic_t file_library_static; - f_string_dynamic_t file_object_script; - f_string_dynamic_t file_object_shared; - f_string_dynamic_t file_object_static; - f_string_dynamic_t file_objects_static; - f_string_dynamic_t file_process_post; - f_string_dynamic_t file_process_pre; - f_string_dynamic_t file_program_script; - f_string_dynamic_t file_program_shared; - f_string_dynamic_t file_program_static; - f_string_dynamic_t file_skeleton; - f_string_dynamic_t file_sources_documentation; - f_string_dynamic_t file_sources_headers; - f_string_dynamic_t file_sources_script; - f_string_dynamic_t file_sources_settings; - } fake_build_stage_t; - - #define fake_build_stage_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_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, \ - } - - #define fake_build_stage_total_d 17 - - #define macro_fake_build_stage_t_delete_simple(stage) \ - macro_f_string_dynamic_t_delete_simple(stage.file_library_script) \ - macro_f_string_dynamic_t_delete_simple(stage.file_library_shared) \ - macro_f_string_dynamic_t_delete_simple(stage.file_library_static) \ - macro_f_string_dynamic_t_delete_simple(stage.file_object_script) \ - macro_f_string_dynamic_t_delete_simple(stage.file_object_shared) \ - macro_f_string_dynamic_t_delete_simple(stage.file_object_static) \ - macro_f_string_dynamic_t_delete_simple(stage.file_objects_static) \ - macro_f_string_dynamic_t_delete_simple(stage.file_process_post) \ - macro_f_string_dynamic_t_delete_simple(stage.file_process_pre) \ - macro_f_string_dynamic_t_delete_simple(stage.file_program_script) \ - macro_f_string_dynamic_t_delete_simple(stage.file_program_shared) \ - macro_f_string_dynamic_t_delete_simple(stage.file_program_static) \ - macro_f_string_dynamic_t_delete_simple(stage.file_skeleton) \ - macro_f_string_dynamic_t_delete_simple(stage.file_sources_documentation) \ - macro_f_string_dynamic_t_delete_simple(stage.file_sources_headers) \ - macro_f_string_dynamic_t_delete_simple(stage.file_sources_script) \ - macro_f_string_dynamic_t_delete_simple(stage.file_sources_settings) -#endif // _di_fake_build_stage_t_ - -/** - * The build data. - * - * setting: The build settings. - * environment: The environment variables. - */ -#ifndef _di_fake_build_data_t_ - typedef struct { - fake_build_setting_t setting; - f_string_maps_t environment; - } fake_build_data_t; - - #define fake_build_data_t_initialize { \ - fake_build_setting_t_initialize, \ - f_string_maps_t_initialize, \ - } - - #define macro_fake_build_main_delete_simple(build) \ - macro_fake_build_setting_t_delete_simple(build.setting) \ - macro_f_string_maps_t_delete_simple(build.environment); -#endif // _di_fake_build_data_t_ - -/** - * Provide common/generic definitions. - * - * _di_fake_common_*_d: - * - allocation_large: Large allocation block size. - * - allocation_small: Small allocation block size. - * - initial_buffer_max: Max size to maintain the buffer (to avoid buffer bloat after an overly large allocation) (131072 = 128k). - */ -#ifndef _di_fake_common_d_ - #define fake_common_allocation_large_d 256 - #define fake_common_allocation_small_d 16 - #define fake_common_initial_buffer_max_d 131072 -#endif // _di_fake_common_d_ - -/** - * Provide common/generic definitions. - * - * fake_make_section_*_d: - * - stack_max: Maximum stack call depth. - */ -#ifndef _di_fake_make_item_d_ - #define fake_make_section_stack_max_d 8192 -#endif // _di_fake_make_item_d_ - -#ifndef _di_fake_make_setting_t_ - typedef struct { - bool load_build; - - uint8_t fail; - - f_string_map_multis_t parameter; - } fake_make_setting_t; - - #define fake_make_setting_t_initialize { \ - 0, \ - 0, \ - f_string_map_multis_t_initialize, \ - } - - #define macro_fake_make_setting_t_delete_simple(setting) \ - macro_f_string_map_multis_t_delete_simple(setting.parameter) -#endif // _di_fake_make_setting_t_ - -#ifndef _di_fake_make_operation_type_e_ - enum { - fake_make_operation_type_none_e = 0, - fake_make_operation_type_and_e, - fake_make_operation_type_break_e, - fake_make_operation_type_build_e, - fake_make_operation_type_clean_e, - fake_make_operation_type_clone_e, - fake_make_operation_type_compile_e, - fake_make_operation_type_copy_e, - fake_make_operation_type_define_e, - fake_make_operation_type_delete_e, - fake_make_operation_type_deletes_e, - fake_make_operation_type_else_e, - fake_make_operation_type_exit_e, - fake_make_operation_type_fail_e, - fake_make_operation_type_group_e, - fake_make_operation_type_groups_e, - fake_make_operation_type_if_e, - fake_make_operation_type_index_e, - fake_make_operation_type_link_e, - fake_make_operation_type_mode_e, - fake_make_operation_type_modes_e, - fake_make_operation_type_move_e, - fake_make_operation_type_operate_e, - fake_make_operation_type_or_e, - fake_make_operation_type_owner_e, - fake_make_operation_type_owners_e, - fake_make_operation_type_parameter_e, - fake_make_operation_type_pop_e, - fake_make_operation_type_print_e, - fake_make_operation_type_run_e, - fake_make_operation_type_shell_e, - fake_make_operation_type_skeleton_e, - fake_make_operation_type_to_e, - fake_make_operation_type_top_e, - fake_make_operation_type_touch_e, - fake_make_operation_type_write_e, - }; -#endif // _di_fake_make_operation_type_e_ - -#ifndef _di_fake_make_operation_if_e_ - enum { - fake_make_operation_if_type_else_e = 1, - fake_make_operation_if_type_if_e, - fake_make_operation_if_type_if_define_e, - fake_make_operation_if_type_if_equal_e, - fake_make_operation_if_type_if_equal_not_e, - fake_make_operation_if_type_if_exist_e, - fake_make_operation_if_type_if_failure_e, - fake_make_operation_if_type_if_greater_e, - fake_make_operation_if_type_if_greater_equal_e, - fake_make_operation_if_type_if_group_e, - fake_make_operation_if_type_if_is_e, - fake_make_operation_if_type_if_less_e, - fake_make_operation_if_type_if_less_equal_e, - fake_make_operation_if_type_if_mode_e, - fake_make_operation_if_type_if_not_e, - fake_make_operation_if_type_if_not_define_e, - fake_make_operation_if_type_if_not_exist_e, - fake_make_operation_if_type_if_not_group_e, - fake_make_operation_if_type_if_not_is_e, - fake_make_operation_if_type_if_not_mode_e, - fake_make_operation_if_type_if_not_owner_e, - fake_make_operation_if_type_if_not_parameter_e, - fake_make_operation_if_type_if_parameter_e, - fake_make_operation_if_type_if_owner_e, - fake_make_operation_if_type_if_success_e, - }; -#endif // _di_fake_make_operation_if_e_ - -#ifndef _di_fake_make_operation_fail_e_ - enum { - fake_make_operation_fail_type_exit_e = 1, - fake_make_operation_fail_type_warn_e, - fake_make_operation_fail_type_ignore_e, - }; -#endif // _di_fake_make_operation_fail_e_ - -#ifndef _di_fake_make_operation_d_ - #define fake_make_operation_recursion_depth_max_d 65535 - - // Total does not include "fake_make_operation_type_none_e". - #define fake_make_operation_total_d 35 -#endif // _di_fake_make_operation_d_ - -#ifndef _di_fake_make_parameter_t_ - typedef struct { - f_string_dynamics_t build; - f_string_dynamics_t color; - f_string_dynamics_t data; - f_string_dynamics_t define; - f_string_dynamics_t documents; - f_string_dynamics_t fakefile; - f_string_dynamics_t licenses; - f_string_dynamics_t mode; - f_string_dynamics_t process; - f_string_dynamics_t settings; - f_string_dynamics_t sources; - f_string_dynamics_t verbosity; - f_string_dynamics_t work; - } fake_make_parameter_t; - - #define fake_make_parameter_t_initialize { \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - f_string_dynamics_t_initialize, \ - } - - #define macro_fake_make_parameter_delete_simple(parameter) \ - macro_f_string_dynamics_t_delete_simple(parameter.build) \ - macro_f_string_dynamics_t_delete_simple(parameter.color) \ - macro_f_string_dynamics_t_delete_simple(parameter.data) \ - macro_f_string_dynamics_t_delete_simple(parameter.define) \ - macro_f_string_dynamics_t_delete_simple(parameter.documents) \ - macro_f_string_dynamics_t_delete_simple(parameter.fakefile) \ - macro_f_string_dynamics_t_delete_simple(parameter.licenses) \ - macro_f_string_dynamics_t_delete_simple(parameter.mode) \ - macro_f_string_dynamics_t_delete_simple(parameter.process) \ - macro_f_string_dynamics_t_delete_simple(parameter.settings) \ - macro_f_string_dynamics_t_delete_simple(parameter.sources) \ - macro_f_string_dynamics_t_delete_simple(parameter.verbosity) \ - macro_f_string_dynamics_t_delete_simple(parameter.work) -#endif // _di_fake_make_parameter_t_ - -#ifndef _di_fake_make_path_t_ - typedef struct { - f_file_t top; - - f_string_dynamics_t stack; - } fake_make_path_t; - - #define fake_make_path_t_initialize { \ - f_file_t_initialize, \ - f_string_dynamics_t_initialize, \ - } - - #define macro_fake_make_path_delete_simple(path) \ - macro_f_string_dynamics_t_delete_simple(path.stack); -#endif // _di_fake_make_path_t_ - -/** - * The control data. - * - * setting_build: The build settings. - * setting_make: The make settings. - * environment: All environment variables allowed to be exposed to the when processing. - * parameter: A set of parameters available for IKI substitution. - * parameter_option: A set of parameters available for IKI option substitution. - * parameter_value: A set of parameters available for IKI value substitution. - * path: The path to the Fakefile. - * error: The error output print structure. - * fakefile: The loaded Fakefile. - * buffer: A buffer used during processing. - * cache_1: An additional buffer for caching purposes. - * cache_2: An additional buffer for caching purposes. - * cache_path: A buffer for path-specific caching. - * cache_arguments: A cache for expanded arguments. - * cache_iki: A cache for IKI data. - * 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 { - fake_build_setting_t setting_build; - fake_make_setting_t setting_make; - - f_string_maps_t environment; - - fake_make_parameter_t parameter; - fake_make_parameter_t parameter_option; - fake_make_parameter_t parameter_value; - fake_make_path_t path; - - fl_print_t error; - - f_fss_nameds_t fakefile; - - f_string_dynamic_t buffer; - f_string_dynamic_t cache_1; - f_string_dynamic_t cache_2; - f_string_dynamic_t cache_path; - f_string_dynamics_t cache_arguments; - f_iki_data_t cache_iki; - - f_array_length_t id_main; - - fll_program_data_t *main; - fake_data_t *data; - fake_setting_t *setting; - } fake_make_data_t; - - #define fake_make_data_t_initialize { \ - fake_build_setting_t_initialize, \ - fake_make_setting_t_initialize, \ - f_string_maps_t_initialize, \ - fake_make_parameter_t_initialize, \ - fake_make_parameter_t_initialize, \ - fake_make_parameter_t_initialize, \ - fake_make_path_t_initialize, \ - fl_print_t_initialize, \ - f_fss_nameds_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_iki_data_t_initialize, \ - 0, \ - 0, \ - 0, \ - 0, \ - } -#endif // _di_fake_make_data_t_ - -/** - * A structure for managing the operation and if-condition states. - * - * block: The process block state. - * block_result: The result of the block. - * condition: The current if-condition type. - * condition_result: The result of the currently processed condition. - * operation: The current operation type. - * operation_previous: The previous operation type. - * success: Current state is considered success when F_true and failure when F_false. - * success_block: Current block state is considered success when F_true and failure when F_false. - */ -#ifndef _di_fake_state_process_t_ - typedef struct { - uint8_t block; - uint8_t block_result; - uint8_t condition; - uint8_t condition_result; - uint8_t operation; - uint8_t operation_previous; - uint8_t success; - uint8_t success_block; - } fake_state_process_t; - - #define fake_state_process_t_initialize { \ - 0, \ - 0, \ - 0, \ - 0, \ - 0, \ - 0, \ - F_true, \ - F_true, \ - } -#endif // _di_fake_state_process_t_ - -/** - * Designate the current process block state. - * - * fake_condition_result_*: - * - none: No if-condition is set. - * - operate: The condition passed or perform condition, process the next operation or the condition. - * - skip: The condition failed, skip the next operation. - * - done: After the condition passed, the next operation was performed, all future operations within block are skipped. - */ -#ifndef _di_fake_state_process_block_e_ - enum { - fake_state_process_block_none_e = 0, - fake_state_process_block_operate_e, - fake_state_process_block_skip_e, - fake_state_process_block_done_e, - }; -#endif // _di_fake_state_process_block_e_ - -/** - * Designate that the if state is true, false, or undefined (none). - * - * fake_condition_result_*: - * - none: The result of the if-condition is not set. - * - false: The result of the if-condition is false. - * - true: The result of the if-condition is true. - * - error: An error occurred, any if-condition is to be skipped, falling back to the else condition, if any. - */ -#ifndef _di_fake_condition_result_e_ - enum { - fake_condition_result_none_e = 0, - fake_condition_result_false_e, - fake_condition_result_true_e, - fake_condition_result_error_e, - }; -#endif // _di_fake_condition_result_e_ - #ifdef __cplusplus extern "C" { #endif @@ -1113,7 +141,7 @@ extern "C" { * @see f_string_maps_resize() */ #ifndef _di_fake_make_data_delete_ - extern f_status_t fake_make_data_delete(fake_make_data_t * const data) F_attribute_visibility_internal_d; + extern f_status_t fake_make_data_delete(fake_make_data_t * const data); #endif // _di_fake_make_data_delete_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/common/define.c b/level_3/fake/c/main/common/define.c new file mode 100644 index 0000000..a84a048 --- /dev/null +++ b/level_3/fake/c/main/common/define.c @@ -0,0 +1,9 @@ +#include "../fake.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/fake/c/main/common/define.h b/level_3/fake/c/main/common/define.h new file mode 100644 index 0000000..d25de6c --- /dev/null +++ b/level_3/fake/c/main/common/define.h @@ -0,0 +1,73 @@ +/** + * FLL - Level 3 + * + * Project: Featureless Make + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the common defines. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _fake_common_define_h +#define _fake_common_define_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. + * - check_tiny: The tiny check. + * - check_short: The short signal check. + */ +#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_ + +/** + * Provide common/generic definitions. + * + * _di_fake_common_*_d: + * - allocation_large: Large allocation block size. + * - allocation_small: Small allocation block size. + * - max_initial_buffer: Max size to maintain the buffer (to avoid buffer bloat after an overly large allocation) (131072 = 128k). + * - max_operation: Maximum number of operations. + * - max_recursion_depth: Maximum recursion depth. + * - max_stack: Maximum stack call depth. + */ +#ifndef _di_fake_common_d_ + #define fake_common_allocation_large_d 256 + #define fake_common_allocation_small_d 16 + #define fake_common_max_initial_buffer_d 131072 + #define fake_common_max_operation_d 35 + #define fake_common_max_recursion_depth_d 65535 + #define fake_common_max_stack_d 8192 +#endif // _di_fake_common_d_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _fake_common_define_h diff --git a/level_3/fake/c/main/common/enumeration.c b/level_3/fake/c/main/common/enumeration.c new file mode 100644 index 0000000..a84a048 --- /dev/null +++ b/level_3/fake/c/main/common/enumeration.c @@ -0,0 +1,9 @@ +#include "../fake.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/fake/c/main/common/enumeration.h b/level_3/fake/c/main/common/enumeration.h new file mode 100644 index 0000000..dc7e31d --- /dev/null +++ b/level_3/fake/c/main/common/enumeration.h @@ -0,0 +1,430 @@ +/** + * FLL - Level 3 + * + * Project: Featureless Make + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the common enumeration structures. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _fake_common_enumeration_h +#define _fake_common_enumeration_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * 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_build_e, + fake_parameter_data_e, + fake_parameter_define_e, + fake_parameter_documents_e, + fake_parameter_fakefile_e, + fake_parameter_licenses_e, + fake_parameter_mode_e, + fake_parameter_process_e, + fake_parameter_settings_e, + fake_parameter_sources_e, + fake_parameter_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_build_s, fake_long_build_s, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize_3(fake_short_data_s, fake_long_data_s, 1, f_console_flag_normal_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_documents_s, fake_long_documents_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_licenses_s, fake_long_licenses_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_sources_s, fake_long_sources_s, 1, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize_3(fake_short_work_s, fake_long_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_ + +/** + * 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. + * - print_first: When set, the first character printing logic is to be processed (this is usually automatic). + * - 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_print_first_e = 0x2000, + fake_main_flag_separate_e = 0x4000, + fake_main_flag_strip_invalid_e = 0x8000, + fake_main_flag_verify_e = 0x10000, + fake_main_flag_version_e = 0x20000, + }; // enum +#endif // _di_fake_main_flag_e_ + +/** + * The build language enumerations. + * + * fake_build_language_*_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_none_e = 0, + fake_build_language_bash_e, + fake_build_language_c_e, + fake_build_language_cpp_e, + fake_build_language_zsh_e, + }; // enum +#endif // _di_fake_build_language_e_ + +/** + * Build settings flag enumeration. + * + * data_build_setting_flag_*: + * - none: No flag set. + * - has_environment: Designate that the "environment" is specified in the "settings" Section of the Fakefile. + */ +#ifndef _di_fake_build_setting_flag_e_ + enum { + data_build_setting_flag_none_e = 0x0, + data_build_setting_flag_has_environment_e = 0x1, + }; // enum +#endif // _di_fake_build_setting_flag_e_ + +/** + * The program version enumerations. + * + * fake_build_version_*_e: + * - none: No version number. + * - major: The major version number. + * - minor: The minor version number. + * - micro: The micro version number (sometimes called the patch version number). + * - nano: The nano version number. + */ +#ifndef _di_fake_build_version_e_ + enum { + fake_build_version_none_e = 0, + fake_build_version_major_e, + fake_build_version_minor_e, + fake_build_version_micro_e, + fake_build_version_nano_e, + }; // enum +#endif // _di_fake_build_version_e_ + +/** + * The program operation enumerations. + * + * fake_operation_*_e: + * - none: No operation. + * - build: The build operation. + * - clean: The clean operation. + * - make: The make operation. + * - skeleton: The skeleton operation. + */ +#ifndef _di_fake_operation_e_ + enum { + fake_operation_none_e = 0, + fake_operation_build_e, + fake_operation_clean_e, + fake_operation_make_e, + fake_operation_skeleton_e, + }; // enum +#endif // _di_fake_operation_e_ + +/** + * Operation types enumerations. + * + * fake_make_operation_type_*_e: + * - none: No operation type. + * - and: The "and" operation. + * - break: The "break" operation. + * - build: The "build" operation. + * - clean: The "clean" operation. + * - clone: The "clone" operation. + * - compile: The "compile" operation. + * - copy: The "copy" operation. + * - define: The "define" operation. + * - delete: The "delete" operation. + * - deletes: The "deletes" operation. + * - else: The "else" operation. + * - exit: The "exit" operation. + * - fail: The "fail" operation. + * - group: The "group" operation. + * - groups: The "groups" operation. + * - if: The "if" operation. + * - index: The "index" operation. + * - link: The "link" operation. + * - mode: The "mode" operation. + * - modes: The "modes" operation. + * - move: The "move" operation. + * - operate: The "operate" operation. + * - or: The "or" operation. + * - owner: The "owner" operation. + * - owners: The "owners" operation. + * - parameter: The "parameter" operation. + * - pop: The "pop" operation. + * - print: The "print" operation. + * - run: The "run" operation. + * - shell: The "shell" operation. + * - skeleton: The "skeleton" operation. + * - to: The "to" operation. + * - top: The "top" operation. + * - touch: The "touch" operation. + * - write: The "write" operation. + */ +#ifndef _di_fake_make_operation_type_e_ + enum { + fake_make_operation_type_none_e = 0, + fake_make_operation_type_and_e, + fake_make_operation_type_break_e, + fake_make_operation_type_build_e, + fake_make_operation_type_clean_e, + fake_make_operation_type_clone_e, + fake_make_operation_type_compile_e, + fake_make_operation_type_copy_e, + fake_make_operation_type_define_e, + fake_make_operation_type_delete_e, + fake_make_operation_type_deletes_e, + fake_make_operation_type_else_e, + fake_make_operation_type_exit_e, + fake_make_operation_type_fail_e, + fake_make_operation_type_group_e, + fake_make_operation_type_groups_e, + fake_make_operation_type_if_e, + fake_make_operation_type_index_e, + fake_make_operation_type_link_e, + fake_make_operation_type_mode_e, + fake_make_operation_type_modes_e, + fake_make_operation_type_move_e, + fake_make_operation_type_operate_e, + fake_make_operation_type_or_e, + fake_make_operation_type_owner_e, + fake_make_operation_type_owners_e, + fake_make_operation_type_parameter_e, + fake_make_operation_type_pop_e, + fake_make_operation_type_print_e, + fake_make_operation_type_run_e, + fake_make_operation_type_shell_e, + fake_make_operation_type_skeleton_e, + fake_make_operation_type_to_e, + fake_make_operation_type_top_e, + fake_make_operation_type_touch_e, + fake_make_operation_type_write_e, + }; // enum +#endif // _di_fake_make_operation_type_e_ + +/** + * Operation if-condition types enumerations. + * + * fake_make_operation_if_type_*_e: + * - none: No condition. + * - else: The else condition. + * - if: The if condition. + * - if_define: The if defined condition. + * - if_equal: The if equal to condition. + * - if_equal_not: The if not equal to condition. + * - if_exist: The if exists condition. + * - if_failure: The if is failure condition. + * - if_greater: The if greater than condition. + * - if_greater_equal: The if greater than or equal to condition. + * - if_group: The if group is condition. + * - if_is: The if is condition. + * - if_less: The if less than condition. + * - if_less_equal: The if less than or equal to condition. + * - if_mode: The if mode is condition. + * - if_not: The if is not condition. + * - if_not_define: The if not defined condition. + * - if_not_exist: The if does not exist condition. + * - if_not_group: The if is not group condition. + * - if_not_is: The if is not condition. + * - if_not_mode: The if is not mode condition. + * - if_not_owner: The if is not owner condition. + * - if_not_parameter: The if is not parameter condition. + * - if_parameter: The if is parameter condition. + * - if_owner: The if is owner condition. + * - if_success: The if is success condition. + */ +#ifndef _di_fake_make_operation_if_type_e_ + enum { + fake_make_operation_if_type_none_e = 0, + fake_make_operation_if_type_else_e, + fake_make_operation_if_type_if_e, + fake_make_operation_if_type_if_define_e, + fake_make_operation_if_type_if_equal_e, + fake_make_operation_if_type_if_equal_not_e, + fake_make_operation_if_type_if_exist_e, + fake_make_operation_if_type_if_failure_e, + fake_make_operation_if_type_if_greater_e, + fake_make_operation_if_type_if_greater_equal_e, + fake_make_operation_if_type_if_group_e, + fake_make_operation_if_type_if_is_e, + fake_make_operation_if_type_if_less_e, + fake_make_operation_if_type_if_less_equal_e, + fake_make_operation_if_type_if_mode_e, + fake_make_operation_if_type_if_not_e, + fake_make_operation_if_type_if_not_define_e, + fake_make_operation_if_type_if_not_exist_e, + fake_make_operation_if_type_if_not_group_e, + fake_make_operation_if_type_if_not_is_e, + fake_make_operation_if_type_if_not_mode_e, + fake_make_operation_if_type_if_not_owner_e, + fake_make_operation_if_type_if_not_parameter_e, + fake_make_operation_if_type_if_parameter_e, + fake_make_operation_if_type_if_owner_e, + fake_make_operation_if_type_if_success_e, + }; // enum +#endif // _di_fake_make_operation_if_type_e_ + +/** + * Operation failure types enumerations. + * + * fake_make_operation_fail_*_e: + * - none: No failure type. + * - exit: The "exit" operation. + * - ignore: The "ignore" operation. + * - warn: The "warn" operation. + */ +#ifndef _di_fake_make_operation_fail_e_ + enum { + fake_make_operation_fail_none_e = 0, + fake_make_operation_fail_exit_e, + fake_make_operation_fail_ignore_e, + fake_make_operation_fail_warn_e, + }; // enum +#endif // _di_fake_make_operation_fail_e_ + +/** + * Designate the current process block state. + * + * fake_condition_result_*_e: + * - none: No if-condition is set. + * - operate: The condition passed or perform condition, process the next operation or the condition. + * - skip: The condition failed, skip the next operation. + * - done: After the condition passed, the next operation was performed, all future operations within block are skipped. + */ +#ifndef _di_fake_state_process_block_e_ + enum { + fake_state_process_block_none_e = 0, + fake_state_process_block_operate_e, + fake_state_process_block_skip_e, + fake_state_process_block_done_e, + }; // enum +#endif // _di_fake_state_process_block_e_ + +/** + * Designate that the if state is true, false, or undefined (none). + * + * fake_condition_result_*_e: + * - none: The result of the if-condition is not set. + * - false: The result of the if-condition is false. + * - true: The result of the if-condition is true. + * - error: An error occurred, any if-condition is to be skipped, falling back to the else condition, if any. + */ +#ifndef _di_fake_condition_result_e_ + enum { + fake_condition_result_none_e = 0, + fake_condition_result_false_e, + fake_condition_result_true_e, + fake_condition_result_error_e, + }; // enum +#endif // _di_fake_condition_result_e_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _fake_common_enumeration_h diff --git a/level_3/fake/c/main/common/type.h b/level_3/fake/c/main/common/type.h index d65fed8..bb4ea27 100644 --- a/level_3/fake/c/main/common/type.h +++ b/level_3/fake/c/main/common/type.h @@ -16,217 +16,41 @@ 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. - * - check_tiny: The tiny check. - * - check_short: The short signal check. - */ -#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. + * A structure for managing the operation and if-condition states. * - * 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. + * block: The process block state. + * block_result: The result of the block. + * condition: The current if-condition type. + * condition_result: The result of the currently processed condition. + * operation: The current operation type. + * operation_previous: The previous operation type. + * success: Current state is considered success when F_true and failure when F_false. + * success_block: Current block state is considered success when F_true and failure when F_false. */ -#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_build_e, - fake_parameter_data_e, - fake_parameter_define_e, - fake_parameter_documents_e, - fake_parameter_fakefile_e, - fake_parameter_licenses_e, - fake_parameter_mode_e, - fake_parameter_process_e, - fake_parameter_settings_e, - fake_parameter_sources_e, - fake_parameter_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_build_s, fake_long_build_s, 1, f_console_flag_normal_e), \ - macro_f_console_parameter_t_initialize_3(fake_short_data_s, fake_long_data_s, 1, f_console_flag_normal_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_documents_s, fake_long_documents_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_licenses_s, fake_long_licenses_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_sources_s, fake_long_sources_s, 1, f_console_flag_normal_e), \ - macro_f_console_parameter_t_initialize_3(fake_short_work_s, fake_long_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), \ - } +#ifndef _di_fake_state_process_t_ + typedef struct { + uint8_t block; + uint8_t block_result; + uint8_t condition; + uint8_t condition_result; + uint8_t operation; + uint8_t operation_previous; + uint8_t success; + uint8_t success_block; + } fake_state_process_t; - #define fake_total_parameters_d 34 -#endif // _di_fake_parameter_e_ + #define fake_state_process_t_initialize { \ + 0, \ + 0, \ + 0, \ + 0, \ + 0, \ + 0, \ + F_true, \ + F_true, \ + } +#endif // _di_fake_state_process_t_ /** * The fake main program settings. @@ -283,7 +107,7 @@ extern "C" { #define fake_setting_t_initialize \ { \ - fake_main_flag_none_e, \ + fake_main_flag_print_first_e, \ f_state_t_initialize, \ F_none, \ f_string_static_t_initialize, \ @@ -303,6 +127,784 @@ extern "C" { } #endif // _di_fake_setting_t_ +/** + * The program data. + * + * operation: A code representing the currrent operation. + * + * main: The main program data. + * setting: The settings data. + * + * path_build: The build path. + * path_build_documentation: The build documentation path. + * path_build_documents: The build documents path. + * path_build_includes: The build includes path. + * path_build_libraries: The build libraries path. + * path_build_libraries_script: The build libraries_script path. + * path_build_libraries_shared: The build libraries_shared path. + * path_build_libraries_static: The build libraries_static path. + * path_build_objects: The build objects path. + * path_build_objects_script: The build objects_script path. + * path_build_objects_shared: The build objects_shared path. + * path_build_objects_static: The build objects_static path. + * path_build_programs: The build programs path. + * path_build_programs_script: The build programs_script path. + * path_build_programs_shared: The build programs_shared path. + * path_build_programs_static: The build programs_static path. + * path_build_settings: The build settings path. + * path_build_stage: The build stage path. + * + * path_data_build: The build data path. + * path_data_documentation: The documentation data path. + * path_data_settings: The settings data path. + * + * path_documents: The documents path. + * path_licenses: The licenses path. + * path_sources: The sources path. + * + * path_work_includes: The includes work path. + * path_work_libraries: The libraries work path. + * path_work_libraries_script: The libraries_script work path. + * path_work_libraries_shared: The libraries_shared work path. + * path_work_libraries_static: The libraries_static work path. + * path_work_programs: The programs work path. + * path_work_programs_script: The programs_script work path. + * path_work_programs_shared: The programs_shared work path. + * path_work_programs_static: The programs_static work path. + * + * file_data_build_defines: The defines build file data. + * file_data_build_dependencies: The dependencies build file data. + * file_data_build_fakefile: The fakefile build file data. + * file_data_build_process_post: The process_post_s build file data. + * file_data_build_process_pre: The process_pre_s build file data. + * file_data_build_settings: The settings build file data. + * + * file_documents_readme: The documents readme file data. + */ +#ifndef _di_fake_data_t_ + typedef struct { + uint8_t operation; + + 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_libraries; + f_string_dynamic_t path_build_libraries_script; + f_string_dynamic_t path_build_libraries_shared; + f_string_dynamic_t path_build_libraries_static; + f_string_dynamic_t path_build_objects; + f_string_dynamic_t path_build_objects_script; + f_string_dynamic_t path_build_objects_shared; + f_string_dynamic_t path_build_objects_static; + f_string_dynamic_t path_build_programs; + f_string_dynamic_t path_build_programs_script; + f_string_dynamic_t path_build_programs_shared; + f_string_dynamic_t path_build_programs_static; + f_string_dynamic_t path_build_settings; + f_string_dynamic_t path_build_stage; + + 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; // @todo: make this a settings configurable parameter, moving it to fake_setting_t. + + f_string_dynamic_t path_licenses; // @todo: make this a settings configurable parameter, moving it to fake_setting_t. + + 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 path_work_libraries_shared; + f_string_dynamic_t path_work_libraries_static; + f_string_dynamic_t path_work_programs; + f_string_dynamic_t path_work_programs_script; + f_string_dynamic_t path_work_programs_shared; + f_string_dynamic_t path_work_programs_static; + + f_string_dynamic_t file_data_build_defines; + f_string_dynamic_t file_data_build_dependencies; + f_string_dynamic_t file_data_build_fakefile; + f_string_dynamic_t file_data_build_process_post; + f_string_dynamic_t file_data_build_process_pre; + f_string_dynamic_t file_data_build_settings; + + f_string_dynamic_t file_documents_readme; + } fake_data_t; + + #define fake_data_t_initialize \ + { \ + 0, \ + 0, \ + 0, \ + 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_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_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_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_dynamic_t_initialize, \ + f_string_dynamic_t_initialize, \ + f_string_dynamic_t_initialize, \ + } +#endif // _di_fake_main_t_ + +/** + * Build settings data. + * + * flag: Flags from data_build_setting_* (Not strictly part of the build settings file). + * + * build_language: The build_language setting. + * + * version_file: The version_file setting. + * version_target: The version_target setting. + * + * build_script: The build_script setting. + * build_shared: The build_shared setting. + * build_static: The build_static setting. + * + * has_path_standard: The has_path_standard setting. + * preserve_path_headers: The preserve_path_headers setting. + * + * search_exclusive: The search_exclusive setting. + * search_shared: The search_shared setting. + * search_static: The search_static setting. + * + * build_compiler: The build_compiler setting. + * build_indexer: The build_indexer setting. + * build_name: The build_name setting. + * build_sources_object: The build_sources_object setting. + * build_sources_object_shared: The build_sources_object_shared setting. + * build_sources_object_static: The build_sources_object_static setting. + * path_headers: The path_headers setting. + * path_language: The path_language setting. + * path_library_script: The path_library_script setting. + * path_library_shared: The path_library_shared setting. + * path_library_static: The path_library_static setting. + * path_object_script: The path_object_script setting. + * path_object_shared: The path_object_shared setting. + * path_object_static: The path_object_static setting. + * path_program_script: The path_program_script setting. + * path_program_shared: The path_program_shared setting. + * path_program_static: The path_program_static setting. + * path_sources: The path_sources setting. + * path_sources_object: The path_sources_object setting. + * process_post: The process_post setting. + * process_pre: The process_pre setting. + * version_major: The version_major setting. + * version_major_prefix: The version_major_prefix setting. + * version_micro: The version_micro setting. + * version_micro_prefix: The version_micro_prefix setting. + * version_minor: The version_minor setting. + * version_minor_prefix: The version_minor_prefix setting. + * version_nano: The version_nano setting. + * version_nano_prefix: The version_nano_prefix setting. + * + * build_indexer_arguments: The build_indexer_arguments setting. + * build_libraries: The build_libraries setting. + * build_libraries_shared: The build_libraries_shared setting. + * build_libraries_static: The build_libraries_static setting. + * build_objects_library: The build_objects_library setting. + * build_objects_library_shared: The build_objects_library_shared setting. + * build_objects_library_static: The build_objects_library_static setting. + * build_objects_program: The build_objects_program setting. + * build_objects_program_shared: The build_objects_program_shared setting. + * build_objects_program_static: The build_objects_program_static setting. + * build_sources_documentation: The build_sources_documentation setting. + * build_sources_headers: The build_sources_headers setting. + * build_sources_headers_shared: The build_sources_headers_shared setting. + * build_sources_headers_static: The build_sources_headers_static setting. + * build_sources_library: The build_sources_library setting. + * build_sources_library_shared: The build_sources_library_shared setting. + * build_sources_library_static: The build_sources_library_static setting. + * build_sources_program: The build_sources_program setting. + * build_sources_program_shared: The build_sources_program_shared setting. + * build_sources_program_static: The build_sources_program_static setting. + * build_sources_script: The build_sources_script setting. + * build_sources_setting: The build_sources_setting setting. + * defines: The defines setting. + * defines_library: The defines_library setting. + * defines_library_shared: The defines_library_shared setting. + * defines_library_static: The defines_library_static setting. + * defines_object: The defines_object setting. + * defines_object_shared: The defines_object_shared setting. + * defines_object_static: The defines_object_static setting. + * defines_program: The defines_program setting. + * defines_program_shared: The defines_program_shared setting. + * defines_program_static: The defines_program_static setting. + * defines_shared: The defines_shared setting. + * defines_static: The defines_static setting. + * environment: The environment setting. + * flags: The flags setting. + * flags_library: The flags_library setting. + * flags_library_shared: The flags_library_shared setting. + * flags_library_static: The flags_library_static setting. + * flags_object: The flags_object setting. + * flags_object_shared: The flags_object_shared setting. + * flags_object_static: The flags_object_static setting. + * flags_program: The flags_program setting. + * flags_program_shared: The flags_program_shared setting. + * flags_program_static: The flags_program_static setting. + * flags_shared: The flags_shared setting. + * flags_static: The flags_static setting. + * modes: The modes setting. + * modes_default: The modes_default setting. + */ +#ifndef _di_fake_build_setting_t_ + typedef struct { + uint8_t flag; + + uint8_t build_language; + + uint8_t version_file; + uint8_t version_target; + + bool build_script; + bool build_shared; + bool build_static; + + bool has_path_standard; + bool preserve_path_headers; + + bool search_exclusive; + bool search_shared; + bool search_static; + + f_string_dynamic_t build_compiler; + f_string_dynamic_t build_indexer; + f_string_dynamic_t build_name; + f_string_dynamic_t build_sources_object; + f_string_dynamic_t build_sources_object_shared; + f_string_dynamic_t build_sources_object_static; + f_string_dynamic_t path_headers; + f_string_dynamic_t path_language; + f_string_dynamic_t path_library_script; + f_string_dynamic_t path_library_shared; + f_string_dynamic_t path_library_static; + f_string_dynamic_t path_object_script; + f_string_dynamic_t path_object_shared; + f_string_dynamic_t path_object_static; + f_string_dynamic_t path_program_script; + f_string_dynamic_t path_program_shared; + f_string_dynamic_t path_program_static; + f_string_dynamic_t path_sources; + f_string_dynamic_t path_sources_object; + f_string_dynamic_t process_post; + f_string_dynamic_t process_pre; + f_string_dynamic_t version_major; + f_string_dynamic_t version_major_prefix; + f_string_dynamic_t version_micro; + f_string_dynamic_t version_micro_prefix; + f_string_dynamic_t version_minor; + f_string_dynamic_t version_minor_prefix; + f_string_dynamic_t version_nano; + f_string_dynamic_t version_nano_prefix; + + f_string_dynamics_t build_indexer_arguments; + f_string_dynamics_t build_libraries; + f_string_dynamics_t build_libraries_shared; + f_string_dynamics_t build_libraries_static; + f_string_dynamics_t build_objects_library; + f_string_dynamics_t build_objects_library_shared; + f_string_dynamics_t build_objects_library_static; + f_string_dynamics_t build_objects_program; + f_string_dynamics_t build_objects_program_shared; + f_string_dynamics_t build_objects_program_static; + f_string_dynamics_t build_sources_documentation; + f_string_dynamics_t build_sources_headers; + f_string_dynamics_t build_sources_headers_shared; + f_string_dynamics_t build_sources_headers_static; + f_string_dynamics_t build_sources_library; + f_string_dynamics_t build_sources_library_shared; + f_string_dynamics_t build_sources_library_static; + f_string_dynamics_t build_sources_program; + f_string_dynamics_t build_sources_program_shared; + f_string_dynamics_t build_sources_program_static; + f_string_dynamics_t build_sources_script; + f_string_dynamics_t build_sources_setting; + f_string_dynamics_t defines; + f_string_dynamics_t defines_library; + f_string_dynamics_t defines_library_shared; + f_string_dynamics_t defines_library_static; + f_string_dynamics_t defines_object; + f_string_dynamics_t defines_object_shared; + f_string_dynamics_t defines_object_static; + f_string_dynamics_t defines_program; + f_string_dynamics_t defines_program_shared; + f_string_dynamics_t defines_program_static; + f_string_dynamics_t defines_shared; + f_string_dynamics_t defines_static; + f_string_dynamics_t environment; + f_string_dynamics_t flags; + f_string_dynamics_t flags_library; + f_string_dynamics_t flags_library_shared; + f_string_dynamics_t flags_library_static; + f_string_dynamics_t flags_object; + f_string_dynamics_t flags_object_shared; + f_string_dynamics_t flags_object_static; + f_string_dynamics_t flags_program; + f_string_dynamics_t flags_program_shared; + f_string_dynamics_t flags_program_static; + f_string_dynamics_t flags_shared; + f_string_dynamics_t flags_static; + f_string_dynamics_t modes; + f_string_dynamics_t modes_default; + } fake_build_setting_t; + + #define fake_build_setting_t_initialize { \ + 0, \ + 0, \ + 0, \ + 0, \ + F_true, \ + F_true, \ + F_true, \ + F_true, \ + F_true, \ + F_true, \ + F_true, \ + F_true, \ + 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_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_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_dynamic_t_initialize, \ + f_string_dynamic_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + } + + #define macro_fake_build_setting_t_delete_simple(setting) \ + macro_f_string_dynamic_t_delete_simple(setting.build_compiler) \ + macro_f_string_dynamic_t_delete_simple(setting.build_indexer) \ + macro_f_string_dynamic_t_delete_simple(setting.build_name) \ + macro_f_string_dynamic_t_delete_simple(setting.build_sources_object) \ + macro_f_string_dynamic_t_delete_simple(setting.build_sources_object_shared) \ + macro_f_string_dynamic_t_delete_simple(setting.build_sources_object_static) \ + macro_f_string_dynamic_t_delete_simple(setting.path_headers) \ + macro_f_string_dynamic_t_delete_simple(setting.path_language) \ + macro_f_string_dynamic_t_delete_simple(setting.path_library_script) \ + macro_f_string_dynamic_t_delete_simple(setting.path_library_shared) \ + macro_f_string_dynamic_t_delete_simple(setting.path_library_static) \ + macro_f_string_dynamic_t_delete_simple(setting.path_object_script) \ + macro_f_string_dynamic_t_delete_simple(setting.path_object_shared) \ + macro_f_string_dynamic_t_delete_simple(setting.path_object_static) \ + macro_f_string_dynamic_t_delete_simple(setting.path_program_script) \ + macro_f_string_dynamic_t_delete_simple(setting.path_program_shared) \ + macro_f_string_dynamic_t_delete_simple(setting.path_program_static) \ + macro_f_string_dynamic_t_delete_simple(setting.path_sources) \ + macro_f_string_dynamic_t_delete_simple(setting.path_sources_object) \ + macro_f_string_dynamic_t_delete_simple(setting.process_post) \ + macro_f_string_dynamic_t_delete_simple(setting.process_pre) \ + macro_f_string_dynamic_t_delete_simple(setting.version_major) \ + macro_f_string_dynamic_t_delete_simple(setting.version_major_prefix) \ + macro_f_string_dynamic_t_delete_simple(setting.version_micro) \ + macro_f_string_dynamic_t_delete_simple(setting.version_micro_prefix) \ + macro_f_string_dynamic_t_delete_simple(setting.version_minor) \ + macro_f_string_dynamic_t_delete_simple(setting.version_minor_prefix) \ + macro_f_string_dynamic_t_delete_simple(setting.version_nano) \ + macro_f_string_dynamic_t_delete_simple(setting.version_nano_prefix) \ + macro_f_string_dynamics_t_delete_simple(setting.build_indexer_arguments) \ + macro_f_string_dynamics_t_delete_simple(setting.build_libraries) \ + macro_f_string_dynamics_t_delete_simple(setting.build_libraries_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_libraries_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_library) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_library_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_library_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_program) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_program_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_objects_program_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_documentation) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_headers_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_library) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_library_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_library_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_program) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_program_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_program_static) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_script) \ + macro_f_string_dynamics_t_delete_simple(setting.build_sources_setting) \ + macro_f_string_dynamics_t_delete_simple(setting.defines) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_library) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_library_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_library_static) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_object) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_object_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_object_static) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_program) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_program_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_program_static) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.defines_static) \ + macro_f_string_dynamics_t_delete_simple(setting.environment) \ + macro_f_string_dynamics_t_delete_simple(setting.flags) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_library) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_library_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_library_static) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_object) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_object_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_object_static) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_program) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_program_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_program_static) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_shared) \ + macro_f_string_dynamics_t_delete_simple(setting.flags_static) \ + macro_f_string_dynamics_t_delete_simple(setting.modes) \ + macro_f_string_dynamics_t_delete_simple(setting.modes_default) + + #define fake_build_setting_total_d 89 +#endif // _di_fake_build_setting_t_ + +#ifndef _di_fake_build_stage_t_ + typedef struct { + f_string_dynamic_t file_library_script; + f_string_dynamic_t file_library_shared; + f_string_dynamic_t file_library_static; + f_string_dynamic_t file_object_script; + f_string_dynamic_t file_object_shared; + f_string_dynamic_t file_object_static; + f_string_dynamic_t file_objects_static; + f_string_dynamic_t file_process_post; + f_string_dynamic_t file_process_pre; + f_string_dynamic_t file_program_script; + f_string_dynamic_t file_program_shared; + f_string_dynamic_t file_program_static; + f_string_dynamic_t file_skeleton; + f_string_dynamic_t file_sources_documentation; + f_string_dynamic_t file_sources_headers; + f_string_dynamic_t file_sources_script; + f_string_dynamic_t file_sources_settings; + } fake_build_stage_t; + + #define fake_build_stage_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_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, \ + } + + #define fake_build_stage_total_d 17 + + #define macro_fake_build_stage_t_delete_simple(stage) \ + macro_f_string_dynamic_t_delete_simple(stage.file_library_script) \ + macro_f_string_dynamic_t_delete_simple(stage.file_library_shared) \ + macro_f_string_dynamic_t_delete_simple(stage.file_library_static) \ + macro_f_string_dynamic_t_delete_simple(stage.file_object_script) \ + macro_f_string_dynamic_t_delete_simple(stage.file_object_shared) \ + macro_f_string_dynamic_t_delete_simple(stage.file_object_static) \ + macro_f_string_dynamic_t_delete_simple(stage.file_objects_static) \ + macro_f_string_dynamic_t_delete_simple(stage.file_process_post) \ + macro_f_string_dynamic_t_delete_simple(stage.file_process_pre) \ + macro_f_string_dynamic_t_delete_simple(stage.file_program_script) \ + macro_f_string_dynamic_t_delete_simple(stage.file_program_shared) \ + macro_f_string_dynamic_t_delete_simple(stage.file_program_static) \ + macro_f_string_dynamic_t_delete_simple(stage.file_skeleton) \ + macro_f_string_dynamic_t_delete_simple(stage.file_sources_documentation) \ + macro_f_string_dynamic_t_delete_simple(stage.file_sources_headers) \ + macro_f_string_dynamic_t_delete_simple(stage.file_sources_script) \ + macro_f_string_dynamic_t_delete_simple(stage.file_sources_settings) +#endif // _di_fake_build_stage_t_ + +/** + * The build data. + * + * setting: The build settings. + * environment: The environment variables. + */ +#ifndef _di_fake_build_data_t_ + typedef struct { + fake_build_setting_t setting; + f_string_maps_t environment; + } fake_build_data_t; + + #define fake_build_data_t_initialize { \ + fake_build_setting_t_initialize, \ + f_string_maps_t_initialize, \ + } + + #define macro_fake_build_main_delete_simple(build) \ + macro_fake_build_setting_t_delete_simple(build.setting) \ + macro_f_string_maps_t_delete_simple(build.environment); +#endif // _di_fake_build_data_t_ + +#ifndef _di_fake_make_setting_t_ + typedef struct { + bool load_build; + + uint8_t fail; + + f_string_map_multis_t parameter; + } fake_make_setting_t; + + #define fake_make_setting_t_initialize { \ + 0, \ + 0, \ + f_string_map_multis_t_initialize, \ + } + + #define macro_fake_make_setting_t_delete_simple(setting) \ + macro_f_string_map_multis_t_delete_simple(setting.parameter) +#endif // _di_fake_make_setting_t_ + +#ifndef _di_fake_make_parameter_t_ + typedef struct { + f_string_dynamics_t build; + f_string_dynamics_t color; + f_string_dynamics_t data; + f_string_dynamics_t define; + f_string_dynamics_t documents; + f_string_dynamics_t fakefile; + f_string_dynamics_t licenses; + f_string_dynamics_t mode; + f_string_dynamics_t process; + f_string_dynamics_t settings; + f_string_dynamics_t sources; + f_string_dynamics_t verbosity; + f_string_dynamics_t work; + } fake_make_parameter_t; + + #define fake_make_parameter_t_initialize { \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_string_dynamics_t_initialize, \ + } + + #define macro_fake_make_parameter_delete_simple(parameter) \ + macro_f_string_dynamics_t_delete_simple(parameter.build) \ + macro_f_string_dynamics_t_delete_simple(parameter.color) \ + macro_f_string_dynamics_t_delete_simple(parameter.data) \ + macro_f_string_dynamics_t_delete_simple(parameter.define) \ + macro_f_string_dynamics_t_delete_simple(parameter.documents) \ + macro_f_string_dynamics_t_delete_simple(parameter.fakefile) \ + macro_f_string_dynamics_t_delete_simple(parameter.licenses) \ + macro_f_string_dynamics_t_delete_simple(parameter.mode) \ + macro_f_string_dynamics_t_delete_simple(parameter.process) \ + macro_f_string_dynamics_t_delete_simple(parameter.settings) \ + macro_f_string_dynamics_t_delete_simple(parameter.sources) \ + macro_f_string_dynamics_t_delete_simple(parameter.verbosity) \ + macro_f_string_dynamics_t_delete_simple(parameter.work) +#endif // _di_fake_make_parameter_t_ + +#ifndef _di_fake_make_path_t_ + typedef struct { + f_file_t top; + + f_string_dynamics_t stack; + } fake_make_path_t; + + #define fake_make_path_t_initialize { \ + f_file_t_initialize, \ + f_string_dynamics_t_initialize, \ + } + + #define macro_fake_make_path_delete_simple(path) \ + macro_f_string_dynamics_t_delete_simple(path.stack); +#endif // _di_fake_make_path_t_ + +/** + * The control data. + * + * setting_build: The build settings. + * setting_make: The make settings. + * environment: All environment variables allowed to be exposed to the when processing. + * parameter: A set of parameters available for IKI substitution. + * parameter_option: A set of parameters available for IKI option substitution. + * parameter_value: A set of parameters available for IKI value substitution. + * path: The path to the Fakefile. + * error: The error output print structure. + * fakefile: The loaded Fakefile. + * buffer: A buffer used during processing. + * cache_1: An additional buffer for caching purposes. + * cache_2: An additional buffer for caching purposes. + * cache_path: A buffer for path-specific caching. + * cache_arguments: A cache for expanded arguments. + * cache_iki: A cache for IKI data. + * 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 { + fake_build_setting_t setting_build; + fake_make_setting_t setting_make; + + f_string_maps_t environment; + + fake_make_parameter_t parameter; + fake_make_parameter_t parameter_option; + fake_make_parameter_t parameter_value; + fake_make_path_t path; + + fl_print_t error; + + f_fss_nameds_t fakefile; + + f_string_dynamic_t buffer; + f_string_dynamic_t cache_1; + f_string_dynamic_t cache_2; + f_string_dynamic_t cache_path; + f_string_dynamics_t cache_arguments; + f_iki_data_t cache_iki; + + f_array_length_t id_main; + + fll_program_data_t *main; + fake_data_t *data; + fake_setting_t *setting; + } fake_make_data_t; + + #define fake_make_data_t_initialize { \ + fake_build_setting_t_initialize, \ + fake_make_setting_t_initialize, \ + f_string_maps_t_initialize, \ + fake_make_parameter_t_initialize, \ + fake_make_parameter_t_initialize, \ + fake_make_parameter_t_initialize, \ + fake_make_path_t_initialize, \ + fl_print_t_initialize, \ + f_fss_nameds_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_iki_data_t_initialize, \ + 0, \ + 0, \ + 0, \ + 0, \ + } +#endif // _di_fake_make_data_t_ + #ifdef __cplusplus } // extern "C" #endif diff --git a/level_3/fake/c/main/fake.c b/level_3/fake/c/main/fake.c index 3cc6a7f..618aa43 100644 --- a/level_3/fake/c/main/fake.c +++ b/level_3/fake/c/main/fake.c @@ -323,8 +323,8 @@ extern "C" { return status; } - if (size_file > fake_common_initial_buffer_max_d) { - size_file = fake_common_initial_buffer_max_d; + if (size_file > fake_common_max_initial_buffer_d) { + size_file = fake_common_max_initial_buffer_d; } status = f_string_dynamic_increase_by(size_file, buffer); @@ -381,7 +381,7 @@ extern "C" { file.stream = F_type_input_d; file.size_read = fake_default_allocation_pipe_d; - status = f_string_dynamic_increase_by(fake_common_initial_buffer_max_d, buffer); + status = f_string_dynamic_increase_by(fake_common_max_initial_buffer_d, 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); diff --git a/level_3/fake/c/main/fake.h b/level_3/fake/c/main/fake.h index 3f930d3..0195781 100644 --- a/level_3/fake/c/main/fake.h +++ b/level_3/fake/c/main/fake.h @@ -90,6 +90,8 @@ #include // Featureless Make includes. +#include +#include #include #include #include @@ -156,7 +158,7 @@ extern "C" { * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal. */ #ifndef _di_fake_execute_ - extern int fake_execute(fake_data_t * const data, const f_string_maps_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_execute(fake_data_t * const data, const f_string_maps_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t * const status); #endif // _di_fake_execute_ /** @@ -182,7 +184,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_file_buffer_ - extern f_status_t fake_file_buffer(fake_data_t * const data, const f_string_static_t path_file, const bool required, f_string_dynamic_t * const buffer) F_attribute_visibility_internal_d; + extern f_status_t fake_file_buffer(fake_data_t * const data, const f_string_static_t path_file, const bool required, f_string_dynamic_t * const buffer); #endif // _di_fake_file_buffer_ /** @@ -201,7 +203,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_pipe_buffer_ - extern f_status_t fake_pipe_buffer(fake_data_t * const data, f_string_dynamic_t * const buffer) F_attribute_visibility_internal_d; + extern f_status_t fake_pipe_buffer(fake_data_t * const data, f_string_dynamic_t * const buffer); #endif // _di_fake_pipe_buffer_ /** @@ -220,7 +222,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_validate_parameter_paths_ - extern f_status_t fake_validate_parameter_paths(fake_data_t * const data) F_attribute_visibility_internal_d; + extern f_status_t fake_validate_parameter_paths(fake_data_t * const data); #endif // _di_fake_validate_parameter_paths_ /** @@ -234,7 +236,7 @@ extern "C" { * The destination string. */ #ifndef _di_fake_verbose_print_clone_ - extern void fake_verbose_print_clone(const f_file_t output, const f_string_static_t source, const f_string_static_t destination) F_attribute_visibility_internal_d; + extern void fake_verbose_print_clone(const f_file_t output, const f_string_static_t source, const f_string_static_t destination); #endif // _di_fake_verbose_print_clone_ /** @@ -248,7 +250,7 @@ extern "C" { * The destination string. */ #ifndef _di_fake_verbose_print_copy_ - extern void fake_verbose_print_copy(const f_file_t output, const f_string_static_t source, const f_string_static_t destination) F_attribute_visibility_internal_d; + extern void fake_verbose_print_copy(const f_file_t output, const f_string_static_t source, const f_string_static_t destination); #endif // _di_fake_verbose_print_copy_ /** @@ -262,7 +264,7 @@ extern "C" { * The destination string. */ #ifndef _di_fake_verbose_print_move_ - extern void fake_verbose_print_move(const f_file_t output, const f_string_static_t source, const f_string_static_t destination) F_attribute_visibility_internal_d; + extern void fake_verbose_print_move(const f_file_t output, const f_string_static_t source, const f_string_static_t destination); #endif // _di_fake_verbose_print_move_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/fake/path_generate.h b/level_3/fake/c/main/fake/path_generate.h index c688460..9cdc5a7 100644 --- a/level_3/fake/c/main/fake/path_generate.h +++ b/level_3/fake/c/main/fake/path_generate.h @@ -24,7 +24,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_path_generate_ - extern f_status_t fake_path_generate(fake_data_t * const data) F_attribute_visibility_internal_d; + extern f_status_t fake_path_generate(fake_data_t * const data); #endif // _di_fake_path_generate_ /** @@ -47,7 +47,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_path_generate_string_dynamic_ - extern f_status_t fake_path_generate_string_dynamic(fake_data_t * const data, const f_string_dynamic_t source, f_string_dynamic_t *destination[], const uint8_t size) F_attribute_visibility_internal_d; + extern f_status_t fake_path_generate_string_dynamic(fake_data_t * const data, const f_string_dynamic_t source, f_string_dynamic_t *destination[], const uint8_t size); #endif // _di_fake_path_generate_string_dynamic_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make.h b/level_3/fake/c/main/make.h index e11e7e4..f3b2cd9 100644 --- a/level_3/fake/c/main/make.h +++ b/level_3/fake/c/main/make.h @@ -28,7 +28,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_assure_inside_project_ - extern f_status_t fake_make_assure_inside_project(fake_make_data_t * const data_make, const f_string_static_t path) F_attribute_visibility_internal_d; + extern f_status_t fake_make_assure_inside_project(fake_make_data_t * const data_make, const f_string_static_t path); #endif // _di_fake_make_assure_inside_project_ /** @@ -50,7 +50,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_get_id_group_ - f_status_t fake_make_get_id_group(fake_data_t * const data, const fl_print_t print, const f_string_static_t buffer, gid_t *id) F_attribute_visibility_internal_d; + f_status_t fake_make_get_id_group(fake_data_t * const data, const fl_print_t print, const f_string_static_t buffer, gid_t *id); #endif // _di_fake_make_get_id_group_ /** @@ -76,7 +76,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_get_id_mode_ - 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) F_attribute_visibility_internal_d; + 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); #endif // _di_fake_make_get_id_mode_ /** @@ -98,7 +98,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_get_id_owner_ - f_status_t fake_make_get_id_owner(fake_data_t * const data, const fl_print_t print, const f_string_static_t buffer, uid_t *id) F_attribute_visibility_internal_d; + f_status_t fake_make_get_id_owner(fake_data_t * const data, const fl_print_t print, const f_string_static_t buffer, uid_t *id); #endif // _di_fake_make_get_id_owner_ /** @@ -114,7 +114,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_path_relative_ - extern f_status_t fake_make_path_relative(fake_make_data_t * const data_make, const f_string_static_t path) F_attribute_visibility_internal_d; + extern f_status_t fake_make_path_relative(fake_make_data_t * const data_make, const f_string_static_t path); #endif // _di_fake_make_path_relative_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make/load_fakefile.c b/level_3/fake/c/main/make/load_fakefile.c index 6483ac6..0d28dcf 100644 --- a/level_3/fake/c/main/make/load_fakefile.c +++ b/level_3/fake/c/main/make/load_fakefile.c @@ -2,7 +2,8 @@ #include "../build/load.h" #include "load_fakefile.h" #include "operate_validate.h" -#include "print.h" +#include "print-error.h" +#include "print-warning.h" #ifdef __cplusplus extern "C" { @@ -244,7 +245,7 @@ extern "C" { data_make->setting_make.parameter.array[0].value.used = 1; data_make->setting_make.load_build = F_false; - data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; + data_make->setting_make.fail = fake_make_operation_fail_exit_e; if (settings.objects.used) { for (f_array_length_t i = 0; i < settings.objects.used; ++i) { @@ -539,13 +540,13 @@ extern "C" { if (content->used) { if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_exit_s.string, data_make->buffer, fake_make_operation_argument_exit_s.used, content->array[content->used - 1]) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; + data_make->setting_make.fail = fake_make_operation_fail_exit_e; } else if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_warn_s.string, data_make->buffer, fake_make_operation_argument_warn_s.used, content->array[content->used - 1]) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_warn_e; + data_make->setting_make.fail = fake_make_operation_fail_warn_e; } else if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_ignore_s.string, data_make->buffer, fake_make_operation_argument_ignore_s.used, content->array[content->used - 1]) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_ignore_e; + data_make->setting_make.fail = fake_make_operation_fail_ignore_e; } else { fake_make_print_warning_settings_content_invalid(data_make->setting, data_make->main->warning, data_make->data->file_data_build_fakefile, data_make->buffer, *object, content->array[content->used - 1], fake_make_item_settings_s); diff --git a/level_3/fake/c/main/make/load_fakefile.h b/level_3/fake/c/main/make/load_fakefile.h index 9362cdb..a0296df 100644 --- a/level_3/fake/c/main/make/load_fakefile.h +++ b/level_3/fake/c/main/make/load_fakefile.h @@ -34,7 +34,7 @@ extern "C" { * @see fake_build_load_setting() */ #ifndef _di_fake_make_load_fakefile_ - extern void fake_make_load_fakefile(fake_make_data_t * const data_make, const bool process_pipe, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_make_load_fakefile(fake_make_data_t * const data_make, const bool process_pipe, f_status_t * const status); #endif // _di_fake_make_load_fakefile_ /** @@ -48,7 +48,7 @@ extern "C" { * The setting content. */ #ifndef _di_fake_make_load_fakefile_setting_build_ - extern void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) F_attribute_visibility_internal_d; + extern void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content); #endif // _di_fake_make_load_fakefile_setting_build_ /** @@ -64,7 +64,7 @@ extern "C" { * A pointer to the range that representing the compiler setting within the buffer. */ #ifndef _di_fake_make_load_fakefile_setting_compiler_ - extern void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler) F_attribute_visibility_internal_d; + extern void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler); #endif // _di_fake_make_load_fakefile_setting_compiler_ /** @@ -89,7 +89,7 @@ extern "C" { * @see fll_fss_snatch_map_apart() */ #ifndef _di_fake_make_load_fakefile_setting_define_and_parameter_ - extern f_status_t fake_make_load_fakefile_setting_define_and_parameter(fake_data_t * const data, fake_make_data_t * const data_make, f_fss_set_t * const settings) F_attribute_visibility_internal_d; + extern f_status_t fake_make_load_fakefile_setting_define_and_parameter(fake_data_t * const data, fake_make_data_t * const data_make, f_fss_set_t * const settings); #endif // _di_fake_make_load_fakefile_setting_define_and_parameter_ /** @@ -112,7 +112,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fake_make_load_fakefile_setting_environment_ - extern f_status_t fake_make_load_fakefile_setting_environment(fake_make_data_t * const data_make, f_fss_content_t * const content) F_attribute_visibility_internal_d; + extern f_status_t fake_make_load_fakefile_setting_environment(fake_make_data_t * const data_make, f_fss_content_t * const content); #endif // _di_fake_make_load_fakefile_setting_environment_ /** @@ -126,7 +126,7 @@ extern "C" { * The setting content. */ #ifndef _di_fake_make_load_fakefile_setting_fail_ - extern void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) F_attribute_visibility_internal_d; + extern void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content); #endif // _di_fake_make_load_fakefile_setting_fail_ /** @@ -142,7 +142,7 @@ extern "C" { * A pointer to the range that representing the indexer setting within the buffer. */ #ifndef _di_fake_make_load_fakefile_setting_indexer_ - extern void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer) F_attribute_visibility_internal_d; + extern void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer); #endif // _di_fake_make_load_fakefile_setting_indexer_ /** @@ -170,7 +170,7 @@ extern "C" { * @see fake_make_load_fakefile_setting_define_and_parameter() */ #ifndef _di_fake_make_load_fakefile_setting_parameter_ - extern f_status_t fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) F_attribute_visibility_internal_d; + extern f_status_t fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content); #endif // _di_fake_make_load_fakefile_setting_parameter_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make/load_parameters.h b/level_3/fake/c/main/make/load_parameters.h index f5a3ee5..613108c 100644 --- a/level_3/fake/c/main/make/load_parameters.h +++ b/level_3/fake/c/main/make/load_parameters.h @@ -27,7 +27,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_load_parameters_ - extern void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t * const status); #endif // _di_fake_make_load_parameters_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make/operate.c b/level_3/fake/c/main/make/operate.c index e0ea57e..48f08de 100644 --- a/level_3/fake/c/main/make/operate.c +++ b/level_3/fake/c/main/make/operate.c @@ -6,6 +6,9 @@ #include "operate_block.h" #include "operate_process.h" #include "operate_validate.h" +#include "print.h" +#include "print-error.h" +#include "print-warning.h" #ifdef __cplusplus extern "C" { @@ -20,29 +23,7 @@ extern "C" { return F_status_set_error(F_interrupt); } - if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) { - 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->setting->fakefile, data->main->context.set.notable); - - 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->setting->modes.used; ) { - - 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->setting->modes.used) { - fl_print_format("%[', '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important); - } - } // for - } - - 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); - } + fake_make_print_now_making(data->setting, data->main->message, data->setting->fakefile); f_status_t status = F_none; @@ -99,7 +80,7 @@ extern "C" { return F_data_not; } - if (data_make.setting_make.fail == fake_make_operation_fail_type_exit_e) { + if (data_make.setting_make.fail == fake_make_operation_fail_exit_e) { data_make.error.prefix = fl_print_error_s; data_make.error.suffix = f_string_empty_s; data_make.error.context = data->main->context.set.error; @@ -108,7 +89,7 @@ extern "C" { data_make.error.to.id = F_type_descriptor_error_d; data_make.error.set = &data->main->context.set; } - else if (data_make.setting_make.fail == fake_make_operation_fail_type_warn_e) { + else if (data_make.setting_make.fail == fake_make_operation_fail_warn_e) { data_make.error.prefix = fl_print_warning_s; data_make.error.suffix = f_string_empty_s; data_make.error.context = data->main->context.set.warning; @@ -161,17 +142,7 @@ extern "C" { } // for if (F_status_is_error(status)) { - if (data->main->error.verbosity != f_console_verbosity_quiet_e) { - index = data->main->parameters.remaining.array[i]; - - flockfile(data->main->error.to.stream); - - fl_print_format("%r%[%QThe argument '%]", 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, data->main->parameters.arguments.array[index], data->main->error.notable); - fl_print_format("%[' is not a valid section name.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s); - - funlockfile(data->main->error.to.stream); - } + fake_make_print_error_argument_invalid_section(data->setting, data->main->error, data->main->parameters, data->main->parameters.remaining.array[i]); } else { int result = 0; @@ -197,16 +168,8 @@ extern "C" { const f_status_t status_path = f_path_change_at(data_make.path.top.id); - if (F_status_is_error(status_path) && data->main->warning.verbosity >= f_console_verbosity_verbose_e) { - flockfile(data->main->warning.to.stream); - - fl_print_format("%r%[%QFailed change back to orignal path '%]", data->main->warning.to, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context); - fl_print_format("%[%Q%]", data->main->warning.to, data->main->warning.notable, data_make.path.stack.array[0], data->main->warning.notable); - fl_print_format("%[', status code =%] ", data->main->warning.to, data->main->warning.context, data->main->warning.context); - fl_print_format("%[%ui%]", data->main->warning.to, data->main->warning.notable, F_status_set_fine(status_path), data->main->warning.notable); - fl_print_format("%['.%]%r", data->main->warning.to, data->main->warning.context, data->main->warning.context, f_string_eol_s); - - funlockfile(data->main->warning.to.stream); + if (F_status_is_error(status_path)) { + fake_make_print_warning_cannot_change_back(data->setting, data->main->warning, data_make.path.stack.array[0], status_path); } break; @@ -231,16 +194,8 @@ extern "C" { if (status != F_child) { const f_status_t status_path = f_path_change_at(data_make.path.top.id); - if (F_status_is_error(status_path) && data->main->warning.verbosity >= f_console_verbosity_verbose_e) { - f_file_stream_lock(data->main->warning.to); - - fl_print_format("%r%[%QFailed change back to orignal path '%]", data->main->warning.to, f_string_eol_s, data->main->warning.context, data->main->warning.prefix, data->main->warning.context); - fl_print_format("%[%Q%]", data->main->warning.to, data->main->warning.notable, data_make.path.stack.array[0], data->main->warning.notable); - fl_print_format("%[', status code =%] ", data->main->warning.to, data->main->warning.context, data->main->warning.context); - fl_print_format("%[%ui%]", data->main->warning.to, data->main->warning.notable, F_status_set_fine(status_path), data->main->warning.notable); - fl_print_format("%['.%]%r", data->main->warning.to, data->main->warning.context, data->main->warning.context, f_string_eol_s); - - f_file_stream_unlock(data->main->warning.to); + if (F_status_is_error(status_path)) { + fake_make_print_warning_cannot_change_back(data->setting, data->main->warning, data_make.path.stack.array[0], status_path); } } } @@ -1274,15 +1229,7 @@ extern "C" { const f_fss_named_t *section = &data_make->fakefile.array[id_section]; - if (data_make->main->message.verbosity != f_console_verbosity_quiet_e && data_make->main->message.verbosity != f_console_verbosity_error_e) { - f_file_stream_lock(data_make->main->message.to); - - fl_print_format("%r%[Processing Section '%]", data_make->main->message.to, f_string_eol_s, data_make->main->context.set.important, data_make->main->context.set.important); - fl_print_format("%[%/Q%]", data_make->main->message.to, data_make->main->context.set.notable, data_make->buffer, section->name, data_make->main->context.set.notable); - fl_print_format("%['.%]%r", data_make->main->message.to, data_make->main->context.set.important, data_make->main->context.set.important, f_string_eol_s); - - f_file_stream_unlock(data_make->main->message.to); - } + fake_make_print_processing_section(data_make->setting, data_make->main->message, data_make->buffer, *section); if (!section->objects.used) { --section_stack->used; @@ -1395,7 +1342,7 @@ extern "C" { data_make->main->signal_check = 0; } - for (j = 0; j < fake_make_operation_total_d; ++j) { + for (j = 0; j < fake_common_max_operation_d; ++j) { if (fl_string_dynamic_partial_compare_string(operations_name[j].string, data_make->buffer, operations_name[j].used, section->objects.array[i]) == F_equal_to) { state_process.operation = operations_type[j]; @@ -1410,8 +1357,8 @@ extern "C" { *status = F_status_set_error(F_valid_not); } else if (state_process.operation == fake_make_operation_type_operate_e) { - if (section_stack->used == fake_make_section_stack_max_d) { - fake_print_message_section_operation_stack_max(data_make->data, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_make_section_stack_max_d); + if (section_stack->used == fake_common_max_stack_d) { + fake_print_message_section_operation_stack_max(data_make->data, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_common_max_stack_d); *status = F_status_set_error(F_recurse); } @@ -1451,7 +1398,7 @@ extern "C" { // Break acts identical to fail when at the top of the stack. if (F_status_set_fine(*status) == F_signal_abort && !section_stack->used) { - data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; + data_make->setting_make.fail = fake_make_operation_fail_exit_e; data_make->error.prefix = fl_print_error_s; data_make->error.suffix = f_string_empty_s; data_make->error.context = data_make->main->context.set.error; @@ -1475,7 +1422,7 @@ extern "C" { break; } - if (data_make->setting_make.fail == fake_make_operation_fail_type_exit_e) { + if (data_make->setting_make.fail == fake_make_operation_fail_exit_e) { break; } } diff --git a/level_3/fake/c/main/make/operate.h b/level_3/fake/c/main/make/operate.h index 871ea9e..042a673 100644 --- a/level_3/fake/c/main/make/operate.h +++ b/level_3/fake/c/main/make/operate.h @@ -30,7 +30,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_ - extern f_status_t fake_make_operate(fake_data_t * const data) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate(fake_data_t * const data); #endif // _di_fake_make_operate_ /** @@ -52,7 +52,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_ - extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_uint8s_t quotes, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_uint8s_t quotes, f_status_t * const status); #endif // _di_fake_make_operate_expand_ /** @@ -74,7 +74,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_context_ - extern f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name); #endif // _di_fake_make_operate_expand_context_ /** @@ -103,7 +103,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fake_make_operate_expand_environment_ - extern f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name); #endif // _di_fake_make_operate_expand_environment_ /** @@ -124,7 +124,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_build_ - extern f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name); #endif // _di_fake_make_operate_expand_build_ /** @@ -150,7 +150,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_make_operate_section_ - extern int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t *section_stack, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t *section_stack, f_status_t * const status); #endif // _di_fake_make_operate_section_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make/operate_block.h b/level_3/fake/c/main/make/operate_block.h index 147ff60..08cb2d1 100644 --- a/level_3/fake/c/main/make/operate_block.h +++ b/level_3/fake/c/main/make/operate_block.h @@ -22,7 +22,7 @@ extern "C" { * The operation and if-condition states. */ #ifndef _di_fake_make_operate_block_prepare_ - extern void fake_make_operate_block_prepare(fake_state_process_t * const state_process) F_attribute_visibility_internal_d; + extern void fake_make_operate_block_prepare(fake_state_process_t * const state_process); #endif // _di_fake_make_operate_block_prepare_ /** @@ -39,7 +39,7 @@ extern "C" { * The status code. */ #ifndef _di_fake_make_operate_block_postprocess_ - extern void fake_make_operate_block_postprocess(const bool last, fake_state_process_t * const state_process, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_make_operate_block_postprocess(const bool last, fake_state_process_t * const state_process, f_status_t * const status); #endif // _di_fake_make_operate_block_postprocess_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make/operate_process.c b/level_3/fake/c/main/make/operate_process.c index ee7fa47..ad71bed 100644 --- a/level_3/fake/c/main/make/operate_process.c +++ b/level_3/fake/c/main/make/operate_process.c @@ -448,7 +448,7 @@ extern "C" { f_file_stream_unlock(data_make->main->error.to); } - if (data_make->setting_make.fail == fake_make_operation_fail_type_exit_e) return F_status_set_error(F_failure); + if (data_make->setting_make.fail == fake_make_operation_fail_exit_e) return F_status_set_error(F_failure); return F_failure; } diff --git a/level_3/fake/c/main/make/operate_process.h b/level_3/fake/c/main/make/operate_process.h index cad38a8..7739990 100644 --- a/level_3/fake/c/main/make/operate_process.h +++ b/level_3/fake/c/main/make/operate_process.h @@ -36,7 +36,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_make_operate_process_ - extern int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status); #endif // _di_fake_make_operate_process_ /** @@ -83,7 +83,7 @@ extern "C" { * @see f_utf_unicode_string_to() */ #ifndef _di_fake_make_operate_process_buffer_escape_ - extern f_status_t fake_make_operate_process_buffer_escape(fake_make_data_t * const data_make, const f_string_static_t source, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_buffer_escape(fake_make_data_t * const data_make, const f_string_static_t source, f_string_dynamic_t * const destination); #endif // _di_fake_make_operate_process_buffer_escape_ /** @@ -108,7 +108,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_process_execute_ - extern f_status_t fake_make_operate_process_execute(fake_make_data_t * const data_make, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_execute(fake_make_data_t * const data_make, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell); #endif // _di_fake_make_operate_process_execute_ /** @@ -123,9 +123,9 @@ extern "C" { * * @return * F_none on success. - * F_failure on identifying the return code as an error code and fail mode is not set to fake_make_operation_fail_type_exit_e. + * F_failure on identifying the return code as an error code and fail mode is not set to fake_make_operation_fail_exit_e. * - * F_failure (with error bit) on identifying the return code as an error code and fail mode is set to fake_make_operation_fail_type_exit_e. + * F_failure (with error bit) on identifying the return code as an error code and fail mode is set to fake_make_operation_fail_exit_e. * * Errors (with error bit) from: f_conversion_number_signed_to_string(). * Errors (with error bit) from: f_string_append(). @@ -136,7 +136,7 @@ extern "C" { * @see f_string_dynamic_append() */ #ifndef _di_fake_make_operate_process_return_ - extern f_status_t fake_make_operate_process_return(fake_make_data_t * const data_make, const int return_code) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_return(fake_make_data_t * const data_make, const int return_code); #endif // _di_fake_make_operate_process_return_ /** @@ -156,7 +156,7 @@ extern "C" { * Errors (with error bit) from: fake_make_operate_process_execute(). */ #ifndef _di_fake_make_operate_process_run_ - extern f_status_t fake_make_operate_process_run(fake_make_data_t * const data_make, const bool as_shell) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_run(fake_make_data_t * const data_make, const bool as_shell); #endif // _di_fake_make_operate_process_run_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make/operate_process_type.c b/level_3/fake/c/main/make/operate_process_type.c index ab387f6..9e225a1 100644 --- a/level_3/fake/c/main/make/operate_process_type.c +++ b/level_3/fake/c/main/make/operate_process_type.c @@ -466,7 +466,7 @@ extern "C" { status = F_status_set_error(F_signal_quit); // Forcing exit forces fail mode. - data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; + data_make->setting_make.fail = fake_make_operation_fail_exit_e; data_make->error.prefix = fl_print_error_s; data_make->error.suffix = f_string_empty_s; data_make->error.context = data_make->main->context.set.error; @@ -491,7 +491,7 @@ extern "C" { void fake_make_operate_process_type_fail(fake_make_data_t * const data_make) { if (fl_string_dynamic_compare(fake_make_operation_argument_exit_s, data_make->cache_arguments.array[0]) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; + data_make->setting_make.fail = fake_make_operation_fail_exit_e; data_make->error.prefix = fl_print_error_s; data_make->error.suffix = f_string_empty_s; data_make->error.context = data_make->main->context.set.error; @@ -501,7 +501,7 @@ extern "C" { data_make->error.set = &data_make->main->context.set; } else if (fl_string_dynamic_compare(fake_make_operation_argument_warn_s, data_make->cache_arguments.array[0]) == F_equal_to) { - data_make->setting_make.fail = fake_make_operation_fail_type_warn_e; + data_make->setting_make.fail = fake_make_operation_fail_warn_e; data_make->error.prefix = fl_print_warning_s; data_make->error.suffix = f_string_empty_s; data_make->error.context = data_make->main->context.set.warning; @@ -511,7 +511,7 @@ extern "C" { data_make->error.set = &data_make->main->context.set; } else { - data_make->setting_make.fail = fake_make_operation_fail_type_ignore_e; + data_make->setting_make.fail = fake_make_operation_fail_ignore_e; data_make->main->error.to.stream = 0; data_make->main->error.to.id = -1; } @@ -521,10 +521,10 @@ extern "C" { f_print_terminated("Set failure state to '", data_make->main->message.to); - if (data_make->setting_make.fail == fake_make_operation_fail_type_exit_e) { + if (data_make->setting_make.fail == fake_make_operation_fail_exit_e) { fl_print_format("%[%r%]", data_make->main->message.to, data_make->main->context.set.notable, fake_make_operation_argument_exit_s, data_make->main->context.set.notable); } - else if (data_make->setting_make.fail == fake_make_operation_fail_type_warn_e) { + else if (data_make->setting_make.fail == fake_make_operation_fail_warn_e) { fl_print_format("%[%r%]", data_make->main->message.to, data_make->main->context.set.notable, fake_make_operation_argument_warn_s, data_make->main->context.set.notable); } else { @@ -566,7 +566,7 @@ extern "C" { } if (all) { - status = fll_file_role_change_all(data_make->cache_arguments.array[i], -1, id, dereference, fake_make_operation_recursion_depth_max_d); + status = fll_file_role_change_all(data_make->cache_arguments.array[i], -1, id, dereference, fake_common_max_recursion_depth_d); } else { status = f_file_role_change(data_make->cache_arguments.array[i], -1, id, dereference); @@ -1411,7 +1411,7 @@ extern "C" { } if (all) { - status = fll_file_mode_set_all(data_make->cache_arguments.array[i], F_true, mode, fake_make_operation_recursion_depth_max_d); + status = fll_file_mode_set_all(data_make->cache_arguments.array[i], F_true, mode, fake_common_max_recursion_depth_d); } else { status = f_file_mode_set(data_make->cache_arguments.array[i], mode); @@ -1578,7 +1578,7 @@ extern "C" { } if (all) { - status = fll_file_role_change_all(data_make->cache_arguments.array[i], id, -1, dereference, fake_make_operation_recursion_depth_max_d); + status = fll_file_role_change_all(data_make->cache_arguments.array[i], id, -1, dereference, fake_common_max_recursion_depth_d); } else { status = f_file_role_change(data_make->cache_arguments.array[i], id, -1, dereference); diff --git a/level_3/fake/c/main/make/operate_process_type.h b/level_3/fake/c/main/make/operate_process_type.h index 275c2bd..31525a2 100644 --- a/level_3/fake/c/main/make/operate_process_type.h +++ b/level_3/fake/c/main/make/operate_process_type.h @@ -24,7 +24,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_process_type_break_ - extern f_status_t fake_make_operate_process_type_break(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_break(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_break_ /** @@ -44,7 +44,7 @@ extern "C" { * @see fake_make_operate_process_return() */ #ifndef _di_fake_make_operate_process_type_build_ - extern f_status_t fake_make_operate_process_type_build(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_build(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_build_ /** @@ -64,7 +64,7 @@ extern "C" { * @see fake_make_operate_process_return() */ #ifndef _di_fake_make_operate_process_type_clean_ - extern f_status_t fake_make_operate_process_type_clean(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_clean(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_clean_ /** @@ -85,7 +85,7 @@ extern "C" { * @see fake_execute() */ #ifndef _di_fake_make_operate_process_type_compile_ - extern int fake_make_operate_process_type_compile(fake_make_data_t * const data_make, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_make_operate_process_type_compile(fake_make_data_t * const data_make, f_status_t * const status); #endif // _di_fake_make_operate_process_type_compile_ /** @@ -102,7 +102,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_process_type_condition_ - extern f_status_t fake_make_operate_process_type_condition(fake_make_data_t * const data_make, fake_state_process_t * const state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_condition(fake_make_data_t * const data_make, fake_state_process_t * const state_process); #endif // _di_fake_make_operate_process_type_condition_ /** @@ -127,7 +127,7 @@ extern "C" { * @see fl_directory_copy() */ #ifndef _di_fake_make_operate_process_type_copy_ - extern f_status_t fake_make_operate_process_type_copy(fake_make_data_t * const data_make, const bool clone) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_copy(fake_make_data_t * const data_make, const bool clone); #endif // _di_fake_make_operate_process_type_copy_ /** @@ -144,7 +144,7 @@ extern "C" { * @see f_environment_set() */ #ifndef _di_fake_make_operate_process_type_define_ - extern f_status_t fake_make_operate_process_type_define(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_define(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_define_ /** @@ -167,7 +167,7 @@ extern "C" { * @see f_directory_remove_custom() */ #ifndef _di_fake_make_operate_process_type_deletes_ - extern f_status_t fake_make_operate_process_type_deletes(fake_make_data_t * const data_make, const bool all) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_deletes(fake_make_data_t * const data_make, const bool all); #endif // _di_fake_make_operate_process_type_deletes_ /** @@ -184,7 +184,7 @@ extern "C" { * F_signal_quit (with error bit) to designate exit on failure. */ #ifndef _di_fake_make_operate_process_type_exit_ - extern f_status_t fake_make_operate_process_type_exit(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_exit(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_exit_ /** @@ -194,7 +194,7 @@ extern "C" { * All make related setting data, including data from the fakefile and the build settings file. */ #ifndef _di_fake_make_operate_process_type_fail_ - extern void fake_make_operate_process_type_fail(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern void fake_make_operate_process_type_fail(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_fail_ /** @@ -218,7 +218,7 @@ extern "C" { * @see fake_make_get_id_group() */ #ifndef _di_fake_make_operate_process_type_groups_ - extern f_status_t fake_make_operate_process_type_groups(fake_make_data_t * const data_make, const bool all) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_groups(fake_make_data_t * const data_make, const bool all); #endif // _di_fake_make_operate_process_type_groups_ /** @@ -233,7 +233,7 @@ extern "C" { * The operation process state. */ #ifndef _di_fake_make_operate_process_type_if_define_ - extern void fake_make_operate_process_type_if_define(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern void fake_make_operate_process_type_if_define(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process); #endif // _di_fake_make_operate_process_type_if_define_ /** @@ -255,7 +255,7 @@ extern "C" { * @see f_file_exists() */ #ifndef _di_fake_make_operate_process_type_if_exist_ - extern f_status_t fake_make_operate_process_type_if_exist(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_exist(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process); #endif // _di_fake_make_operate_process_type_if_exist_ /** @@ -274,7 +274,7 @@ extern "C" { * @see fl_conversion_dynamic_partial_to_unsigned_detect() */ #ifndef _di_fake_make_operate_process_type_if_greater_if_lesser_ - extern f_status_t fake_make_operate_process_type_if_greater_if_lesser(fake_make_data_t * const data_make, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_greater_if_lesser(fake_make_data_t * const data_make, fake_state_process_t *state_process); #endif // _di_fake_make_operate_process_type_if_greater_if_lesser_ /** @@ -298,7 +298,7 @@ extern "C" { * @see fake_make_get_id_group() */ #ifndef _di_fake_make_operate_process_type_if_group_ - extern f_status_t fake_make_operate_process_type_if_group(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_group(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process); #endif // _di_fake_make_operate_process_type_if_group_ /** @@ -320,7 +320,7 @@ extern "C" { * @see f_file_mode_read() */ #ifndef _di_fake_make_operate_process_type_if_is_ - extern f_status_t fake_make_operate_process_type_if_is(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_is(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process); #endif // _di_fake_make_operate_process_type_if_is_ /** @@ -345,7 +345,7 @@ extern "C" { * @see fake_make_get_id_mode() */ #ifndef _di_fake_make_operate_process_type_if_mode_ - extern f_status_t fake_make_operate_process_type_if_mode(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_mode(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process); #endif // _di_fake_make_operate_process_type_if_mode_ /** @@ -369,7 +369,7 @@ extern "C" { * @see fake_make_get_id_owner() */ #ifndef _di_fake_make_operate_process_type_if_owner_ - extern f_status_t fake_make_operate_process_type_if_owner(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_owner(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process); #endif // _di_fake_make_operate_process_type_if_owner_ /** @@ -384,7 +384,7 @@ extern "C" { * The operation process state. */ #ifndef _di_fake_make_operate_process_type_if_parameter_ - extern void fake_make_operate_process_type_if_parameter(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern void fake_make_operate_process_type_if_parameter(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process); #endif // _di_fake_make_operate_process_type_if_parameter_ /** @@ -406,7 +406,7 @@ extern "C" { * @see fake_make_operate_process_return() */ #ifndef _di_fake_make_operate_process_type_index_ - extern int fake_make_operate_process_type_index(fake_make_data_t * const data_make, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_make_operate_process_type_index(fake_make_data_t * const data_make, f_status_t * const status); #endif // _di_fake_make_operate_process_type_index_ /** @@ -423,7 +423,7 @@ extern "C" { * @see f_file_link() */ #ifndef _di_fake_make_operate_process_type_link_ - extern f_status_t fake_make_operate_process_type_link(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_link(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_link_ /** @@ -448,7 +448,7 @@ extern "C" { * @see fake_make_get_id_mode() */ #ifndef _di_fake_make_operate_process_type_modes_ - extern f_status_t fake_make_operate_process_type_modes(fake_make_data_t * const data_make, const bool all) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_modes(fake_make_data_t * const data_make, const bool all); #endif // _di_fake_make_operate_process_type_modes_ /** @@ -467,7 +467,7 @@ extern "C" { * @see fll_file_move() */ #ifndef _di_fake_make_operate_process_type_move_ - extern f_status_t fake_make_operate_process_type_move(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_move(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_move_ /** @@ -490,7 +490,7 @@ extern "C" { * @see fake_make_operate_section() */ #ifndef _di_fake_make_operate_process_type_operate_ - extern int fake_make_operate_process_type_operate(fake_make_data_t * const data_make, f_array_lengths_t * const section_stack, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_make_operate_process_type_operate(fake_make_data_t * const data_make, f_array_lengths_t * const section_stack, f_status_t * const status); #endif // _di_fake_make_operate_process_type_operate_ /** @@ -514,7 +514,7 @@ extern "C" { * @see fake_make_get_id_owner() */ #ifndef _di_fake_make_operate_process_type_owners_ - extern f_status_t fake_make_operate_process_type_owners(fake_make_data_t * const data_make, const bool all) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_owners(fake_make_data_t * const data_make, const bool all); #endif // _di_fake_make_operate_process_type_owners_ /** @@ -533,7 +533,7 @@ extern "C" { * @see f_string_map_multis_resize() */ #ifndef _di_fake_make_operate_process_type_parameter_ - extern f_status_t fake_make_operate_process_type_parameter(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_parameter(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_parameter_ /** @@ -556,7 +556,7 @@ extern "C" { * @see fake_make_path_relative() */ #ifndef _di_fake_make_operate_process_type_pop_ - extern f_status_t fake_make_operate_process_type_pop(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_pop(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_pop_ /** @@ -578,7 +578,7 @@ extern "C" { * @see f_string_dynamic_increase_by() */ #ifndef _di_fake_make_operate_process_type_print_ - extern f_status_t fake_make_operate_process_type_print(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_print(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_print_ /** @@ -598,7 +598,7 @@ extern "C" { * @see fake_skeleton_operate() */ #ifndef _di_fake_make_operate_process_type_skeleton_ - extern f_status_t fake_make_operate_process_type_skeleton(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_skeleton(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_skeleton_ /** @@ -620,7 +620,7 @@ extern "C" { * @see fake_make_path_relative() */ #ifndef _di_fake_make_operate_process_type_to_ - extern f_status_t fake_make_operate_process_type_to(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_to(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_to_ /** @@ -638,7 +638,7 @@ extern "C" { * @see f_string_dynamic_resize() */ #ifndef _di_fake_make_operate_process_type_top_ - extern f_status_t fake_make_operate_process_type_top(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_top(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_top_ /** @@ -656,7 +656,7 @@ extern "C" { * @see f_file_touch() */ #ifndef _di_fake_make_operate_process_type_touch_ - extern f_status_t fake_make_operate_process_type_touch(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_touch(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_touch_ /** @@ -676,7 +676,7 @@ extern "C" { * @see f_file_stream_write() */ #ifndef _di_fake_make_operate_process_type_write_ - extern f_status_t fake_make_operate_process_type_write(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_write(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_process_type_write_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make/operate_validate.h b/level_3/fake/c/main/make/operate_validate.h index 704603f..714b781 100644 --- a/level_3/fake/c/main/make/operate_validate.h +++ b/level_3/fake/c/main/make/operate_validate.h @@ -33,7 +33,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_validate_ - extern void fake_make_operate_validate(fake_make_data_t * const data_make, const f_string_range_t section_name, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_make_operate_validate(fake_make_data_t * const data_make, const f_string_range_t section_name, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status); #endif // _di_fake_make_operate_validate_ /** @@ -52,7 +52,7 @@ extern "C" { * F_none if there is no string to validate (used = 0). */ #ifndef _di_fake_make_operate_validate_define_name_ - extern f_status_t fake_make_operate_validate_define_name(const f_string_static_t name) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_define_name(const f_string_static_t name); #endif // _di_fake_make_operate_validate_define_name_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make/operate_validate_type.h b/level_3/fake/c/main/make/operate_validate_type.h index 1144db0..2d1abcc 100644 --- a/level_3/fake/c/main/make/operate_validate_type.h +++ b/level_3/fake/c/main/make/operate_validate_type.h @@ -24,7 +24,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_break_ - extern f_status_t fake_make_operate_validate_type_break(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_break(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_break_ /** @@ -39,7 +39,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_build_ - extern f_status_t fake_make_operate_validate_type_build(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_build(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_build_ /** @@ -54,7 +54,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_clean_top_skeleton_ - extern f_status_t fake_make_operate_validate_type_clean_top_skeleton(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_clean_top_skeleton(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_clean_top_skeleton_ /** @@ -69,7 +69,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_clone_ - extern f_status_t fake_make_operate_validate_type_clone(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_clone(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_clone_ /** @@ -84,7 +84,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_compile_ - extern f_status_t fake_make_operate_validate_type_compile(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_compile(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_compile_ /** @@ -102,7 +102,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_condition_ - extern f_status_t fake_make_operate_validate_type_condition(fake_make_data_t * const data_make, fake_state_process_t * const state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_condition(fake_make_data_t * const data_make, fake_state_process_t * const state_process); #endif // _di_fake_make_operate_validate_type_condition_ /** @@ -117,7 +117,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_copy_ - extern f_status_t fake_make_operate_validate_type_copy(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_copy(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_copy_ /** @@ -132,7 +132,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_define_ - extern f_status_t fake_make_operate_validate_type_define(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_define(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_define_ /** @@ -147,7 +147,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_delete_ - extern f_status_t fake_make_operate_validate_type_delete(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_delete(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_delete_ /** @@ -165,7 +165,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_else_ - extern f_status_t fake_make_operate_validate_type_else(fake_make_data_t * const data_make, fake_state_process_t * const state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_else(fake_make_data_t * const data_make, fake_state_process_t * const state_process); #endif // _di_fake_make_operate_validate_type_else_ /** @@ -180,7 +180,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_exit_ - extern f_status_t fake_make_operate_validate_type_exit(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_exit(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_exit_ /** @@ -195,7 +195,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_fail_ - extern f_status_t fake_make_operate_validate_type_fail(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_fail(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_fail_ /** @@ -210,7 +210,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_index_ - extern f_status_t fake_make_operate_validate_type_index(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_index(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_index_ /** @@ -225,7 +225,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_link_ - extern f_status_t fake_make_operate_validate_type_link(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_link(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_link_ /** @@ -240,7 +240,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_move_ - extern f_status_t fake_make_operate_validate_type_move(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_move(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_move_ /** @@ -257,7 +257,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_operate_ - extern f_status_t fake_make_operate_validate_type_operate(fake_make_data_t * const data_make, f_array_lengths_t * const section_stack) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_operate(fake_make_data_t * const data_make, f_array_lengths_t * const section_stack); #endif // _di_fake_make_operate_validate_type_operate_ /** @@ -272,7 +272,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_parameter_ - extern f_status_t fake_make_operate_validate_type_parameter(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_parameter(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_parameter_ /** @@ -290,7 +290,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_permission_ - extern f_status_t fake_make_operate_validate_type_permission(fake_make_data_t * const data_make, fake_state_process_t * const state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_permission(fake_make_data_t * const data_make, fake_state_process_t * const state_process); #endif // _di_fake_make_operate_validate_type_permission_ /** @@ -305,7 +305,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_pop_ - extern f_status_t fake_make_operate_validate_type_pop(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_pop(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_pop_ /** @@ -320,7 +320,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_run_ - extern f_status_t fake_make_operate_validate_type_run(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_run(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_run_ /** @@ -335,7 +335,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_to_ - extern f_status_t fake_make_operate_validate_type_to(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_to(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_to_ /** @@ -350,7 +350,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_touch_ - extern f_status_t fake_make_operate_validate_type_touch(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_touch(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_touch_ /** @@ -365,7 +365,7 @@ extern "C" { * F_failure (with error bit) on any error. */ #ifndef _di_fake_make_operate_validate_type_write_ - extern f_status_t fake_make_operate_validate_type_write(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_validate_type_write(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_write_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/make/print-error.c b/level_3/fake/c/main/make/print-error.c new file mode 100644 index 0000000..28c2e14 --- /dev/null +++ b/level_3/fake/c/main/make/print-error.c @@ -0,0 +1,69 @@ +#include "../fake.h" +#include "print-error.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fake_make_print_error_argument_invalid_section_ + f_status_t fake_make_print_error_argument_invalid_section(fake_setting_t * const setting, const fl_print_t print, const f_console_parameters_t parameters, const f_array_length_t index) { + + 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 argument '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, parameters.arguments.array[index], print.notable); + fl_print_format("%[' is not a valid section name.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_argument_invalid_section_ + +#ifndef _di_fake_make_print_error_define_invalid_character_ + f_status_t fake_make_print_error_define_invalid_character(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) { + + 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("%[%QInvalid characters in the define setting name '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable); + fl_print_format("%[', only alpha-numeric ASCII characters and underscore (without a leading digit) are allowed.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_define_invalid_character_ + +#ifndef _di_fake_make_print_error_fakefile_item_missing_ + f_status_t fake_make_print_error_fakefile_item_missing(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t item) { + + 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 fakefile '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); + fl_print_format("%[' is missing the required '%]", print.to, print.context, print.context); + fl_print_format("%[%r%]", print.to, print.notable, item, print.notable); + fl_print_format("%[' item.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_error_fakefile_item_missing_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/fake/c/main/make/print-error.h b/level_3/fake/c/main/make/print-error.h new file mode 100644 index 0000000..d1a76bd --- /dev/null +++ b/level_3/fake/c/main/make/print-error.h @@ -0,0 +1,90 @@ +/** + * FLL - Level 3 + * + * Project: Featureless Make + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + */ +#ifndef _fake_make_print_error_h +#define _fake_make_print_error_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Print error about a define setting containing an invalid character. + * + * These only allow valid characters in an environment variable name. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param parameters + * The console parameters. + * @param index + * An index within the console parameters arguments that represents the invalid argument. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_argument_invalid_section_ + extern f_status_t fake_make_print_error_argument_invalid_section(fake_setting_t * const setting, const fl_print_t print, const f_console_parameters_t parameters, const f_array_length_t index); +#endif // _di_fake_make_print_error_argument_invalid_section_ + +/** + * Print error about a define setting containing an invalid character. + * + * These only allow valid characters in an environment variable name. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param name + * The name of the variable containing one or more invalid characters. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_define_invalid_character_ + extern f_status_t fake_make_print_error_define_invalid_character(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name); +#endif // _di_fake_make_print_error_define_invalid_character_ + +/** + * Print error about a given fakefile missing a section. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param fakefile + * The name or path of the file that is empty. + * @param item + * The name of the missing section. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_error_fakefile_item_missing_ + extern f_status_t fake_make_print_error_fakefile_item_missing(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t item); +#endif // _di_fake_make_print_error_fakefile_item_missing_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _fake_make_print_error_h diff --git a/level_3/fake/c/main/make/print-warning.c b/level_3/fake/c/main/make/print-warning.c new file mode 100644 index 0000000..26ec6fc --- /dev/null +++ b/level_3/fake/c/main/make/print-warning.c @@ -0,0 +1,178 @@ +#include "../fake.h" +#include "print-warning.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_fake_make_print_warning_cannot_change_back_ + f_status_t fake_make_print_warning_cannot_change_back(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path, const f_status_t status) { + + if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QFailed change back to original path '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, path, print.notable); + fl_print_format("%[', status code =%] ", print.to, print.context, print.context); + fl_print_format("%[%ui%]", print.to, print.notable, F_status_set_fine(status), print.notable); + fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_warning_cannot_change_back_ + +#ifndef _di_fake_make_print_warning_environment_name_already_added_ + f_status_t fake_make_print_warning_environment_name_already_added(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) { + + if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe environment name '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable); + fl_print_format("%[' is already added, replacing previous value.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_warning_environment_name_already_added_ + +#ifndef _di_fake_make_print_warning_environment_name_invalid_ + f_status_t fake_make_print_warning_environment_name_invalid(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) { + + if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe environment name '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable); + fl_print_format("%[' is invalid, ignoring.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_warning_environment_name_invalid_ + +#ifndef _di_fake_make_print_warning_fakefile_empty_ + f_status_t fake_make_print_warning_fakefile_empty(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile) { + + if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe fakefile '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); + fl_print_format("%[' is empty.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_warning_fakefile_empty_ + +#ifndef _di_fake_make_print_warning_settings_content_empty_ + f_status_t fake_make_print_warning_settings_content_empty(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_dynamic_t buffer, const f_string_range_t range, const f_string_static_t name) { + + if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe fakefile '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); + fl_print_format("%[' has empty content for the '%]", print.to, print.context, print.context); + fl_print_format("%[%r%]", print.to, print.notable, name, print.notable); + fl_print_format("%[' object '%]", print.to, print.context, print.context); + fl_print_format("%[%/Q%]", print.to, print.notable, buffer, range, print.notable); + fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_warning_settings_content_empty_ + +#ifndef _di_fake_make_print_warning_settings_content_invalid_ + f_status_t fake_make_print_warning_settings_content_invalid(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_dynamic_t buffer, const f_string_range_t object, const f_string_range_t content, const f_string_static_t name) { + + if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe fakefile '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); + fl_print_format("%[' has invalid content '%]", print.to, print.context, print.context); + fl_print_format("%[%/Q%]", print.to, print.notable, buffer, content, print.notable); + fl_print_format("%[' for the '%]", print.to, print.context, print.context); + fl_print_format("%[%r%]", print.to, print.notable, name, print.notable); + fl_print_format("%[' object '%]", print.to, print.context, print.context); + fl_print_format("%[%/Q%]", print.to, print.notable, buffer, object, print.notable); + fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_warning_settings_content_invalid_ + +#ifndef _di_fake_make_print_warning_settings_content_multiple_ + f_status_t fake_make_print_warning_settings_content_multiple(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t name) { + + if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe fakefile '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%r%]", print.to, print.notable, fakefile, print.notable); + fl_print_format("%[' may only have a single content for the object '%]", print.to, print.context, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable); + fl_print_format("%[', only using the first.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_warning_settings_content_multiple_ + +#ifndef _di_fake_make_print_warning_settings_object_multiple_ + f_status_t fake_make_print_warning_settings_object_multiple(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t label, const f_string_static_t name) { + + if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + + f_file_stream_lock(print.to); + + fake_print_line_first_unlocked(setting, print); + + fl_print_format("%[%QThe object '%]", print.to, print.context, print.prefix, print.context); + fl_print_format("%[%r%]", print.to, print.notable, name, print.notable); + fl_print_format("%[' in the fakefile '%]", print.to, print.context, print.context); + fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); + fl_print_format("%[' may only be specified once, only using the first.%]%r", print.to, print.context, print.context, f_string_eol_s); + + f_file_stream_unlock(print.to); + + return F_none; + } +#endif // _di_fake_make_print_warning_settings_object_multiple_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/fake/c/main/make/print-warning.h b/level_3/fake/c/main/make/print-warning.h new file mode 100644 index 0000000..b9cd742 --- /dev/null +++ b/level_3/fake/c/main/make/print-warning.h @@ -0,0 +1,213 @@ +/** + * FLL - Level 3 + * + * Project: Featureless Make + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + */ +#ifndef _fake_make_print_warning_h +#define _fake_make_print_warning_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Print warning message when unable to change back to original path. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param path + * The path that cannot be changed back to. + * @param status + * The status code representing the cause of the failure. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_warning_cannot_change_back_ + extern f_status_t fake_make_print_warning_cannot_change_back(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path, const f_status_t status); +#endif // _di_fake_make_print_warning_cannot_change_back_ + +/** + * Print warning about a setting name being already added. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param name + * The name of the environment variable that is already added. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_warning_environment_name_already_added_ + extern f_status_t fake_make_print_warning_environment_name_already_added(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name); +#endif // _di_fake_make_print_warning_environment_name_already_added_ + +/** + * Print warning about a given environment name being invalid. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param name + * The name of the environment variable that is invalid. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_warning_environment_name_invalid_ + extern f_status_t fake_make_print_warning_environment_name_invalid(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name); +#endif // _di_fake_make_print_warning_environment_name_invalid_ + +/** + * Print warning about a given fakefile being empty. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param fakefile + * The name or path of the file that is empty. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_warning_fakefile_empty_ + extern f_status_t fake_make_print_warning_fakefile_empty(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile); +#endif // _di_fake_make_print_warning_fakefile_empty_ + +/** + * Print message when fake settings content is empty. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param fakefile + * The name or path of the file that is empty. + * @param buffer + * The buffer containing the loaded file content. + * @param range + * The range within the buffer representing the object. + * @param name + * The name of the setting that has an invalid value. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_warning_settings_content_empty_ + extern f_status_t fake_make_print_warning_settings_content_empty(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_dynamic_t buffer, const f_string_range_t range, const f_string_static_t name); +#endif // _di_fake_make_print_warning_settings_content_empty_ + +/** + * Print warning message when fake settings content is invalid. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param fakefile + * The name or path of the file that is empty. + * @param buffer + * The buffer containing the loaded file content. + * @param object + * The range within the buffer representing the object. + * @param content + * The range within the buffer representing the content. + * @param name + * The name of the setting that has an invalid value. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_warning_settings_content_invalid_ + extern f_status_t fake_make_print_warning_settings_content_invalid(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_dynamic_t buffer, const f_string_range_t object, const f_string_range_t content, const f_string_static_t name); +#endif // _di_fake_make_print_warning_settings_content_invalid_ + +/** + * Print warning message when settings content has too many values. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param fakefile + * The name or path of the file that is empty. + * @param buffer + * The buffer containing the loaded file content. + * @param name + * The name of the content. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_warning_settings_content_multiple_ + extern f_status_t fake_make_print_warning_settings_content_multiple(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t name); +#endif // _di_fake_make_print_warning_settings_content_multiple_ + +/** + * Print warning message when fakefile has too many objects with the same name. + * + * @param setting + * The main program settings. + * (Must be of type fake_setting_t.) + * + * This does not alter setting.status. + * @param print + * The output structure to print to. + * @param fakefile + * The name or path of the file that is empty. + * @param buffer + * The buffer containing the loaded file content. + * @param label + * A label describing what this object belongs to. + * @param name + * The name of the object. + * + * @return + * F_none on success. + * F_output_not on success, but no printing is performed. + */ +#ifndef _di_fake_make_print_warning_settings_object_multiple_ + extern f_status_t fake_make_print_warning_settings_object_multiple(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t label, const f_string_static_t name); +#endif // _di_fake_make_print_warning_settings_object_multiple_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _fake_make_print_warning_h diff --git a/level_3/fake/c/main/make/print.c b/level_3/fake/c/main/make/print.c index 61e0adc..a90ea05 100644 --- a/level_3/fake/c/main/make/print.c +++ b/level_3/fake/c/main/make/print.c @@ -5,192 +5,57 @@ extern "C" { #endif -#ifndef _di_fake_make_print_error_fakefile_item_missing_ - f_status_t fake_make_print_error_fakefile_item_missing(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t item) { +#ifndef _di_fake_make_print_now_making_ + f_status_t fake_make_print_now_making(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile) { - if (print.verbosity < f_console_verbosity_error_e) return F_output_not; + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; f_file_stream_lock(print.to); fake_print_line_first_unlocked(setting, print); - fl_print_format("%[%QThe fakefile '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); - fl_print_format("%[' is missing the required '%]", print.to, print.context, print.context); - fl_print_format("%[%r%]", print.to, print.notable, item, print.notable); - fl_print_format("%[' item.%]%r", print.to, print.context, print.context, f_string_eol_s); + fl_print_format("%[Now making using '%]", print.to, print.set->important, print.set->important); + fl_print_format("%[%Q%]", print.to, print.set->notable, fakefile, print.set->notable); - f_file_stream_unlock(print.to); - - return F_none; - } -#endif // _di_fake_make_print_error_fakefile_item_missing_ - -#ifndef _di_fake_make_print_error_define_invalid_character_ - f_status_t fake_make_print_error_define_invalid_character(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) { - - 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("%[%QInvalid characters in the define setting name '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable); - fl_print_format("%[', only alpha-numeric ASCII characters and underscore (without a leading digit) are allowed.%]%r", print.to, print.context, print.context, f_string_eol_s); - - f_file_stream_unlock(print.to); - - return F_none; - } -#endif // _di_fake_make_print_error_define_invalid_character_ - -#ifndef _di_fake_make_print_warning_environment_name_already_added_ - f_status_t fake_make_print_warning_environment_name_already_added(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) { - - if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; - - f_file_stream_lock(print.to); - - fake_print_line_first_unlocked(setting, print); - - fl_print_format("%[%QThe environment name '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable); - fl_print_format("%[' is already added, replacing previous value.%]%r", print.to, print.context, print.context, f_string_eol_s); - - f_file_stream_unlock(print.to); - - return F_none; - } -#endif // _di_fake_make_print_warning_environment_name_already_added_ - -#ifndef _di_fake_make_print_warning_environment_name_invalid_ - f_status_t fake_make_print_warning_environment_name_invalid(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name) { - - if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; - - f_file_stream_lock(print.to); - - fake_print_line_first_unlocked(setting, print); - - fl_print_format("%[%QThe environment name '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable); - fl_print_format("%[' is invalid, ignoring.%]%r", print.to, print.context, print.context, f_string_eol_s); - - f_file_stream_unlock(print.to); - - return F_none; - } -#endif // _di_fake_make_print_warning_environment_name_invalid_ + if (setting->modes.used) { + fl_print_format("%[' with modes '%]", print.to, print.set->important, print.set->important); -#ifndef _di_fake_make_print_warning_settings_content_empty_ - f_status_t fake_make_print_warning_settings_content_empty(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_dynamic_t buffer, const f_string_range_t range, const f_string_static_t name) { + for (f_array_length_t i = 0; i < setting->modes.used; ) { - if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + fl_print_format("%[%Q%]", print.to, print.set->notable, setting->modes.array[i], print.set->notable); - f_file_stream_lock(print.to); - - fake_print_line_first_unlocked(setting, print); - - fl_print_format("%[%QThe fakefile '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); - fl_print_format("%[' has empty content for the '%]", print.to, print.context, print.context); - fl_print_format("%[%r%]", print.to, print.notable, name, print.notable); - fl_print_format("%[' object '%]", print.to, print.context, print.context); - fl_print_format("%[%/Q%]", print.to, print.notable, buffer, range, print.notable); - fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s); - - f_file_stream_unlock(print.to); - - return F_none; - } -#endif // _di_fake_make_print_warning_settings_content_empty_ - -#ifndef _di_fake_make_print_warning_settings_content_invalid_ - f_status_t fake_make_print_warning_settings_content_invalid(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_dynamic_t buffer, const f_string_range_t object, const f_string_range_t content, const f_string_static_t name) { - - if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; - - f_file_stream_lock(print.to); - - fake_print_line_first_unlocked(setting, print); - - fl_print_format("%[%QThe fakefile '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); - fl_print_format("%[' has invalid content '%]", print.to, print.context, print.context); - fl_print_format("%[%/Q%]", print.to, print.notable, buffer, content, print.notable); - fl_print_format("%[' for the '%]", print.to, print.context, print.context); - fl_print_format("%[%r%]", print.to, print.notable, name, print.notable); - fl_print_format("%[' object '%]", print.to, print.context, print.context); - fl_print_format("%[%/Q%]", print.to, print.notable, buffer, object, print.notable); - fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s); - - f_file_stream_unlock(print.to); - - return F_none; - } -#endif // _di_fake_make_print_warning_settings_content_invalid_ - -#ifndef _di_fake_make_print_warning_settings_content_multiple_ - f_status_t fake_make_print_warning_settings_content_multiple(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t name) { - - if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; - - f_file_stream_lock(print.to); - - fake_print_line_first_unlocked(setting, print); - - fl_print_format("%[%QThe fakefile '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%r%]", print.to, print.notable, fakefile, print.notable); - fl_print_format("%[' may only have a single content for the object '%]", print.to, print.context, print.context); - fl_print_format("%[%Q%]", print.to, print.notable, name, print.notable); - fl_print_format("%[', only using the first.%]%r", print.to, print.context, print.context, f_string_eol_s); - - f_file_stream_unlock(print.to); - - return F_none; - } -#endif // _di_fake_make_print_warning_settings_content_multiple_ - -#ifndef _di_fake_make_print_warning_settings_object_multiple_ - f_status_t fake_make_print_warning_settings_object_multiple(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t label, const f_string_static_t name) { - - if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; - - f_file_stream_lock(print.to); - - fake_print_line_first_unlocked(setting, print); + if (++i < setting->modes.used) { + fl_print_format("%[', '%]", print.to, print.set->important, print.set->important); + } + } // for + } - fl_print_format("%[%QThe object '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%r%]", print.to, print.notable, name, print.notable); - fl_print_format("%[' in the fakefile '%]", print.to, print.context, print.context); - fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); - fl_print_format("%[' may only be specified once, only using the first.%]%r", print.to, print.context, print.context, f_string_eol_s); + fl_print_format("%['.%]%r", print.to, print.set->important, print.set->important, f_string_eol_s); f_file_stream_unlock(print.to); return F_none; } -#endif // _di_fake_make_print_warning_settings_object_multiple_ +#endif // _di_fake_make_print_now_making_ -#ifndef _di_fake_make_print_warning_fakefile_empty_ - f_status_t fake_make_print_warning_fakefile_empty(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile) { +#ifndef _di_fake_make_print_processing_section_ + f_status_t fake_make_print_processing_section(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t buffer, const f_fss_named_t section) { - if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; + if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; f_file_stream_lock(print.to); fake_print_line_first_unlocked(setting, print); - fl_print_format("%[%QThe fakefile '%]", print.to, print.context, print.prefix, print.context); - fl_print_format("%[%Q%]", print.to, print.notable, fakefile, print.notable); - fl_print_format("%[' is empty.%]%r", print.to, print.context, print.context, f_string_eol_s); + fl_print_format("%[Processing Section '%]", print.to, print.set->important, print.set->important); + fl_print_format("%[%/Q%]", print.to, print.set->notable, buffer, section.name, print.set->notable); + fl_print_format("%['.%]%r", print.to, print.set->important, print.set->important, f_string_eol_s); f_file_stream_unlock(print.to); return F_none; } -#endif // _di_fake_make_print_warning_fakefile_empty_ +#endif // _di_fake_make_print_processing_section_ #ifdef __cplusplus } // extern "C" diff --git a/level_3/fake/c/main/make/print.h b/level_3/fake/c/main/make/print.h index 83e3694..7814abb 100644 --- a/level_3/fake/c/main/make/print.h +++ b/level_3/fake/c/main/make/print.h @@ -13,7 +13,7 @@ extern "C" { #endif /** - * Print error about a given fakefile missing a section. + * Print the now making message. * * @param setting * The main program settings. @@ -24,187 +24,17 @@ extern "C" { * The output structure to print to. * @param fakefile * The name or path of the file that is empty. - * @param item - * The name of the missing section. * * @return * F_none on success. * F_output_not on success, but no printing is performed. */ -#ifndef _di_fake_make_print_error_fakefile_item_missing_ - extern f_status_t fake_make_print_error_fakefile_item_missing(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t item); -#endif // _di_fake_make_print_error_fakefile_item_missing_ +#ifndef _di_fake_make_print_now_making_ + extern f_status_t fake_make_print_now_making(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile); +#endif // _di_fake_make_print_now_making_ /** - * Print error about a define setting containing an invalid character. - * - * These only allow valid characters in an environment variable name. - * - * @param setting - * The main program settings. - * (Must be of type fake_setting_t.) - * - * This does not alter setting.status. - * @param print - * The output structure to print to. - * @param name - * The name of the variable containing one or more invalid characters. - * - * @return - * F_none on success. - * F_output_not on success, but no printing is performed. - */ -#ifndef _di_fake_make_print_error_define_invalid_character_ - extern f_status_t fake_make_print_error_define_invalid_character(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name); -#endif // _di_fake_make_print_error_define_invalid_character_ - -/** - * Print warning about a setting name being already added. - * - * @param setting - * The main program settings. - * (Must be of type fake_setting_t.) - * - * This does not alter setting.status. - * @param print - * The output structure to print to. - * @param name - * The name of the environment variable that is already added. - * - * @return - * F_none on success. - * F_output_not on success, but no printing is performed. - */ -#ifndef _di_fake_make_print_warning_environment_name_already_added_ - extern f_status_t fake_make_print_warning_environment_name_already_added(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name); -#endif // _di_fake_make_print_warning_environment_name_already_added_ - -/** - * Print warning about a given environment name being invalid. - * - * @param setting - * The main program settings. - * (Must be of type fake_setting_t.) - * - * This does not alter setting.status. - * @param print - * The output structure to print to. - * @param name - * The name of the environment variable that is invalid. - * - * @return - * F_none on success. - * F_output_not on success, but no printing is performed. - */ -#ifndef _di_fake_make_print_warning_environment_name_invalid_ - extern f_status_t fake_make_print_warning_environment_name_invalid(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t name); -#endif // _di_fake_make_print_warning_environment_name_invalid_ - -/** - * Print warning about a given fakefile being empty. - * - * @param setting - * The main program settings. - * (Must be of type fake_setting_t.) - * - * This does not alter setting.status. - * @param print - * The output structure to print to. - * @param fakefile - * The name or path of the file that is empty. - * - * @return - * F_none on success. - * F_output_not on success, but no printing is performed. - */ -#ifndef _di_fake_make_print_warning_fakefile_empty_ - extern f_status_t fake_make_print_warning_fakefile_empty(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile); -#endif // _di_fake_make_print_warning_fakefile_empty_ - -/** - * Print message when fake settings content is empty. - * - * @param setting - * The main program settings. - * (Must be of type fake_setting_t.) - * - * This does not alter setting.status. - * @param print - * The output structure to print to. - * @param fakefile - * The name or path of the file that is empty. - * @param buffer - * The buffer containing the loaded file content. - * @param range - * The range within the buffer representing the object. - * @param name - * The name of the setting that has an invalid value. - * - * @return - * F_none on success. - * F_output_not on success, but no printing is performed. - */ -#ifndef _di_fake_make_print_warning_settings_content_empty_ - extern f_status_t fake_make_print_warning_settings_content_empty(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_dynamic_t buffer, const f_string_range_t range, const f_string_static_t name); - -#endif // _di_fake_make_print_warning_settings_content_empty_ - -/** - * Print warning message when fake settings content is invalid. - * - * @param setting - * The main program settings. - * (Must be of type fake_setting_t.) - * - * This does not alter setting.status. - * @param print - * The output structure to print to. - * @param fakefile - * The name or path of the file that is empty. - * @param buffer - * The buffer containing the loaded file content. - * @param object - * The range within the buffer representing the object. - * @param content - * The range within the buffer representing the content. - * @param name - * The name of the setting that has an invalid value. - * - * @return - * F_none on success. - * F_output_not on success, but no printing is performed. - */ -#ifndef _di_fake_make_print_warning_settings_content_invalid_ - extern f_status_t fake_make_print_warning_settings_content_invalid(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_dynamic_t buffer, const f_string_range_t object, const f_string_range_t content, const f_string_static_t name); -#endif // _di_fake_make_print_warning_settings_content_invalid_ - -/** - * Print warning message when settings content has too many values. - * - * @param setting - * The main program settings. - * (Must be of type fake_setting_t.) - * - * This does not alter setting.status. - * @param print - * The output structure to print to. - * @param fakefile - * The name or path of the file that is empty. - * @param buffer - * The buffer containing the loaded file content. - * @param name - * The name of the content. - * - * @return - * F_none on success. - * F_output_not on success, but no printing is performed. - */ -#ifndef _di_fake_make_print_warning_settings_content_multiple_ - extern f_status_t fake_make_print_warning_settings_content_multiple(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t name); -#endif // _di_fake_make_print_warning_settings_content_multiple_ - -/** - * Print warning message when fakefile has too many objects with the same name. + * Print the processing section message. * * @param setting * The main program settings. @@ -213,22 +43,18 @@ extern "C" { * This does not alter setting.status. * @param print * The output structure to print to. - * @param fakefile - * The name or path of the file that is empty. * @param buffer - * The buffer containing the loaded file content. - * @param label - * A label describing what this object belongs to. - * @param name - * The name of the object. + * The string containing the section name. + * @param section + * The section structure containing the section name range. * * @return * F_none on success. * F_output_not on success, but no printing is performed. */ -#ifndef _di_fake_make_print_warning_settings_object_multiple_ - extern f_status_t fake_make_print_warning_settings_object_multiple(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t fakefile, const f_string_static_t label, const f_string_static_t name); -#endif // _di_fake_make_print_warning_settings_object_multiple_ +#ifndef _di_fake_make_print_processing_section_ + extern f_status_t fake_make_print_processing_section(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t buffer, const f_fss_named_t section); +#endif // _di_fake_make_print_processing_section_ #ifdef __cplusplus } // extern "C" diff --git a/level_3/fake/c/main/print.c b/level_3/fake/c/main/print.c index 87097cb..0b0c431 100644 --- a/level_3/fake/c/main/print.c +++ b/level_3/fake/c/main/print.c @@ -267,7 +267,14 @@ extern "C" { if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } - f_print_dynamic_raw(setting->line_first, print.to); + if (setting->flag & fake_main_flag_print_first_e) { + fll_print_dynamic_raw(setting->line_first, print.to); + + setting->flag -= fake_main_flag_print_first_e; + } + else { + fll_print_dynamic_raw(f_string_eol_s, print.to); + } return F_none; } @@ -282,7 +289,14 @@ extern "C" { if (print.verbosity < f_console_verbosity_normal_e) return F_output_not; } - fll_print_dynamic_raw(setting->line_first, print.to); + if (setting->flag & fake_main_flag_print_first_e) { + fll_print_dynamic_raw(setting->line_first, print.to); + + setting->flag -= fake_main_flag_print_first_e; + } + else { + fll_print_dynamic_raw(f_string_eol_s, print.to); + } return F_none; } diff --git a/level_3/fake/c/main/print.h b/level_3/fake/c/main/print.h index da82195..89ba49e 100644 --- a/level_3/fake/c/main/print.h +++ b/level_3/fake/c/main/print.h @@ -251,6 +251,8 @@ extern "C" { * * This is generally either the first line in the program or the first line printed before an error message. * + * Once the first line is processed (printed or not), then this will print new lines normally. + * * This function locks and then unlocks the input stream when printing. * * @param setting @@ -273,6 +275,8 @@ extern "C" { * * This is generally either the first line in the program or the first line printed before an error message. * + * Once the first line is processed (printed or not), then this will print new lines normally. + * * This function neither locks nor unlocks the input stream. * * @param setting @@ -385,7 +389,7 @@ extern "C" { * @see fake_print_error_build_operation_file_message(); */ #ifndef _di_fake_print_error_operation_file_ - extern bool fake_print_error_build_operation_file(fake_data_t * const data, const f_status_t status, const f_string_t function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback) F_attribute_visibility_internal_d; + extern bool fake_print_error_build_operation_file(fake_data_t * const data, const f_status_t status, const f_string_t function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback); #endif // _di_fake_print_error_operation_file_ /** @@ -410,7 +414,7 @@ extern "C" { * @see fake_print_error_build_operation_file() */ #ifndef _di_fake_print_error_build_operation_file_message_ - extern void fake_print_error_build_operation_file_message(fake_data_t * const data, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how) F_attribute_visibility_internal_d; + extern void fake_print_error_build_operation_file_message(fake_data_t * const data, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how); #endif // _di_fake_print_error_build_operation_file_message_ /** @@ -438,7 +442,7 @@ extern "C" { * @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 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; + 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); #endif // _di_fake_print_error_fss_ /** @@ -454,7 +458,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fake_print_error_parameter_missing_value_ - extern void fake_print_error_parameter_missing_value(fake_data_t * const data, const f_string_static_t parameter) F_attribute_visibility_internal_d; + extern void fake_print_error_parameter_missing_value(fake_data_t * const data, const f_string_static_t parameter); #endif // _di_fake_print_error_parameter_missing_value_ /** @@ -470,7 +474,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fake_print_error_parameter_too_many_ - extern void fake_print_error_parameter_too_many(fake_data_t * const data, const f_string_static_t parameter) F_attribute_visibility_internal_d; + extern void fake_print_error_parameter_too_many(fake_data_t * const data, const f_string_static_t parameter); #endif // _di_fake_print_error_parameter_too_many_ /** @@ -482,7 +486,7 @@ extern "C" { * @see fll_print_format() */ #ifndef _di_fake_print_error_requires_more_arguments_ - extern void fake_print_error_requires_more_arguments(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern void fake_print_error_requires_more_arguments(fake_make_data_t * const data_make); #endif // _di_fake_print_error_requires_more_arguments_ /** @@ -494,7 +498,7 @@ extern "C" { * @see fll_print_format() */ #ifndef _di_fake_print_error_too_many_arguments_ - extern void fake_print_error_too_many_arguments(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; + extern void fake_print_error_too_many_arguments(fake_make_data_t * const data_make); #endif // _di_fake_print_error_too_many_arguments_ /** @@ -508,7 +512,7 @@ extern "C" { * @see fll_print_format() */ #ifndef _di_fake_print_error_argument_empty_ - extern void fake_print_error_argument_empty(fake_make_data_t * const data_make, const f_array_length_t index) F_attribute_visibility_internal_d; + extern void fake_print_error_argument_empty(fake_make_data_t * const data_make, const f_array_length_t index); #endif // _di_fake_print_error_argument_empty_ /** @@ -530,7 +534,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fake_print_message_section_operation_failed_ - extern void fake_print_message_section_operation_failed(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) F_attribute_visibility_internal_d; + extern void fake_print_message_section_operation_failed(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); #endif // _di_fake_print_message_section_operation_failed_ /** @@ -548,7 +552,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fake_print_message_section_operation_link_argument_unknown_ - extern void fake_print_message_section_operation_link_argument_unknown(fake_data_t * const data, const fl_print_t print, const f_string_static_t argument) F_attribute_visibility_internal_d; + extern void fake_print_message_section_operation_link_argument_unknown(fake_data_t * const data, const fl_print_t print, const f_string_static_t argument); #endif // _di_fake_print_message_section_operation_link_argument_unknown_ /** @@ -566,7 +570,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fake_print_message_section_operation_link_point_exists_ - extern void fake_print_message_section_operation_link_point_exists(fake_data_t * const data, const fl_print_t print, const f_string_static_t argument) F_attribute_visibility_internal_d; + extern void fake_print_message_section_operation_link_point_exists(fake_data_t * const data, const fl_print_t print, const f_string_static_t argument); #endif // _di_fake_print_message_section_operation_link_point_exists_ /** @@ -584,7 +588,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fake_print_message_section_operation_link_target_exists_not_ - extern void fake_print_message_section_operation_link_target_exists_not(fake_data_t * const data, const fl_print_t print, const f_string_static_t argument) F_attribute_visibility_internal_d; + extern void fake_print_message_section_operation_link_target_exists_not(fake_data_t * const data, const fl_print_t print, const f_string_static_t argument); #endif // _di_fake_print_message_section_operation_link_target_exists_not_ /** @@ -607,7 +611,7 @@ extern "C" { * @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 f_string_t 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); #endif // _fake_print_message_section_operation_path_outside_ /** @@ -631,7 +635,7 @@ extern "C" { * @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 f_string_t 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); #endif // _di_fake_print_message_section_operation_path_stack_max_ /** @@ -655,7 +659,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fake_print_message_section_operation_stack_max_ - extern void fake_print_message_section_operation_stack_max(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, const f_array_length_t stack_max) F_attribute_visibility_internal_d; + extern void fake_print_message_section_operation_stack_max(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, const f_array_length_t stack_max); #endif // _di_fake_print_message_section_operation_stack_max_ /** @@ -677,7 +681,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fake_print_message_section_operation_unknown_ - extern 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) F_attribute_visibility_internal_d; + extern 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); #endif // _di_fake_print_message_section_operation_unknown_ #ifdef __cplusplus diff --git a/level_3/fake/c/main/skeleton.h b/level_3/fake/c/main/skeleton.h index 0f4d0a6..21cc97a 100644 --- a/level_3/fake/c/main/skeleton.h +++ b/level_3/fake/c/main/skeleton.h @@ -26,7 +26,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_skeleton_operate_ - extern f_status_t fake_skeleton_operate(fake_data_t * const data) F_attribute_visibility_internal_d; + extern f_status_t fake_skeleton_operate(fake_data_t * const data); #endif // _di_fake_skeleton_operate_ /** @@ -44,7 +44,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_skeleton_operate_directory_create_ - extern f_status_t fake_skeleton_operate_directory_create(fake_data_t * const data, const f_string_static_t path) F_attribute_visibility_internal_d; + extern f_status_t fake_skeleton_operate_directory_create(fake_data_t * const data, const f_string_static_t path); #endif // _di_fake_skeleton_operate_directory_create_ /** @@ -67,7 +67,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_skeleton_operate_file_create_ - extern f_status_t fake_skeleton_operate_file_create(fake_data_t * const data, const f_string_static_t path, const bool executable, const f_string_static_t content) F_attribute_visibility_internal_d; + extern f_status_t fake_skeleton_operate_file_create(fake_data_t * const data, const f_string_static_t path, const bool executable, const f_string_static_t content); #endif // _di_fake_skeleton_operate_file_create_ /** @@ -84,7 +84,7 @@ extern "C" { * The path_sources.size is ignored. */ #ifndef _di_fake_skeleton_path_source_length_ - extern void fake_skeleton_path_source_length(fake_data_t * const data, const f_string_static_t *partial, f_string_static_t * const source) F_attribute_visibility_internal_d; + extern void fake_skeleton_path_source_length(fake_data_t * const data, const f_string_static_t *partial, f_string_static_t * const source); #endif // _di_fake_skeleton_path_source_length_ /** @@ -101,7 +101,7 @@ extern "C" { * The path_sources.size is ignored. */ #ifndef _di_fake_skeleton_path_source_string_ - extern void fake_skeleton_path_source_string(fake_data_t * const data, const f_string_static_t *partial, f_string_static_t * const source) F_attribute_visibility_internal_d; + extern void fake_skeleton_path_source_string(fake_data_t * const data, const f_string_static_t *partial, f_string_static_t * const source); #endif // _di_fake_skeleton_path_source_string_ #ifdef __cplusplus diff --git a/level_3/fake/data/build/settings b/level_3/fake/data/build/settings index ec0a586..b1cb165 100644 --- a/level_3/fake/data/build/settings +++ b/level_3/fake/data/build/settings @@ -30,9 +30,9 @@ build_libraries-monolithic -lfll build_sources_library main/build.c main/clean.c main/common.c main/fake.c main/make.c main/print.c main/private-common.c main/private-fake.c main/private-print.c main/skeleton.c build_sources_library main/build/library.c main/build/load.c main/build/object.c main/build/objects.c main/build/print.c main/build/program.c main/build/skeleton.c build_sources_library main/clean/print.c -build_sources_library main/common/print.c main/common/string.c main/common/type.c +build_sources_library main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c build_sources_library main/fake/path_generate.c main/fake/print.c -build_sources_library main/make/load_fakefile.c main/make/load_parameters.c main/make/operate_block.c main/make/operate.c main/make/operate_process.c main/make/operate_process_type.c main/make/operate_validate.c main/make/operate_validate_type.c main/make/print.c +build_sources_library main/make/load_fakefile.c main/make/load_parameters.c main/make/operate_block.c main/make/operate.c main/make/operate_process.c main/make/operate_process_type.c main/make/operate_validate.c main/make/operate_validate_type.c main/make/print.c main/make/print-error.c main/make/print-warning.c build_sources_library main/skeleton/print.c build_sources_program main/main.c @@ -40,9 +40,9 @@ build_sources_program main/main.c build_sources_headers main/build.h main/clean.h main/common.h main/fake.h main/make.h main/print.h main/private-common.h main/private-fake.h main/private-print.h main/skeleton.h build_sources_headers main/build/library.h main/build/load.h main/build/object.h main/build/objects.h main/build/print.h main/build/program.h main/build/skeleton.h build_sources_headers main/clean/print.h -build_sources_headers main/common/print.h main/common/string.h main/common/type.h +build_sources_headers main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h build_sources_headers main/fake/path_generate.h main/fake/print.h -build_sources_headers main/make/load_fakefile.h main/make/load_parameters.h main/make/operate_block.h main/make/operate.h main/make/operate_process.h main/make/operate_process_type.h main/make/operate_validate.h main/make/operate_validate_type.h main/make/print.h +build_sources_headers main/make/load_fakefile.h main/make/load_parameters.h main/make/operate_block.h main/make/operate.h main/make/operate_process.h main/make/operate_process_type.h main/make/operate_validate.h main/make/operate_validate_type.h main/make/print.h main/make/print-error.h main/make/print-warning.h build_sources_headers main/skeleton/print.h build_sources_documentation man