From 2986b182f39ec570204b653cedba35f370a14803 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 9 Mar 2023 22:04:07 -0600 Subject: [PATCH] Progress: Continue program related work. --- level_3/controller/c/entry/private-entry.c | 6 +- level_3/controller/c/rule/private-rule.c | 70 +-- level_3/controller/c/rule/private-rule_print.c | 4 +- level_3/fake/c/main/build.c | 204 ++++---- level_3/fake/c/main/build/load.c | 82 ++-- level_3/fake/c/main/build/skeleton.c | 34 +- level_3/fake/c/main/clean.c | 14 +- level_3/fake/c/main/fake.c | 80 ++-- level_3/fake/c/main/fake/path_generate.c | 42 +- level_3/fake/c/main/make/operate.c | 88 ++-- level_3/fake/c/main/make/operate_process.c | 2 +- level_3/fake/c/main/make/operate_process_type.c | 212 ++++----- level_3/fake/c/main/make/operate_validate.c | 59 ++- level_3/fake/c/main/make/operate_validate.h | 62 ++- level_3/fake/c/main/make/operate_validate_type.c | 581 ++++++++++++++--------- level_3/fake/c/main/make/operate_validate_type.h | 184 +++---- level_3/fake/c/main/print/error.c | 30 +- level_3/fake/c/main/skeleton.c | 12 +- 18 files changed, 980 insertions(+), 786 deletions(-) diff --git a/level_3/controller/c/entry/private-entry.c b/level_3/controller/c/entry/private-entry.c index a556fea..ed52908 100644 --- a/level_3/controller/c/entry/private-entry.c +++ b/level_3/controller/c/entry/private-entry.c @@ -149,7 +149,7 @@ extern "C" { action->status = F_known_not; action->parameters.used = 0; - status = f_fss_count_lines(state, cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action); + status = f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action, &setting->state); if (F_status_is_error(status)) { controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread); @@ -1666,7 +1666,7 @@ extern "C" { break; } - status = f_fss_count_lines(state, cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item); + status = f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item, &setting->state); if (F_status_is_error(status)) { controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread); @@ -1911,7 +1911,7 @@ extern "C" { cache->action.line_action = 0; - status = f_fss_count_lines(state, cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action); + status = f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action, &setting->state); if (F_status_is_error(status)) { controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread); diff --git a/level_3/controller/c/rule/private-rule.c b/level_3/controller/c/rule/private-rule.c index 7be8d86..1c6c408 100644 --- a/level_3/controller/c/rule/private-rule.c +++ b/level_3/controller/c/rule/private-rule.c @@ -351,7 +351,7 @@ extern "C" { return status; } - status = f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &actions->array[actions->used].line); + status = f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &actions->array[actions->used].line, &setting->state); if (F_status_is_error(status)) { controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true); @@ -625,7 +625,7 @@ extern "C" { actions->array[actions->used++].parameters.used = 1; } else { - status = f_fss_count_lines(state, cache->buffer_item, range->start, &actions->array[actions->used].line); + status = f_fss_count_lines(cache->buffer_item, range->start, &actions->array[actions->used].line, &setting->state); if (F_status_is_error(status)) { controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true); @@ -2409,7 +2409,7 @@ extern "C" { break; } - status = f_fss_count_lines(state, cache->buffer_item, cache->range_action.start, &cache->action.line_action); + status = f_fss_count_lines(cache->buffer_item, cache->range_action.start, &cache->action.line_action, &setting->state); if (F_status_is_error(status)) { controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true); @@ -3842,7 +3842,7 @@ extern "C" { for_item = F_true; - status = f_fss_count_lines(state, cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item); + status = f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item, &setting->state); if (F_status_is_error(status)) { controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true); @@ -4005,7 +4005,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4070,7 +4070,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4099,7 +4099,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4124,7 +4124,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4253,7 +4253,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4281,7 +4281,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4307,7 +4307,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4398,7 +4398,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4478,7 +4478,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4507,7 +4507,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4547,7 +4547,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4680,7 +4680,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4696,7 +4696,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; } @@ -4757,7 +4757,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4841,7 +4841,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4920,7 +4920,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -4968,7 +4968,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5037,7 +5037,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5067,7 +5067,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5117,7 +5117,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5162,7 +5162,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5212,7 +5212,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5276,7 +5276,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5303,7 +5303,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5354,7 +5354,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5384,7 +5384,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5399,7 +5399,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5501,7 +5501,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5552,7 +5552,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5594,7 +5594,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -5619,7 +5619,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; diff --git a/level_3/controller/c/rule/private-rule_print.c b/level_3/controller/c/rule/private-rule_print.c index 580189e..0bc3fc8 100644 --- a/level_3/controller/c/rule/private-rule_print.c +++ b/level_3/controller/c/rule/private-rule_print.c @@ -370,7 +370,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; @@ -393,7 +393,7 @@ extern "C" { // Get the current line number within the settings item. cache->action.line_item = line_item; - f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item); + f_fss_count_lines(cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item, &setting->state); cache->action.line_action = ++cache->action.line_item; diff --git a/level_3/fake/c/main/build.c b/level_3/fake/c/main/build.c index be20ee5..d984220 100644 --- a/level_3/fake/c/main/build.c +++ b/level_3/fake/c/main/build.c @@ -8,7 +8,7 @@ extern "C" { 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) { if (!data || !data_build || !arguments) return; - if (F_status_is_error(data->setting.state.status)) return; + if (F_status_is_error(data->setting->state.status)) return; { f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + data->path_build_libraries_shared.used; @@ -42,8 +42,8 @@ extern "C" { if (!values[i].used) continue; - data->setting.state.status = fll_execute_arguments_add(values[i], arguments); - if (F_status_is_error(data->setting.state.status)) return; + data->setting->state.status = fll_execute_arguments_add(values[i], arguments); + if (F_status_is_error(data->setting->state.status)) return; } // for } @@ -60,8 +60,8 @@ extern "C" { memcpy(buffer_string, fake_build_parameter_library_include_s.string, sizeof(f_char_t) * fake_build_parameter_library_include_s.used); memcpy(buffer_string + fake_build_parameter_library_include_s.used, data->path_work_includes.string, sizeof(f_char_t) * data->path_work_includes.used); - data->setting.state.status = fll_execute_arguments_add(buffer, arguments); - if (F_status_is_error(data->setting.state.status)) return; + data->setting->state.status = fll_execute_arguments_add(buffer, arguments); + if (F_status_is_error(data->setting->state.status)) return; } if (data_build->setting.search_shared && (is_shared || !data_build->setting.search_exclusive)) { @@ -74,8 +74,8 @@ extern "C" { memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_path_s.used); memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, data->path_work_libraries_shared.string, sizeof(f_char_t) * data->path_work_libraries_shared.used); - data->setting.state.status = fll_execute_arguments_add(buffer, arguments); - if (F_status_is_error(data->setting.state.status)) return; + data->setting->state.status = fll_execute_arguments_add(buffer, arguments); + if (F_status_is_error(data->setting->state.status)) return; } if (data_build->setting.search_static && (!is_shared || !data_build->setting.search_exclusive)) { @@ -88,8 +88,8 @@ extern "C" { memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_path_s.used); memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, data->path_work_libraries_static.string, sizeof(f_char_t) * data->path_work_libraries_static.used); - data->setting.state.status = fll_execute_arguments_add(buffer, arguments); - if (F_status_is_error(data->setting.state.status)) return; + data->setting->state.status = fll_execute_arguments_add(buffer, arguments); + if (F_status_is_error(data->setting->state.status)) return; } } @@ -145,13 +145,13 @@ extern "C" { if (!strings[s]->array[i].used) continue; - data->setting.state.status = fll_execute_arguments_add(strings[s]->array[i], arguments); - if (F_status_is_error(data->setting.state.status)) return; + data->setting->state.status = fll_execute_arguments_add(strings[s]->array[i], arguments); + if (F_status_is_error(data->setting->state.status)) return; } // for } // for } - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_build_arguments_standard_add_ @@ -159,13 +159,13 @@ extern "C" { 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) { if (!data) return; - if (F_status_is_error(data->setting.state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting.state.status == F_child) return; + if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return; if (!((++data->main->signal_check) % fake_signal_check_d)) { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); return; } @@ -181,10 +181,10 @@ extern "C" { fll_print_format("%r%[Copying %Q.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, label, data->main->context.set.important, f_string_eol_s); } - data->setting.state.status = f_string_dynamic_resize(source.used, &path_source); + data->setting->state.status = f_string_dynamic_resize(source.used, &path_source); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_string_dynamic_resize)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_string_dynamic_resize)); f_string_dynamic_resize(0, &path_source); @@ -208,7 +208,7 @@ extern "C" { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); break; } @@ -220,46 +220,46 @@ extern "C" { path_source.used = source.used; - data->setting.state.status = f_string_dynamic_append_nulless(files.array[i], &path_source); + data->setting->state.status = f_string_dynamic_append_nulless(files.array[i], &path_source); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_string_dynamic_append_nulless)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_string_dynamic_append_nulless)); break; } - data->setting.state.status = f_directory_is(path_source); + data->setting->state.status = f_directory_is(path_source); - if (data->setting.state.status == F_true) { + if (data->setting->state.status == F_true) { destination_directory.used = 0; - data->setting.state.status = f_string_dynamic_append_nulless(destination, &destination_directory); + data->setting->state.status = f_string_dynamic_append_nulless(destination, &destination_directory); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_string_dynamic_append_nulless)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_string_dynamic_append_nulless)); break; } - data->setting.state.status = f_file_name_base(path_source, &destination_directory); + data->setting->state.status = f_file_name_base(path_source, &destination_directory); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_file_name_base)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_file_name_base)); break; } - data->setting.state.status = fl_directory_copy(path_source, destination_directory, mode, recurse); + data->setting->state.status = fl_directory_copy(path_source, destination_directory, mode, recurse); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { for (f_array_length_t j = 0; j < failures.used; ++j) { fake_print_error_build_operation_file(data->setting, data->main->error, macro_fake_f(fl_directory_copy), fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true); } // for - if (F_status_set_fine(data->setting.state.status) != F_failure) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(fl_directory_copy)); + if (F_status_set_fine(data->setting->state.status) != F_failure) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(fl_directory_copy)); } } else if (data->main->error.verbosity > f_console_verbosity_quiet_e) { @@ -269,23 +269,23 @@ extern "C" { break; } } - else if (data->setting.state.status == F_false) { + else if (data->setting->state.status == F_false) { destination_file.used = 0; destination_directory.used = 0; - data->setting.state.status = f_string_dynamic_append_nulless(destination, &destination_file); + data->setting->state.status = f_string_dynamic_append_nulless(destination, &destination_file); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_string_dynamic_append_nulless)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_string_dynamic_append_nulless)); break; } if (perserve_offset && perserve_offset < path_source.used) { - data->setting.state.status = f_string_dynamic_append_nulless(destination, &destination_directory); + data->setting->state.status = f_string_dynamic_append_nulless(destination, &destination_directory); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_string_dynamic_append_nulless)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_string_dynamic_append_nulless)); break; } @@ -293,44 +293,44 @@ extern "C" { buffer.string = path_source.string + perserve_offset; buffer.used = path_source.used - perserve_offset; - data->setting.state.status = f_file_name_directory(buffer, &destination_directory); + data->setting->state.status = f_file_name_directory(buffer, &destination_directory); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_file_name_directory)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_file_name_directory)); break; } - data->setting.state.status = fl_directory_create(destination_directory, F_file_mode_all_rwx_d); + data->setting->state.status = fl_directory_create(destination_directory, F_file_mode_all_rwx_d); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error_file(data->setting, data->main->error, data->setting.state.status, macro_fake_f(fl_directory_create), destination_directory, f_file_operation_create_s, fll_error_file_type_directory_e); + if (F_status_is_error(setting->state.status)) { + fake_print_error_file(data->setting, data->main->error, data->setting->state.status, macro_fake_f(fl_directory_create), destination_directory, f_file_operation_create_s, fll_error_file_type_directory_e); break; } - data->setting.state.status = f_string_append(path_source.string + perserve_offset, path_source.used - perserve_offset, &destination_file); + data->setting->state.status = f_string_append(path_source.string + perserve_offset, path_source.used - perserve_offset, &destination_file); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_string_append)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_string_append)); break; } } else { - data->setting.state.status = f_file_name_base(path_source, &destination_file); + data->setting->state.status = f_file_name_base(path_source, &destination_file); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_file_name_base)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_file_name_base)); break; } } - data->setting.state.status = f_file_copy(path_source, destination_file, mode, F_file_default_read_size_d, f_file_stat_flag_reference_e); + data->setting->state.status = f_file_copy(path_source, destination_file, mode, F_file_default_read_size_d, f_file_stat_flag_reference_e); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error_build_operation_file(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_file_copy), f_file_operation_copy_s, f_file_operation_to_s, path_source, destination_file, F_true); + if (F_status_is_error(setting->state.status)) { + fake_print_error_build_operation_file(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_file_copy), f_file_operation_copy_s, f_file_operation_to_s, path_source, destination_file, F_true); break; } @@ -339,13 +339,13 @@ extern "C" { fll_print_format("Copied file '%Q' to '%Q'.%r", data->main->message.to, path_source, destination_file, f_string_eol_s); } } - else if (F_status_is_error(data->setting.state.status)) { - fake_print_error_file(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_directory_is), path_source, f_file_operation_create_s, fll_error_file_type_file_e); + else if (F_status_is_error(setting->state.status)) { + fake_print_error_file(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_directory_is), path_source, f_file_operation_create_s, fll_error_file_type_file_e); break; } - data->setting.state.status = F_none; + data->setting->state.status = F_none; } // for macro_f_directory_statuss_t_delete_simple(failures); @@ -364,15 +364,15 @@ extern "C" { 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) { if (!data) return; - if (F_status_is_error(data->setting.state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting.state.status == F_child) return data->main->child; + if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child; if (!process_script.used) return 0; f_string_dynamics_t arguments = f_string_dynamics_t_initialize; - data->setting.state.status = fll_execute_arguments_add(fake_other_operation_build_s, &arguments); + data->setting->state.status = fll_execute_arguments_add(fake_other_operation_build_s, &arguments); // Ensure console color mode is passed to the scripts so that they can also react to color mode. - if (F_status_is_error_not(data->setting.state.status) && data->main->context.mode != f_color_mode_none_e) { + if (F_status_is_error_not(data->setting->state.status) && data->main->context.mode != f_color_mode_none_e) { f_string_static_t argument = f_string_static_t_initialize; argument.used = f_console_symbol_short_inverse_s.used + f_console_standard_short_dark_s.used; @@ -392,11 +392,11 @@ extern "C" { memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_no_color_s.string, sizeof(f_char_t) * f_console_standard_short_no_color_s.used); } - data->setting.state.status = fll_execute_arguments_add(argument, &arguments); + data->setting->state.status = fll_execute_arguments_add(argument, &arguments); } // Ensure verbosity level is passed to the scripts so that they can also react to requested verbosity. - if (F_status_is_error_not(data->setting.state.status) && data->main->error.verbosity != f_console_verbosity_normal_e) { + if (F_status_is_error_not(data->setting->state.status) && data->main->error.verbosity != f_console_verbosity_normal_e) { f_string_static_t argument = f_string_static_t_initialize; argument.used = f_console_symbol_short_inverse_s.used + f_console_standard_short_quiet_s.used; @@ -419,10 +419,10 @@ extern "C" { memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_debug_s.string, sizeof(f_char_t) * f_console_standard_short_debug_s.used); } - data->setting.state.status = fll_execute_arguments_add(argument, &arguments); + data->setting->state.status = fll_execute_arguments_add(argument, &arguments); } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(fll_execute_arguments_add)); f_string_dynamics_resize(0, &arguments); @@ -436,11 +436,11 @@ extern "C" { if (data->setting->defines.used) { for (f_array_length_t i = 0; i < data->setting->defines.used; ++i) { - data->setting.state.status = f_string_dynamic_mash(f_string_space_s, data->setting->defines.array[i], &defines); - if (F_status_is_error(data->setting.state.status)) break; + data->setting->state.status = f_string_dynamic_mash(f_string_space_s, data->setting->defines.array[i], &defines); + if (F_status_is_error(data->setting->state.status)) break; } // for - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_mash)); f_string_dynamic_resize(0, &defines); @@ -486,11 +486,11 @@ extern "C" { data->setting->work, }; - data->setting.state.status = fll_execute_arguments_add_parameter_set(prefixs, names, values, 9, &arguments); + data->setting->state.status = fll_execute_arguments_add_parameter_set(prefixs, names, values, 9, &arguments); f_string_dynamic_resize(0, &defines); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(fll_execute_arguments_add_parameter_set)); f_string_dynamics_resize(0, &arguments); @@ -502,15 +502,15 @@ extern "C" { f_string_dynamic_t path = f_string_dynamic_t_initialize; if (process_script.string[0] != '/') { - data->setting.state.status = f_string_dynamic_append_nulless(data->path_data_build, &path); + data->setting->state.status = f_string_dynamic_append_nulless(data->path_data_build, &path); } - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_string_dynamic_append_nulless(process_script, &path); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_string_dynamic_append_nulless(process_script, &path); } - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_string_dynamic_append_nulless)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_string_dynamic_append_nulless)); f_string_dynamic_resize(0, &path); f_string_dynamics_resize(0, &arguments); @@ -527,18 +527,18 @@ extern "C" { fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(FL_execute_parameter_option_path_d, 0, &data_build->environment, &signals, 0); - data->setting.state.status = fll_execute_program(path, arguments, ¶meter, 0, (void *) &return_code); + data->setting->state.status = fll_execute_program(path, arguments, ¶meter, 0, (void *) &return_code); f_string_dynamics_resize(0, &arguments); if (!((++data->main->signal_check) % fake_signal_check_d) && fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); } - else if (data->setting.state.status != F_child) { - if (F_status_is_error(data->setting.state.status)) { - if (F_status_set_fine(data->setting.state.status) == F_failure) { + else if (data->setting->state.status != F_child) { + if (F_status_is_error(setting->state.status)) { + if (F_status_set_fine(data->setting->state.status) == F_failure) { fake_print_error_failure_script(data->setting, data->main->error, path); } else { @@ -562,13 +562,13 @@ extern "C" { if (!data) return; name->used = 0; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (!path.used) return; - data->setting.state.status = f_file_name_base(path, name); + data->setting->state.status = f_file_name_base(path, name); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(f_file_name_base)); return; @@ -583,7 +583,7 @@ extern "C" { } } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_build_get_file_name_without_extension_ @@ -617,12 +617,12 @@ extern "C" { memcpy(source_string, path->string, sizeof(f_char_t) * path->used); memcpy(source_string + path->used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used); - data->setting.state.status = fll_execute_arguments_add(source, arguments); - if (F_status_is_error(data->setting.state.status)) return; + data->setting->state.status = fll_execute_arguments_add(source, arguments); + if (F_status_is_error(data->setting->state.status)) return; } // for } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_build_objects_add_ @@ -635,13 +635,13 @@ extern "C" { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); return; } } - data->setting.state.status = F_none; + data->setting->state.status = F_none; f_mode_t mode = f_mode_t_initialize; @@ -652,7 +652,7 @@ extern "C" { fake_build_load_setting(data, build_arguments, process_pipe, &data_build.setting); - if (F_status_is_fine(data->setting.state.status)) { + if (F_status_is_fine(data->setting->state.status)) { 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); @@ -902,12 +902,12 @@ extern "C" { source.used += sources[i]->array[j].used; source.string[source.used] = 0; - data->setting.state.status = fll_execute_arguments_add(source, arguments); - if (F_status_is_error(data->setting.state.status)) return; + data->setting->state.status = fll_execute_arguments_add(source, arguments); + if (F_status_is_error(data->setting->state.status)) return; } // for } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_build_sources_add_ @@ -917,7 +917,7 @@ extern "C" { if (!data || !data_build || !generic || !specific || !arguments) return; if (!generic->used && !specific->used) { - data->setting.state.status = F_none; + data->setting->state.status = F_none; return; } @@ -949,10 +949,10 @@ extern "C" { source_string[source.used] = 0; - data->setting.state.status = fll_execute_arguments_add(source, arguments); - if (F_status_is_error(data->setting.state.status)) return; + data->setting->state.status = fll_execute_arguments_add(source, arguments); + if (F_status_is_error(data->setting->state.status)) return; - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_build_sources_object_add_ @@ -960,13 +960,13 @@ extern "C" { void fake_build_touch(fake_data_t * const data, const f_string_dynamic_t file) { if (!data) return; - if (F_status_is_error(data->setting.state.status)) return; + if (F_status_is_error(data->setting->state.status)) return; if (!((++data->main->signal_check) % fake_signal_check_d)) { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); return; } @@ -976,13 +976,13 @@ extern "C" { macro_f_mode_t_set_default_umask(mode, data->main->umask); - data->setting.state.status = f_file_touch(file, mode.regular, F_false); + data->setting->state.status = f_file_touch(file, mode.regular, F_false); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_touch), file, f_file_operation_touch_s, fll_error_file_type_file_e); } else { - data->setting.state.status = F_none; + data->setting->state.status = F_none; } } #endif // _di_fake_build_touch_ diff --git a/level_3/fake/c/main/build/load.c b/level_3/fake/c/main/build/load.c index b19f275..f7f1910 100644 --- a/level_3/fake/c/main/build/load.c +++ b/level_3/fake/c/main/build/load.c @@ -8,7 +8,7 @@ extern "C" { void fake_build_load_environment(fake_data_t * const data, fake_build_data_t * const data_build, f_string_maps_t * const environment) { if (!data || !data_build || !environment) return; - if (F_status_is_error(data->setting.state.status)) return; + if (F_status_is_error(data->setting->state.status)) return; // Reset the environment. for (f_array_length_t i = 0; i < environment->used; ++i) { @@ -28,9 +28,9 @@ extern "C" { for (uint8_t i = 0; i < 2; ++i) { - data->setting.state.status = fl_environment_load_name(variables[i], environment); + data->setting->state.status = fl_environment_load_name(variables[i], environment); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(fl_environment_load_name)); return; @@ -52,19 +52,19 @@ extern "C" { f_file_stream_unlock(data->main->error.to); } - data->setting.state.status = F_status_set_error(F_array_too_large); + data->setting->state.status = F_status_set_error(F_array_too_large); return; } } - data->setting.state.status = fl_environment_load_names(data_build->setting.environment, environment); + data->setting->state.status = fl_environment_load_names(data_build->setting.environment, environment); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(fl_environment_load_names)); } else { - data->setting.state.status = F_none; + data->setting->state.status = F_none; } } #endif // _di_fake_build_load_environment_ @@ -73,13 +73,13 @@ extern "C" { 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) { if (!data || !setting) return; - if (F_status_is_error(data->setting.state.status)) return; + if (F_status_is_error(data->setting->state.status)) return; if (!((++data->main->signal_check) % fake_signal_check_d)) { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); return; } @@ -132,36 +132,36 @@ extern "C" { if (process_pipe) { fake_pipe_buffer(data, &buffer); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { buffer.used = 0; } else { - data->setting.state.status = f_string_dynamic_append_assure(f_string_eol_s, &buffer); + data->setting->state.status = f_string_dynamic_append_assure(f_string_eol_s, &buffer); } } - if (F_status_is_error_not(data->setting.state.status)) { + if (F_status_is_error_not(data->setting->state.status)) { if (build_arguments && build_arguments->used || !process_pipe || (data->setting->flag & fake_main_flag_operation_e)) { fake_file_buffer(data, path_file, process_pipe ? F_false : F_true, &buffer); } } - if (F_status_is_error_not(data->setting.state.status)) { + if (F_status_is_error_not(data->setting->state.status)) { f_string_range_t range = macro_f_string_range_t_initialize2(buffer.used); f_fss_delimits_t delimits = f_fss_delimits_t_initialize; - // @todo make sure data->setting.state.custom = (void *) data->main; + // @todo make sure data->setting->state.custom = (void *) data->main; //f_state_t state = macro_f_state_t_initialize_1(fake_allocation_large_d, fake_allocation_small_d, F_none, 0, 0, &fll_program_standard_signal_handle, 0, (void *) data->main, 0); - data->setting.state.status = fll_fss_extended_read(buffer, &range, &objects, &contents, 0, 0, &delimits, 0, &data->setting.state); + data->setting->state.status = fll_fss_extended_read(buffer, &range, &objects, &contents, 0, 0, &delimits, 0, &data->setting.state); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_fss(data->setting, data->main->error, macro_fake_f(fll_fss_extended_read), data->file_data_build_settings, range, F_true); } else { - data->setting.state.status = f_fss_apply_delimit(state, delimits, &buffer); + data->setting->state.status = f_fss_apply_delimit(state, delimits, &buffer); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(f_fss_apply_delimit)); } else { @@ -179,7 +179,7 @@ extern "C" { } // Error when required settings are not specified. - if (F_status_is_error_not(data->setting.state.status)) { + if (F_status_is_error_not(data->setting->state.status)) { bool failed = F_false; f_string_static_t * const settings[] = { @@ -200,12 +200,12 @@ extern "C" { } // for if (failed) { - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } - data->setting.state.status = F_none; + data->setting->state.status = F_none; } fake_build_load_setting_override(data, setting); @@ -1334,13 +1334,13 @@ extern "C" { void fake_build_load_stage(fake_data_t * const data, const f_string_static_t settings_file, fake_build_stage_t * const stage) { if (!data || !stage) return; - if (F_status_is_error(data->setting.state.status)) return; + if (F_status_is_error(data->setting->state.status)) return; if (!((++data->main->signal_check) % fake_signal_check_d)) { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); return; } @@ -1386,18 +1386,18 @@ extern "C" { &stage->file_sources_settings, }; - data->setting.state.status = F_none; + data->setting->state.status = F_none; f_string_dynamic_t settings_file_base = f_string_dynamic_t_initialize; if (settings_file.used) { - data->setting.state.status = f_file_name_base(settings_file, &settings_file_base); + data->setting->state.status = f_file_name_base(settings_file, &settings_file_base); } else { - data->setting.state.status = f_file_name_base(data->file_data_build_settings, &settings_file_base); + data->setting->state.status = f_file_name_base(data->file_data_build_settings, &settings_file_base); } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(f_file_name_base)); return; @@ -1405,33 +1405,33 @@ extern "C" { for (uint8_t i = 0; i < fake_build_stage_total_d; ++i) { - data->setting.state.status = f_string_dynamic_append_nulless(data->path_build_stage, values[i]); + data->setting->state.status = f_string_dynamic_append_nulless(data->path_build_stage, values[i]); - if (F_status_is_error_not(data->setting.state.status) && data->setting->process.used) { - data->setting.state.status = f_string_dynamic_append_nulless(data->setting->process, values[i]); + if (F_status_is_error_not(data->setting->state.status) && data->setting->process.used) { + data->setting->state.status = f_string_dynamic_append_nulless(data->setting->process, values[i]); } - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); } - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_string_dynamic_append_nulless(names[i], values[i]); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_string_dynamic_append_nulless(names[i], values[i]); } - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]); } - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_string_dynamic_append_nulless(settings_file_base, values[i]); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_string_dynamic_append_nulless(settings_file_base, values[i]); } - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_built_s, values[i]); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_string_dynamic_append_nulless(fake_build_stage_built_s, values[i]); } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_append_nulless)); break; diff --git a/level_3/fake/c/main/build/skeleton.c b/level_3/fake/c/main/build/skeleton.c index 2ff78a1..7352d9d 100644 --- a/level_3/fake/c/main/build/skeleton.c +++ b/level_3/fake/c/main/build/skeleton.c @@ -8,7 +8,7 @@ extern "C" { 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) { if (!data || !data_build) return; - if (F_status_is_error(data->setting.state.status) || data->setting.state.status == F_child) return; + if (F_status_is_error(data->setting->state.status) || data->setting->state.status == F_child) return; if (f_file_exists(file_stage, F_true) == F_true) return; f_string_static_t path_headers = f_string_static_t_initialize; @@ -68,7 +68,7 @@ extern "C" { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); return; } @@ -76,40 +76,40 @@ extern "C" { directorys[i].string[j] = 0; // @fixme this is an error because static strings might be in use. - data->setting.state.status = f_directory_exists(directorys[i]); + data->setting->state.status = f_directory_exists(directorys[i]); - if (F_status_is_error(data->setting.state.status) || data->setting.state.status == F_false) { + if (F_status_is_error(data->setting->state.status) || data->setting->state.status == F_false) { directorys[i].string[j] = f_path_separator_s.string[0]; break; } - if (data->setting.state.status == F_file_found_not) { - data->setting.state.status = f_directory_create(directorys[i], mode); + if (data->setting->state.status == F_file_found_not) { + data->setting->state.status = f_directory_create(directorys[i], mode); created = F_true; } directorys[i].string[j] = f_path_separator_s.string[0]; - if (F_status_is_error(data->setting.state.status)) break; + if (F_status_is_error(data->setting->state.status)) break; } // for - if (F_status_is_fine(data->setting.state.status) && directorys[i].used && f_path_separator_s.used && directorys[i].string[directorys[i].used - 1] != f_path_separator_s.string[0]) { - data->setting.state.status = f_directory_exists(directorys[i]); + if (F_status_is_fine(data->setting->state.status) && directorys[i].used && f_path_separator_s.used && directorys[i].string[directorys[i].used - 1] != f_path_separator_s.string[0]) { + data->setting->state.status = f_directory_exists(directorys[i]); - if (F_status_is_error_not(data->setting.state.status)) { - if (data->setting.state.status == F_false) { - data->setting.state.status = f_directory_create(directorys[i], mode); + if (F_status_is_error_not(data->setting->state.status)) { + if (data->setting->state.status == F_false) { + data->setting->state.status = f_directory_create(directorys[i], mode); created = F_true; } } } - if (F_status_is_error(data->setting.state.status)) { - if (F_status_set_fine(data->setting.state.status) == F_file_found) { - data->setting.state.status = F_none; + if (F_status_is_error(setting->state.status)) { + if (F_status_set_fine(data->setting->state.status) == F_file_found) { + data->setting->state.status = F_none; continue; } @@ -126,8 +126,8 @@ extern "C" { fake_build_touch(data, file_stage); - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = F_none; + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = F_none; } } #endif // _di_fake_build_skeleton_ diff --git a/level_3/fake/c/main/clean.c b/level_3/fake/c/main/clean.c index 00b3c3e..3d9c5d1 100644 --- a/level_3/fake/c/main/clean.c +++ b/level_3/fake/c/main/clean.c @@ -19,28 +19,28 @@ extern "C" { f_file_stream_unlock(data->main->message.to); } - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { - data->setting.state.status = f_directory_remove_custom(data->setting->build, F_directory_max_descriptors_d, F_true, fake_clean_remove_recursively_verbosely); + data->setting->state.status = f_directory_remove_custom(data->setting->build, F_directory_max_descriptors_d, F_true, fake_clean_remove_recursively_verbosely); } else { - data->setting.state.status = f_directory_remove(data->setting->build, F_directory_max_descriptors_d, F_true); + data->setting->state.status = f_directory_remove(data->setting->build, F_directory_max_descriptors_d, F_true); } - if (F_status_set_fine(data->setting.state.status) == F_file_found_not || F_status_set_fine(data->setting.state.status) == F_directory) { + if (F_status_set_fine(data->setting->state.status) == F_file_found_not || F_status_set_fine(data->setting->state.status) == F_directory) { if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { fll_print_format("The build directory '%[%Q%]' does not exist.%r", data->main->warning.to, data->main->context.set.notable, data->setting->build, data->main->context.set.notable, f_string_eol_s); } - data->setting.state.status = F_none; + data->setting->state.status = F_none; } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_directory_remove), data->setting->build, f_file_operation_delete_s, fll_error_file_type_directory_e); } else { - data->setting.state.status = F_none; + data->setting->state.status = F_none; } } #endif // _di_fake_clean_operate_ diff --git a/level_3/fake/c/main/fake.c b/level_3/fake/c/main/fake.c index 79740ec..f6073eb 100644 --- a/level_3/fake/c/main/fake.c +++ b/level_3/fake/c/main/fake.c @@ -225,7 +225,7 @@ extern "C" { 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) { if (!data) return; - if (F_status_is_error(data->setting.state.status)) return 1; + if (F_status_is_error(data->setting->state.status)) return 1; if (data->main->error.verbosity >= f_console_verbosity_verbose_e) { f_file_stream_lock(data->main->message.to); @@ -256,31 +256,31 @@ extern "C" { fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(0, 0, &environment, &signals, 0); - data->setting.state.status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code); + data->setting->state.status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code); if (!((++data->main->signal_check) % fake_signal_check_d)) { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); return 0; } } - if (data->setting.state.status == F_child) return return_code; + if (data->setting->state.status == F_child) return return_code; } else { - data->setting.state.status = F_status_set_error(F_file_found_not); + data->setting->state.status = F_status_set_error(F_file_found_not); } if (return_code != 0) { - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); } - else if (F_status_is_error(data->setting.state.status)) { + else if (F_status_is_error(setting->state.status)) { return_code = 1; - if (F_status_set_fine(data->setting.state.status) == F_file_found_not) { + if (F_status_set_fine(data->setting->state.status) == F_file_found_not) { if (data->main->error.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(data->main->error.to); @@ -307,27 +307,27 @@ extern "C" { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); return; } } - data->setting.state.status = f_file_exists(path_file, F_true); + data->setting->state.status = f_file_exists(path_file, F_true); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_exists), path_file, f_file_operation_find_s, fll_error_file_type_file_e); return; } - if (data->setting.state.status == F_true) { + if (data->setting->state.status == F_true) { { off_t size_file = 0; - data->setting.state.status = f_file_size(path_file, F_true, &size_file); + data->setting->state.status = f_file_size(path_file, F_true, &size_file); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data->setting, data->main->error, , macro_fake_f(f_file_size), path_file, f_file_operation_read_s, fll_error_file_type_file_e); return; @@ -337,9 +337,9 @@ extern "C" { size_file = fake_max_initial_buffer_d; } - data->setting.state.status = f_string_dynamic_increase_by(size_file, buffer); + data->setting->state.status = f_string_dynamic_increase_by(size_file, buffer); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { const f_string_static_t message = macro_f_string_static_t_initialize("allocate buffer size for", 0, 24); fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_string_dynamic_increase_by), path_file, message, fll_error_file_type_file_e); @@ -347,34 +347,34 @@ extern "C" { return; } - data->setting.state.status = F_true; + data->setting->state.status = F_true; } f_file_t file = f_file_t_initialize; - data->setting.state.status = f_file_stream_open(path_file, f_string_empty_s, &file); + data->setting->state.status = f_file_stream_open(path_file, f_string_empty_s, &file); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_stream_open), path_file, f_file_operation_open_s, fll_error_file_type_file_e); return; } - data->setting.state.status = f_file_stream_read(file, buffer); + data->setting->state.status = f_file_stream_read(file, buffer); f_file_stream_flush(file); f_file_stream_close(&file); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_read), path_file, f_file_operation_read_s, fll_error_file_type_file_e); } else { - data->setting.state.status = F_none; + data->setting->state.status = F_none; } } else { if (required) { - data->setting.state.status = F_status_set_error(F_file_found_not); + data->setting->state.status = F_status_set_error(F_file_found_not); fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_exists), path_file, f_file_operation_find_s, fll_error_file_type_file_e); } @@ -393,9 +393,9 @@ extern "C" { file.stream = F_type_input_d; file.size_read = fake_default_allocation_pipe_d; - data->setting.state.status = f_string_dynamic_increase_by(fake_max_initial_buffer_d, buffer); + data->setting->state.status = f_string_dynamic_increase_by(fake_max_initial_buffer_d, buffer); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { const f_string_static_t message = macro_f_string_static_t_initialize("allocate buffer size for", 0, 24); fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_string_dynamic_increase_by), f_string_ascii_minus_s, message, fll_error_file_type_file_e); @@ -416,15 +416,15 @@ extern "C" { } } - data->setting.state.status = f_file_stream_read_block(file, buffer); + data->setting->state.status = f_file_stream_read_block(file, buffer); - } while (F_status_is_fine(data->setting.state.status) && data->setting.state.status != F_interrupt && data->setting.state.status != F_none_eof); + } while (F_status_is_fine(data->setting->state.status) && data->setting->state.status != F_interrupt && data->setting->state.status != F_none_eof); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_stream_read_block), f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_file_e); } else { - data->setting.state.status = F_none; + data->setting->state.status = F_none; } } #endif // _di_fake_pipe_buffer_ @@ -438,7 +438,7 @@ extern "C" { if (fll_program_standard_signal_received(data->main)) { fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); return } @@ -473,7 +473,7 @@ extern "C" { struct stat directory_stat; - data->setting.state.status = F_none; + data->setting->state.status = F_none; // Check only expected operations (fake_operation_clean_e and fake_operation_skeleton_e should not call this function). if (data->operation == fake_operation_make_e) { @@ -501,9 +501,9 @@ extern "C" { requireds[1] = F_none; // fake_long_data_s } else { - data->setting.state.status = f_file_exists(data->main->parameters.arguments.array[index], F_true); + data->setting->state.status = f_file_exists(data->main->parameters.arguments.array[index], F_true); - if (F_status_is_error_not(data->setting.state.status) && data->setting.state.status == F_true) { + if (F_status_is_error_not(data->setting->state.status) && data->setting->state.status == F_true) { requireds[1] = F_none; // fake_long_data_s } } @@ -515,14 +515,14 @@ extern "C" { if (requireds[i] != F_none && values[i].used) { memset(&directory_stat, 0, sizeof(struct stat)); - data->setting.state.status = f_file_stat(values[i], F_true, &directory_stat); + data->setting->state.status = f_file_stat(values[i], F_true, &directory_stat); - if (data->setting.state.status == F_status_set_error(F_file_found_not)) { - data->setting.state.status = F_status_set_error(F_directory_found_not); + if (data->setting->state.status == F_status_set_error(F_file_found_not)) { + data->setting->state.status = F_status_set_error(F_directory_found_not); } - if (F_status_is_error(data->setting.state.status)) { - if (F_status_set_fine(data->setting.state.status) != F_directory_found_not || requireds[i]) { + if (F_status_is_error(setting->state.status)) { + if (F_status_set_fine(data->setting->state.status) != F_directory_found_not || requireds[i]) { fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_stat), values[i], f_file_operation_access_s, fll_error_file_type_directory_e); return; @@ -538,13 +538,13 @@ extern "C" { f_file_stream_unlock(data->main->error.to); - data->setting.state.status = F_status_set_error(F_directory_found_not); + data->setting->state.status = F_status_set_error(F_directory_found_not); return; } } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_validate_parameter_paths_ diff --git a/level_3/fake/c/main/fake/path_generate.c b/level_3/fake/c/main/fake/path_generate.c index 04dabcf..79dacab 100644 --- a/level_3/fake/c/main/fake/path_generate.c +++ b/level_3/fake/c/main/fake/path_generate.c @@ -9,7 +9,7 @@ extern "C" { if (!data) return; - data->setting.state.status = F_none; + data->setting->state.status = F_none; uint8_t i = 0; { @@ -57,8 +57,8 @@ extern "C" { fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(fake_path_generate_string_dynamic)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(fake_path_generate_string_dynamic)); return; } @@ -100,9 +100,9 @@ extern "C" { for (i = 0; i < 13; ++i) { - data->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]); + data->setting->state.status = f_string_dynamic_append_nulless(sources[i], values[i]); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_append_nulless)); return; @@ -170,7 +170,7 @@ extern "C" { fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(fake_path_generate_string_dynamic)); return; @@ -228,9 +228,9 @@ extern "C" { for (i = 0; i < 16; ++i) { - data->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]); + data->setting->state.status = f_string_dynamic_append_nulless(sources[i], values[i]); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_append_nulless)); return; @@ -250,9 +250,9 @@ extern "C" { values[i]->used = 0; - data->setting.state.status = f_string_dynamic_append_nulless(data->setting->work, values[i]); + data->setting->state.status = f_string_dynamic_append_nulless(data->setting->work, values[i]); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_append_nulless)); return; @@ -275,9 +275,9 @@ extern "C" { for (i = 0; i < 3; ++i) { - data->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]); + data->setting->state.status = f_string_dynamic_append_nulless(sources[i], values[i]); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_append_nulless)); return; @@ -315,9 +315,9 @@ extern "C" { for (i = 0; i < 2; ++i) { - data->setting.state.status = fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]); + data->setting->state.status = fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data->setting, data->main->error, macro_fake_f(fake_path_generate_string_dynamic)); return; @@ -346,10 +346,10 @@ extern "C" { for (i = 0; i < 6; ++i) { - data->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]); + data->setting->state.status = f_string_dynamic_append_nulless(sources[i], values[i]); - if (F_status_is_error(data->setting.state.status)) { - fake_print_error(data->setting, data->main->error, data->setting.state.status, macro_fake_f(f_string_dynamic_append_nulless)); + if (F_status_is_error(setting->state.status)) { + fake_print_error(data->setting, data->main->error, data->setting->state.status, macro_fake_f(f_string_dynamic_append_nulless)); return; } @@ -357,7 +357,7 @@ extern "C" { } } - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_path_generate_ @@ -366,12 +366,12 @@ extern "C" { if (!data) return; - data->setting.state.status = F_none; + data->setting->state.status = F_none; for (uint8_t i = 0; i < length; ++i) { - data->setting.state.status = f_string_dynamic_append_nulless(source, destination[i]); - if (F_status_is_error(data->setting.state.status)) break; + data->setting->state.status = f_string_dynamic_append_nulless(source, destination[i]); + if (F_status_is_error(data->setting->state.status)) break; } // for } #endif // _di_fake_path_generate_string_dynamic_ diff --git a/level_3/fake/c/main/make/operate.c b/level_3/fake/c/main/make/operate.c index 741f7ad..387bf07 100644 --- a/level_3/fake/c/main/make/operate.c +++ b/level_3/fake/c/main/make/operate.c @@ -1155,49 +1155,49 @@ extern "C" { #ifndef _di_fake_make_operate_expand_environment_ void fake_make_operate_expand_environment(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) { - data->setting.state.status = F_none; + data->setting->state.status = F_none; data_make->cache_1.used = 0; data_make->cache_2.used = 0; - data->setting.state.status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 2, &data_make->cache_1); + data->setting->state.status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 2, &data_make->cache_1); - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range_name, &data_make->cache_1); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range_name, &data_make->cache_1); } - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_environment_get(data_make->cache_1, &data_make->cache_2); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_environment_get(data_make->cache_1, &data_make->cache_2); } - if (F_status_is_error(data->setting.state.status)) return; + if (F_status_is_error(data_make->setting->state.status)) return; - if (data->setting.state.status == F_exist_not) { - data->setting.state.status = F_false; + if (data->setting->state.status == F_exist_not) { + data->setting->state.status = F_false; return; } - data->setting.state.status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); + data->setting->state.status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_string_dynamic_increase_by(data_make->cache_2.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_string_dynamic_increase_by(data_make->cache_2.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]); } - if (F_status_is_error_not(data->setting.state.status)) { - data->setting.state.status = f_string_dynamic_append_nulless(data_make->cache_2, &data_make->cache_arguments.array[data_make->cache_arguments.used]); + if (F_status_is_error_not(data->setting->state.status)) { + data->setting->state.status = f_string_dynamic_append_nulless(data_make->cache_2, &data_make->cache_arguments.array[data_make->cache_arguments.used]); } - if (F_status_is_error(data->setting.state.status)) return; + if (F_status_is_error(data_make->setting->state.status)) return; if (!quote) { ++data_make->cache_arguments.used; - data->setting.state.status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); - if (F_status_is_error(data->setting.state.status)) return; + data->setting->state.status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); + if (F_status_is_error(data_make->setting->state.status)) return; } - data->setting.state.status = data_make->cache_2.used ? F_true : F_data_not; + data->setting->state.status = data_make->cache_2.used ? F_true : F_data_not; } #endif // _di_fake_make_operate_expand_environment_ @@ -1205,10 +1205,10 @@ extern "C" { int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t * const section_stack) { if (!data_make || !section_stack) return 0; - if (F_status_is_error(data->setting.state.status) || data->setting.state.status == F_child) return data_make->data->main->child; + if (F_status_is_error(data->setting->state.status) || data->setting->state.status == F_child) return data_make->data->main->child; if (id_section >= data_make->fakefile.used) { - data->setting.state.status = F_status_set_error(F_parameter); + data->setting->state.status = F_status_set_error(F_parameter); fake_print_error(data_make->setting, data_make->error, macro_fake_f(fake_make_operate_section)); @@ -1216,9 +1216,9 @@ extern "C" { } // Add the operation id to the operation stack. - data->setting.state.status = f_array_lengths_increase(fake_default_allocation_small_d, section_stack); + data->setting->state.status = f_array_lengths_increase(fake_default_allocation_small_d, section_stack); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data_make->setting, data_make->error, macro_fake_f(f_array_lengths_increase)); return 0; @@ -1317,7 +1317,7 @@ extern "C" { f_array_length_t i = 0; f_array_length_t j = 0; - for (i = 0; i < section->objects.used; ++i, data->setting.state.status = F_none) { + for (i = 0; i < section->objects.used; ++i, data->setting->state.status = F_none) { for (j = 0; j < data_make->cache_arguments.size; ++j) { data_make->cache_arguments.array[j].used = 0; @@ -1333,7 +1333,7 @@ extern "C" { if (fll_program_standard_signal_received(data_make->main)) { fll_program_print_signal_received(data_make->main->warning, data_make->data->setting->line_first, data_make->main->signal_received); - data->setting.state.status = F_status_set_error(F_interrupt); + data->setting->state.status = F_status_set_error(F_interrupt); break; } @@ -1353,13 +1353,13 @@ extern "C" { if (!state_process.operation) { fake_print_error_operation_unknown(data_make->setting, data_make->error, data_make->buffer, section->name, section->objects.array[i]); - data->setting.state.status = F_status_set_error(F_valid_not); + data->setting->state.status = F_status_set_error(F_valid_not); } else if (state_process.operation == fake_make_operation_type_operate_e) { if (section_stack->used == fake_max_stack_d) { fake_print_error_operation_stack_max(data_make->setting, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_max_stack_d); - data->setting.state.status = F_status_set_error(F_recurse); + data->setting->state.status = F_status_set_error(F_recurse); } } @@ -1371,7 +1371,7 @@ extern "C" { fake_make_operate_validate(data_make, section->name, &state_process, section_stack); } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { if (state_process.block || state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_or_e) { state_process.success_block = F_false; @@ -1384,19 +1384,19 @@ extern "C" { else { if (!state_process.block || state_process.block == fake_state_process_block_operate_e) { result = fake_make_operate_process(data_make, section->name, &state_process, section_stack); - if (data->setting.state.status == F_child) return result; + if (data->setting->state.status == F_child) return result; } fake_make_operate_block_postprocess(data_make, i == section->objects.used, &state_process); } - if (F_status_set_fine(data->setting.state.status) == F_interrupt) break; + if (F_status_set_fine(data->setting->state.status) == F_interrupt) break; - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { state_process.success = F_false; // Break acts identical to fail when at the top of the stack. - if (F_status_set_fine(data->setting.state.status) == F_signal_abort && !section_stack->used) { + if (F_status_set_fine(data->setting->state.status) == F_signal_abort && !section_stack->used) { 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; @@ -1410,12 +1410,12 @@ extern "C" { fake_print_error_operation_failed(data_make->setting, data_make->error, data_make->buffer, section->name, section->objects.array[i]); // F_signal_abort is used by the break section operation. - if (F_status_set_fine(data->setting.state.status) == F_signal_abort) break; + if (F_status_set_fine(data->setting->state.status) == F_signal_abort) break; // F_signal_abort is used by the exit section operation. - if (F_status_set_fine(data->setting.state.status) == F_signal_quit) { + if (F_status_set_fine(data->setting->state.status) == F_signal_quit) { if (!section_stack->used) { - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); } break; @@ -1423,27 +1423,27 @@ extern "C" { if (data_make->setting_make.fail == fake_make_operation_fail_exit_e) break; } - else if (data->setting.state.status == F_signal_abort) { + else if (data->setting->state.status == F_signal_abort) { state_process.success = F_true; // F_signal_abort is used by the break section operation. break; } - else if (data->setting.state.status == F_signal_quit) { + else if (data->setting->state.status == F_signal_quit) { state_process.success = F_true; // F_signal_quit is used by the exit section operation. if (!section_stack->used) { - data->setting.state.status = F_none; + data->setting->state.status = F_none; } break; } - else if (data->setting.state.status == F_failure) { + else if (data->setting->state.status == F_failure) { // When F_failure (without the error bit) is returned, an error occured but the exit mode is not set to exit. // Record the success state and set the status to F_none. - data->setting.state.status = F_none; + data->setting->state.status = F_none; state_process.success = F_false; } else { @@ -1451,19 +1451,19 @@ extern "C" { } } // for - if (F_status_set_error(data->setting.state.status) == F_interrupt) return 0; + if (F_status_set_error(data->setting->state.status) == F_interrupt) return 0; - if (i == section->objects.used && F_status_is_error_not(data->setting.state.status) && (state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_else_e || state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_or_e)) { + if (i == section->objects.used && F_status_is_error_not(data->setting->state.status) && (state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_else_e || state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_or_e)) { fake_make_print_error_operation_incomplete(data_make->setting, data_make->main->error, state_process.operation); fake_print_error_operation_failed(data_make->setting, data_make->error, data_make->buffer, section->name, section->objects.array[section->objects.used - 1]); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); } // Ensure an error is returned during recursion if the last known section operation failed, except for the main operation. - if (state_process.success == F_false && F_status_is_error_not(data->setting.state.status) && section_stack->used > 1) { - data->setting.state.status = F_status_set_error(F_failure); + if (state_process.success == F_false && F_status_is_error_not(data->setting->state.status) && section_stack->used > 1) { + data->setting->state.status = F_status_set_error(F_failure); } --section_stack->used; diff --git a/level_3/fake/c/main/make/operate_process.c b/level_3/fake/c/main/make/operate_process.c index 98d42a4..f7ba893 100644 --- a/level_3/fake/c/main/make/operate_process.c +++ b/level_3/fake/c/main/make/operate_process.c @@ -8,7 +8,7 @@ extern "C" { 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) { if (!data_make || !state_process || !section_stack) return 0; - if (data->setting.state.status == F_child) return data_make->data->main->child; + if (data->setting->state.status == F_child) return data_make->data->main->child; if (state_process->operation == fake_make_operation_type_break_e) { fake_make_operate_process_type_break(data_make); 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 ac1b897..49333d1 100644 --- a/level_3/fake/c/main/make/operate_process_type.c +++ b/level_3/fake/c/main/make/operate_process_type.c @@ -33,9 +33,9 @@ extern "C" { if (!data_make) return; fake_build_operate(data_make->data, data_make->cache_arguments.used ? &data_make->cache_arguments : 0, F_false); - if (F_status_set_fine(data->setting.state.status) == F_interrupt) return; + if (F_status_set_fine(data->setting->state.status) == F_interrupt) return; - data->setting.state.status = fake_make_operate_process_return(data_make, F_status_is_error(data->setting.state.status) ? 1 : 0); + data->setting->state.status = fake_make_operate_process_return(data_make, F_status_is_error(data->setting->state.status) ? 1 : 0); } #endif // _di_fake_make_operate_process_type_build_ @@ -44,10 +44,10 @@ extern "C" { if (!data_make) return; - data->setting.state.status = fake_clean_operate(data_make->data); - if (F_status_set_fine(data->setting.state.status) == F_interrupt) return; + data->setting->state.status = fake_clean_operate(data_make->data); + if (F_status_set_fine(data->setting->state.status) == F_interrupt) return; - data->setting.state.status = fake_make_operate_process_return(data_make, F_status_is_error(data->setting.state.status) ? 1 : 0); + data->setting->state.status = fake_make_operate_process_return(data_make, F_status_is_error(data->setting->state.status) ? 1 : 0); } #endif // _di_fake_make_operate_process_type_clean_ @@ -58,14 +58,14 @@ extern "C" { const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_compiler, data_make->cache_arguments); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_execute)); } - else if (data->setting.state.status == F_child) { + else if (data->setting->state.status == F_child) { return; } - data->setting.state.status = fake_make_operate_process_return(data_make, result); + data->setting->state.status = fake_make_operate_process_return(data_make, result); return 0; } @@ -76,7 +76,7 @@ extern "C" { if (!data_make) return; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (state_process->condition == fake_make_operation_if_type_if_define_e) { fake_make_operate_process_type_if_define(data_make, F_false, state_process); @@ -205,7 +205,7 @@ extern "C" { f_directory_recurse_t recurse = f_directory_recurse_t_initialize; f_mode_t mode = f_mode_t_initialize; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (clone) { if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { @@ -234,17 +234,17 @@ extern "C" { // In this case, the destination could be a file, so confirm this. if (data_make->cache_arguments.used == 2 + i) { - data->setting.state.status = f_directory_is(data_make->cache_arguments.array[1]); + data->setting->state.status = f_directory_is(data_make->cache_arguments.array[1]); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_path_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } - if (data->setting.state.status == F_false || data->setting.state.status == F_file_found_not || data->setting.state.status == F_data_not) { + if (data->setting->state.status == F_false || data->setting->state.status == F_file_found_not || data->setting->state.status == F_data_not) { existing = F_false; } } @@ -256,12 +256,12 @@ extern "C" { if (existing) { data_make->cache_path.used = 0; - data->setting.state.status = f_file_name_base(data_make->cache_arguments.array[i], &data_make->cache_path); + data->setting->state.status = f_file_name_base(data_make->cache_arguments.array[i], &data_make->cache_path); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_name_base), data_make->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -306,7 +306,7 @@ extern "C" { if (F_status_is_error(status)) { fake_print_error_file(data_make->setting, data_make->main->error, clone ? macro_fake_f(fl_directory_clone) : macro_fake_f(fl_directory_copy), data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); } } else if (status == F_false) { @@ -322,7 +322,7 @@ extern "C" { f_directory_recurse_delete(&recurse); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -334,7 +334,7 @@ extern "C" { f_directory_recurse_delete(&recurse); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -342,7 +342,7 @@ extern "C" { f_directory_recurse_delete(&recurse); - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_make_operate_process_type_copy_ @@ -351,22 +351,22 @@ extern "C" { if (!data_make) return; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (data_make->cache_arguments.used > 1) { - data->setting.state.status = f_environment_set(data_make->cache_arguments.array[0], data_make->cache_arguments.array[1], F_true); + data->setting->state.status = f_environment_set(data_make->cache_arguments.array[0], data_make->cache_arguments.array[1], F_true); } else { - data->setting.state.status = f_environment_set(data_make->cache_arguments.array[0], f_string_empty_s, F_true); + data->setting->state.status = f_environment_set(data_make->cache_arguments.array[0], f_string_empty_s, F_true); } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_environment_set)); } else { fake_make_print_verbose_operate_define(data_make->setting, data_make->main->message, data_make->cache_arguments.array[0]); - data->setting.state.status = F_none; + data->setting->state.status = F_none; } } #endif // _di_fake_make_operate_process_type_define_ @@ -379,65 +379,65 @@ extern "C" { const int recursion_max = all ? F_directory_max_descriptors_d : 0; struct stat file_stat; - data->setting.state.status = F_none; + data->setting->state.status = F_none; for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) { memset(&file_stat, 0, sizeof(struct stat)); - data->setting.state.status = f_file_stat(data_make->cache_arguments.array[i], F_false, &file_stat); + data->setting->state.status = f_file_stat(data_make->cache_arguments.array[i], F_false, &file_stat); - if (F_status_is_error(data->setting.state.status)) { - if (F_status_set_fine(data->setting.state.status) == F_file_found_not) { + if (F_status_is_error(setting->state.status)) { + if (F_status_set_fine(data->setting->state.status) == F_file_found_not) { fake_make_print_warning_file_not_found(data_make->setting, data_make->main->warning, data_make->cache_arguments.array[i]); - data->setting.state.status = F_none; + data->setting->state.status = F_none; } else { fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_stat), data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } } else if (macro_f_file_type_is_directory(file_stat.st_mode)) { if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - data->setting.state.status = f_directory_remove_custom(data_make->cache_arguments.array[i], recursion_max, F_false, fake_clean_remove_recursively_verbosely); + data->setting->state.status = f_directory_remove_custom(data_make->cache_arguments.array[i], recursion_max, F_false, fake_clean_remove_recursively_verbosely); } else { - data->setting.state.status = f_directory_remove(data_make->cache_arguments.array[i], recursion_max, F_false); + data->setting->state.status = f_directory_remove(data_make->cache_arguments.array[i], recursion_max, F_false); } - if (F_status_set_fine(data->setting.state.status) == F_file_found_not) { + if (F_status_set_fine(data->setting->state.status) == F_file_found_not) { fake_make_print_verbose_operate_file_not_found(data_make->setting, data_make->main->message, F_true, data_make->cache_arguments.array[i]); - data->setting.state.status = F_none; + data->setting->state.status = F_none; } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_directory_remove), data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_directory_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } } else { - data->setting.state.status = f_file_remove(data_make->cache_arguments.array[i]); + data->setting->state.status = f_file_remove(data_make->cache_arguments.array[i]); - if (F_status_set_fine(data->setting.state.status) == F_file_found_not) { + if (F_status_set_fine(data->setting->state.status) == F_file_found_not) { if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { fake_make_print_verbose_operate_file_not_found(data_make->setting, data_make->main->message, F_false, data_make->cache_arguments.array[i]); } - data->setting.state.status = F_none; + data->setting->state.status = F_none; } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_remove), data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -446,7 +446,7 @@ extern "C" { fake_make_print_verbose_operate_delete(data_make->setting, data_make->main->message, data_make->cache_arguments.array[i]); } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_make_operate_process_type_deletes_ @@ -455,13 +455,13 @@ extern "C" { if (!data_make) return; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (!data_make->cache_arguments.used || fl_string_dynamic_compare(fake_make_operation_argument_success_s, data_make->cache_arguments.array[0]) == F_equal_to) { - data->setting.state.status = F_signal_quit; + data->setting->state.status = F_signal_quit; } else if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to) { - data->setting.state.status = F_status_set_error(F_signal_quit); + data->setting->state.status = F_status_set_error(F_signal_quit); // Forcing exit forces fail mode. data_make->setting_make.fail = fake_make_operation_fail_exit_e; @@ -474,7 +474,7 @@ extern "C" { data_make->error.set = &data_make->main->context.set; } else { - data->setting.state.status = F_none; + data->setting->state.status = F_none; return; } @@ -527,40 +527,40 @@ extern "C" { bool dereference = F_true; f_array_length_t i = 0; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) { ++i; dereference = F_false; } - data->setting.state.status = fake_make_get_id(data_make, data_make->cache_arguments.array[i++], (void *) &id); + data->setting->state.status = fake_make_get_id(data_make, data_make->cache_arguments.array[i++], (void *) &id); - if (F_status_is_error(data->setting.state.status)) { - data->setting.state.status = F_status_set_error(F_failure); + if (F_status_is_error(setting->state.status)) { + data->setting->state.status = F_status_set_error(F_failure); } for (; i < data_make->cache_arguments.used; ++i) { - data->setting.state.status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); + data->setting->state.status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); continue; } if (all) { - data->setting.state.status = fll_file_role_change_all(data_make->cache_arguments.array[i], -1, id, dereference, fake_max_recursion_depth_d); + data->setting->state.status = fll_file_role_change_all(data_make->cache_arguments.array[i], -1, id, dereference, fake_max_recursion_depth_d); } else { - data->setting.state.status = f_file_role_change(data_make->cache_arguments.array[i], -1, id, dereference); + data->setting->state.status = f_file_role_change(data_make->cache_arguments.array[i], -1, id, dereference); } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error_file(data_make->setting, data_make->main->error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -568,7 +568,7 @@ extern "C" { fake_make_print_verbose_operate_set_role(data_make->setting, data_make->main->message, all ? 0x1 : 0x0, data_make->cache_arguments.array[i], (f_number_unsigned_t) id); } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_make_operate_process_type_groups_ @@ -611,7 +611,7 @@ extern "C" { f_array_length_t i = if_not ? 2 : 1; bool dereference = F_true; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (i == data_make->cache_arguments.used) { if (if_not) { @@ -621,7 +621,7 @@ extern "C" { state_process->condition_result = fake_condition_result_false_e; } - data->setting.state.status = F_none; + data->setting->state.status = F_none; return; } @@ -635,27 +635,27 @@ extern "C" { for (; i < data_make->cache_arguments.used; ++i) { - data->setting.state.status = f_file_exists(data_make->cache_arguments.array[i], dereference); + data->setting->state.status = f_file_exists(data_make->cache_arguments.array[i], dereference); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { state_process->condition_result = fake_condition_result_error_e; fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_exists), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } if (if_not) { - if (data->setting.state.status == F_true) { + if (data->setting->state.status == F_true) { state_process->condition_result = fake_condition_result_false_e; break; } } else { - if (data->setting.state.status != F_true) { + if (data->setting->state.status != F_true) { state_process->condition_result = fake_condition_result_false_e; break; @@ -663,7 +663,7 @@ extern "C" { } } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_make_operate_process_type_if_exist_ @@ -681,7 +681,7 @@ extern "C" { f_array_length_t i = if_not ? 2 : 1; bool dereference = F_true; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) { ++i; @@ -696,7 +696,7 @@ extern "C" { state_process->condition_result = fake_condition_result_false_e; } - data->setting.state.status = F_none; + data->setting->state.status = F_none; return; } @@ -739,14 +739,14 @@ extern "C" { for (; i < data_make->cache_arguments.used; ++i, mode_file = 0) { - data->setting.state.status = f_file_mode_read(data_make->cache_arguments.array[i], dereference, &mode_file); + data->setting->state.status = f_file_mode_read(data_make->cache_arguments.array[i], dereference, &mode_file); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { state_process->condition_result = fake_condition_result_error_e; fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_mode_read), data_make->cache_arguments.array[i], f_file_operation_get_type_s, fll_error_file_type_file_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -789,7 +789,7 @@ extern "C" { } } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_make_operate_process_type_if_is_ @@ -807,7 +807,7 @@ extern "C" { f_array_length_t i = 1; - data->setting.state.status = F_none; + data->setting->state.status = F_none; state_process->condition_result = fake_condition_result_true_e; range.start = 0; @@ -822,14 +822,14 @@ extern "C" { } if (range.start > range.stop) { - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); } else { - data->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number_left); + data->setting->state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number_left); } - if (F_status_is_error_not(data->setting.state.status)) { - for (i = 2; i < data_make->cache_arguments.used; ++i, data->setting.state.status = F_none, number_left = number_right, is_negative_left = is_negative_right) { + if (F_status_is_error_not(data->setting->state.status)) { + for (i = 2; i < data_make->cache_arguments.used; ++i, data->setting->state.status = F_none, number_left = number_right, is_negative_left = is_negative_right) { if (data_make->cache_arguments.array[i].used) { range.start = 0; @@ -846,17 +846,17 @@ extern "C" { } if (range.start > range.stop) { - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); } else { - data->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number_right); + data->setting->state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number_right); } } else { - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); } - if (F_status_is_error(data->setting.state.status)) break; + if (F_status_is_error(data->setting->state.status)) break; if (state_process->condition == fake_make_operation_if_type_if_greater_e) { @@ -921,7 +921,7 @@ extern "C" { } // for } - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { state_process->condition_result = fake_condition_result_error_e; if ((i == 1 && number_left > F_number_t_size_unsigned_d) || (i > 1 && number_right > F_number_t_size_unsigned_d)) { @@ -931,10 +931,10 @@ extern "C" { fake_make_print_error_unsupported_number(data_make->setting, data_make->main->error, data_make->cache_arguments.array[i]); } - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); } else { - data->setting.state.status = F_none; + data->setting->state.status = F_none; } } #endif // _di_fake_make_operate_process_type_if_greater_if_lesser_ @@ -948,21 +948,21 @@ extern "C" { f_array_length_t i = if_not ? 2 : 1; bool dereference = F_true; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) { ++i; dereference = F_false; } - data->setting.state.status = fake_make_get_id(data_make, data_make->cache_arguments.array[i++], (void *) &id); + data->setting->state.status = fake_make_get_id(data_make, data_make->cache_arguments.array[i++], (void *) &id); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { state_process->condition_result = fake_condition_result_error_e; fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_make_get_id)); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -971,14 +971,14 @@ extern "C" { for (uid_t id_file = 0; i < data_make->cache_arguments.used; ++i, id_file = 0) { - data->setting.state.status = f_file_group_read(data_make->cache_arguments.array[i], dereference, &id_file); + data->setting->state.status = f_file_group_read(data_make->cache_arguments.array[i], dereference, &id_file); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { state_process->condition_result = fake_condition_result_error_e; fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_group_read), data_make->cache_arguments.array[i], f_file_operation_get_group_s, fll_error_file_type_file_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -999,7 +999,7 @@ extern "C" { } } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_make_operate_process_type_if_group_ @@ -1109,21 +1109,21 @@ extern "C" { f_array_length_t i = if_not ? 2 : 1; bool dereference = F_true; - data->setting.state.status = F_none; + data->setting->state.status = F_none; if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) { ++i; dereference = F_false; } - data->setting.state.status = fake_make_get_id(data_make->data, data_make->error, data_make->cache_arguments.array[i++], (void *) &id); + data->setting->state.status = fake_make_get_id(data_make->data, data_make->error, data_make->cache_arguments.array[i++], (void *) &id); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { state_process->condition_result = fake_condition_result_error_e; fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_make_get_id)); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -1132,14 +1132,14 @@ extern "C" { for (uid_t id_file = 0; i < data_make->cache_arguments.used; ++i, id_file = 0) { - data->setting.state.status = f_file_owner_read(data_make->cache_arguments.array[i], dereference, &id_file); + data->setting->state.status = f_file_owner_read(data_make->cache_arguments.array[i], dereference, &id_file); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { state_process->condition_result = fake_condition_result_error_e; fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_owner_read), data_make->cache_arguments.array[i], f_file_operation_get_owner_s, fll_error_file_type_file_e); - data->setting.state.status = F_status_set_error(F_failure); + data->setting->state.status = F_status_set_error(F_failure); return; } @@ -1160,7 +1160,7 @@ extern "C" { } } // for - data->setting.state.status = F_none; + data->setting->state.status = F_none; } #endif // _di_fake_make_operate_process_type_if_owner_ @@ -1305,13 +1305,13 @@ extern "C" { const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_indexer, data_make->cache_arguments); - if (F_status_is_error(data->setting.state.status)) { + if (F_status_is_error(setting->state.status)) { fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_execute)); } - if (data->setting.state.status == F_child) return result; + if (data->setting->state.status == F_child) return result; - data->setting.state.status = fake_make_operate_process_return(data_make, result); + data->setting->state.status = fake_make_operate_process_return(data_make, result); return 0; } @@ -1593,7 +1593,7 @@ extern "C" { status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(status)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, status, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); continue; } @@ -1820,7 +1820,7 @@ extern "C" { const f_status_t status = fake_skeleton_operate(data_make->data); if (F_status_set_fine(status) == F_interrupt) return status; - data->setting.state.status = fake_make_operate_process_return(data_make, F_status_is_error(status) ? 1 : 0); + data->setting->state.status = fake_make_operate_process_return(data_make, F_status_is_error(status) ? 1 : 0); } #endif // _di_fake_make_operate_process_type_skeleton_ diff --git a/level_3/fake/c/main/make/operate_validate.c b/level_3/fake/c/main/make/operate_validate.c index 0abbbe5..9b14420 100644 --- a/level_3/fake/c/main/make/operate_validate.c +++ b/level_3/fake/c/main/make/operate_validate.c @@ -5,78 +5,87 @@ extern "C" { #endif #ifndef _di_fake_make_operate_validate_ - 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) { + 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) { - if (F_status_is_error(*status)) return; + if (!data_make) return; + if (F_status_is_error(data_make->setting->status)) return; + + if (!section_stack) { + data_make->setting->status = F_status_set_error(F_parameter); + + return; + } + + data_make->setting->status = F_none; if (state_process->operation == fake_make_operation_type_break_e) { - *status = fake_make_operate_validate_type_break(data_make); + fake_make_operate_validate_type_break(data_make); } else if (state_process->operation == fake_make_operation_type_build_e) { - *status = fake_make_operate_validate_type_build(data_make); + fake_make_operate_validate_type_build(data_make); } else if (state_process->operation == fake_make_operation_type_clean_e || state_process->operation == fake_make_operation_type_top_e || state_process->operation == fake_make_operation_type_skeleton_e) { - *status = fake_make_operate_validate_type_clean_top_skeleton(data_make); + fake_make_operate_validate_type_clean_top_skeleton(data_make); } else if (state_process->operation == fake_make_operation_type_clone_e) { - *status = fake_make_operate_validate_type_clone(data_make); + fake_make_operate_validate_type_clone(data_make); } else if (state_process->operation == fake_make_operation_type_compile_e) { - *status = fake_make_operate_validate_type_compile(data_make); + fake_make_operate_validate_type_compile(data_make); } else if (state_process->operation == fake_make_operation_type_copy_e) { - *status = fake_make_operate_validate_type_copy(data_make); + fake_make_operate_validate_type_copy(data_make); } else if (state_process->operation == fake_make_operation_type_define_e) { - *status = fake_make_operate_validate_type_define(data_make); + fake_make_operate_validate_type_define(data_make); } else if (state_process->operation == fake_make_operation_type_delete_e || state_process->operation == fake_make_operation_type_deletes_e) { - *status = fake_make_operate_validate_type_delete(data_make); + fake_make_operate_validate_type_delete(data_make); } else if (state_process->operation == fake_make_operation_type_else_e) { - *status = fake_make_operate_validate_type_else(data_make, state_process); + fake_make_operate_validate_type_else(data_make, state_process); } else if (state_process->operation == fake_make_operation_type_exit_e) { - *status = fake_make_operate_validate_type_exit(data_make); + fake_make_operate_validate_type_exit(data_make); } else if (state_process->operation == fake_make_operation_type_fail_e) { - *status = fake_make_operate_validate_type_exit(data_make); + fake_make_operate_validate_type_exit(data_make); } else if (state_process->operation == fake_make_operation_type_group_e || state_process->operation == fake_make_operation_type_groups_e || state_process->operation == fake_make_operation_type_mode_e || state_process->operation == fake_make_operation_type_modes_e || state_process->operation == fake_make_operation_type_owner_e || state_process->operation == fake_make_operation_type_owners_e) { - *status = fake_make_operate_validate_type_permission(data_make, state_process); + fake_make_operate_validate_type_permission(data_make, state_process); } else if (state_process->operation == fake_make_operation_type_if_e || state_process->operation == fake_make_operation_type_and_e || state_process->operation == fake_make_operation_type_or_e) { - *status = fake_make_operate_validate_type_condition(data_make, state_process); + fake_make_operate_validate_type_condition(data_make, state_process); } else if (state_process->operation == fake_make_operation_type_index_e) { - *status = fake_make_operate_validate_type_index(data_make); + fake_make_operate_validate_type_index(data_make); } else if (state_process->operation == fake_make_operation_type_link_e) { - *status = fake_make_operate_validate_type_link(data_make); + fake_make_operate_validate_type_link(data_make); } else if (state_process->operation == fake_make_operation_type_move_e) { - *status = fake_make_operate_validate_type_move(data_make); + fake_make_operate_validate_type_move(data_make); } else if (state_process->operation == fake_make_operation_type_operate_e) { - *status = fake_make_operate_validate_type_operate(data_make, section_stack); + fake_make_operate_validate_type_operate(data_make, section_stack); } else if (state_process->operation == fake_make_operation_type_run_e || state_process->operation == fake_make_operation_type_shell_e) { - *status = fake_make_operate_validate_type_run(data_make); + fake_make_operate_validate_type_run(data_make); } else if (state_process->operation == fake_make_operation_type_parameter_e) { - *status = fake_make_operate_validate_type_parameter(data_make); + fake_make_operate_validate_type_parameter(data_make); } else if (state_process->operation == fake_make_operation_type_pop_e) { - *status = fake_make_operate_validate_type_pop(data_make); + fake_make_operate_validate_type_pop(data_make); } else if (state_process->operation == fake_make_operation_type_to_e) { - *status = fake_make_operate_validate_type_to(data_make); + fake_make_operate_validate_type_to(data_make); } else if (state_process->operation == fake_make_operation_type_touch_e) { - *status = fake_make_operate_validate_type_touch(data_make); + fake_make_operate_validate_type_touch(data_make); } else if (state_process->operation == fake_make_operation_type_write_e) { - *status = fake_make_operate_validate_type_write(data_make); + fake_make_operate_validate_type_write(data_make); } // Note: There is nothing to validate for fake_make_operation_type_print_e. diff --git a/level_3/fake/c/main/make/operate_validate.h b/level_3/fake/c/main/make/operate_validate.h index dfeb654..84ef657 100644 --- a/level_3/fake/c/main/make/operate_validate.h +++ b/level_3/fake/c/main/make/operate_validate.h @@ -24,6 +24,35 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. + * + * This alters data_make.setting.status: + * F_none on success. + * + * F_parameter (with error bit) on invalid parameter. + * + * Errors (with error bit) from: fake_make_operate_validate_type_break() + * Errors (with error bit) from: fake_make_operate_validate_type_build() + * Errors (with error bit) from: fake_make_operate_validate_type_clean_top_skeleton() + * Errors (with error bit) from: fake_make_operate_validate_type_clone() + * Errors (with error bit) from: fake_make_operate_validate_type_compile() + * Errors (with error bit) from: fake_make_operate_validate_type_copy() + * Errors (with error bit) from: fake_make_operate_validate_type_define() + * Errors (with error bit) from: fake_make_operate_validate_type_delete() + * Errors (with error bit) from: fake_make_operate_validate_type_else() + * Errors (with error bit) from: fake_make_operate_validate_type_exit() + * Errors (with error bit) from: fake_make_operate_validate_type_exit() + * Errors (with error bit) from: fake_make_operate_validate_type_permission() + * Errors (with error bit) from: fake_make_operate_validate_type_condition() + * Errors (with error bit) from: fake_make_operate_validate_type_index() + * Errors (with error bit) from: fake_make_operate_validate_type_link() + * Errors (with error bit) from: fake_make_operate_validate_type_move() + * Errors (with error bit) from: fake_make_operate_validate_type_operate() + * Errors (with error bit) from: fake_make_operate_validate_type_run() + * Errors (with error bit) from: fake_make_operate_validate_type_parameter() + * Errors (with error bit) from: fake_make_operate_validate_type_pop() + * Errors (with error bit) from: fake_make_operate_validate_type_to() + * Errors (with error bit) from: fake_make_operate_validate_type_touch() + * Errors (with error bit) from: fake_make_operate_validate_type_write() * @param section_name * The section name. * @param state_process @@ -31,13 +60,33 @@ extern "C" { * This condition will be updated by this as appropriate. * @param section_stack * The current operation stack. - * @param status - * The return status. * - * Status codes (with error bit) are returned on any problem. + * @see fake_make_operate_validate_type_break() + * @see fake_make_operate_validate_type_build() + * @see fake_make_operate_validate_type_clean_top_skeleton() + * @see fake_make_operate_validate_type_clone() + * @see fake_make_operate_validate_type_compile() + * @see fake_make_operate_validate_type_copy() + * @see fake_make_operate_validate_type_define() + * @see fake_make_operate_validate_type_delete() + * @see fake_make_operate_validate_type_else() + * @see fake_make_operate_validate_type_exit() + * @see fake_make_operate_validate_type_exit() + * @see fake_make_operate_validate_type_permission() + * @see fake_make_operate_validate_type_condition() + * @see fake_make_operate_validate_type_index() + * @see fake_make_operate_validate_type_link() + * @see fake_make_operate_validate_type_move() + * @see fake_make_operate_validate_type_operate() + * @see fake_make_operate_validate_type_run() + * @see fake_make_operate_validate_type_parameter() + * @see fake_make_operate_validate_type_pop() + * @see fake_make_operate_validate_type_to() + * @see fake_make_operate_validate_type_touch() + * @see fake_make_operate_validate_type_write() */ #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); + 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); #endif // _di_fake_make_operate_validate_ /** @@ -51,9 +100,12 @@ extern "C" { * The variable name string to validate. * * @return + * F_none if there is no string to validate (used = 0). * F_true on valid. * F_false on invalid. - * F_none if there is no string to validate (used = 0). + * + * @see isalpha() + * @see isalnum() */ #ifndef _di_fake_make_operate_validate_define_name_ extern f_status_t fake_make_operate_validate_define_name(const f_string_static_t name); diff --git a/level_3/fake/c/main/make/operate_validate_type.c b/level_3/fake/c/main/make/operate_validate_type.c index 15a4d8b..721dab4 100644 --- a/level_3/fake/c/main/make/operate_validate_type.c +++ b/level_3/fake/c/main/make/operate_validate_type.c @@ -5,7 +5,9 @@ extern "C" { #endif #ifndef _di_fake_make_operate_validate_type_break_ - f_status_t fake_make_operate_validate_type_break(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_break(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used > 1) { fake_print_error_too_many_arguments(data_make->setting, data_make->main->error); @@ -28,7 +30,9 @@ extern "C" { #endif // _di_fake_make_operate_validate_type_break_ #ifndef _di_fake_make_operate_validate_type_build_ - f_status_t fake_make_operate_validate_type_build(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_build(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used) { if (data_make->cache_arguments.array[0].used) { @@ -68,7 +72,9 @@ extern "C" { #endif // _di_fake_make_operate_validate_type_build_ #ifndef _di_fake_make_operate_validate_type_clean_top_skeleton_ - f_status_t fake_make_operate_validate_type_clean_top_skeleton(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_clean_top_skeleton(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used) { fake_print_error_too_many_arguments(data_make->setting, data_make->main->error); @@ -81,7 +87,9 @@ extern "C" { #endif // _di_fake_make_operate_validate_type_clean_top_skeleton_ #ifndef _di_fake_make_operate_validate_type_clone_ - f_status_t fake_make_operate_validate_type_clone(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_clone(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used > 1) { f_status_t status = F_none; @@ -150,7 +158,9 @@ extern "C" { #endif // _di_fake_make_operate_validate_type_clone_ #ifndef _di_fake_make_operate_validate_type_compile_ - f_status_t fake_make_operate_validate_type_compile(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_compile(fake_make_data_t * const data_make) { + + if (!data_make) return; if (!data_make->cache_arguments.used) { fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); @@ -169,20 +179,26 @@ extern "C" { #endif // _di_fake_make_operate_validate_type_compile_ #ifndef _di_fake_make_operate_validate_type_condition_ - f_status_t fake_make_operate_validate_type_condition(fake_make_data_t * const data_make, fake_state_process_t * const state_process) { + void fake_make_operate_validate_type_condition(fake_make_data_t * const data_make, fake_state_process_t * const state_process) { + + if (!data_make || !state_process) return; if (state_process->operation == fake_make_operation_type_if_e) { if (state_process->operation_previous == fake_make_operation_type_if_e) { fake_make_print_error_after_condition_must_not(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } } else { if (!(state_process->operation_previous == fake_make_operation_type_if_e || state_process->operation_previous == fake_make_operation_type_and_e || state_process->operation_previous == fake_make_operation_type_or_e)) { fake_make_print_error_after_condition_may_only(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } } @@ -343,7 +359,9 @@ extern "C" { if (data_make->cache_arguments.used < 1 + k) { fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } for (; j < 7; ++j) { @@ -358,7 +376,9 @@ extern "C" { if (j == 7) { fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, if_and_or, data_make->cache_arguments.array[k]); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } } else { @@ -372,24 +392,32 @@ extern "C" { if (data_make->cache_arguments.used > if_type_minimum[i]) { fake_print_error_too_many_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } + else { + data_make->setting->status = F_none; } - return F_none; + return; } if (state_process->condition == fake_make_operation_if_type_if_equal_e || state_process->condition == fake_make_operation_if_type_if_equal_not_e) { if (data_make->cache_arguments.used < 2 + k) { fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } + else { + data_make->setting->status = F_none; } - return F_none; + return; } if (state_process->condition == fake_make_operation_if_type_if_exist_e || state_process->condition == fake_make_operation_if_type_if_not_exist_e) { - return F_none; + data_make->setting->status = F_none; + + return; } if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_is_e || state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition > fake_make_operation_if_type_if_not_exist_e && state_process->condition < fake_make_operation_if_type_if_success_e) { @@ -412,7 +440,9 @@ extern "C" { fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, message_s, data_make->cache_arguments.array[k]); } - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } } @@ -420,7 +450,9 @@ extern "C" { uint8_t replace = 0; if (F_status_is_error(fake_make_get_id_mode(data_make->data, data_make->error, data_make->cache_arguments.array[++k], &mode_rule, &replace))) { - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } i = ++k; @@ -429,7 +461,9 @@ extern "C" { gid_t id = 0; if (F_status_is_error(fake_make_get_id(data_make, data_make->cache_arguments.array[k++], (void *) &id))) { - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } i = k; @@ -478,13 +512,19 @@ extern "C" { } } // for - if (type_file & 0x80) return F_status_set_error(F_failure); + if (type_file & 0x80) { + data_make->setting->status = F_status_set_error(F_failure); + + return; + } } else if (state_process->condition == fake_make_operation_if_type_if_owner_e || state_process->condition == fake_make_operation_if_type_if_not_owner_e) { uid_t id = 0; if (F_status_is_error(fake_make_get_id(data_make->data, data_make->error, data_make->cache_arguments.array[k++], (void *) &id))) { - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } i = k; @@ -492,53 +532,56 @@ extern "C" { if (i < data_make->cache_arguments.used) { f_status_t status = F_none; - f_status_t status_file = F_none; for (; i < data_make->cache_arguments.used; ++i) { - status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); + data_make->setting->status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); - if (F_status_is_error(status_file)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); status = F_status_set_error(F_failure); } else if (state_process->condition != fake_make_operation_if_type_if_exist_e && state_process->condition != fake_make_operation_if_type_if_is_e) { // The existence tests do not need to happen here for *_if_exists and *_if_is as those two types will handle performing them during the process stage. - status_file = f_file_exists(data_make->cache_arguments.array[i], dereference); + data_make->setting->status = f_file_exists(data_make->cache_arguments.array[i], dereference); - if (status_file == F_false) { - status_file = F_status_set_error(F_file_found_not); + if (data_make->setting->status == F_false) { + data_make->setting->status = F_status_set_error(F_file_found_not); } - if (F_status_is_error(status_file)) { - fake_print_error_file(data_make->setting, data_make->main->error, status_file, macro_fake_f(f_file_exists), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_exists), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); status = F_status_set_error(F_failure); } } } // for - return status; + data_make->setting->status = status; + } + else { + data_make->setting->status = F_none; } - return F_none; + return; } if (state_process->condition == fake_make_operation_if_type_if_greater_e || state_process->condition == fake_make_operation_if_type_if_greater_equal_e || state_process->condition == fake_make_operation_if_type_if_less_e || state_process->condition == fake_make_operation_if_type_if_less_equal_e) { if (data_make->cache_arguments.used < 2 + k) { fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } f_status_t status = F_none; - f_status_t status_number = F_none; f_string_range_t range = f_string_range_t_initialize; f_number_unsigned_t number = 0; - for (i = k; i < data_make->cache_arguments.used; ++i, status_number = F_none) { + for (i = k; i < data_make->cache_arguments.used; ++i, data_make->setting->status = F_none) { if (data_make->cache_arguments.array[i].used) { range.start = 0; @@ -552,17 +595,17 @@ extern "C" { } if (range.start > range.stop) { - status_number = F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); } else { - status_number = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number); + data_make->setting->status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number); } } else { - status_number = F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); } - if (F_status_is_error(status_number)) { + if (F_status_is_error(data_make->setting->status)) { status = F_status_set_error(F_failure); if (number > F_number_t_size_unsigned_d) { @@ -574,41 +617,47 @@ extern "C" { } } // for - return status; + data_make->setting->status = status; + } + else { + data_make->setting->status = F_none; } - } - return F_none; + return; + } } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_condition_ #ifndef _di_fake_make_operate_validate_type_copy_ - f_status_t fake_make_operate_validate_type_copy(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_copy(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used > 1) { f_status_t status = F_none; - f_status_t status_file = F_none; + f_array_length_t i = 0; - for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) { + for (; i < data_make->cache_arguments.used; ++i) { - status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); + fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); - if (F_status_is_error(status_file)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); status = F_status_set_error(F_failure); } } // for - for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) { + for (i = 0; i < data_make->cache_arguments.used - 1; ++i) { if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) { - fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); + fake_print_error_file_simple(data_make->setting, data_make->main->error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); status = F_status_set_error(F_failure); } @@ -647,103 +696,126 @@ extern "C" { } } - return status; + data_make->setting->status = status; } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_copy_ #ifndef _di_fake_make_operate_validate_type_define_ - f_status_t fake_make_operate_validate_type_define(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_define(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used) { - const f_status_t status = fake_make_operate_validate_define_name(data_make->cache_arguments.array[0]); - if (status == F_true) return F_none; + fake_make_operate_validate_define_name(data_make->cache_arguments.array[0]); + + if (data_make->setting->status == F_true) { + data_make->setting->status = F_none; + + return; + } - if (status == F_none) { + if (data_make->setting->status == F_none) { fake_make_print_error_define_name_empty(data_make->setting, data_make->main->error); } else { fake_make_print_error_define_invalid_character(data_make->setting, data_make->main->error, data_make->cache_arguments.array[0]); } - - return F_status_set_error(F_failure); + } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); } - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); } #endif // _di_fake_make_operate_validate_type_define_ #ifndef _di_fake_make_operate_validate_type_delete_ - f_status_t fake_make_operate_validate_type_delete(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_delete(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used) { f_status_t status = F_none; - f_status_t status_file = F_none; for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) { - status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); + fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); - if (F_status_is_error(status_file)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); status = F_status_set_error(F_failure); } } // for - return status; + data_make->setting->status = status; } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_delete_ #ifndef _di_fake_make_operate_validate_type_else_ - f_status_t fake_make_operate_validate_type_else(fake_make_data_t * const data_make, fake_state_process_t * const state_process) { + void fake_make_operate_validate_type_else(fake_make_data_t * const data_make, fake_state_process_t * const state_process) { + + if (!data_make || !state_process) return; if (state_process->operation_previous == fake_make_operation_type_else_e) { fake_make_print_error_after_condition_must_not(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } if (state_process->operation_previous == fake_make_operation_type_if_e || state_process->operation_previous == fake_make_operation_type_and_e || state_process->operation_previous == fake_make_operation_type_or_e) { fake_make_print_error_after_condition_must_not(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } if (!state_process->block) { fake_make_print_error_after_condition_no_preceding(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } if (data_make->cache_arguments.used) { fake_print_error_too_many_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } - return F_none; + data_make->setting->status = F_none; } #endif // _di_fake_make_operate_validate_type_else_ #ifndef _di_fake_make_operate_validate_type_exit_ - f_status_t fake_make_operate_validate_type_exit(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_exit(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used > 1) { fake_print_error_too_many_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } if (data_make->cache_arguments.used) { @@ -751,17 +823,21 @@ extern "C" { if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, fake_make_operation_exit_s, data_make->cache_arguments.array[0]); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } } } - return F_none; + data_make->setting->status = F_none; } #endif // _di_fake_make_operate_validate_type_exit_ #ifndef _di_fake_make_operate_validate_type_fail_ - f_status_t fake_make_operate_validate_type_fail(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_fail(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used) { if (fl_string_dynamic_compare(fake_make_operation_argument_exit_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { @@ -769,51 +845,59 @@ extern "C" { if (fl_string_dynamic_compare(fake_make_operation_argument_ignore_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, fake_make_operation_fail_s, data_make->cache_arguments.array[0]); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } } } - return F_none; + data_make->setting->status = F_none; } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_fail_ #ifndef _di_fake_make_operate_validate_type_index_ - f_status_t fake_make_operate_validate_type_index(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_index(fake_make_data_t * const data_make) { + + if (!data_make) return; if (!data_make->cache_arguments.used) { fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); } - - if (!data_make->setting_build.build_indexer.used) { + else if (!data_make->setting_build.build_indexer.used) { fake_make_print_error_indexer_not_specified(data_make->setting, data_make->main->error, fake_make_operation_index_s); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } + else { + data_make->setting->status = F_none; } - - return F_none; } #endif // _di_fake_make_operate_validate_type_index_ #ifndef _di_fake_make_operate_validate_type_link_ - f_status_t fake_make_operate_validate_type_link(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_link(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used > 4) { fake_print_error_too_many_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } if (data_make->cache_arguments.used > 1) { f_status_t status = F_none; - f_status_t status_file = F_none; // 0x1 = force, 0x2 = strict. uint8_t flag = 0; @@ -846,10 +930,10 @@ extern "C" { } } - status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); + fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); - if (F_status_is_error(status_file)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); status = F_status_set_error(F_failure); } @@ -863,15 +947,15 @@ extern "C" { } if (f_path_is_absolute(data_make->cache_arguments.array[data_make->cache_arguments.used - 2]) == F_true) { - status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[data_make->cache_arguments.used - 2]); + fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[data_make->cache_arguments.used - 2]); - if (F_status_is_error(status_file)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), macro_fake_f(fake_make_assure_inside_project), data_make->cache_arguments.array[data_make->cache_arguments.used - 2]); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_arguments.array[data_make->cache_arguments.used - 2]); status = F_status_set_error(F_failure); } - if ((flag & 0x2) && F_status_is_error_not(status_file)) { + if ((flag & 0x2) && F_status_is_error_not(data_make->setting->status)) { if (f_file_exists(data_make->cache_arguments.array[data_make->cache_arguments.used - 2], F_false) != F_true) { fake_print_error_operation_link_target_exists_not(data_make->setting, data_make->error, data_make->cache_arguments.array[data_make->cache_arguments.used - 2]); @@ -892,33 +976,33 @@ extern "C" { data_make->cache_path.used = 0; - status_file = f_file_name_directory(full, &data_make->cache_path); + data_make->setting->status = f_file_name_directory(full, &data_make->cache_path); - if (F_status_is_error(status_file)) { - fake_print_error_file(data_make->setting, data_make->main->error, status_file, macro_fake_f(f_file_name_directory), full, f_file_operation_analyze_s, fll_error_file_type_path_e); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_name_directory), full, f_file_operation_analyze_s, fll_error_file_type_path_e); status = F_status_set_error(F_failure); } - if (F_status_is_error_not(status_file)) { - status_file = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_path); + if (F_status_is_error_not(data_make->setting->status)) { + data_make->setting->status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_path); - if (F_status_is_error(status_file)) { - fake_print_error(data_make->setting, data_make->main->error, status_file, macro_fake_f(f_string_dynamic_append_assure)); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_assure)); status = F_status_set_error(F_failure); } else { - status_file = f_string_dynamic_append(data_make->cache_arguments.array[data_make->cache_arguments.used - 2], &data_make->cache_path); + data_make->setting->status = f_string_dynamic_append(data_make->cache_arguments.array[data_make->cache_arguments.used - 2], &data_make->cache_path); - if (F_status_is_error(status_file)) { - fake_print_error(data_make->setting, data_make->main->error, status_file, macro_fake_f(f_string_dynamic_append)); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append)); status = F_status_set_error(F_failure); } } - if (F_status_is_error_not(status_file)) { + if (F_status_is_error_not(data_make->setting->status)) { // The cache_path is used by fake_make_assure_inside_project(), so copy the contents into another buffer. f_char_t target_string[data_make->cache_path.used + 1]; @@ -927,15 +1011,15 @@ extern "C" { memcpy(target_string, data_make->cache_path.string, sizeof(f_char_t) * data_make->cache_path.used); target_string[data_make->cache_path.used] = 0; - status_file = fake_make_assure_inside_project(data_make, target); + fake_make_assure_inside_project(data_make, target); - if (F_status_is_error(status_file)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), macro_fake_f(fake_make_assure_inside_project), target); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), target); status = F_status_set_error(F_failure); } - if ((flag & 0x2) && F_status_is_error_not(status_file)) { + if ((flag & 0x2) && F_status_is_error_not(data_make->setting->status)) { if (f_file_exists(target, F_false) != F_true) { fake_print_error_operation_link_target_exists_not(data_make->setting, data_make->error, target); @@ -948,34 +1032,35 @@ extern "C" { else { fake_make_print_error_target_file_name_empty(data_make->setting, data_make->main->error); - status = F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); } } - return status; + data_make->setting->status = status; } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_link_ #ifndef _di_fake_make_operate_validate_type_move_ - f_status_t fake_make_operate_validate_type_move(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_move(fake_make_data_t * const data_make) { - if (data_make->cache_arguments.used > 1) { - f_status_t status = F_none; + if (!data_make) return; + if (data_make->cache_arguments.used > 1) { { - f_status_t status_file = F_none; + f_status_t status = F_none; for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) { - status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); + data_make->setting->status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); - if (F_status_is_error(status_file)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); status = F_status_set_error(F_failure); } @@ -985,65 +1070,78 @@ extern "C" { for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) { if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) { - fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); + fake_print_error_file_simple(data_make->setting, data_make->main->error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); status = F_status_set_error(F_failure); } } // for } - if (F_status_is_error(status)) return status; + data_make->setting->status = status; + + if (F_status_is_error(data_make->setting->status)) return; } if (data_make->cache_arguments.used > 2) { // The last file must be a directory. - status = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); + data_make->setting->status = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); - if (status == F_false || status == F_file_found_not) { + if (data_make->setting->status == F_false || data_make->setting->status == F_file_found_not) { fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, "last", data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } - if (F_status_is_error(status)) { - fake_print_error_file(data_make->setting, data_make->main->error, status, macro_fake_f(f_directory_is), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } } else { // When the first file is a directory, then the second, if it exists, must also be a directory. - status = f_directory_is(data_make->cache_arguments.array[0]); + data_make->setting->status = f_directory_is(data_make->cache_arguments.array[0]); - if (status == F_true) { - status = f_directory_is(data_make->cache_arguments.array[1]); + if (data_make->setting->status == F_true) { + data_make->setting->status = f_directory_is(data_make->cache_arguments.array[1]); - if (status == F_false) { + if (data_make->setting->status == F_false) { fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, "second", data_make->cache_arguments.array[1]); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + break; } } } - return F_none; + data_make->setting->status = F_none; } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_move_ #ifndef _di_fake_make_operate_validate_type_operate_ - f_status_t fake_make_operate_validate_type_operate(fake_make_data_t * const data_make, f_array_lengths_t * const section_stack) { + void fake_make_operate_validate_type_operate(fake_make_data_t * const data_make, f_array_lengths_t * const section_stack) { + + if (!data_make || !section_stack) return; if (data_make->cache_arguments.used > 1) { fake_print_error_too_many_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } if (data_make->cache_arguments.used == 1) { @@ -1059,7 +1157,9 @@ extern "C" { if (id_section == data_make->fakefile.used) { fake_make_print_error_operation_section_not_found(data_make->setting, data_make->main->error, data_make->cache_arguments.array[0]); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } for (f_array_length_t i = 0; i < section_stack->used; ++i) { @@ -1067,21 +1167,26 @@ extern "C" { if (section_stack->array[i] == id_section) { fake_make_print_error_operation_recursion(data_make->setting, data_make->main->error, data_make->buffer, data_make->fakefile.array[id_section].name); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } } // for - return F_none; + data_make->setting->status = F_none; } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_operate_ #ifndef _di_fake_make_operate_validate_type_parameter_ - f_status_t fake_make_operate_validate_type_parameter(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_parameter(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used) { const f_string_static_t reserved_name[] = { @@ -1131,17 +1236,20 @@ extern "C" { } } // for - return status; + data_make->setting->status = status; } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_parameter_ #ifndef _di_fake_make_operate_validate_type_permission_ - f_status_t fake_make_operate_validate_type_permission(fake_make_data_t * const data_make, fake_state_process_t * const state_process) { + void fake_make_operate_validate_type_permission(fake_make_data_t * const data_make, fake_state_process_t * const state_process) { + + if (!data_make || !state_process) return; if (data_make->cache_arguments.used) { f_array_length_t i = 1; @@ -1154,148 +1262,169 @@ extern "C" { if (data_make->cache_arguments.used > i) { f_status_t status = F_none; - f_status_t status_file = F_none; for (; i < data_make->cache_arguments.used; ++i) { - status_file = f_file_is(data_make->cache_arguments.array[i], F_file_type_regular_d, F_false); + data_make->setting->status = f_file_is(data_make->cache_arguments.array[i], F_file_type_regular_d, F_false); - if (status_file == F_file_found_not) { - fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); + if (data_make->setting->status == F_file_found_not) { + fake_print_error_file_simple(data_make->setting, data_make->main->error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); status = F_status_set_error(F_failure); } - if (F_status_is_error(status_file)) { + if (F_status_is_error(data_make->setting->status)) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - fake_print_error_file(data_make->setting, data_make->main->error, status_file, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e); + fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e); } status = F_status_set_error(F_failure); } - } + } // for - return status; + data_make->setting->status = status; } } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_permission_ #ifndef _di_fake_make_operate_validate_type_pop_ - f_status_t fake_make_operate_validate_type_pop(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_pop(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used) { fake_print_error_too_many_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } if (data_make->path.stack.used == 1) { fake_make_print_error_pop_last_path(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } + else { + data_make->setting->status = F_none; } - - return F_none; } #endif // _di_fake_make_operate_validate_type_pop_ #ifndef _di_fake_make_operate_validate_type_run_ - f_status_t fake_make_operate_validate_type_run(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_run(fake_make_data_t * const data_make) { + + if (!data_make) return; if (!data_make->cache_arguments.used) { fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } + else { + data_make->setting->status = F_none; } - - return F_none; } #endif // _di_fake_make_operate_validate_type_run_ #ifndef _di_fake_make_operate_validate_type_to_ - f_status_t fake_make_operate_validate_type_to(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_to(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used > 1) { fake_print_error_too_many_arguments(data_make->setting, data_make->main->error); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } if (data_make->cache_arguments.used) { if (data_make->cache_arguments.array[0].used) { - const f_status_t status = f_file_is(data_make->cache_arguments.array[0], F_file_type_directory_d, F_false); + data_make->setting->status = f_file_is(data_make->cache_arguments.array[0], F_file_type_directory_d, F_false); - if (status == F_file_found_not) { - fake_print_error_file_simple(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->cache_arguments.array[0], f_file_operation_find_s, fll_error_file_type_file_e); + if (data_make->setting->status == F_file_found_not) { + fake_print_error_file_simple(data_make->setting, data_make->main->error, macro_fake_f(f_file_is), data_make->cache_arguments.array[0], f_file_operation_find_s, fll_error_file_type_file_e); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } - if (F_status_is_error(status)) { + if (F_status_is_error(data_make->setting->status)) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->error.to.stream) { - fake_print_error_file(data_make->setting, data_make->main->error, status, macro_fake_f(f_file_is), data_make->data->file_data_build_fakefile, f_file_operation_find_s, fll_error_file_type_file_e); + fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_is), data_make->data->file_data_build_fakefile, f_file_operation_find_s, fll_error_file_type_file_e); } - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } - if (!status) { + if (data_make->setting->status) { + data_make->setting->status = F_none; + } + else { fake_make_print_error_content_not_directory(data_make->setting, data_make->main->error, 0, data_make->cache_arguments.array[0]); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); } - - return F_none; } + else { + fake_make_print_error_file_name_empty(data_make->setting, data_make->main->error); - fake_make_print_error_file_name_empty(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_to_ #ifndef _di_fake_make_operate_validate_type_touch_ - f_status_t fake_make_operate_validate_type_touch(fake_make_data_t * const data_make) { + void fake_make_operate_validate_type_touch(fake_make_data_t * const data_make) { + + if (!data_make) return; if (data_make->cache_arguments.used > 1) { if (fl_string_dynamic_compare(fake_make_operation_argument_file_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { if (fl_string_dynamic_compare(fake_make_operation_argument_directory_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { fake_make_print_error_unsupported_type(data_make->setting, data_make->main->error, f_file_type_name_file_s, data_make->cache_arguments.array[0]); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); } } f_status_t status = F_none; - f_status_t status_file = F_none; for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i) { - status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); + fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); - if (F_status_is_error(status_file)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, F_status_set_fine(status_file), macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); + if (F_status_is_error(setting->status)) { + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); status = F_status_set_error(F_failure); } } // for - return status; + data_make->setting->status = status; } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_touch_ @@ -1306,23 +1435,27 @@ extern "C" { if (!data_make->cache_arguments.array[0].used) { fake_print_error_argument_empty(data_make->setting, data_make->error, 1); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + + return; } - const f_status_t status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]); + fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]); - if (F_status_is_error(status)) { - fake_print_error_operation_path_outside(data_make->setting, data_make->error, status, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]); + if (F_status_is_error(data_make->setting->status)) { + fake_print_error_operation_path_outside(data_make->setting, data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]); - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } + else { + data_make->setting->status = F_none; } - - return F_none; } + else { + fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error); - - return F_status_set_error(F_failure); + data_make->setting->status = F_status_set_error(F_failure); + } } #endif // _di_fake_make_operate_validate_type_write_ 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 042a181..c17e2b2 100644 --- a/level_3/fake/c/main/make/operate_validate_type.h +++ b/level_3/fake/c/main/make/operate_validate_type.h @@ -22,13 +22,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_break(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_break_ /** @@ -37,13 +37,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_build(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_build_ /** @@ -52,13 +52,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void 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_ /** @@ -67,13 +67,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_clone(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_clone_ /** @@ -82,13 +82,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_compile(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_compile_ /** @@ -100,13 +100,13 @@ extern "C" { * The operation and if-condition operation states. * This condition will be updated by this as appropriate. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void 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_ /** @@ -115,13 +115,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_copy(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_copy_ /** @@ -130,13 +130,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_define(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_define_ /** @@ -145,13 +145,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_delete(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_delete_ /** @@ -163,13 +163,13 @@ extern "C" { * The operation and if-condition operation states. * This condition will be updated by this as appropriate. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void 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_ /** @@ -178,13 +178,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_exit(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_exit_ /** @@ -193,13 +193,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_fail(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_fail_ /** @@ -208,13 +208,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_index(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_index_ /** @@ -223,13 +223,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_link(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_link_ /** @@ -238,13 +238,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_move(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_move_ /** @@ -255,13 +255,13 @@ extern "C" { * @param section_stack * The current operation stack. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void 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_ /** @@ -270,13 +270,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_parameter(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_parameter_ /** @@ -288,13 +288,13 @@ extern "C" { * The operation and if-condition operation states. * This condition will be updated by this as appropriate. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void 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_ /** @@ -303,13 +303,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_pop(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_pop_ /** @@ -318,13 +318,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_run(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_run_ /** @@ -333,13 +333,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_to(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_to_ /** @@ -348,13 +348,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void fake_make_operate_validate_type_touch(fake_make_data_t * const data_make); #endif // _di_fake_make_operate_validate_type_touch_ /** @@ -363,13 +363,13 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * - * @return - * F_none on success. + * This alters data_make.setting.state: + * F_none on success. * - * F_failure (with error bit) on any error. + * 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); + extern void 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/print/error.c b/level_3/fake/c/main/print/error.c index 721d4bc..f4f9928 100644 --- a/level_3/fake/c/main/print/error.c +++ b/level_3/fake/c/main/print/error.c @@ -10,7 +10,7 @@ extern "C" { if (!setting) return F_status_set_error(F_output_not); if (print.verbosity < f_console_verbosity_error_e) return F_output_not; - fll_error_print(print, F_status_set_fine(data->setting.state.status), function, fll_error_file_flag_fallback_e); + fll_error_print(print, F_status_set_fine(data->setting->state.status), function, fll_error_file_flag_fallback_e); return F_none; } @@ -276,7 +276,7 @@ extern "C" { if (!setting) return F_status_set_error(F_output_not); if (print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (fll_error_print(print, F_status_set_fine(data->setting.state.status), function, fll_error_file_flag_none_e) == F_known_not) return F_false; + if (fll_error_print(print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_none_e) == F_known_not) return F_false; return F_true; } @@ -312,7 +312,7 @@ extern "C" { if (!setting) return F_status_set_error(F_output_not); if (print.verbosity < f_console_verbosity_error_e) return F_output_not; - fll_error_file_print(print, F_status_set_fine(data->setting.state.status), function, fll_error_file_flag_simple_e, name, operation, type); + fll_error_file_print(print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_simple_e, name, operation, type); return F_none; } @@ -323,7 +323,7 @@ extern "C" { if (!setting) return F_status_set_error(F_output_not); - if (data->setting.state.status == F_file_found_not) { + if (setting->state.status == F_file_found_not) { if (print.verbosity > f_console_verbosity_quiet_e) { fake_print_error_fss_message(setting, print, 0, "Occurred on invalid UTF-8 character at stop position (at ", range.start, " of the setting file ", path_file, ")"); } @@ -331,11 +331,11 @@ extern "C" { return F_false; } - if (data->setting.state.status == F_complete_not_utf || data->setting.state.status == F_complete_not_utf_eos || data->setting.state.status == F_complete_not_utf_stop) { + if (setting->state.status == F_complete_not_utf || setting->state.status == F_complete_not_utf_eos || setting->state.status == F_complete_not_utf_stop) { if (print.verbosity > f_console_verbosity_quiet_e) { f_file_stream_lock(print.to); - fl_print_format("%[%QOccurred on invalid UTF-8 character at %s (at '%]", print.to, print.context, print.prefix, data->setting.state.status == F_complete_not_utf_eos ? "end of string" : "stop point of string", print.context); + fl_print_format("%[%QOccurred on invalid UTF-8 character at %s (at '%]", print.to, print.context, print.prefix, setting->state.status == F_complete_not_utf_eos ? "end of string" : "stop point of string", print.context); fl_print_format("%[%un%]", print.to, print.notable, range.start, print.notable); fl_print_format("%[ of the setting file '%]", print.to, print.context, print.context); fl_print_format("%[%Q%]", print.to, print.notable, path_file, print.notable); @@ -347,7 +347,7 @@ extern "C" { return F_false; } - if (data->setting.state.status == F_complete_not_utf_stop) { + if (setting->state.status == F_complete_not_utf_stop) { if (print.verbosity > f_console_verbosity_quiet_e) { fake_print_error_fss_message(setting, print, 0, "Occurred on invalid UTF-8 character at stop point of string (at ", range.start, " of the setting file ", path_file, ")"); } @@ -355,13 +355,13 @@ extern "C" { return F_false; } - if (fll_error_print(print, data->setting.state.status, function, fll_error_file_flag_none_e) == F_known_not && fallback) { + if (fll_error_print(print, setting->state.status, function, fll_error_file_flag_none_e) == F_known_not && fallback) { if (print.verbosity > f_console_verbosity_quiet_e) { f_string_static_t function_s = f_string_static_t_initialize; function_s.string = function; function_s.used = strlen(function); - fake_print_error_fss_message(setting, print, "UNKNOWN ", 0, (f_number_unsigned_t) data->setting.state.status, ") in function ", function_s, "()"); + fake_print_error_fss_message(setting, print, "UNKNOWN ", 0, (f_number_unsigned_t) setting->state.status, ") in function ", function_s, "()"); } } @@ -434,7 +434,7 @@ extern "C" { f_array_length_t line = 1; f_state_t state = f_state_t_initialize; - f_fss_count_lines(state, buffer, operation_name.start, &line); + f_fss_count_lines(buffer, operation_name.start, &line, &setting->state); f_file_stream_lock(print.to); @@ -504,11 +504,11 @@ extern "C" { if (!setting) return F_status_set_error(F_output_not); if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not; - if (F_status_set_fine(data->setting.state.status) == F_false) { + if (F_status_set_fine(data->setting->state.status) == F_false) { fake_print_context_wrapped_variable(setting, print, "The path ", path, " is outside the project root"); } else { - fake_print_error_file(setting, print, data->setting.state.status, function, path, fake_common_file_path_determine_real_s, fll_error_file_type_file_e); + fake_print_error_file(setting, print, function, path, fake_common_file_path_determine_real_s, fll_error_file_type_file_e); } return F_none; @@ -521,7 +521,7 @@ extern "C" { if (!setting) return F_status_set_error(F_output_not); if (print.verbosity < f_console_verbosity_error_e) return F_output_not; - if (data->setting.state.status == F_array_too_large) { + if (setting->state.status == F_array_too_large) { f_file_stream_lock(print.to); fl_print_format("%[%QMaximum stack size reached while processing path '%]", print.to, print.context, print.prefix, print.context); @@ -554,7 +554,7 @@ extern "C" { f_array_length_t line = 1; f_state_t state = f_state_t_initialize; - f_fss_count_lines(state, buffer, operation_name.start, &line); + f_fss_count_lines(buffer, operation_name.start, &line, &setting->state); f_file_stream_lock(print.to); @@ -583,7 +583,7 @@ extern "C" { f_array_length_t line = 1; f_state_t state = f_state_t_initialize; - f_fss_count_lines(state, buffer, operation_name.start, &line); + f_fss_count_lines(buffer, operation_name.start, &line, &setting->state); f_file_stream_lock(print.to); diff --git a/level_3/fake/c/main/skeleton.c b/level_3/fake/c/main/skeleton.c index 156f876..adfb177 100644 --- a/level_3/fake/c/main/skeleton.c +++ b/level_3/fake/c/main/skeleton.c @@ -152,7 +152,7 @@ extern "C" { fake_print_error_directory_create_parent_missing(data->setting, data->main->error, path); } else { - fake_print_error_file(data->setting, data->main->error, status, macro_fake_f(f_directory_create), path, f_file_operation_create_s, fll_error_file_type_directory_e); + fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_directory_create), path, f_file_operation_create_s, fll_error_file_type_directory_e); } return status; @@ -161,7 +161,7 @@ extern "C" { fake_print_verbose_create_directory(data->setting, data->main->message, path); } else if (F_status_is_error(status)) { - fake_print_error_file(data->setting, data->main->error, status, macro_fake_f(f_directory_exists), path, f_file_operation_create_s, fll_error_file_type_directory_e); + fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_directory_exists), path, f_file_operation_create_s, fll_error_file_type_directory_e); return status; } @@ -216,7 +216,7 @@ extern "C" { fake_print_error_file_create_parent_missing(data->setting, data->main->error, path); } else { - fake_print_error_file(data->setting, data->main->error, status, macro_fake_f(f_file_create), path, f_file_operation_create_s, fll_error_file_type_file_e); + fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_create), path, f_file_operation_create_s, fll_error_file_type_file_e); } return status; @@ -233,7 +233,7 @@ extern "C" { status = f_file_open(path, 0, &file); if (F_status_is_error(status)) { - fake_print_error_file(data->setting, data->main->error, status, macro_fake_f(f_file_open), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e); + fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_open), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e); return status; } @@ -241,7 +241,7 @@ extern "C" { status = f_file_write(file, content, 0); if (F_status_is_error(status)) { - fake_print_error_file(data->setting, data->main->error, status, macro_fake_f(f_file_write), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e); + fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_write), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e); f_file_stream_flush(file); f_file_stream_close(&file); @@ -256,7 +256,7 @@ extern "C" { } } else if (F_status_is_error(status)) { - fake_print_error_file(data->setting, data->main->error, status, macro_fake_f(f_file_is), path, f_file_operation_create_s, fll_error_file_type_file_e); + fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_is), path, f_file_operation_create_s, fll_error_file_type_file_e); return status; } -- 1.8.3.1