From 9ebfcc071f11f82b435cfa0f73e4961912571c38 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 16 Jul 2022 20:00:35 -0500 Subject: [PATCH] Bugfix: IKI variable substitutionr results in incorrect parameter structure. The commit d94d5337c44d7b2d6f3ed183e8d2c94b4bdad1f6 exposed an existing bug. There parameters are not always expanding properly resulting in the parameter being empty, having the incorrect order, or being improperly merged with another parameter. Change the array resize behavior to resize after incrementing the arguments rather than before. Detect and handle special cases where separation needs to be applied and when separation does not need to be applied. Remove random space that is being accidentally appended when printing arguments (probably an accident from a previous commit). The commit 6012208c61e616a5d31d285ba8873f55b987bf70 did not fully solve the problems it attempted to solve. Handle additional cases, such as: settings: parameter a iki <-assure_space unassure_space-> parameter b value main: if exist 'parameter:"a"' print yes (parameter:"a") else print no (parameter:"a") print 0 parameter:"a" print 1 parameter:"b" print 2 parameter:"b". print 3 "parameter:"b"" print 4 "parameter:"b\" between parameter:"b"" print 5 'begin parameter:"a" middle parameter:"a" end' print 6 "begin parameter:"a\" middle parameter:"a\" end" print 7 begin parameter:"a" middle parameter:"a" end print 8 begin parameter:"a"! middle parameter:"a"@parameter:"a" end Should produce results like: no (iki <-assure_space unassure_space->) 0 iki <-assure_space unassure_space-> 1 value 2 value. 3 value 4 value between value 5 begin iki <-assure_space unassure_space-> middle iki <-assure_space unassure_space-> end 6 begin iki <-assure_space unassure_space-> middle iki <-assure_space unassure_space-> end 7 begin iki <-assure_space unassure_space-> middle iki <-assure_space unassure_space-> end 8 begin iki <-assure_space unassure_space->! middle iki <-assure_space unassure_space->@iki <-assure_space unassure_space-> end Move the relevant arguments and iki data into a shared cache to save memory consumption. Rename path_cache to cache_path for consistency. --- level_3/fake/c/private-common.c | 6 +- level_3/fake/c/private-common.h | 10 +- level_3/fake/c/private-make-load_fakefile.c | 3 + level_3/fake/c/private-make-operate.c | 259 +++++++------ level_3/fake/c/private-make-operate.h | 16 +- level_3/fake/c/private-make-operate_process.c | 134 +++---- level_3/fake/c/private-make-operate_process.h | 8 +- level_3/fake/c/private-make-operate_process_type.c | 423 ++++++++++----------- level_3/fake/c/private-make-operate_process_type.h | 86 ++--- level_3/fake/c/private-make-operate_validate.c | 300 +++++++-------- level_3/fake/c/private-make-operate_validate.h | 4 +- level_3/fake/c/private-make.c | 18 +- level_3/fake/c/private-make.h | 4 +- 13 files changed, 607 insertions(+), 664 deletions(-) diff --git a/level_3/fake/c/private-common.c b/level_3/fake/c/private-common.c index ab23574..bfc5b3d 100644 --- a/level_3/fake/c/private-common.c +++ b/level_3/fake/c/private-common.c @@ -396,7 +396,11 @@ extern "C" { f_string_dynamic_resize(0, &data->buffer); f_string_dynamic_resize(0, &data->cache_1); f_string_dynamic_resize(0, &data->cache_2); - f_string_dynamic_resize(0, &data->path_cache); + f_string_dynamic_resize(0, &data->cache_path); + + f_string_dynamics_resize(0, &data->cache_arguments); + + f_iki_data_delete(&data->cache_iki); return F_none; } diff --git a/level_3/fake/c/private-common.h b/level_3/fake/c/private-common.h index 294ca74..93a314d 100644 --- a/level_3/fake/c/private-common.h +++ b/level_3/fake/c/private-common.h @@ -1666,7 +1666,9 @@ extern "C" { * buffer: A buffer used during processing. * cache_1: An additional buffer for caching purposes. * cache_2: An additional buffer for caching purposes. - * path_cache: A buffer for path-specific caching. + * cache_path: A buffer for path-specific caching. + * cache_arguments: A cache for expanded arguments. + * cache_iki: A cache for IKI data. * id_main: Index of the "main" Section. * main: The main program data. * data: The Fake make program data. @@ -1690,7 +1692,9 @@ extern "C" { f_string_dynamic_t buffer; f_string_dynamic_t cache_1; f_string_dynamic_t cache_2; - f_string_dynamic_t path_cache; + f_string_dynamic_t cache_path; + f_string_dynamics_t cache_arguments; + f_iki_data_t cache_iki; f_array_length_t id_main; @@ -1712,6 +1716,8 @@ extern "C" { f_string_dynamic_t_initialize, \ f_string_dynamic_t_initialize, \ f_string_dynamic_t_initialize, \ + f_string_dynamics_t_initialize, \ + f_iki_data_t_initialize, \ 0, \ 0, \ 0, \ diff --git a/level_3/fake/c/private-make-load_fakefile.c b/level_3/fake/c/private-make-load_fakefile.c index 4ae12b3..32de47b 100644 --- a/level_3/fake/c/private-make-load_fakefile.c +++ b/level_3/fake/c/private-make-load_fakefile.c @@ -167,6 +167,9 @@ extern "C" { delimits.used = 0; content_range = list_contents.array[i].array[0]; + data_make->fakefile.array[data_make->fakefile.used].objects.used = 0; + data_make->fakefile.array[data_make->fakefile.used].contents.used = 0; + data_make->fakefile.array[data_make->fakefile.used].quotess.used = 0; *status = fll_fss_extended_read(data_make->buffer, state, &content_range, &data_make->fakefile.array[data_make->fakefile.used].objects, &data_make->fakefile.array[data_make->fakefile.used].contents, 0, &data_make->fakefile.array[data_make->fakefile.used].quotess, &delimits, 0); diff --git a/level_3/fake/c/private-make-operate.c b/level_3/fake/c/private-make-operate.c index d13296a..3d75599 100644 --- a/level_3/fake/c/private-make-operate.c +++ b/level_3/fake/c/private-make-operate.c @@ -140,13 +140,13 @@ extern "C" { #endif // _di_fake_make_operate_ #ifndef _di_fake_make_operate_expand_ - void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_fss_quotes_t quotes, f_string_dynamics_t * const arguments, f_status_t * const status) { + void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_fss_quotes_t quotes, f_status_t * const status) { if (F_status_is_error(*status)) return; if (!content.used) return; // Pre-allocate the known arguments size. - *status = f_string_dynamics_increase_by(content.used, arguments); + *status = f_string_dynamics_increase_by(content.used, &data_make->cache_arguments); if (F_status_is_error(*status) || *status == F_string_too_large) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); @@ -158,17 +158,18 @@ extern "C" { const f_string_static_t vocabulary_define = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_define_s, 0, F_iki_vocabulary_0002_define_s_length); const f_string_static_t vocabulary_parameter = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_parameter_s, 0, F_iki_vocabulary_0002_parameter_s_length); - f_iki_data_t iki_data = f_iki_data_t_initialize; + f_iki_data_t *iki_data = &data_make->cache_iki; f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data_make->main, 0); f_string_range_t range = f_string_range_t_initialize; f_string_map_multis_t *parameter = &data_make->setting_make.parameter; - // 1 = is parameter, 2 = is defined, 3 = is context. + // 1 = is parameter, 2 = is define, 3 = is context. uint8_t is = 0; bool unmatched = F_true; + bool separate = F_false; f_array_length_t i = 0; f_array_length_t j = 0; @@ -249,18 +250,23 @@ extern "C" { for (; i < content.used; ++i) { + iki_data->variable.used = 0; + iki_data->vocabulary.used = 0; + iki_data->content.used = 0; + iki_data->delimits.used = 0; + // Skip content that is unused, but quoted content, even if empty, should remain. if (content.array[i].start > content.array[i].stop) { if (quotes.array[i]) { - *status = f_string_dynamics_increase(fake_default_allocation_small_d, arguments); + ++data_make->cache_arguments.used; + + *status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true); break; } - - arguments->array[arguments->used++].used = 0; } continue; @@ -268,7 +274,7 @@ extern "C" { range = content.array[i]; - *status = fl_iki_read(state, &data_make->buffer, &range, &iki_data); + *status = fl_iki_read(state, &data_make->buffer, &range, iki_data); if (F_status_is_error(*status)) { if (F_status_set_fine(*status) != F_interrupt) { @@ -279,26 +285,18 @@ extern "C" { } // Apply the IKI delimits to the buffer. - for (j = 0; j < iki_data.delimits.used; ++j) { - data_make->buffer.string[iki_data.delimits.array[j]] = f_iki_syntax_placeholder_s.string[0]; + for (j = 0; j < iki_data->delimits.used; ++j) { + data_make->buffer.string[iki_data->delimits.array[j]] = f_iki_syntax_placeholder_s.string[0]; } // for - *status = f_string_dynamics_increase(fake_default_allocation_small_d, arguments); - - if (F_status_is_error(*status)) { - fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true); - - break; - } - - if (iki_data.variable.used) { + if (iki_data->variable.used) { // Copy everything up to the start of the first IKI variable. - if (iki_data.variable.array[0].start && content.array[i].start < iki_data.variable.array[0].start) { + if (iki_data->variable.array[0].start && content.array[i].start < iki_data->variable.array[0].start) { range.start = content.array[i].start; - range.stop = iki_data.variable.array[0].start - 1; + range.stop = iki_data->variable.array[0].start - 1; - *status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &arguments->array[arguments->used]); + *status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_partial_append_nulless", F_true); @@ -307,23 +305,23 @@ extern "C" { } } - for (j = 0; j < iki_data.variable.used; ++j) { + for (j = 0; j < iki_data->variable.used; ++j) { is = 0; - *status = fl_string_dynamic_partial_compare_string(vocabulary_define.string, data_make->buffer, vocabulary_define.used, iki_data.vocabulary.array[j]); + *status = fl_string_dynamic_partial_compare_string(vocabulary_define.string, data_make->buffer, vocabulary_define.used, iki_data->vocabulary.array[j]); if (*status == F_equal_to) { is = 2; } else if (*status == F_equal_to_not) { - *status = fl_string_dynamic_partial_compare_string(vocabulary_parameter.string, data_make->buffer, vocabulary_parameter.used, iki_data.vocabulary.array[j]); + *status = fl_string_dynamic_partial_compare_string(vocabulary_parameter.string, data_make->buffer, vocabulary_parameter.used, iki_data->vocabulary.array[j]); if (*status == F_equal_to) { is = 1; } else if (*status == F_equal_to_not) { - *status = fl_string_dynamic_partial_compare_string(vocabulary_context.string, data_make->buffer, vocabulary_context.used, iki_data.vocabulary.array[j]); + *status = fl_string_dynamic_partial_compare_string(vocabulary_context.string, data_make->buffer, vocabulary_context.used, iki_data->vocabulary.array[j]); if (*status == F_equal_to) { is = 3; @@ -341,9 +339,10 @@ extern "C" { unmatched = F_true; // Check against reserved parameter names and if matches use them instead. - if (fl_string_dynamic_partial_compare_string(fake_make_parameter_variable_return_s.string, data_make->buffer, fake_make_parameter_variable_return_s.used, iki_data.content.array[j]) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(fake_make_parameter_variable_return_s.string, data_make->buffer, fake_make_parameter_variable_return_s.used, iki_data->content.array[j]) == F_equal_to) { + if (data_make->setting_make.parameter.array[0].value.array[0].used) { - *status = f_string_dynamic_append_nulless(data_make->setting_make.parameter.array[0].value.array[0], &arguments->array[arguments->used]); + *status = f_string_dynamic_append_nulless(data_make->setting_make.parameter.array[0].value.array[0], &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); @@ -352,7 +351,7 @@ extern "C" { } } else { - *status = f_string_dynamic_append(f_string_ascii_0_s, &arguments->array[arguments->used]); + *status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); @@ -366,29 +365,21 @@ extern "C" { else { for (k = 0; k < 33; ++k) { - if (fl_string_dynamic_partial_compare_string(reserved_name[k].string, data_make->buffer, reserved_name[k].used, iki_data.content.array[j]) != F_equal_to) { + if (fl_string_dynamic_partial_compare_string(reserved_name[k].string, data_make->buffer, reserved_name[k].used, iki_data->content.array[j]) != F_equal_to) { continue; } unmatched = F_false; + separate = F_false; // Unquoted IKI content that are reserved words and entirely represent a single parameter should expand into separate parameters. - if (content.array[i].start == iki_data.variable.array[0].start && content.array[i].stop == iki_data.variable.array[0].stop && !quotes.array[i]) { - *status = f_string_dynamics_increase_by(reserved_value[k]->used, arguments); - - if (F_status_is_error(*status)) { - fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); - - break; - } + if (content.array[i].start == iki_data->variable.array[0].start && content.array[i].stop == iki_data->variable.array[0].stop && !quotes.array[i]) { for (l = 0; l < reserved_value[k]->used; ++l) { if (!reserved_value[k]->array[l].used) continue; - arguments->array[arguments->used].used = 0; - - *status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &arguments->array[arguments->used]); + *status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); @@ -396,33 +387,37 @@ extern "C" { break; } - ++arguments->used; - } // for - } - else { - *status = f_string_dynamics_increase(fake_default_allocation_small_d, arguments); + ++data_make->cache_arguments.used; - if (F_status_is_error(*status)) { - fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true); + *status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); - break; - } + if (F_status_is_error(*status)) { + fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true); + break; + } + + separate = F_true; + } // for + } + else { for (l = 0; l < reserved_value[k]->used; ++l) { if (!reserved_value[k]->array[l].used) continue; - if (l) { - *status = f_string_dynamic_append(f_string_space_s, &arguments->array[arguments->used]); + if (separate) { + *status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); break; } + + separate = F_false; } - *status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &arguments->array[arguments->used]); + *status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); @@ -442,18 +437,21 @@ extern "C" { for (k = 0; k < parameter->used; ++k) { // Check against IKI variable list. - if (fl_string_dynamic_partial_compare_dynamic(parameter->array[k].name, data_make->buffer, iki_data.content.array[j]) != F_equal_to) { + if (fl_string_dynamic_partial_compare_dynamic(parameter->array[k].name, data_make->buffer, iki_data->content.array[j]) != F_equal_to) { continue; } unmatched = F_false; + separate = F_false; if (parameter->array[k].value.used) { if (quotes.array[i]) { for (l = 0; l < parameter->array[k].value.used; ++l) { - if (l > 0) { - *status = f_string_dynamic_append(f_string_space_s, &arguments->array[arguments->used]); + if (!parameter->array[k].value.array[l].used) continue; + + if (separate) { + *status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true); @@ -462,35 +460,48 @@ extern "C" { } } - *status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &arguments->array[arguments->used]); + *status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); break; } + + separate = F_true; } // for } else { - *status = f_string_dynamics_increase_by(fake_default_allocation_small_d, arguments); + for (l = 0; l < parameter->array[k].value.used; ++l) { - if (F_status_is_error(*status)) { - fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true); + if (!parameter->array[k].value.array[l].used) continue; - break; - } + // Unquoted use separate parameters rather then being separated by a space. + if (separate) { + ++data_make->cache_arguments.used; - for (l = 0; l < parameter->array[k].value.used; ++l) { + *status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); + + if (F_status_is_error(*status)) { + fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true); + + break; + } + } - *status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &arguments->array[arguments->used]); + *status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true); break; } + + separate = F_true; } // for } + + if (F_status_is_error(*status)) break; } break; @@ -500,7 +511,7 @@ extern "C" { if (F_status_is_error(*status)) break; if (unmatched) { - *status = fake_make_operate_expand_build(data_make, quotes.array[i], iki_data.content.array[j], arguments); + *status = fake_make_operate_expand_build(data_make, quotes.array[i], iki_data->content.array[j]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_operate_expand_build", F_true); @@ -510,7 +521,7 @@ extern "C" { } } else if (is == 2) { - *status = fake_make_operate_expand_environment(data_make, quotes.array[i], iki_data.content.array[j], arguments); + *status = fake_make_operate_expand_environment(data_make, quotes.array[i], iki_data->content.array[j]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_operate_expand_environment", F_true); @@ -519,7 +530,7 @@ extern "C" { } } else if (is == 3) { - *status = fake_make_operate_expand_context(data_make, quotes.array[i], iki_data.content.array[j], arguments); + *status = fake_make_operate_expand_context(data_make, quotes.array[i], iki_data->content.array[j]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_operate_expand_context", F_true); @@ -529,20 +540,12 @@ extern "C" { } // Make sure to copy content between multiple IKI variables within the same content. - if (j + 1 < iki_data.variable.used) { - if (iki_data.variable.array[j].stop + 1 < iki_data.variable.array[j + 1].start && iki_data.variable.array[j + 1].stop <= content.array[i].stop) { - *status = f_string_dynamics_increase(fake_default_allocation_small_d, arguments); - - if (F_status_is_error(*status)) { - fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true); - - break; - } - - range.start = iki_data.variable.array[j].stop + 1; - range.stop = iki_data.variable.array[j + 1].start - 1; + if (j + 1 < iki_data->variable.used) { + if (iki_data->variable.array[j].stop + 1 < iki_data->variable.array[j + 1].start && iki_data->variable.array[j + 1].stop <= content.array[i].stop) { + range.start = iki_data->variable.array[j].stop + 1; + range.stop = iki_data->variable.array[j + 1].start - 1; - *status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &arguments->array[arguments->used]); + *status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_partial_append_nulless", F_true); @@ -556,33 +559,33 @@ extern "C" { if (F_status_is_error(*status)) break; // Copy everything after the last IKI variable to the end of the content. - if (iki_data.variable.used && content.array[i].stop > iki_data.variable.array[iki_data.variable.used - 1].stop) { - *status = f_string_dynamics_increase(fake_default_allocation_small_d, arguments); + if (iki_data->variable.used && content.array[i].stop > iki_data->variable.array[iki_data->variable.used - 1].stop) { + range.start = iki_data->variable.array[iki_data->variable.used - 1].stop + 1; + range.stop = content.array[i].stop; + + *status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { - fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true); + fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_partial_append_nulless", F_true); break; } + } - range.start = iki_data.variable.array[iki_data.variable.used - 1].stop + 1; - range.stop = content.array[i].stop; + if (!(content.array[i].start == iki_data->variable.array[0].start && content.array[i].stop == iki_data->variable.array[0].stop && !quotes.array[i]) || !quotes.array[i] || i + 1 == content.used) { + ++data_make->cache_arguments.used; - *status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &arguments->array[arguments->used]); + *status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); if (F_status_is_error(*status)) { - fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_partial_append_nulless", F_true); + fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true); break; } } - - if (!(content.array[i].start == iki_data.variable.array[0].start && content.array[i].stop == iki_data.variable.array[0].stop && !quotes.array[i])) { - ++arguments->used; - } } else { - *status = f_string_dynamic_partial_append_nulless(data_make->buffer, content.array[i], &arguments->array[arguments->used]); + *status = f_string_dynamic_partial_append_nulless(data_make->buffer, content.array[i], &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_partial_append_nulless", F_true); @@ -590,18 +593,22 @@ extern "C" { break; } - ++arguments->used; - } + ++data_make->cache_arguments.used; - f_iki_data_delete(&iki_data); - } // for + *status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); - f_iki_data_delete(&iki_data); + if (F_status_is_error(*status)) { + fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true); + + break; + } + } + } // for } #endif // _di_fake_make_operate_expand_ #ifndef _di_fake_make_operate_expand_build_ - f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) { + f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) { f_status_t status = F_none; f_string_dynamic_t value = f_string_dynamic_t_initialize; @@ -880,16 +887,16 @@ extern "C" { } if (quoted) { - status = f_string_dynamic_append_nulless(value, &arguments->array[arguments->used]); + status = f_string_dynamic_append_nulless(value, &data_make->cache_arguments.array[data_make->cache_arguments.used]); } else { - status = f_string_dynamics_increase_by(fake_default_allocation_small_d, arguments); + status = f_string_dynamics_increase_by(fake_default_allocation_small_d, &data_make->cache_arguments); if (F_status_is_error_not(status)) { - status = f_string_dynamic_append_nulless(value, &arguments->array[arguments->used]); + status = f_string_dynamic_append_nulless(value, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error_not(status)) { - ++arguments->used; + ++data_make->cache_arguments.used; } } } @@ -903,7 +910,7 @@ extern "C" { #endif // _di_fake_make_operate_expand_build_ #ifndef _di_fake_make_operate_expand_context_ - f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) { + f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) { f_status_t status = F_none; const f_string_static_t *context = 0; @@ -943,16 +950,16 @@ extern "C" { if (context) { if (quoted) { - status = f_string_dynamic_append_nulless(*context, &arguments->array[arguments->used]); + status = f_string_dynamic_append_nulless(*context, &data_make->cache_arguments.array[data_make->cache_arguments.used]); } else { - status = f_string_dynamics_increase_by(fake_default_allocation_small_d, arguments); + status = f_string_dynamics_increase_by(fake_default_allocation_small_d, &data_make->cache_arguments); if (F_status_is_error_not(status)) { - status = f_string_dynamic_append_nulless(*context, &arguments->array[arguments->used]); + status = f_string_dynamic_append_nulless(*context, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error_not(status)) { - ++arguments->used; + ++data_make->cache_arguments.used; } } } @@ -965,7 +972,7 @@ extern "C" { #endif // _di_fake_make_operate_expand_context_ #ifndef _di_fake_make_operate_expand_environment_ - f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) { + f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) { f_status_t status = F_none; @@ -985,20 +992,20 @@ extern "C" { if (F_status_is_error(status)) return status; if (status == F_exist_not) return F_false; - status = f_string_dynamics_increase(fake_default_allocation_small_d, arguments); + status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments); if (F_status_is_error_not(status)) { - status = f_string_dynamic_increase_by(data_make->cache_2.used + 1, &arguments->array[arguments->used]); + 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(status)) { - status = f_string_dynamic_append_nulless(data_make->cache_2, &arguments->array[arguments->used]); + 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(status)) return status; if (!quoted) { - ++arguments->used; + ++data_make->cache_arguments.used; } return F_true; @@ -1124,18 +1131,17 @@ extern "C" { }; fake_state_process_t state_process = fake_state_process_t_initialize; - f_string_dynamics_t arguments = f_string_dynamics_t_initialize; int result; f_array_length_t i = 0; f_array_length_t j = 0; for (i = 0; i < section->objects.used; ++i, *status = F_none) { - for (j = 0; j < arguments.size; ++j) { - arguments.array[j].used = 0; + for (j = 0; j < data_make->cache_arguments.size; ++j) { + data_make->cache_arguments.array[j].used = 0; } // for - arguments.used = 0; + data_make->cache_arguments.used = 0; state_process.condition = 0; state_process.condition_result = 0; state_process.operation_previous = state_process.operation; @@ -1175,12 +1181,12 @@ extern "C" { } } - fake_make_operate_expand(data_make, section->name, section->contents.array[i], section->quotess.array[i], &arguments, status); + fake_make_operate_expand(data_make, section->name, section->contents.array[i], section->quotess.array[i], status); fake_make_operate_block_prepare(&state_process); if (state_process.block != fake_state_process_block_done_e && state_process.block != fake_state_process_block_skip_e) { - fake_make_operate_validate(data_make, section->name, arguments, &state_process, section_stack, status); + fake_make_operate_validate(data_make, section->name, &state_process, section_stack, status); } if (F_status_is_error(*status)) { @@ -1195,13 +1201,8 @@ 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, arguments, &state_process, section_stack, status); - - if (*status == F_child) { - f_string_dynamics_resize(0, &arguments); - - return result; - } + result = fake_make_operate_process(data_make, section->name, &state_process, section_stack, status); + if (*status == F_child) return result; } fake_make_operate_block_postprocess(i == section->objects.used, &state_process, status); @@ -1270,11 +1271,7 @@ extern "C" { } } // for - if (F_status_set_error(*status) == F_interrupt) { - f_string_dynamics_resize(0, &arguments); - - return 0; - } + if (F_status_set_error(*status) == F_interrupt) return 0; if (i == section->objects.used && F_status_is_error_not(*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 (data_make->data->main->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { @@ -1310,8 +1307,6 @@ extern "C" { *status = F_status_set_error(F_failure); } - f_string_dynamics_resize(0, &arguments); - --section_stack->used; return 0; diff --git a/level_3/fake/c/private-make-operate.h b/level_3/fake/c/private-make-operate.h index f04136c..f22bb87 100644 --- a/level_3/fake/c/private-make-operate.h +++ b/level_3/fake/c/private-make-operate.h @@ -45,15 +45,13 @@ extern "C" { * The content array. * @param quoteds * The array of quoted associated with the content. - * @param arguments - * The expanded arguments. * @param status * The return status. * * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_ - extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_fss_quotes_t quoteds, f_string_dynamics_t * const arguments, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_fss_quotes_t quoteds, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_ /** @@ -67,8 +65,6 @@ extern "C" { * The quoted associated with the content. * @param range_name * The range representing the variable content name string within the data_make->buffer. - * @param arguments - * The expanded arguments. * * @return * F_true on success and match expanded. @@ -77,7 +73,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_context_ - extern f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_context_ /** @@ -89,8 +85,6 @@ extern "C" { * The quoted associated with the content. * @param range_name * The range representing the variable content name string within the data_make->buffer. - * @param arguments - * The expanded arguments. * * @return * F_true on success and match expanded. @@ -107,7 +101,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fake_make_operate_expand_environment_ - extern f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_environment_ /** @@ -119,8 +113,6 @@ extern "C" { * The quoted associated with the content. * @param range_name * The range representing the variable content name string within the data_make->buffer. - * @param arguments - * The expanded arguments. * * @return * F_true on success and match expanded. @@ -129,7 +121,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_expand_build_ - extern f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_expand_build_ /** diff --git a/level_3/fake/c/private-make-operate_process.c b/level_3/fake/c/private-make-operate_process.c index 7b7c81b..5a6b986 100644 --- a/level_3/fake/c/private-make-operate_process.c +++ b/level_3/fake/c/private-make-operate_process.c @@ -14,12 +14,12 @@ extern "C" { #endif #ifndef _di_fake_make_operate_process_ - int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) { + int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) { if (*status == F_child) return data_make->data->main->child; if (state_process->operation == fake_make_operation_type_index_e) { - const f_status_t result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_indexer, arguments, status); + const f_status_t result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_indexer, data_make->cache_arguments, status); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "fake_execute", F_true); @@ -35,10 +35,10 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_break_e) { - if (!arguments.used || fl_string_dynamic_compare(fake_make_operation_argument_success_s, arguments.array[0]) == F_equal_to) { + 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) { *status = F_signal_abort; } - else if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, arguments.array[0]) == F_equal_to) { + else if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to) { *status = F_status_set_error(F_signal_abort); } else { @@ -49,7 +49,7 @@ extern "C" { flockfile(data_make->main->output.to.stream); fl_print_format("%rBreaking as '", data_make->main->output.to.stream, f_string_eol_s); - fl_print_format("%[%Q%]", data_make->main->output.to.stream, data_make->main->context.set.notable, arguments.used ? arguments.array[0] : fake_make_operation_argument_success_s, data_make->main->context.set.notable); + fl_print_format("%[%Q%]", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->cache_arguments.used ? data_make->cache_arguments.array[0] : fake_make_operation_argument_success_s, data_make->main->context.set.notable); fl_print_format("'.%r", data_make->main->output.to.stream, f_string_eol_s); funlockfile(data_make->main->output.to.stream); @@ -59,7 +59,7 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_build_e) { - *status = fake_build_operate(data_make->data, arguments.used ? &arguments : 0); + *status = fake_build_operate(data_make->data, data_make->cache_arguments.used ? &data_make->cache_arguments : 0); if (F_status_set_fine(*status) == F_interrupt) { return 0; @@ -83,13 +83,13 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_clone_e) { - *status = fake_make_operate_process_type_copy(data_make, arguments, F_true); + *status = fake_make_operate_process_type_copy(data_make, F_true); return 0; } if (state_process->operation == fake_make_operation_type_compile_e) { - const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_compiler, arguments, status); + const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_compiler, data_make->cache_arguments, status); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "fake_execute", F_true); @@ -105,37 +105,37 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_copy_e) { - *status = fake_make_operate_process_type_copy(data_make, arguments, F_false); + *status = fake_make_operate_process_type_copy(data_make, F_false); return 0; } if (state_process->operation == fake_make_operation_type_define_e) { - if (arguments.used > 1) { - *status = f_environment_set(arguments.array[0], arguments.array[1], F_true); + if (data_make->cache_arguments.used > 1) { + *status = f_environment_set(data_make->cache_arguments.array[0], data_make->cache_arguments.array[1], F_true); } else { - *status = f_environment_set(arguments.array[0], f_string_empty_s, F_true); + *status = f_environment_set(data_make->cache_arguments.array[0], f_string_empty_s, F_true); } if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_environment_set", F_true); } else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rDefined environment variable '%[%Q%]'.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, arguments.array[0], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rDefined environment variable '%[%Q%]'.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[0], data_make->main->context.set.notable, f_string_eol_s); } return 0; } if (state_process->operation == fake_make_operation_type_delete_e) { - *status = fake_make_operate_process_type_deletes(data_make, arguments, F_false); + *status = fake_make_operate_process_type_deletes(data_make, F_false); return 0; } if (state_process->operation == fake_make_operation_type_deletes_e) { - *status = fake_make_operate_process_type_deletes(data_make, arguments, F_true); + *status = fake_make_operate_process_type_deletes(data_make, F_true); return 0; } @@ -147,10 +147,10 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_exit_e) { - if (!arguments.used || fl_string_dynamic_compare(fake_make_operation_argument_success_s, arguments.array[0]) == F_equal_to) { + 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) { *status = F_signal_quit; } - else if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, arguments.array[0]) == F_equal_to) { + else if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to) { *status = F_status_set_error(F_signal_quit); // Forcing exit forces fail mode. @@ -168,40 +168,40 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rExiting as '%[%Q%]'.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, arguments.used ? arguments.array[0] : fake_make_operation_argument_success_s, data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rExiting as '%[%Q%]'.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.used ? data_make->cache_arguments.array[0] : fake_make_operation_argument_success_s, data_make->main->context.set.notable, f_string_eol_s); } return 0; } if (state_process->operation == fake_make_operation_type_fail_e) { - fake_make_operate_process_type_fail(data_make, arguments); + fake_make_operate_process_type_fail(data_make); return 0; } if (state_process->operation == fake_make_operation_type_group_e) { - *status = fake_make_operate_process_type_groups(data_make, arguments, F_false); + *status = fake_make_operate_process_type_groups(data_make, F_false); return 0; } if (state_process->operation == fake_make_operation_type_groups_e) { - *status = fake_make_operate_process_type_groups(data_make, arguments, F_true); + *status = fake_make_operate_process_type_groups(data_make, F_true); return 0; } 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) { if (state_process->condition == fake_make_operation_if_type_if_define_e) { - fake_make_operate_process_type_if_define(data_make, arguments, F_false, state_process); + fake_make_operate_process_type_if_define(data_make, F_false, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_equal_e) { state_process->condition_result = fake_condition_result_true_e; - for (f_array_length_t i = 2; i < arguments.used; ++i) { + for (f_array_length_t i = 2; i < data_make->cache_arguments.used; ++i) { - if (fl_string_dynamic_compare(arguments.array[1], arguments.array[i]) == F_equal_to_not) { + if (fl_string_dynamic_compare(data_make->cache_arguments.array[1], data_make->cache_arguments.array[i]) == F_equal_to_not) { state_process->condition_result = fake_condition_result_false_e; break; @@ -214,13 +214,13 @@ extern "C" { f_array_length_t i = 1; f_array_length_t j = 0; - for (; i < arguments.used; ++i) { + for (; i < data_make->cache_arguments.used; ++i) { - for (j = i + 1; j < arguments.used; ++j) { + for (j = i + 1; j < data_make->cache_arguments.used; ++j) { - if (fl_string_dynamic_compare(arguments.array[i], arguments.array[j]) == F_equal_to) { + if (fl_string_dynamic_compare(data_make->cache_arguments.array[i], data_make->cache_arguments.array[j]) == F_equal_to) { state_process->condition_result = fake_condition_result_false_e; - i = arguments.used; + i = data_make->cache_arguments.used; break; } @@ -228,7 +228,7 @@ extern "C" { } // for } else if (state_process->condition == fake_make_operation_if_type_if_exist_e) { - *status = fake_make_operate_process_type_if_exist(data_make, arguments, F_false, state_process); + *status = fake_make_operate_process_type_if_exist(data_make, F_false, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_failure_e) { if (state_process->success) { @@ -239,43 +239,43 @@ extern "C" { } } else 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) { - *status = fake_make_operate_process_type_if_greater_if_lesser(data_make, arguments, state_process); + *status = fake_make_operate_process_type_if_greater_if_lesser(data_make, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_group_e) { - *status = fake_make_operate_process_type_if_group(data_make, arguments, F_false, state_process); + *status = fake_make_operate_process_type_if_group(data_make, F_false, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_is_e) { - *status = fake_make_operate_process_type_if_is(data_make, arguments, F_false, state_process); + *status = fake_make_operate_process_type_if_is(data_make, F_false, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_mode_e) { - *status = fake_make_operate_process_type_if_mode(data_make, arguments, F_false, state_process); + *status = fake_make_operate_process_type_if_mode(data_make, F_false, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_not_define_e) { - fake_make_operate_process_type_if_define(data_make, arguments, F_true, state_process); + fake_make_operate_process_type_if_define(data_make, F_true, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_not_parameter_e) { - fake_make_operate_process_type_if_parameter(data_make, arguments, F_true, state_process); + fake_make_operate_process_type_if_parameter(data_make, F_true, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_not_exist_e) { - *status = fake_make_operate_process_type_if_exist(data_make, arguments, F_true, state_process); + *status = fake_make_operate_process_type_if_exist(data_make, F_true, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_not_group_e) { - *status = fake_make_operate_process_type_if_group(data_make, arguments, F_true, state_process); + *status = fake_make_operate_process_type_if_group(data_make, F_true, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_not_is_e) { - *status = fake_make_operate_process_type_if_is(data_make, arguments, F_true, state_process); + *status = fake_make_operate_process_type_if_is(data_make, F_true, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_not_mode_e) { - *status = fake_make_operate_process_type_if_mode(data_make, arguments, F_true, state_process); + *status = fake_make_operate_process_type_if_mode(data_make, F_true, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_not_owner_e) { - *status = fake_make_operate_process_type_if_owner(data_make, arguments, F_true, state_process); + *status = fake_make_operate_process_type_if_owner(data_make, F_true, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_owner_e) { - *status = fake_make_operate_process_type_if_owner(data_make, arguments, F_false, state_process); + *status = fake_make_operate_process_type_if_owner(data_make, F_false, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_parameter_e) { - fake_make_operate_process_type_if_parameter(data_make, arguments, F_false, state_process); + fake_make_operate_process_type_if_parameter(data_make, F_false, state_process); } else if (state_process->condition == fake_make_operation_if_type_if_success_e) { if (state_process->success) { @@ -309,16 +309,16 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_link_e) { - *status = f_file_link(arguments.array[0], arguments.array[1]); + *status = f_file_link(data_make->cache_arguments.array[0], data_make->cache_arguments.array[1]); if (F_status_is_error(*status)) { - fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_link", F_true, arguments.array[1], f_file_operation_link_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_link", F_true, data_make->cache_arguments.array[1], f_file_operation_link_s, fll_error_file_type_file_e); } else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { flockfile(data_make->main->output.to.stream); - fl_print_format("Created symbolic link from '%[%Q%]", data_make->main->output.to.stream, data_make->main->context.set.notable, arguments.array[1], data_make->main->context.set.notable); - fl_print_format("' to %[%Q%].%r", data_make->main->output.to.stream, data_make->main->context.set.notable, arguments.array[0], data_make->main->context.set.notable, f_string_eol_s); + fl_print_format("Created symbolic link from '%[%Q%]", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->cache_arguments.array[1], data_make->main->context.set.notable); + fl_print_format("' to %[%Q%].%r", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->cache_arguments.array[0], data_make->main->context.set.notable, f_string_eol_s); funlockfile(data_make->main->output.to.stream); } @@ -327,19 +327,19 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_mode_e) { - *status = fake_make_operate_process_type_modes(data_make, arguments, F_false); + *status = fake_make_operate_process_type_modes(data_make, F_false); return 0; } if (state_process->operation == fake_make_operation_type_modes_e) { - *status = fake_make_operate_process_type_modes(data_make, arguments, F_true); + *status = fake_make_operate_process_type_modes(data_make, F_true); return 0; } if (state_process->operation == fake_make_operation_type_move_e) { - *status = fake_make_operate_process_type_move(data_make, arguments); + *status = fake_make_operate_process_type_move(data_make); return 0; } @@ -349,7 +349,7 @@ extern "C" { for (; id_section < data_make->fakefile.used; ++id_section) { - if (fl_string_dynamic_partial_compare_string(arguments.array[0].string, data_make->buffer, arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(data_make->cache_arguments.array[0].string, data_make->buffer, data_make->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) { break; } } // for @@ -372,43 +372,43 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_owner_e) { - *status = fake_make_operate_process_type_owners(data_make, arguments, F_false); + *status = fake_make_operate_process_type_owners(data_make, F_false); return 0; } if (state_process->operation == fake_make_operation_type_owners_e) { - *status = fake_make_operate_process_type_owners(data_make, arguments, F_true); + *status = fake_make_operate_process_type_owners(data_make, F_true); return 0; } if (state_process->operation == fake_make_operation_type_parameter_e) { - *status = fake_make_operate_process_type_parameter(data_make, arguments); + *status = fake_make_operate_process_type_parameter(data_make); return 0; } if (state_process->operation == fake_make_operation_type_pop_e) { - *status = fake_make_operate_process_type_pop(data_make, arguments); + *status = fake_make_operate_process_type_pop(data_make); return 0; } if (state_process->operation == fake_make_operation_type_print_e) { - *status = fake_make_operate_process_type_print(data_make, arguments); + *status = fake_make_operate_process_type_print(data_make); return 0; } if (state_process->operation == fake_make_operation_type_run_e) { - *status = fake_make_operate_process_run(data_make, arguments, F_false); + *status = fake_make_operate_process_run(data_make, F_false); return 0; } if (state_process->operation == fake_make_operation_type_shell_e) { - *status = fake_make_operate_process_run(data_make, arguments, F_true); + *status = fake_make_operate_process_run(data_make, F_true); return 0; } @@ -426,23 +426,23 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_to_e) { - *status = fake_make_operate_process_type_to(data_make, arguments); + *status = fake_make_operate_process_type_to(data_make); return 0; } if (state_process->operation == fake_make_operation_type_top_e) { - *status = fake_make_operate_process_type_top(data_make, arguments); + *status = fake_make_operate_process_type_top(data_make); return 0; } if (state_process->operation == fake_make_operation_type_touch_e) { - *status = fake_make_operate_process_type_touch(data_make, arguments); + *status = fake_make_operate_process_type_touch(data_make); } if (state_process->operation == fake_make_operation_type_write_e) { - *status = fake_make_operate_process_type_write(data_make, arguments); + *status = fake_make_operate_process_type_write(data_make); } return 0; @@ -790,20 +790,20 @@ extern "C" { #endif // _di_fake_make_operate_process_return_ #ifndef _di_fake_make_operate_process_run_ - f_status_t fake_make_operate_process_run(fake_make_data_t * const data_make, const f_string_statics_t arguments, const bool as_shell) { + f_status_t fake_make_operate_process_run(fake_make_data_t * const data_make, const bool as_shell) { f_string_statics_t args = f_string_statics_t_initialize; - if (arguments.used > 1) { - args.array = arguments.array + 1; - args.used = arguments.used - 1; + if (data_make->cache_arguments.used > 1) { + args.array = data_make->cache_arguments.array + 1; + args.used = data_make->cache_arguments.used - 1; args.size = 0; } - else if (!arguments.used) { + else if (!data_make->cache_arguments.used) { return F_data_not; } - return fake_make_operate_process_execute(data_make, arguments.used ? arguments.array[0] : f_string_empty_s, args, as_shell); + return fake_make_operate_process_execute(data_make, data_make->cache_arguments.used ? data_make->cache_arguments.array[0] : f_string_empty_s, args, as_shell); } #endif // _di_fake_make_operate_process_run_ diff --git a/level_3/fake/c/private-make-operate_process.h b/level_3/fake/c/private-make-operate_process.h index 4c57f02..a0b2809 100644 --- a/level_3/fake/c/private-make-operate_process.h +++ b/level_3/fake/c/private-make-operate_process.h @@ -19,8 +19,6 @@ extern "C" { * All make related setting data, including data from the fakefile and the build settings file. * @param section_name * The section name. - * @param arguments - * The expanded arguments. * @param state_process * The operation and if-condition states. * @param section_stack @@ -37,7 +35,7 @@ extern "C" { * This generally is only needed when F_child is returned, where this holds the return status of the child process. */ #ifndef _di_fake_make_operate_process_ - extern int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) F_attribute_visibility_internal_d; + extern int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_ /** @@ -145,8 +143,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the run or shell operation. * @param as_shell * When TRUE, this is a shell operation. * When FALSE, this is a run operation. @@ -159,7 +155,7 @@ extern "C" { * Errors (with error bit) from: fake_make_operate_process_execute(). */ #ifndef _di_fake_make_operate_process_run_ - extern f_status_t fake_make_operate_process_run(fake_make_data_t * const data_make, const f_string_statics_t arguments, const bool as_shell) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_run(fake_make_data_t * const data_make, const bool as_shell) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_run_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-make-operate_process_type.c b/level_3/fake/c/private-make-operate_process_type.c index 63227a3..f16818a 100644 --- a/level_3/fake/c/private-make-operate_process_type.c +++ b/level_3/fake/c/private-make-operate_process_type.c @@ -12,12 +12,12 @@ extern "C" { #endif #ifndef _di_fake_make_operate_process_type_copy_ - f_status_t fake_make_operate_process_type_copy(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool clone) { + f_status_t fake_make_operate_process_type_copy(fake_make_data_t * const data_make, const bool clone) { f_status_t status = F_none; f_status_t status_file = F_none; - const f_array_length_t total = arguments.used - 1; + const f_array_length_t total = data_make->cache_arguments.used - 1; f_string_static_t destination = f_string_static_t_initialize; fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize; @@ -43,17 +43,17 @@ extern "C" { bool existing = F_true; f_array_length_t i = 0; - if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, arguments.array[i]) == F_equal_to) { + if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) { ++i; recurse.flag |= f_file_stat_flag_reference_e; } // In this case, the destination could be a file, so confirm this. - if (arguments.used == 2 + i) { - status = f_directory_is(arguments.array[1]); + if (data_make->cache_arguments.used == 2 + i) { + status = f_directory_is(data_make->cache_arguments.array[1]); if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, data_make->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e); return F_status_set_error(F_failure); } @@ -65,63 +65,63 @@ extern "C" { for (; i < total; ++i) { - destination.used = arguments.array[total].used; + destination.used = data_make->cache_arguments.array[total].used; if (existing) { - destination.used += arguments.array[i].used + 1; + destination.used += data_make->cache_arguments.array[i].used + 1; } f_char_t destination_string[destination.used + 1]; destination.string = destination_string; destination_string[destination.used] = 0; - memcpy(destination_string, arguments.array[total].string, sizeof(f_char_t) * arguments.array[total].used); + memcpy(destination_string, data_make->cache_arguments.array[total].string, sizeof(f_char_t) * data_make->cache_arguments.array[total].used); if (existing) { - memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(f_char_t) * arguments.array[i].used); - destination_string[arguments.array[total].used] = f_path_separator_s.string[0]; + memcpy(destination_string + data_make->cache_arguments.array[total].used + 1, data_make->cache_arguments.array[i].string, sizeof(f_char_t) * data_make->cache_arguments.array[i].used); + destination_string[data_make->cache_arguments.array[total].used] = f_path_separator_s.string[0]; } - status_file = f_directory_is(arguments.array[i]); + status_file = f_directory_is(data_make->cache_arguments.array[i]); if (status_file == F_true) { if (clone) { - status_file = fl_directory_clone(arguments.array[i], destination, recurse); + status_file = fl_directory_clone(data_make->cache_arguments.array[i], destination, recurse); } else { - status_file = fl_directory_copy(arguments.array[i], destination, mode, recurse); + status_file = fl_directory_copy(data_make->cache_arguments.array[i], destination, mode, recurse); } if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "fl_directory_clone" : "fl_directory_copy", F_true, arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "fl_directory_clone" : "fl_directory_copy", F_true, data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e); status = F_status_set_error(F_failure); } } else if (status_file == F_false) { if (clone) { - status_file = f_file_clone(arguments.array[i], destination, recurse.size_block, recurse.flag); + status_file = f_file_clone(data_make->cache_arguments.array[i], destination, recurse.size_block, recurse.flag); } else { - status_file = f_file_copy(arguments.array[i], destination, mode, recurse.size_block, recurse.flag); + status_file = f_file_copy(data_make->cache_arguments.array[i], destination, mode, recurse.size_block, recurse.flag); } if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "f_file_clone" : "f_file_copy", F_true, arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), clone ? "f_file_clone" : "f_file_copy", F_true, data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_file_e); status = F_status_set_error(F_failure); } else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { flockfile(data_make->main->output.to.stream); - fl_print_format("%r%s '%[%Q%]' to '", data_make->main->output.to.stream, f_string_eol_s, clone ? "Cloned" : "Copied", data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable); + fl_print_format("%r%s '%[%Q%]' to '", data_make->main->output.to.stream, f_string_eol_s, clone ? "Cloned" : "Copied", data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable); fl_print_format("%[%Q%]'.%r", data_make->main->output.to.stream, data_make->main->context.set.notable, destination, data_make->main->context.set.notable, f_string_eol_s); funlockfile(data_make->main->output.to.stream); } } else if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[i], f_file_operation_identify_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, data_make->cache_arguments.array[i], f_file_operation_identify_s, fll_error_file_type_directory_e); return F_status_set_error(F_failure); } @@ -134,18 +134,18 @@ extern "C" { #endif // _di_fake_make_operate_process_type_copy_ #ifndef _di_fake_make_operate_process_type_deletes_ - f_status_t fake_make_operate_process_type_deletes(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool all) { + f_status_t fake_make_operate_process_type_deletes(fake_make_data_t * const data_make, const bool all) { f_status_t status = F_none; const int recursion_max = all ? F_directory_descriptors_max_d : 0; struct stat file_stat; - for (f_array_length_t i = 0; i < arguments.used; ++i) { + for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) { memset(&file_stat, 0, sizeof(struct stat)); - status = f_file_stat(arguments.array[i], F_false, &file_stat); + status = f_file_stat(data_make->cache_arguments.array[i], F_false, &file_stat); if (F_status_is_error(status)) { if (F_status_set_fine(status) == F_file_found_not) { @@ -153,7 +153,7 @@ extern "C" { flockfile(data_make->main->warning.to.stream); fl_print_format("%r%[%QThe file '%]", data_make->main->warning.to.stream, data_make->main->warning.prefix, f_string_eol_s); - fl_print_format("%[%Q%]", data_make->main->warning.to.stream, data_make->main->warning.notable, arguments.array[i], data_make->main->warning.notable); + fl_print_format("%[%Q%]", data_make->main->warning.to.stream, data_make->main->warning.notable, data_make->cache_arguments.array[i], data_make->main->warning.notable); fl_print_format("%[' cannot be found.%]%r", data_make->main->warning.to.stream, f_string_eol_s); funlockfile(data_make->main->warning.to.stream); @@ -162,55 +162,55 @@ extern "C" { status = F_none; } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stat", F_true, arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stat", F_true, data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e); return status; } } else if (macro_f_file_type_is_directory(file_stat.st_mode)) { if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - status = f_directory_remove_custom(arguments.array[i], recursion_max, F_false, fake_clean_remove_recursively_verbosely); + status = f_directory_remove_custom(data_make->cache_arguments.array[i], recursion_max, F_false, fake_clean_remove_recursively_verbosely); } else { - status = f_directory_remove(arguments.array[i], recursion_max, F_false); + status = f_directory_remove(data_make->cache_arguments.array[i], recursion_max, F_false); } if (F_status_set_fine(status) == F_file_found_not) { if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rThe directory '%[%Q%]' does not exist.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rThe directory '%[%Q%]' does not exist.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } status = F_none; } if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_remove", F_true, arguments.array[i], f_file_operation_delete_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_remove", F_true, data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_directory_e); return status; } else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rRemoved '%[%Q%]'.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rRemoved '%[%Q%]'.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } } else { - status = f_file_remove(arguments.array[i]); + status = f_file_remove(data_make->cache_arguments.array[i]); if (F_status_set_fine(status) == F_file_found_not) { if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rThe file '%[%Q%]' does not exist.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rThe file '%[%Q%]' does not exist.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } status = F_none; } if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_remove", F_true, arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_remove", F_true, data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e); return status; } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%rRemoved '%[%Q%]'.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("%rRemoved '%[%Q%]'.%r", data_make->main->output.to.stream, f_string_eol_s, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } } } // for @@ -220,9 +220,9 @@ extern "C" { #endif // _di_fake_make_operate_process_type_deletes_ #ifndef _di_fake_make_operate_process_type_fail_ - void fake_make_operate_process_type_fail(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { + void fake_make_operate_process_type_fail(fake_make_data_t * const data_make) { - if (fl_string_dynamic_compare(fake_make_operation_argument_exit_s, arguments.array[0]) == F_equal_to) { + if (fl_string_dynamic_compare(fake_make_operation_argument_exit_s, data_make->cache_arguments.array[0]) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_exit_e; data_make->error.prefix = fl_print_error_s; data_make->error.suffix = f_string_empty_s; @@ -232,7 +232,7 @@ extern "C" { data_make->error.to.id = F_type_descriptor_error_d; data_make->error.set = &data_make->main->context.set; } - else if (fl_string_dynamic_compare(fake_make_operation_argument_warn_s, arguments.array[0]) == F_equal_to) { + else if (fl_string_dynamic_compare(fake_make_operation_argument_warn_s, data_make->cache_arguments.array[0]) == F_equal_to) { data_make->setting_make.fail = fake_make_operation_fail_type_warn_e; data_make->error.prefix = fl_print_warning_s; data_make->error.suffix = f_string_empty_s; @@ -271,7 +271,7 @@ extern "C" { #endif // _di_fake_make_operate_process_type_fail_ #ifndef _di_fake_make_operate_process_type_groups_ - f_status_t fake_make_operate_process_type_groups(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool all) { + f_status_t fake_make_operate_process_type_groups(fake_make_data_t * const data_make, const bool all) { f_status_t status = F_none; f_status_t status_file = F_none; @@ -280,42 +280,42 @@ extern "C" { bool dereference = F_true; f_array_length_t i = 0; - if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, arguments.array[i]) == F_equal_to) { + 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; } - status = fake_make_get_id_group(data_make->data, data_make->error, arguments.array[i++], &id); + status = fake_make_get_id_group(data_make->data, data_make->error, data_make->cache_arguments.array[i++], &id); if (F_status_is_error(status)) return 0; - for (; i < arguments.used; ++i) { + for (; i < data_make->cache_arguments.used; ++i) { - status_file = fake_make_assure_inside_project(data_make, arguments.array[i]); + status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(status_file)) { status = status_file; - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); continue; } if (all) { - status_file = fll_file_role_change_all(arguments.array[i], -1, id, dereference, fake_make_operation_recursion_depth_max_d); + status_file = fll_file_role_change_all(data_make->cache_arguments.array[i], -1, id, dereference, fake_make_operation_recursion_depth_max_d); } else { - status_file = f_file_role_change(arguments.array[i], -1, id, dereference); + status_file = f_file_role_change(data_make->cache_arguments.array[i], -1, id, dereference); } if (F_status_is_error(status_file)) { status = status_file; - fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e); } else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { flockfile(data_make->main->output.to.stream); - fl_print_format("%r group of '%[%r%]", data_make->main->output.to.stream, all ? "Recursively changed" : "Changed", data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable); + fl_print_format("%r group of '%[%r%]", data_make->main->output.to.stream, all ? "Recursively changed" : "Changed", data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable); fl_print_format("' to %[%ul%].%r", data_make->main->output.to.stream, data_make->main->context.set.notable, id, data_make->main->context.set.notable, f_string_eol_s); funlockfile(data_make->main->output.to.stream); @@ -327,15 +327,15 @@ extern "C" { #endif // _di_fake_make_operate_process_type_groups_ #ifndef _di_fake_make_operate_process_type_if_define_ - void fake_make_operate_process_type_if_define(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) { + void fake_make_operate_process_type_if_define(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) { state_process->condition_result = fake_condition_result_true_e; // Multiple properties may pass and so if any of them fail, then they all fail. if (if_not) { - for (f_array_length_t i = 2; i < arguments.used; ++i) { + for (f_array_length_t i = 2; i < data_make->cache_arguments.used; ++i) { - if (f_environment_exists(arguments.array[i]) == F_true) { + if (f_environment_exists(data_make->cache_arguments.array[i]) == F_true) { state_process->condition_result = fake_condition_result_false_e; break; @@ -343,9 +343,9 @@ extern "C" { } // for } else { - for (f_array_length_t i = 1; i < arguments.used; ++i) { + for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i) { - if (f_environment_exists(arguments.array[i]) != F_true) { + if (f_environment_exists(data_make->cache_arguments.array[i]) != F_true) { state_process->condition_result = fake_condition_result_false_e; break; @@ -356,13 +356,13 @@ extern "C" { #endif // _di_fake_make_operate_process_type_if_define_ #ifndef _di_fake_make_operate_process_type_if_exist_ - f_status_t fake_make_operate_process_type_if_exist(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) { + f_status_t fake_make_operate_process_type_if_exist(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) { f_status_t status = F_none; f_array_length_t i = if_not ? 2 : 1; bool dereference = F_true; - if (i == arguments.used) { + if (i == data_make->cache_arguments.used) { if (if_not) { state_process->condition_result = fake_condition_result_true_e; } @@ -375,19 +375,19 @@ extern "C" { state_process->condition_result = fake_condition_result_true_e; - if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, arguments.array[i]) == F_equal_to) { + 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; } - for (; i < arguments.used; ++i) { + for (; i < data_make->cache_arguments.used; ++i) { - status = f_file_exists(arguments.array[i], dereference); + status = f_file_exists(data_make->cache_arguments.array[i], dereference); if (F_status_is_error(status)) { state_process->condition_result = fake_condition_result_error_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_exists", F_true, arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_exists", F_true, data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); break; } @@ -415,7 +415,7 @@ extern "C" { #endif // _di_fake_make_operate_process_type_if_exist_ #ifndef _di_fake_make_operate_process_type_if_is_ - f_status_t fake_make_operate_process_type_if_is(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) { + f_status_t fake_make_operate_process_type_if_is(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) { f_status_t status = F_none; @@ -428,12 +428,12 @@ extern "C" { f_array_length_t i = if_not ? 2 : 1; bool dereference = F_true; - if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, arguments.array[i]) == F_equal_to) { + 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; } - if (i == arguments.used) { + if (i == data_make->cache_arguments.used) { if (if_not) { state_process->condition_result = fake_condition_result_true_e; } @@ -446,33 +446,33 @@ extern "C" { status = F_none; - for (; i < arguments.used; ++i) { + for (; i < data_make->cache_arguments.used; ++i) { - if (fl_string_dynamic_compare(fake_make_operation_argument_if_is_for_s, arguments.array[i]) == F_equal_to) { + if (fl_string_dynamic_compare(fake_make_operation_argument_if_is_for_s, data_make->cache_arguments.array[i]) == F_equal_to) { ++i; break; } - if (fl_string_dynamic_compare(f_file_type_name_block_s, arguments.array[i]) == F_equal_to) { + if (fl_string_dynamic_compare(f_file_type_name_block_s, data_make->cache_arguments.array[i]) == F_equal_to) { type |= 0x1; } - else if (fl_string_dynamic_compare(f_file_type_name_character_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_character_s, data_make->cache_arguments.array[i]) == F_equal_to) { type |= 0x2; } - else if (fl_string_dynamic_compare(f_file_type_name_directory_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_directory_s, data_make->cache_arguments.array[i]) == F_equal_to) { type |= 0x4; } - else if (fl_string_dynamic_compare(f_file_type_name_fifo_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_fifo_s, data_make->cache_arguments.array[i]) == F_equal_to) { type |= 0x8; } - else if (fl_string_dynamic_compare(f_file_type_name_link_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_link_s, data_make->cache_arguments.array[i]) == F_equal_to) { type |= 0x10; } - else if (fl_string_dynamic_compare(f_file_type_name_regular_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_regular_s, data_make->cache_arguments.array[i]) == F_equal_to) { type |= 0x20; } - else if (fl_string_dynamic_compare(f_file_type_name_socket_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_socket_s, data_make->cache_arguments.array[i]) == F_equal_to) { type |= 0x40; } } // for @@ -482,14 +482,14 @@ extern "C" { state_process->condition_result = fake_condition_result_true_e; - for (; i < arguments.used; ++i, mode_file = 0) { + for (; i < data_make->cache_arguments.used; ++i, mode_file = 0) { - status = f_file_mode_read(arguments.array[i], dereference, &mode_file); + status = f_file_mode_read(data_make->cache_arguments.array[i], dereference, &mode_file); if (F_status_is_error(status)) { state_process->condition_result = fake_condition_result_error_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, arguments.array[i], f_file_operation_get_type_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, data_make->cache_arguments.array[i], f_file_operation_get_type_s, fll_error_file_type_file_e); break; } @@ -539,7 +539,7 @@ extern "C" { #endif // _di_fake_make_operate_process_type_if_is_ #ifndef _di_fake_make_operate_process_type_if_greater_if_lesser_ - f_status_t fake_make_operate_process_type_if_greater_if_lesser(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, fake_state_process_t *state_process) { + f_status_t fake_make_operate_process_type_if_greater_if_lesser(fake_make_data_t * const data_make, fake_state_process_t *state_process) { f_status_t status = F_none; @@ -555,12 +555,12 @@ extern "C" { state_process->condition_result = fake_condition_result_true_e; range.start = 0; - range.stop = arguments.array[i].used - 1; + range.stop = data_make->cache_arguments.array[i].used - 1; - if (arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) { + if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) { range.start = 1; } - else if (arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) { + else if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) { range.start = 1; is_negative_left = F_true; } @@ -569,22 +569,22 @@ extern "C" { status = F_status_set_error(F_failure); } else { - status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, arguments.array[i], range, &number_left); + 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(status)) { - for (i = 2; i < arguments.used; ++i, status = F_none, number_left = number_right, is_negative_left = is_negative_right) { + for (i = 2; i < data_make->cache_arguments.used; ++i, status = F_none, number_left = number_right, is_negative_left = is_negative_right) { - if (arguments.array[i].used) { + if (data_make->cache_arguments.array[i].used) { range.start = 0; - range.stop = arguments.array[i].used - 1; + range.stop = data_make->cache_arguments.array[i].used - 1; is_negative_right = F_false; - if (arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) { + if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) { range.start = 1; } - else if (arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) { + else if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) { range.start = 1; is_negative_right = F_true; } @@ -593,7 +593,7 @@ extern "C" { status = F_status_set_error(F_failure); } else { - status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, arguments.array[i], range, &number_right); + status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number_right); } } else { @@ -673,12 +673,12 @@ extern "C" { if ((i == 1 && number_left > F_number_t_size_unsigned_d) || (i > 1 && number_right > F_number_t_size_unsigned_d)) { fl_print_format("%r%[%QThe number '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); fl_print_format("%[' may only be between the ranges -%un to %un.%]%r", data_make->error.to.stream, data_make->error.context, F_number_t_size_unsigned_d, F_number_t_size_unsigned_d, data_make->error.context, f_string_eol_s); } else { fl_print_format("%r%[%QInvalid or unsupported number provided '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, F_number_t_size_unsigned_d, F_number_t_size_unsigned_d, data_make->error.context, f_string_eol_s); } @@ -693,31 +693,31 @@ extern "C" { #endif // _di_fake_make_operate_process_type_if_greater_if_lesser_ #ifndef _di_fake_make_operate_process_type_if_group_ - f_status_t fake_make_operate_process_type_if_group(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) { + f_status_t fake_make_operate_process_type_if_group(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) { f_status_t status = F_none; uid_t id = 0; f_array_length_t i = if_not ? 2 : 1; bool dereference = F_true; - if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, arguments.array[i]) == F_equal_to) { + 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; } - status = fake_make_get_id_group(data_make->data, data_make->error, arguments.array[i++], &id); + status = fake_make_get_id_group(data_make->data, data_make->error, data_make->cache_arguments.array[i++], &id); if (F_status_is_error(status)) return status; state_process->condition_result = fake_condition_result_true_e; - for (uid_t id_file = 0; i < arguments.used; ++i, id_file = 0) { + for (uid_t id_file = 0; i < data_make->cache_arguments.used; ++i, id_file = 0) { - status = f_file_group_read(arguments.array[i], dereference, &id_file); + status = f_file_group_read(data_make->cache_arguments.array[i], dereference, &id_file); if (F_status_is_error(status)) { state_process->condition_result = fake_condition_result_error_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_group_read", F_true, arguments.array[i], f_file_operation_get_group_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_group_read", F_true, data_make->cache_arguments.array[i], f_file_operation_get_group_s, fll_error_file_type_file_e); break; } @@ -745,21 +745,21 @@ extern "C" { #endif // _di_fake_make_operate_process_type_if_group_ #ifndef _di_fake_make_operate_process_type_if_mode_ - f_status_t fake_make_operate_process_type_if_mode(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) { + f_status_t fake_make_operate_process_type_if_mode(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) { f_status_t status = F_none; f_file_mode_t mode_rule = 0; mode_t mode_match = 0; bool is = F_false; - if (fl_string_dynamic_compare(fake_make_operation_argument_is_s, arguments.array[if_not ? 2 : 1]) == F_equal_to) { + if (fl_string_dynamic_compare(fake_make_operation_argument_is_s, data_make->cache_arguments.array[if_not ? 2 : 1]) == F_equal_to) { is = F_true; } { uint8_t mode_replace = 0; - status = fake_make_get_id_mode(data_make->data, data_make->error, arguments.array[if_not ? 3 : 2], &mode_rule, &mode_replace); + status = fake_make_get_id_mode(data_make->data, data_make->error, data_make->cache_arguments.array[if_not ? 3 : 2], &mode_rule, &mode_replace); if (F_status_is_error(status)) { state_process->condition_result = fake_condition_result_error_e; @@ -782,14 +782,14 @@ extern "C" { state_process->condition_result = fake_condition_result_true_e; - for (f_array_length_t i = if_not ? 4 : 3; i < arguments.used; ++i, mode_file = 0) { + for (f_array_length_t i = if_not ? 4 : 3; i < data_make->cache_arguments.used; ++i, mode_file = 0) { - status = f_file_mode_read(arguments.array[i], F_true, &mode_file); + status = f_file_mode_read(data_make->cache_arguments.array[i], F_true, &mode_file); if (F_status_is_error(status)) { state_process->condition_result = fake_condition_result_error_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, arguments.array[i], f_file_operation_get_mode_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, data_make->cache_arguments.array[i], f_file_operation_get_mode_s, fll_error_file_type_file_e); break; } @@ -833,31 +833,31 @@ extern "C" { #endif // _di_fake_make_operate_process_type_if_mode_ #ifndef _di_fake_make_operate_process_type_if_owner_ - f_status_t fake_make_operate_process_type_if_owner(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) { + f_status_t fake_make_operate_process_type_if_owner(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) { f_status_t status = F_none; uid_t id = 0; f_array_length_t i = if_not ? 2 : 1; bool dereference = F_true; - if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, arguments.array[i]) == F_equal_to) { + 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; } - status = fake_make_get_id_owner(data_make->data, data_make->error, arguments.array[i++], &id); + status = fake_make_get_id_owner(data_make->data, data_make->error, data_make->cache_arguments.array[i++], &id); if (F_status_is_error(status)) return status; state_process->condition_result = fake_condition_result_true_e; - for (uid_t id_file = 0; i < arguments.used; ++i, id_file = 0) { + for (uid_t id_file = 0; i < data_make->cache_arguments.used; ++i, id_file = 0) { - status = f_file_owner_read(arguments.array[i], dereference, &id_file); + status = f_file_owner_read(data_make->cache_arguments.array[i], dereference, &id_file); if (F_status_is_error(status)) { state_process->condition_result = fake_condition_result_error_e; - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_owner_read", F_true, arguments.array[i], f_file_operation_get_owner_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_owner_read", F_true, data_make->cache_arguments.array[i], f_file_operation_get_owner_s, fll_error_file_type_file_e); break; } @@ -885,7 +885,7 @@ extern "C" { #endif // _di_fake_make_operate_process_type_if_owner_ #ifndef _di_fake_make_operate_process_type_if_parameter_ - void fake_make_operate_process_type_if_parameter(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) { + void fake_make_operate_process_type_if_parameter(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) { const f_string_static_t reserved_name[] = { fake_make_parameter_variable_build_s, @@ -968,11 +968,11 @@ extern "C" { state_process->condition_result = fake_condition_result_true_e; // Multiple properties may pass and so if any of them fail, then they all fail. - for (; i < arguments.used && !result; ++i) { + for (; i < data_make->cache_arguments.used && !result; ++i) { for (j = 0; j < 33; ++j) { - if (fl_string_dynamic_compare(reserved_name[j], arguments.array[i]) == F_equal_to) { + if (fl_string_dynamic_compare(reserved_name[j], data_make->cache_arguments.array[i]) == F_equal_to) { result = reserved_parameter[j] ? 2 : 1; break; @@ -982,7 +982,7 @@ extern "C" { if (!result) { for (j = 0; j < data_make->setting_make.parameter.used; ++j) { - if (fl_string_dynamic_compare(arguments.array[i], data_make->setting_make.parameter.array[j].name) == F_equal_to) { + if (fl_string_dynamic_compare(data_make->cache_arguments.array[i], data_make->setting_make.parameter.array[j].name) == F_equal_to) { result = 2; break; @@ -994,7 +994,7 @@ extern "C" { } } - if (result == 2 && i + 1 < arguments.used) { + if (result == 2 && i + 1 < data_make->cache_arguments.used) { result = 0; } } // for @@ -1017,25 +1017,25 @@ extern "C" { #endif // _di_fake_make_operate_process_type_if_parameter_ #ifndef _di_fake_make_operate_process_type_modes_ - f_status_t fake_make_operate_process_type_modes(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool all) { + f_status_t fake_make_operate_process_type_modes(fake_make_data_t * const data_make, const bool all) { f_status_t status = F_none; f_file_mode_t mode_rule = 0; uint8_t replace = 0; - status = fake_make_get_id_mode(data_make->data, data_make->error, arguments.array[0], &mode_rule, &replace); + status = fake_make_get_id_mode(data_make->data, data_make->error, data_make->cache_arguments.array[0], &mode_rule, &replace); if (F_status_is_error(status)) return 0; mode_t mode = 0; mode_t mode_file = 0; - for (f_array_length_t i = 1; i < arguments.used; ++i, mode = 0) { + for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i, mode = 0) { - status = f_file_mode_read(arguments.array[i], F_true, &mode_file); + status = f_file_mode_read(data_make->cache_arguments.array[i], F_true, &mode_file); if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_read", F_true, data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e); break; } @@ -1043,26 +1043,26 @@ extern "C" { status = f_file_mode_determine(mode_file, mode_rule, replace, macro_f_file_type_is_directory(mode_file), &mode); if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_determine", F_true, arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_mode_determine", F_true, data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e); break; } if (all) { - status = fll_file_mode_set_all(arguments.array[i], F_true, mode, fake_make_operation_recursion_depth_max_d); + status = fll_file_mode_set_all(data_make->cache_arguments.array[i], F_true, mode, fake_make_operation_recursion_depth_max_d); } else { - status = f_file_mode_set(arguments.array[i], mode); + status = f_file_mode_set(data_make->cache_arguments.array[i], mode); } if (F_status_is_error(status)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_mode_set_all" : "f_file_mode_set", F_true, arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_mode_set_all" : "f_file_mode_set", F_true, data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e); break; } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Changed mode of '%Q' to %#@u.%r", data_make->main->output.to.stream, arguments.array[i], mode, f_string_eol_s); + fll_print_format("Changed mode of '%Q' to %#@u.%r", data_make->main->output.to.stream, data_make->cache_arguments.array[i], mode, f_string_eol_s); } } // for @@ -1073,12 +1073,12 @@ extern "C" { #endif // _di_fake_make_operate_process_type_modes_ #ifndef _di_fake_make_operate_process_type_move_ - f_status_t fake_make_operate_process_type_move(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { + f_status_t fake_make_operate_process_type_move(fake_make_data_t * const data_make) { f_status_t status = F_none; f_status_t status_file = F_none; - const f_array_length_t total = arguments.used -1; + const f_array_length_t total = data_make->cache_arguments.used -1; fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize; @@ -1092,11 +1092,11 @@ extern "C" { bool existing = F_true; // In this case, the destination could be a file, so confirm this. - if (arguments.used == 2) { - status_file = f_directory_is(arguments.array[1]); + if (data_make->cache_arguments.used == 2) { + status_file = f_directory_is(data_make->cache_arguments.array[1]); if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_is", F_true, data_make->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e); return F_status_set_error(F_failure); } @@ -1108,27 +1108,27 @@ extern "C" { for (f_array_length_t i = 0; i < total; ++i) { - destination.used = arguments.array[total].used; + destination.used = data_make->cache_arguments.array[total].used; if (existing) { - destination.used += arguments.array[i].used + 1; + destination.used += data_make->cache_arguments.array[i].used + 1; } f_char_t destination_string[destination.used + 1]; destination.string = destination_string; destination_string[destination.used] = 0; - memcpy(destination_string, arguments.array[total].string, sizeof(f_char_t) * arguments.array[total].used); + memcpy(destination_string, data_make->cache_arguments.array[total].string, sizeof(f_char_t) * data_make->cache_arguments.array[total].used); if (existing) { - memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(f_char_t) * arguments.array[i].used); - destination_string[arguments.array[total].used] = f_path_separator_s.string[0]; + memcpy(destination_string + data_make->cache_arguments.array[total].used + 1, data_make->cache_arguments.array[i].string, sizeof(f_char_t) * data_make->cache_arguments.array[i].used); + destination_string[data_make->cache_arguments.array[total].used] = f_path_separator_s.string[0]; } - status_file = fll_file_move(arguments.array[i], destination, recurse); + status_file = fll_file_move(data_make->cache_arguments.array[i], destination, recurse); if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "fll_file_move", F_true, arguments.array[i], f_file_operation_move_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "fll_file_move", F_true, data_make->cache_arguments.array[i], f_file_operation_move_s, fll_error_file_type_directory_e); status = F_status_set_error(F_failure); } @@ -1141,49 +1141,49 @@ extern "C" { #endif // _di_fake_make_operate_process_type_move_ #ifndef _di_fake_make_operate_process_type_owners_ - f_status_t fake_make_operate_process_type_owners(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool all) { + f_status_t fake_make_operate_process_type_owners(fake_make_data_t * const data_make, const bool all) { f_status_t status = F_none; uid_t id = 0; bool dereference = F_true; f_array_length_t i = 0; - if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, arguments.array[i]) == F_equal_to) { + 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; } - status = fake_make_get_id_owner(data_make->data, data_make->error, arguments.array[i++], &id); + status = fake_make_get_id_owner(data_make->data, data_make->error, data_make->cache_arguments.array[i++], &id); if (F_status_is_error(status)) return status; f_status_t status_file = F_none; - for (; i < arguments.used; ++i) { + for (; i < data_make->cache_arguments.used; ++i) { - status_file = fake_make_assure_inside_project(data_make, arguments.array[i]); + status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(status_file)) { status = status_file; - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); continue; } if (all) { - status_file = fll_file_role_change_all(arguments.array[i], id, -1, dereference, fake_make_operation_recursion_depth_max_d); + status_file = fll_file_role_change_all(data_make->cache_arguments.array[i], id, -1, dereference, fake_make_operation_recursion_depth_max_d); } else { - status_file = f_file_role_change(arguments.array[i], id, -1, dereference); + status_file = f_file_role_change(data_make->cache_arguments.array[i], id, -1, dereference); } if (F_status_is_error(status_file)) { status = status_file; - fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, arguments.array[i], f_file_operation_change_owner_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), all ? "fll_file_role_change_all" : "f_file_role_change", F_true, data_make->cache_arguments.array[i], f_file_operation_change_owner_s, fll_error_file_type_file_e); } else if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("%s owner of '%Q' to %u.%r", data_make->main->output.to.stream, all ? "Recursively changed" : "Changed", arguments.array[i], id, f_string_eol_s); + fll_print_format("%s owner of '%Q' to %u.%r", data_make->main->output.to.stream, all ? "Recursively changed" : "Changed", data_make->cache_arguments.array[i], id, f_string_eol_s); } } // for @@ -1194,7 +1194,7 @@ extern "C" { #endif // _di_fake_make_operate_process_type_owners_ #ifndef _di_fake_make_operate_process_type_parameter_ - f_status_t fake_make_operate_process_type_parameter(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { + f_status_t fake_make_operate_process_type_parameter(fake_make_data_t * const data_make) { f_status_t status = F_none; @@ -1203,7 +1203,7 @@ extern "C" { for (; i < data_make->setting_make.parameter.used; ++i) { - if (fl_string_dynamic_compare(arguments.array[0], data_make->setting_make.parameter.array[i].name) == F_equal_to) { + if (fl_string_dynamic_compare(data_make->cache_arguments.array[0], data_make->setting_make.parameter.array[i].name) == F_equal_to) { found = F_true; break; @@ -1241,7 +1241,7 @@ extern "C" { return status; } - status = f_string_dynamic_append_nulless(arguments.array[0], &data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name); + status = f_string_dynamic_append_nulless(data_make->cache_arguments.array[0], &data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name); if (F_status_is_error(status)) { fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true); @@ -1254,8 +1254,8 @@ extern "C" { data_make->setting_make.parameter.array[i].value.used = 0; - if (arguments.used > 1) { - status = f_string_dynamics_resize(arguments.used - 1, &data_make->setting_make.parameter.array[i].value); + if (data_make->cache_arguments.used > 1) { + status = f_string_dynamics_resize(data_make->cache_arguments.used - 1, &data_make->setting_make.parameter.array[i].value); if (F_status_is_error(status)) { fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamics_resize", F_true); @@ -1265,7 +1265,7 @@ extern "C" { for (f_array_length_t j = 0; j < data_make->setting_make.parameter.array[i].value.size; ++j) { - status = f_string_dynamic_append_nulless(arguments.array[j + 1], &data_make->setting_make.parameter.array[i].value.array[j]); + status = f_string_dynamic_append_nulless(data_make->cache_arguments.array[j + 1], &data_make->setting_make.parameter.array[i].value.array[j]); if (F_status_is_error(status)) { fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true); @@ -1282,7 +1282,7 @@ extern "C" { #endif // _di_fake_make_operate_process_type_parameter_ #ifndef _di_fake_make_operate_process_type_pop_ - f_status_t fake_make_operate_process_type_pop(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { + f_status_t fake_make_operate_process_type_pop(fake_make_data_t * const data_make) { f_status_t status = F_none; @@ -1309,7 +1309,7 @@ extern "C" { fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to.stream, data_make->main->context.set.notable, argument, data_make->main->context.set.notable, f_string_eol_s); } else { - fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->path_cache, data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->cache_path, data_make->main->context.set.notable, f_string_eol_s); } } @@ -1318,7 +1318,7 @@ extern "C" { #endif // _di_fake_make_operate_process_type_pop_ #ifndef _di_fake_make_operate_process_type_print_ - f_status_t fake_make_operate_process_type_print(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { + f_status_t fake_make_operate_process_type_print(fake_make_data_t * const data_make) { f_status_t status = F_none; @@ -1329,10 +1329,10 @@ extern "C" { // Pre-allocate the cache to reduce allocations. { - f_array_length_t total = arguments.used; + f_array_length_t total = data_make->cache_arguments.used; - for (; i < arguments.used; ++i) { - total += arguments.array[i].used; + for (; i < data_make->cache_arguments.used; ++i) { + total += data_make->cache_arguments.array[i].used; } // for status = f_string_dynamic_increase_by(total, &data_make->cache_1); @@ -1344,32 +1344,24 @@ extern "C" { } } - for (i = 0; i < arguments.used; ++i) { + for (i = 0; i < data_make->cache_arguments.used; ++i) { - status = fake_make_operate_process_buffer_escape(data_make, arguments.array[i], &data_make->cache_1); - - if (F_status_is_error(status)) { - fll_error_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true); - - return status; - } - - if (i + 1 < arguments.used) { - status = f_string_dynamic_increase_by(1, &data_make->cache_1); + if (i) { + status = f_string_dynamic_append(f_string_space_s, &data_make->cache_1); if (F_status_is_error(status)) { - fll_error_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true); + fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); return status; } + } - status = f_string_dynamic_append(f_string_space_s, &data_make->cache_1); + status = fake_make_operate_process_buffer_escape(data_make, data_make->cache_arguments.array[i], &data_make->cache_1); - if (F_status_is_error(status)) { - fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); + if (F_status_is_error(status)) { + fll_error_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true); - return status; - } + return status; } } // for } @@ -1377,7 +1369,6 @@ extern "C" { flockfile(data_make->main->output.to.stream); fll_print_dynamic_raw(data_make->cache_1, data_make->main->output.to.stream); - fll_print_dynamic_raw(f_string_space_s, data_make->main->output.to.stream); fll_print_dynamic_raw(f_string_eol_s, data_make->main->output.to.stream); funlockfile(data_make->main->output.to.stream); @@ -1387,14 +1378,14 @@ extern "C" { #endif // _di_fake_make_operate_process_type_print_ #ifndef _di_fake_make_operate_process_type_to_ - f_status_t fake_make_operate_process_type_to(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { + f_status_t fake_make_operate_process_type_to(fake_make_data_t * const data_make) { f_status_t status = F_none; - status = fake_make_assure_inside_project(data_make, arguments.array[0]); + status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]); if (F_status_is_error(status)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[0]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]); if (F_status_set_fine(status) == F_false) { status = F_status_set_error(F_failure); @@ -1403,10 +1394,10 @@ extern "C" { return status; } - status = f_path_change(arguments.array[0]); + status = f_path_change(data_make->cache_arguments.array[0]); if (F_status_is_error(status)) { - fake_print_message_section_operation_path_stack_max(data_make->data, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0]); + fake_print_message_section_operation_path_stack_max(data_make->data, data_make->error, F_status_set_fine(status), "f_path_change", data_make->cache_arguments.array[0]); } else { status = f_string_dynamics_increase_by(fake_default_allocation_small_d, &data_make->path.stack); @@ -1424,9 +1415,9 @@ extern "C" { } // Copy the entire real path, including the trailing NULL. - ++data_make->path_cache.used; + ++data_make->cache_path.used; - status = f_string_dynamic_append_nulless(data_make->path_cache, &data_make->path.stack.array[data_make->path.stack.used]); + status = f_string_dynamic_append_nulless(data_make->cache_path, &data_make->path.stack.array[data_make->path.stack.used]); if (F_status_is_error(status)) { fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true); @@ -1443,7 +1434,7 @@ extern "C" { fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->path.stack.array[data_make->path.stack.used], data_make->main->context.set.notable, f_string_eol_s); } else { - fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->path_cache, data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("Changed to project path '%[%Q%]'.%r", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->cache_path, data_make->main->context.set.notable, f_string_eol_s); } } @@ -1455,7 +1446,7 @@ extern "C" { #endif // _di_fake_make_operate_process_type_to_ #ifndef _di_fake_make_operate_process_type_top_ - f_status_t fake_make_operate_process_type_top(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { + f_status_t fake_make_operate_process_type_top(fake_make_data_t * const data_make) { { f_status_t status = F_none; @@ -1463,7 +1454,7 @@ extern "C" { status = f_path_change_at(data_make->path.top.id); if (F_status_is_error(status)) { - fake_print_message_section_operation_path_stack_max(data_make->data, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0]); + fake_print_message_section_operation_path_stack_max(data_make->data, data_make->error, F_status_set_fine(status), "f_path_change", data_make->cache_arguments.array[0]); return status; } @@ -1485,38 +1476,38 @@ extern "C" { #endif // _di_fake_make_operate_process_type_top_ #ifndef _di_fake_make_operate_process_type_touch_ - f_status_t fake_make_operate_process_type_touch(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { + f_status_t fake_make_operate_process_type_touch(fake_make_data_t * const data_make) { f_status_t status = F_none; f_mode_t mode = f_mode_t_initialize; macro_f_mode_t_set_default_umask(mode, data_make->main->umask); - for (f_array_length_t i = 1; i < arguments.used; ++i) { + for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i) { - if (fl_string_dynamic_compare(fake_make_operation_argument_file_s, arguments.array[0]) == F_equal_to) { - status = f_file_touch(arguments.array[i], mode.regular, F_false); + if (fl_string_dynamic_compare(fake_make_operation_argument_file_s, data_make->cache_arguments.array[0]) == F_equal_to) { + status = f_file_touch(data_make->cache_arguments.array[i], mode.regular, F_false); if (F_status_is_error(status)) { - if (F_status_is_error_not(fll_path_canonical(arguments.array[i], &data_make->path_cache))) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, data_make->path_cache, f_file_operation_touch_s, fll_error_file_type_file_e); + if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) { + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_file_e); } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, arguments.array[i], f_file_operation_touch_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_touch", F_true, data_make->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_file_e); } break; } } - else if (fl_string_dynamic_compare(fake_make_operation_argument_directory_s, arguments.array[0]) == F_equal_to) { - status = f_directory_touch(arguments.array[i], mode.directory); + else if (fl_string_dynamic_compare(fake_make_operation_argument_directory_s, data_make->cache_arguments.array[0]) == F_equal_to) { + status = f_directory_touch(data_make->cache_arguments.array[i], mode.directory); if (F_status_is_error(status)) { - if (F_status_is_error_not(fll_path_canonical(arguments.array[i], &data_make->path_cache))) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, data_make->path_cache, f_file_operation_touch_s, fll_error_file_type_directory_e); + if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) { + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_directory_e); } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, arguments.array[i], f_file_operation_touch_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_directory_touch", F_true, data_make->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_directory_e); } break; @@ -1524,7 +1515,7 @@ extern "C" { } if (data_make->main->error.verbosity >= f_console_verbosity_verbose_e) { - fll_print_format("Touched '%[%Q%]'.%r", data_make->main->output.to.stream, data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); + fll_print_format("Touched '%[%Q%]'.%r", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->cache_arguments.array[i], data_make->main->context.set.notable, f_string_eol_s); } } // for @@ -1535,29 +1526,29 @@ extern "C" { #endif // _di_fake_make_operate_process_type_touch_ #ifndef _di_fake_make_operate_process_type_write_ - f_status_t fake_make_operate_process_type_write(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) { + f_status_t fake_make_operate_process_type_write(fake_make_data_t * const data_make) { f_status_t status = F_none; f_file_t file = f_file_t_initialize; - status = f_file_exists(arguments.array[0], F_true); + status = f_file_exists(data_make->cache_arguments.array[0], F_true); - if (arguments.used == 1 || status == F_false) { - status = f_file_stream_open(arguments.array[0], f_file_open_mode_truncate_s, &file); + if (data_make->cache_arguments.used == 1 || status == F_false) { + status = f_file_stream_open(data_make->cache_arguments.array[0], f_file_open_mode_truncate_s, &file); if (F_status_is_error(status)) { - if (F_status_is_error_not(fll_path_canonical(arguments.array[0], &data_make->path_cache))) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->path_cache, f_file_operation_open_s, fll_error_file_type_file_e); + if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) { + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e); } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e); } } if (F_status_is_error_not(status)) { // Keep the stream open if there is a string to write to it. - if (arguments.used > 1) { + if (data_make->cache_arguments.used > 1) { status = F_false; } else { @@ -1566,33 +1557,33 @@ extern "C" { } } - if (F_status_is_error_not(status) && arguments.used > 1) { + if (F_status_is_error_not(status) && data_make->cache_arguments.used > 1) { if (status != F_false) { - status = f_file_stream_open(arguments.array[0], f_file_open_mode_append_s, &file); + status = f_file_stream_open(data_make->cache_arguments.array[0], f_file_open_mode_append_s, &file); if (F_status_is_error(status)) { - if (F_status_is_error_not(fll_path_canonical(arguments.array[0], &data_make->path_cache))) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->path_cache, f_file_operation_open_s, fll_error_file_type_file_e); + if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) { + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e); } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_open", F_true, data_make->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e); } } } if (F_status_is_error_not(status)) { - for (f_array_length_t i = 1; i < arguments.used; ++i) { + for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i) { data_make->cache_1.used = 0; - status = fake_make_operate_process_buffer_escape(data_make, arguments.array[i], &data_make->cache_1); + status = fake_make_operate_process_buffer_escape(data_make, data_make->cache_arguments.array[i], &data_make->cache_1); if (F_status_is_error(status)) { - if (F_status_is_error_not(fll_path_canonical(arguments.array[0], &data_make->path_cache))) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "fake_make_operate_process_buffer_escape", F_true, data_make->path_cache, f_file_operation_write_s, fll_error_file_type_file_e); + if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) { + fll_error_file_print(data_make->error, F_status_set_fine(status), "fake_make_operate_process_buffer_escape", F_true, data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e); } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "fake_make_operate_process_buffer_escape", F_true, arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "fake_make_operate_process_buffer_escape", F_true, data_make->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e); } break; @@ -1601,17 +1592,17 @@ extern "C" { status = f_file_stream_write(file, data_make->cache_1, 0); if (F_status_is_error(status)) { - if (F_status_is_error_not(fll_path_canonical(arguments.array[0], &data_make->path_cache))) { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_write", F_true, data_make->path_cache, f_file_operation_write_s, fll_error_file_type_file_e); + if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) { + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_write", F_true, data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e); } else { - fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_write", F_true, arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_stream_write", F_true, data_make->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e); } break; } - if (i + 1 < arguments.used) { + if (i + 1 < data_make->cache_arguments.used) { status = f_file_stream_write(file, f_string_ascii_space_s, 0); } } // for diff --git a/level_3/fake/c/private-make-operate_process_type.h b/level_3/fake/c/private-make-operate_process_type.h index 2e6661e..a6acf49 100644 --- a/level_3/fake/c/private-make-operate_process_type.h +++ b/level_3/fake/c/private-make-operate_process_type.h @@ -17,8 +17,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param clone * If TRUE, perform a copy that is a clone (preserved timestamps, roles, and permissions). * If FALSE, perforrm a normaly copy without preserving properties. @@ -39,7 +37,7 @@ extern "C" { * @see fl_directory_copy() */ #ifndef _di_fake_make_operate_process_type_copy_ - extern f_status_t fake_make_operate_process_type_copy(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool clone) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_copy(fake_make_data_t * const data_make, const bool clone) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_copy_ /** @@ -47,8 +45,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param all * If TRUE, then if the path is a directory, then recursively apply to all paths within the directory. * If FALSE, then only apply to the given path. @@ -67,7 +63,7 @@ extern "C" { * @see f_directory_remove_custom() */ #ifndef _di_fake_make_operate_process_type_deletes_ - extern f_status_t fake_make_operate_process_type_deletes(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool all) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_deletes(fake_make_data_t * const data_make, const bool all) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_deletes_ /** @@ -75,11 +71,9 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. */ #ifndef _di_fake_make_operate_process_type_fail_ - extern void fake_make_operate_process_type_fail(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; + extern void fake_make_operate_process_type_fail(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_fail_ /** @@ -87,8 +81,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param all * If TRUE, then if the path is a directory, then recursively apply to all paths within the directory. * If FALSE, then only apply to the given path. @@ -109,7 +101,7 @@ extern "C" { * @see fake_make_get_id_group() */ #ifndef _di_fake_make_operate_process_type_groups_ - extern f_status_t fake_make_operate_process_type_groups(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool all) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_groups(fake_make_data_t * const data_make, const bool all) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_groups_ /** @@ -117,8 +109,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param if_not * When TRUE, perform the if not is. * When FALSE, perform the if is. @@ -126,7 +116,7 @@ extern "C" { * The operation process state. */ #ifndef _di_fake_make_operate_process_type_if_define_ - extern void fake_make_operate_process_type_if_define(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern void fake_make_operate_process_type_if_define(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_if_define_ /** @@ -137,8 +127,6 @@ extern "C" { * @param if_not * When TRUE, perform the if not is. * When FALSE, perform the if is. - * @param arguments - * The arguments for the operation. * @param state_process * The operation process state. * @@ -150,7 +138,7 @@ extern "C" { * @see f_file_exists() */ #ifndef _di_fake_make_operate_process_type_if_exist_ - extern f_status_t fake_make_operate_process_type_if_exist(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_exist(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_if_exist_ /** @@ -158,8 +146,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param state_process * The operation process state. * @@ -171,7 +157,7 @@ extern "C" { * @see fl_conversion_dynamic_partial_to_unsigned_detect() */ #ifndef _di_fake_make_operate_process_type_if_greater_if_lesser_ - extern f_status_t fake_make_operate_process_type_if_greater_if_lesser(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_greater_if_lesser(fake_make_data_t * const data_make, fake_state_process_t *state_process) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_if_greater_if_lesser_ /** @@ -179,8 +165,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param if_not * When TRUE, perform the if not is. * When FALSE, perform the if is. @@ -199,7 +183,7 @@ extern "C" { * @see fake_make_get_id_group() */ #ifndef _di_fake_make_operate_process_type_if_group_ - extern f_status_t fake_make_operate_process_type_if_group(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_group(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_if_group_ /** @@ -207,8 +191,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param if_not * When TRUE, perform the if not is. * When FALSE, perform the if is. @@ -223,7 +205,7 @@ extern "C" { * @see f_file_mode_read() */ #ifndef _di_fake_make_operate_process_type_if_is_ - extern f_status_t fake_make_operate_process_type_if_is(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_is(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_if_is_ /** @@ -231,8 +213,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param if_not * When TRUE, perform the if not is. * When FALSE, perform the if is. @@ -253,7 +233,7 @@ extern "C" { * @see fake_make_get_id_mode() */ #ifndef _di_fake_make_operate_process_type_if_mode_ - extern f_status_t fake_make_operate_process_type_if_mode(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_mode(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_if_mode_ /** @@ -261,8 +241,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param if_not * When TRUE, perform the if not is. * When FALSE, perform the if is. @@ -281,7 +259,7 @@ extern "C" { * @see fake_make_get_id_owner() */ #ifndef _di_fake_make_operate_process_type_if_owner_ - extern f_status_t fake_make_operate_process_type_if_owner(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_if_owner(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_if_owner_ /** @@ -289,8 +267,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param if_not * When TRUE, perform the if not is. * When FALSE, perform the if is. @@ -298,7 +274,7 @@ extern "C" { * The operation process state. */ #ifndef _di_fake_make_operate_process_type_if_parameter_ - extern void fake_make_operate_process_type_if_parameter(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; + extern void fake_make_operate_process_type_if_parameter(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_if_parameter_ /** @@ -306,8 +282,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param all * If TRUE, then if the path is a directory, then recursively apply to all paths within the directory. * If FALSE, then only apply to the given path. @@ -328,7 +302,7 @@ extern "C" { * @see fake_make_get_id_mode() */ #ifndef _di_fake_make_operate_process_type_modes_ - extern f_status_t fake_make_operate_process_type_modes(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool all) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_modes(fake_make_data_t * const data_make, const bool all) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_modes_ /** @@ -336,8 +310,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * * @return * F_none on success. @@ -349,7 +321,7 @@ extern "C" { * @see fll_file_move() */ #ifndef _di_fake_make_operate_process_type_move_ - extern f_status_t fake_make_operate_process_type_move(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_move(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_move_ /** @@ -357,8 +329,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * @param all * If TRUE, then if the path is a directory, then recursively apply to all paths within the directory. * If FALSE, then only apply to the given path. @@ -379,7 +349,7 @@ extern "C" { * @see fake_make_get_id_owner() */ #ifndef _di_fake_make_operate_process_type_owners_ - extern f_status_t fake_make_operate_process_type_owners(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool all) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_owners(fake_make_data_t * const data_make, const bool all) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_owners_ /** @@ -387,8 +357,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * * @return * F_none on success. @@ -402,7 +370,7 @@ extern "C" { * @see f_string_map_multis_resize() */ #ifndef _di_fake_make_operate_process_type_parameter_ - extern f_status_t fake_make_operate_process_type_parameter(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_parameter(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_parameter_ /** @@ -413,8 +381,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * * @return * F_none on success. @@ -428,7 +394,7 @@ extern "C" { * @see fake_make_path_relative() */ #ifndef _di_fake_make_operate_process_type_pop_ - extern f_status_t fake_make_operate_process_type_pop(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_pop(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_pop_ /** @@ -452,7 +418,7 @@ extern "C" { * @see f_string_dynamic_increase_by() */ #ifndef _di_fake_make_operate_process_type_print_ - extern f_status_t fake_make_operate_process_type_print(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_print(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_print_ /** @@ -460,8 +426,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * * @return * F_none on success. @@ -480,7 +444,7 @@ extern "C" { * @see fake_make_path_relative() */ #ifndef _di_fake_make_operate_process_type_to_ - extern f_status_t fake_make_operate_process_type_to(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_to(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_to_ /** @@ -488,8 +452,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * * @return * F_none on success. @@ -501,7 +463,7 @@ extern "C" { * @see f_string_dynamic_resize() */ #ifndef _di_fake_make_operate_process_type_top_ - extern f_status_t fake_make_operate_process_type_top(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_top(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_top_ /** @@ -509,8 +471,6 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * @param arguments - * The arguments for the operation. * * @return * F_none on success. @@ -522,7 +482,7 @@ extern "C" { * @see f_file_touch() */ #ifndef _di_fake_make_operate_process_type_touch_ - extern f_status_t fake_make_operate_process_type_touch(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_touch(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_touch_ /** @@ -531,8 +491,6 @@ extern "C" { * @param data_make * All make related setting data, including data from the fakefile and the build settings file. * This resets and uses data_make.cache_1. - * @param arguments - * The arguments for the operation. * * @return * F_none on success. @@ -546,7 +504,7 @@ extern "C" { * @see f_file_stream_write() */ #ifndef _di_fake_make_operate_process_type_write_ - extern f_status_t fake_make_operate_process_type_write(fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d; + extern f_status_t fake_make_operate_process_type_write(fake_make_data_t * const data_make) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_process_type_write_ #ifdef __cplusplus diff --git a/level_3/fake/c/private-make-operate_validate.c b/level_3/fake/c/private-make-operate_validate.c index daf13a3..be2dee0 100644 --- a/level_3/fake/c/private-make-operate_validate.c +++ b/level_3/fake/c/private-make-operate_validate.c @@ -9,12 +9,12 @@ 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, const f_string_dynamics_t arguments, 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, f_status_t * const status) { if (F_status_is_error(*status)) return; if (state_process->operation == fake_make_operation_type_index_e || state_process->operation == fake_make_operation_type_run_e || state_process->operation == fake_make_operation_type_shell_e) { - if (!arguments.used) { + if (!data_make->cache_arguments.used) { fake_print_error_requires_more_arguments(data_make); *status = F_status_set_error(F_failure); @@ -39,20 +39,20 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_break_e) { - if (arguments.used > 1) { + if (data_make->cache_arguments.used > 1) { fake_print_error_too_many_arguments(data_make); *status = F_status_set_error(F_failure); } - else if (arguments.used) { - if (fl_string_dynamic_compare(fake_make_operation_argument_success_s, arguments.array[0]) == F_equal_to_not) { - if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, arguments.array[0]) == F_equal_to_not) { + else if (data_make->cache_arguments.used) { + if (fl_string_dynamic_compare(fake_make_operation_argument_success_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { + if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QUnsupported break type '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[0], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -67,17 +67,17 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_build_e) { - if (arguments.used) { - if (arguments.array[0].used) { + if (data_make->cache_arguments.used) { + if (data_make->cache_arguments.array[0].used) { f_string_static_t path_file = f_string_static_t_initialize; - path_file.used = data_make->data->path_data_build.used + arguments.array[0].used; + path_file.used = data_make->data->path_data_build.used + data_make->cache_arguments.array[0].used; f_char_t path_file_string[path_file.used + 1]; path_file.string = path_file_string; path_file_string[path_file.used] = 0; memcpy(path_file_string, data_make->data->path_data_build.string, sizeof(f_char_t) * data_make->data->path_data_build.used); - memcpy(path_file_string + data_make->data->path_data_build.used, arguments.array[0].string, sizeof(f_char_t) * arguments.array[0].used); + memcpy(path_file_string + data_make->data->path_data_build.used, data_make->cache_arguments.array[0].string, sizeof(f_char_t) * data_make->cache_arguments.array[0].used); f_status_t status_file = f_file_is(path_file, F_file_type_regular_d, F_false); @@ -125,7 +125,7 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_clean_e || state_process->operation == fake_make_operation_type_pop_e || state_process->operation == fake_make_operation_type_top_e || state_process->operation == fake_make_operation_type_skeleton_e) { - if (arguments.used) { + if (data_make->cache_arguments.used) { fake_print_error_too_many_arguments(data_make); *status = F_status_set_error(F_failure); @@ -145,13 +145,13 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_clone_e) { - if (arguments.used > 1) { - for (f_array_length_t i = 0; i < arguments.used; ++i) { + if (data_make->cache_arguments.used > 1) { + for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) { - *status = fake_make_assure_inside_project(data_make, arguments.array[i]); + *status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -159,14 +159,14 @@ extern "C" { } } // for - for (f_array_length_t i = 0; i < arguments.used - 1; ++i) { + for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) { - if (f_file_exists(arguments.array[i], F_true) != F_true) { + if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QFailed to find file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -176,17 +176,17 @@ extern "C" { } } // for - if (arguments.used > 2) { + if (data_make->cache_arguments.used > 2) { // The last file must be a directory. - f_status_t status_file = f_directory_is(arguments.array[arguments.used - 1]); + f_status_t status_file = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); if (status_file == F_false || status_file == F_file_found_not) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QThe last file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[arguments.used - 1], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], data_make->error.notable); fl_print_format("%[' must be a valid directory.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -195,24 +195,24 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1], f_file_operation_find_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_find_s, fll_error_file_type_directory_e); *status = F_status_set_error(F_failure); } } else { // When the first file is a directory, then the second, if it exists, must also be a directory. - f_status_t status_file = f_directory_is(arguments.array[0]); + f_status_t status_file = f_directory_is(data_make->cache_arguments.array[0]); if (status_file == F_true) { - status_file = f_directory_is(arguments.array[1]); + status_file = f_directory_is(data_make->cache_arguments.array[1]); if (status_file == F_false) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QThe second file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[1], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[1], data_make->error.notable); fl_print_format("%[' must be a valid directory.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -233,7 +233,7 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_compile_e) { - if (!arguments.used) { + if (!data_make->cache_arguments.used) { fake_print_error_requires_more_arguments(data_make); *status = F_status_set_error(F_failure); @@ -256,13 +256,13 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_copy_e) { - if (arguments.used > 1) { - for (f_array_length_t i = 0; i < arguments.used; ++i) { + if (data_make->cache_arguments.used > 1) { + for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) { - *status = fake_make_assure_inside_project(data_make, arguments.array[i]); + *status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -270,14 +270,14 @@ extern "C" { } } // for - for (f_array_length_t i = 0; i < arguments.used - 1; ++i) { + for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) { - if (f_file_exists(arguments.array[i], F_true) != F_true) { + if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QFailed to find file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -287,17 +287,17 @@ extern "C" { } } // for - if (arguments.used > 2) { + if (data_make->cache_arguments.used > 2) { // The last file must be a directory. - f_status_t status_file = f_directory_is(arguments.array[arguments.used - 1]); + f_status_t status_file = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); if (status_file == F_false || status_file == F_file_found_not) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QThe last file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[arguments.used - 1], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], data_make->error.notable); fl_print_format("%[' must be a valid directory.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -306,24 +306,24 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e); *status = F_status_set_error(F_failure); } } else { // When the first file is a directory, then the second, if it exists, must also be a directory. - f_status_t status_file = f_directory_is(arguments.array[0]); + f_status_t status_file = f_directory_is(data_make->cache_arguments.array[0]); if (status_file == F_true) { - status_file = f_directory_is(arguments.array[1]); + status_file = f_directory_is(data_make->cache_arguments.array[1]); if (status_file == F_false) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QThe second file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[1], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[1], data_make->error.notable); fl_print_format("%[' must be a valid directory.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -344,8 +344,8 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_define_e) { - if (arguments.used) { - *status = fake_make_operate_validate_define_name(arguments.array[0]); + if (data_make->cache_arguments.used) { + *status = fake_make_operate_validate_define_name(data_make->cache_arguments.array[0]); if (*status == F_none) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { @@ -359,7 +359,7 @@ extern "C" { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QInvalid characters in the define setting name '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[0], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); fl_print_format("%[', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -378,13 +378,13 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_delete_e || state_process->operation == fake_make_operation_type_deletes_e) { - if (arguments.used) { - for (f_array_length_t i = 0; i < arguments.used; ++i) { + if (data_make->cache_arguments.used) { + for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) { - *status = fake_make_assure_inside_project(data_make, arguments.array[i]); + *status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -454,7 +454,7 @@ extern "C" { return; } - if (arguments.used) { + if (data_make->cache_arguments.used) { fake_print_error_too_many_arguments(data_make); *status = F_status_set_error(F_failure); @@ -464,19 +464,19 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_exit_e) { - if (arguments.used > 1) { + if (data_make->cache_arguments.used > 1) { fake_print_error_too_many_arguments(data_make); *status = F_status_set_error(F_failure); } - else if (arguments.used) { - if (fl_string_dynamic_compare(fake_make_operation_argument_success_s, arguments.array[0]) == F_equal_to_not) { - if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, arguments.array[0]) == F_equal_to_not) { + else if (data_make->cache_arguments.used) { + if (fl_string_dynamic_compare(fake_make_operation_argument_success_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { + if (fl_string_dynamic_compare(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QUnsupported exit type '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[0], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -491,15 +491,15 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_fail_e) { - if (arguments.used) { - if (fl_string_dynamic_compare(fake_make_operation_argument_exit_s, arguments.array[0]) == F_equal_to_not) { - if (fl_string_dynamic_compare(fake_make_operation_argument_warn_s, arguments.array[0]) == F_equal_to_not) { - if (fl_string_dynamic_compare(fake_make_operation_argument_ignore_s, arguments.array[0]) == F_equal_to_not) { + 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) { + if (fl_string_dynamic_compare(fake_make_operation_argument_warn_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { + if (fl_string_dynamic_compare(fake_make_operation_argument_ignore_s, data_make->cache_arguments.array[0]) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QUnsupported fail type '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[0], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -520,28 +520,28 @@ extern "C" { } 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) { - if (arguments.used) { + if (data_make->cache_arguments.used) { f_array_length_t i = 1; 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_owner_e || state_process->operation == fake_make_operation_type_owners_e) { - if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, arguments.array[i]) == F_equal_to) { + if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) { i = 2; } } - if (arguments.used > i) { + if (data_make->cache_arguments.used > i) { f_status_t status_file = F_none; - for (; i < arguments.used; ++i) { + for (; i < data_make->cache_arguments.used; ++i) { - status_file = f_file_is(arguments.array[i], F_file_type_regular_d, F_false); + status_file = f_file_is(data_make->cache_arguments.array[i], F_file_type_regular_d, F_false); if (status_file == F_file_found_not) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QFailed to find file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -551,7 +551,7 @@ extern "C" { } else if (F_status_is_error(status_file)) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { - fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e); } *status = status_file; @@ -613,7 +613,7 @@ extern "C" { } } - if (arguments.used) { + if (data_make->cache_arguments.used) { const f_string_static_t if_type_strings[] = { fake_make_operation_argument_if_define_s, fake_make_operation_argument_if_equal_s, @@ -702,7 +702,7 @@ extern "C" { if_and_or = fake_make_operation_if_s; } - if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, arguments.array[k]) == F_equal_to) { + if (fl_string_dynamic_compare(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[k]) == F_equal_to) { ++k; dereference = F_false; } @@ -748,7 +748,7 @@ extern "C" { // Skip the "if not XXX" types as they are determined later on. if (i > 12 && i < 21) continue; - if (fl_string_dynamic_compare(if_type_strings[i], arguments.array[k]) == F_equal_to) { + if (fl_string_dynamic_compare(if_type_strings[i], data_make->cache_arguments.array[k]) == F_equal_to) { state_process->condition = if_type_codes[i]; break; @@ -762,7 +762,7 @@ extern "C" { fl_print_format("%r%[%QUnsupported '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); fl_print_format("%[%r%]", data_make->error.to.stream, data_make->error.notable, if_and_or, data_make->error.notable); fl_print_format("%[' type '%]", data_make->error.to.stream, data_make->error.context, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[k], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[k], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -779,7 +779,7 @@ extern "C" { // Identify and convert to the appropriate if not condition. if (state_process->condition == fake_make_operation_if_type_if_not_e) { - if (arguments.used < 1 + k) { + if (data_make->cache_arguments.used < 1 + k) { fake_print_error_requires_more_arguments(data_make); *status = F_status_set_error(F_failure); @@ -789,7 +789,7 @@ extern "C" { for (; j < 7; ++j) { - if (fl_string_dynamic_compare(if_not_type_strings[j], arguments.array[k]) == F_equal_to) { + if (fl_string_dynamic_compare(if_not_type_strings[j], data_make->cache_arguments.array[k]) == F_equal_to) { state_process->condition = if_not_type_codes[j]; break; @@ -803,7 +803,7 @@ extern "C" { fl_print_format("%r%[%QUnsupported '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); fl_print_format("%[%r%]", data_make->error.to.stream, data_make->error.notable, if_and_or, data_make->error.notable); fl_print_format("%[' not type '%]", data_make->error.to.stream, data_make->error.context, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[k], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[k], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -818,11 +818,11 @@ extern "C" { j = 7; } - if (j == 7 && arguments.used >= if_type_minimum[i] || arguments.used >= if_not_type_minimum[j]) { + if (j == 7 && data_make->cache_arguments.used >= if_type_minimum[i] || data_make->cache_arguments.used >= if_not_type_minimum[j]) { if (state_process->condition == fake_make_operation_if_type_if_success_e || state_process->condition == fake_make_operation_if_type_if_failure_e) { // The success and failure operations minimum is also the maximum. - if (arguments.used > if_type_minimum[i]) { + if (data_make->cache_arguments.used > if_type_minimum[i]) { fake_print_error_too_many_arguments(data_make); *status = F_status_set_error(F_failure); @@ -832,7 +832,7 @@ extern "C" { } 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 (arguments.used < 2 + k) { + if (data_make->cache_arguments.used < 2 + k) { fake_print_error_requires_more_arguments(data_make); *status = F_status_set_error(F_failure); @@ -847,13 +847,13 @@ extern "C" { 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) { if (state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition == fake_make_operation_if_type_if_not_mode_e) { - if (fl_string_dynamic_compare(fake_make_operation_argument_is_s, arguments.array[k]) == F_equal_to_not) { - if (fl_string_dynamic_compare(fake_make_operation_argument_has_s, arguments.array[k]) == F_equal_to_not) { + if (fl_string_dynamic_compare(fake_make_operation_argument_is_s, data_make->cache_arguments.array[k]) == F_equal_to_not) { + if (fl_string_dynamic_compare(fake_make_operation_argument_has_s, data_make->cache_arguments.array[k]) == F_equal_to_not) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QUnsupported %smode type '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, j == 6 ? "" : "not ", data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[k], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[k], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -868,7 +868,7 @@ extern "C" { f_file_mode_t mode_rule = 0; uint8_t replace = 0; - *status = fake_make_get_id_mode(data_make->data, data_make->error, arguments.array[++k], &mode_rule, &replace); + *status = fake_make_get_id_mode(data_make->data, data_make->error, data_make->cache_arguments.array[++k], &mode_rule, &replace); if (F_status_is_error(*status)) return; i = ++k; @@ -876,7 +876,7 @@ extern "C" { else if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_not_group_e) { gid_t id = 0; - *status = fake_make_get_id_group(data_make->data, data_make->error, arguments.array[k++], &id); + *status = fake_make_get_id_group(data_make->data, data_make->error, data_make->cache_arguments.array[k++], &id); if (F_status_is_error(*status)) return; i = k; @@ -889,33 +889,33 @@ extern "C" { // fifo = 0x8 (0000 1000) invalid = 0x80 (1000 0000) uint8_t type_file = 0; - for (i = k; i < arguments.used; ++i) { + for (i = k; i < data_make->cache_arguments.used; ++i) { - if (fl_string_dynamic_compare(fake_make_operation_argument_if_is_for_s, arguments.array[i]) == F_equal_to) { + if (fl_string_dynamic_compare(fake_make_operation_argument_if_is_for_s, data_make->cache_arguments.array[i]) == F_equal_to) { ++i; break; } - if (fl_string_dynamic_compare(f_file_type_name_block_s, arguments.array[i]) == F_equal_to) { + if (fl_string_dynamic_compare(f_file_type_name_block_s, data_make->cache_arguments.array[i]) == F_equal_to) { type_file |= 0x1; } - else if (fl_string_dynamic_compare(f_file_type_name_character_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_character_s, data_make->cache_arguments.array[i]) == F_equal_to) { type_file |= 0x2; } - else if (fl_string_dynamic_compare(f_file_type_name_directory_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_directory_s, data_make->cache_arguments.array[i]) == F_equal_to) { type_file |= 0x4; } - else if (fl_string_dynamic_compare(f_file_type_name_fifo_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_fifo_s, data_make->cache_arguments.array[i]) == F_equal_to) { type_file |= 0x8; } - else if (fl_string_dynamic_compare(f_file_type_name_link_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_link_s, data_make->cache_arguments.array[i]) == F_equal_to) { type_file |= 0x10; } - else if (fl_string_dynamic_compare(f_file_type_name_regular_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_regular_s, data_make->cache_arguments.array[i]) == F_equal_to) { type_file |= 0x20; } - else if (fl_string_dynamic_compare(f_file_type_name_socket_s, arguments.array[i]) == F_equal_to) { + else if (fl_string_dynamic_compare(f_file_type_name_socket_s, data_make->cache_arguments.array[i]) == F_equal_to) { type_file |= 0x40; } else { @@ -923,7 +923,7 @@ extern "C" { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QUnsupported file type '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -942,19 +942,19 @@ extern "C" { 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; - *status = fake_make_get_id_owner(data_make->data, data_make->error, arguments.array[k++], &id); + *status = fake_make_get_id_owner(data_make->data, data_make->error, data_make->cache_arguments.array[k++], &id); if (F_status_is_error(*status)) return; i = k; } - if (i < arguments.used) { - for (f_status_t status_file = F_none; i < arguments.used; ++i) { + if (i < data_make->cache_arguments.used) { + for (f_status_t status_file = F_none; i < data_make->cache_arguments.used; ++i) { - status_file = fake_make_assure_inside_project(data_make, arguments.array[i]); + status_file = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(status_file)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status_file), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(status_file), "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_not(*status)) { if (F_status_set_fine(status_file) == F_false) { @@ -968,14 +968,14 @@ extern "C" { 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(arguments.array[i], dereference); + status_file = 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 (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_exists", F_true, arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_exists", F_true, data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e); if (F_status_is_error_not(*status)) { *status = F_status_set_error(status_file); @@ -989,7 +989,7 @@ extern "C" { } 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 (arguments.used < 2 + k) { + if (data_make->cache_arguments.used < 2 + k) { fake_print_error_requires_more_arguments(data_make); *status = F_status_set_error(F_failure); @@ -1001,16 +1001,16 @@ extern "C" { f_string_range_t range = f_string_range_t_initialize; f_number_unsigned_t number = 0; - for (i = k; i < arguments.used; ++i, status_number = F_none) { + for (i = k; i < data_make->cache_arguments.used; ++i, status_number = F_none) { - if (arguments.array[i].used) { + if (data_make->cache_arguments.array[i].used) { range.start = 0; - range.stop = arguments.array[i].used - 1; + range.stop = data_make->cache_arguments.array[i].used - 1; - if (arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) { + if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) { range.start = 1; } - else if (arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) { + else if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) { range.start = 1; } @@ -1018,7 +1018,7 @@ extern "C" { status_number = F_status_set_error(F_failure); } else { - status_number = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, arguments.array[i], range, &number); + status_number = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number); } } else { @@ -1033,12 +1033,12 @@ extern "C" { if (number > F_number_t_size_unsigned_d) { fl_print_format("%r%[%QThe number '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); fl_print_format("%[' may only be between the ranges -%un to %un.%]%r", data_make->error.to.stream, data_make->error.context, F_number_t_size_unsigned_d, F_number_t_size_unsigned_d, data_make->error.context, f_string_eol_s); } else { fl_print_format("%r%[%QInvalid or unsupported number provided '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); } @@ -1060,26 +1060,26 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_link_e) { - if (arguments.used > 2) { + if (data_make->cache_arguments.used > 2) { fake_print_error_too_many_arguments(data_make); *status = F_status_set_error(F_failure); } - else if (arguments.used == 2) { - *status = fake_make_assure_inside_project(data_make, arguments.array[0]); + else if (data_make->cache_arguments.used == 2) { + *status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[0]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); } } - *status = fake_make_assure_inside_project(data_make, arguments.array[1]); + *status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[1]); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[1]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[1]); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -1096,13 +1096,13 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_move_e) { - if (arguments.used > 1) { - for (f_array_length_t i = 0; i < arguments.used; ++i) { + if (data_make->cache_arguments.used > 1) { + for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) { - *status = fake_make_assure_inside_project(data_make, arguments.array[i]); + *status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -1110,14 +1110,14 @@ extern "C" { } } // for - for (f_array_length_t i = 0; i < arguments.used - 1; ++i) { + for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) { - if (f_file_exists(arguments.array[i], F_true) != F_true) { + if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QFailed to find file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[i], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[i], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -1127,17 +1127,17 @@ extern "C" { } } // for - if (arguments.used > 2) { + if (data_make->cache_arguments.used > 2) { // The last file must be a directory. - f_status_t status_file = f_directory_is(arguments.array[arguments.used - 1]); + f_status_t status_file = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]); if (status_file == F_false || status_file == F_file_found_not) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QThe last file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[arguments.used - 1], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], data_make->error.notable); fl_print_format("%[' must be a valid directory.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -1146,24 +1146,24 @@ extern "C" { *status = F_status_set_error(F_failure); } else if (F_status_is_error(status_file)) { - fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e); + fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e); *status = F_status_set_error(F_failure); } } else { // When the first file is a directory, then the second, if it exists, must also be a directory. - f_status_t status_file = f_directory_is(arguments.array[0]); + f_status_t status_file = f_directory_is(data_make->cache_arguments.array[0]); if (status_file == F_true) { - status_file = f_directory_is(arguments.array[1]); + status_file = f_directory_is(data_make->cache_arguments.array[1]); if (status_file == F_false) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QThe second file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[1], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[1], data_make->error.notable); fl_print_format("%[' must be a valid directory.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -1184,17 +1184,17 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_operate_e) { - if (arguments.used > 1) { + if (data_make->cache_arguments.used > 1) { fake_print_error_too_many_arguments(data_make); *status = F_status_set_error(F_failure); } - else if (arguments.used == 1) { + else if (data_make->cache_arguments.used == 1) { f_array_length_t id_section = 0; for (; id_section < data_make->fakefile.used; ++id_section) { - if (fl_string_dynamic_partial_compare_string(arguments.array[0].string, data_make->buffer, arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) { + if (fl_string_dynamic_partial_compare_string(data_make->cache_arguments.array[0].string, data_make->buffer, data_make->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) { break; } } // for @@ -1203,7 +1203,7 @@ extern "C" { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QNo operation section named '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[0], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); fl_print_format("%[' was found.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -1239,7 +1239,7 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_parameter_e) { - if (arguments.used) { + if (data_make->cache_arguments.used) { const f_string_static_t reserved_name[] = { fake_make_parameter_variable_build_s, fake_make_parameter_variable_color_s, @@ -1278,7 +1278,7 @@ extern "C" { for (f_array_length_t i = 0; i < 33; ++i) { - if (fl_string_dynamic_compare(reserved_name[i], arguments.array[0]) == F_equal_to) { + if (fl_string_dynamic_compare(reserved_name[i], data_make->cache_arguments.array[0]) == F_equal_to) { fll_print_format("%r%[%QCannot assign a value to the parameter name '%r' because it is a reserved parameter name.%]%r", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, reserved_name[i], data_make->error.context, f_string_eol_s); *status = F_status_set_error(F_failure); @@ -1297,21 +1297,21 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_to_e) { - if (arguments.used > 1) { + if (data_make->cache_arguments.used > 1) { fake_print_error_too_many_arguments(data_make); *status = F_status_set_error(F_failure); } - else if (arguments.used) { - if (arguments.array[0].used) { - f_status_t status_file = f_file_is(arguments.array[0], F_file_type_directory_d, F_false); + else if (data_make->cache_arguments.used) { + if (data_make->cache_arguments.array[0].used) { + f_status_t status_file = f_file_is(data_make->cache_arguments.array[0], F_file_type_directory_d, F_false); if (status_file == F_file_found_not) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QFailed to find file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[0], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -1331,7 +1331,7 @@ extern "C" { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QThe file '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[0], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); fl_print_format("%[' must be a directory file.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -1356,15 +1356,15 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_touch_e) { - if (arguments.used > 1) { - if (fl_string_dynamic_compare(fake_make_operation_argument_file_s, arguments.array[0]) == F_equal_to_not) { - if (fl_string_dynamic_compare(fake_make_operation_argument_directory_s, arguments.array[0]) == F_equal_to_not) { + 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) { if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { flockfile(data_make->error.to.stream); fl_print_format("%r%[%QUnsupported file type '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); - fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, arguments.array[0], data_make->error.notable); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, data_make->cache_arguments.array[0], data_make->error.notable); fl_print_format("%['.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); funlockfile(data_make->error.to.stream); @@ -1374,12 +1374,12 @@ extern "C" { } } - for (f_array_length_t i = 1; i < arguments.used; ++i) { + for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i) { - *status = fake_make_assure_inside_project(data_make, arguments.array[i]); + *status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); @@ -1395,17 +1395,17 @@ extern "C" { } if (state_process->operation == fake_make_operation_type_write_e) { - if (arguments.used) { - if (!arguments.array[0].used) { + if (data_make->cache_arguments.used) { + if (!data_make->cache_arguments.array[0].used) { fake_print_error_argument_empty(data_make, 1); *status = F_status_set_error(F_failure); } else { - *status = fake_make_assure_inside_project(data_make, arguments.array[0]); + *status = fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]); if (F_status_is_error(*status)) { - fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[0]); + fake_print_message_section_operation_path_outside(data_make->data, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]); if (F_status_set_fine(*status) == F_false) { *status = F_status_set_error(F_failure); diff --git a/level_3/fake/c/private-make-operate_validate.h b/level_3/fake/c/private-make-operate_validate.h index 3283f83..baaff65 100644 --- a/level_3/fake/c/private-make-operate_validate.h +++ b/level_3/fake/c/private-make-operate_validate.h @@ -22,8 +22,6 @@ extern "C" { * All make related setting data, including data from the fakefile and the build settings file. * @param section_name * The section name. - * @param arguments - * The expanded arguments. * @param state_process * The operation and if-condition operation states. * This condition will be updated by this as appropriate. @@ -35,7 +33,7 @@ extern "C" { * Status codes (with error bit) are returned on any problem. */ #ifndef _di_fake_make_operate_validate_ - extern void fake_make_operate_validate(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) F_attribute_visibility_internal_d; + extern void fake_make_operate_validate(fake_make_data_t * const data_make, const f_string_range_t section_name, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack, f_status_t * const status) F_attribute_visibility_internal_d; #endif // _di_fake_make_operate_validate_ /** diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index b5115cb..8532f3b 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -9,27 +9,27 @@ extern "C" { #ifndef _di_fake_make_assure_inside_project_ f_status_t fake_make_assure_inside_project(fake_make_data_t * const data_make, const f_string_static_t path) { - data_make->path_cache.used = 0; + data_make->cache_path.used = 0; - f_status_t status = fll_path_canonical(path, &data_make->path_cache); + f_status_t status = fll_path_canonical(path, &data_make->cache_path); if (F_status_is_error(status)) return status; - if (data_make->path_cache.used < data_make->path.stack.array[0].used) { + if (data_make->cache_path.used < data_make->path.stack.array[0].used) { return F_status_set_error(F_false); } const f_string_range_t range = macro_f_string_range_t_initialize2(data_make->path.stack.array[0].used); if (range.start <= range.stop) { - status = fl_string_dynamic_partial_compare(data_make->path.stack.array[0], data_make->path_cache, range, range); + status = fl_string_dynamic_partial_compare(data_make->path.stack.array[0], data_make->cache_path, range, range); if (F_status_is_error(status)) return status; if (status) { - if (data_make->path_cache.used == data_make->path.stack.array[0].used) { + if (data_make->cache_path.used == data_make->path.stack.array[0].used) { return F_true; } - if (data_make->path_cache.string[data_make->path.stack.array[0].used] == f_path_separator_s.string[0]) { + if (data_make->cache_path.string[data_make->path.stack.array[0].used] == f_path_separator_s.string[0]) { return F_true; } } @@ -194,7 +194,7 @@ extern "C" { #ifndef _di_fake_make_path_relative_ f_status_t fake_make_path_relative(fake_make_data_t * const data_make, const f_string_static_t path) { - data_make->path_cache.used = 0; + data_make->cache_path.used = 0; if (!path.used || path.used == data_make->path.stack.array[0].used) { return F_none; @@ -209,10 +209,10 @@ extern "C" { range.start = data_make->path.stack.array[0].used + 1; range.stop = range.start + (path.used - range.start) - 1; - f_status_t status = f_string_dynamic_partial_append(path, range, &data_make->path_cache); + f_status_t status = f_string_dynamic_partial_append(path, range, &data_make->cache_path); if (F_status_is_error(status)) return status; - status = f_string_dynamic_terminate(&data_make->path_cache); + status = f_string_dynamic_terminate(&data_make->cache_path); if (F_status_is_error(status)) return status; return status; diff --git a/level_3/fake/c/private-make.h b/level_3/fake/c/private-make.h index 394abbe..9ac9dc1 100644 --- a/level_3/fake/c/private-make.h +++ b/level_3/fake/c/private-make.h @@ -17,7 +17,7 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * The data_make.path_cache will be updated to reflect the full path to this file. + * The data_make.cache_path will be updated to reflect the full path to this file. * @param path * file path to get the real path of. * @@ -106,7 +106,7 @@ extern "C" { * * @param data_make * All make related setting data, including data from the fakefile and the build settings file. - * The relative path is stored in data_make.path_cache. + * The relative path is stored in data_make.cache_path. * @param path * The NULL terminated path to get the relative path of. * -- 1.8.3.1