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;
}
* 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.
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;
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, \
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);
#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);
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;
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;
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) {
}
// 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);
}
}
- 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;
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);
}
}
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);
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);
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);
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);
}
}
- *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;
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);
}
}
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);
}
}
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);
}
// 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);
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);
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;
}
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;
}
}
}
#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;
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;
}
}
}
#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;
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;
};
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;
}
}
- 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)) {
}
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);
}
} // 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) {
*status = F_status_set_error(F_failure);
}
- f_string_dynamics_resize(0, &arguments);
-
--section_stack->used;
return 0;
* 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_
/**
* 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.
* 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_
/**
* 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.
* @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_
/**
* 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.
* 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_
/**
#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);
}
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 {
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);
}
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;
}
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);
}
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;
}
}
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.
}
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;
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;
}
} // 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) {
}
}
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) {
}
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);
}
}
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;
}
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
}
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;
}
}
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;
#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_
* 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
* 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_
/**
*
* @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.
* 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
#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;
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);
}
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);
}
#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) {
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);
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
#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;
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;
#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;
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);
#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;
} // 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;
#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;
}
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;
}
#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;
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;
}
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
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;
}
#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;
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;
}
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;
}
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 {
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);
}
#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;
}
#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;
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;
}
#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;
}
#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,
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;
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;
}
}
- if (result == 2 && i + 1 < arguments.used) {
+ if (result == 2 && i + 1 < data_make->cache_arguments.used) {
result = 0;
}
} // for
#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;
}
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
#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;
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);
}
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);
}
#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
#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;
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;
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);
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);
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);
#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;
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);
}
}
#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;
// 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);
}
}
- 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
}
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);
#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);
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);
}
// 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);
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);
}
}
#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;
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;
}
#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;
}
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
#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 {
}
}
- 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;
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
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
*
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* 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_
/**
* @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.
*
* @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_
/**
*
* @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.
*
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* 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_
/**
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
*
* @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.
* @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_
/**
* @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.
* @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
#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);
}
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);
}
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);
}
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);
}
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);
}
} // 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);
}
} // 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);
*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);
}
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);
}
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);
}
} // 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);
}
} // 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);
*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);
}
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) {
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);
}
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);
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);
}
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);
}
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);
}
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);
}
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;
}
}
- 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,
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;
}
// 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;
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);
// 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);
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;
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);
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);
}
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);
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);
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;
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;
// 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 {
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);
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) {
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);
}
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);
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;
}
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 {
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);
}
}
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);
}
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);
}
} // 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);
}
} // 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);
*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);
}
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
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);
}
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,
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);
}
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);
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);
}
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);
}
}
- 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);
}
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);
* 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.
* 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_
/**
#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;
}
}
#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;
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;
*
* @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.
*
*
* @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.
*