The goal here is to reduce the number arguments passed to functions in a consistent manner.
This has a downside of having another pointer and the costs of dereferencing it for each access.
Rename the "main" property to "id_main" to be clearer as well as to not conflict with the new "main" property that points to the main data.
Remove a stale header that has no associated function implemented.
f_string_dynamic_t buffer;
f_string_dynamic_t path_cache;
- f_array_length_t main;
+ f_array_length_t id_main;
+
+ fake_main_t *main;
} fake_make_data_t;
#define fake_make_data_t_initialize { \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
0, \
+ 0, \
}
#define macro_fake_make_data_t_delete_simple(structure) \
#endif
#ifndef _di_fake_make_load_fakefile_
- void fake_make_load_fakefile(fake_main_t * const main, fake_make_data_t * const data_make, f_status_t *status) {
+ void fake_make_load_fakefile(fake_make_data_t * const data_make, f_status_t *status) {
if (F_status_is_error(*status)) return;
- if (fake_signal_received(main)) {
+ if (fake_signal_received(data_make->main)) {
*status = F_status_set_error(F_interrupt);
return;
data_make->fakefile.used = 0;
- *status = fake_file_buffer(main, main->file_data_build_fakefile.string, &data_make->buffer);
+ *status = fake_file_buffer(data_make->main, data_make->main->file_data_build_fakefile.string, &data_make->buffer);
if (F_status_is_error(*status)) return;
if (!data_make->buffer.used) {
- if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->warning.to.stream);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->warning.to.stream);
- fl_print_format("%c%[%SThe fakefile '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context);
- fl_print_format("%[%Q%]", main->warning.to.stream, main->warning.notable, main->file_data_build_fakefile, main->warning.notable);
- fl_print_format("%[' is empty.%]%c", main->warning.to.stream, main->warning.context, main->warning.context, f_string_eol_s[0]);
+ fl_print_format("%c%[%SThe fakefile '%]", data_make->main->warning.to.stream, f_string_eol_s[0], data_make->main->warning.context, data_make->main->warning.prefix, data_make->main->warning.context);
+ fl_print_format("%[%Q%]", data_make->main->warning.to.stream, data_make->main->warning.notable, data_make->main->file_data_build_fakefile, data_make->main->warning.notable);
+ fl_print_format("%[' is empty.%]%c", data_make->main->warning.to.stream, data_make->main->warning.context, data_make->main->warning.context, f_string_eol_s[0]);
- funlockfile(main->warning.to.stream);
+ funlockfile(data_make->main->warning.to.stream);
}
return;
f_fss_comments_t comments = f_fss_comments_t_initialize;
{
- f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) main, 0);
+ f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) data_make->main, 0);
*status = fll_fss_basic_list_read(data_make->buffer, state, &range, &list_objects, &list_contents, &delimits, 0, &comments);
}
if (F_status_is_error(*status)) {
- fake_print_error_fss(main, F_status_set_fine(*status), "fll_fss_basic_list_read", main->file_data_build_fakefile.string, range, F_true);
+ fake_print_error_fss(data_make->main, F_status_set_fine(*status), "fll_fss_basic_list_read", data_make->main->file_data_build_fakefile.string, range, F_true);
}
else {
*status = fl_fss_apply_delimit(delimits, &data_make->buffer);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
}
}
f_fss_set_t settings = f_fss_set_t_initialize;
- f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) main, 0);
+ f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_fss, 0, (void *) data_make->main, 0);
const f_string_static_t name_settings = macro_f_string_static_t_initialize(fake_make_section_settings_s, fake_make_section_settings_s_length);
const f_string_static_t name_main = macro_f_string_static_t_initialize(fake_make_section_main_s, fake_make_section_main_s_length);
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "macro_f_fss_nameds_t_resize", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "macro_f_fss_nameds_t_resize", F_true);
macro_f_fss_set_t_delete_simple(settings);
macro_f_fss_objects_t_delete_simple(list_objects);
for (f_array_length_t i = 0; i < list_objects.used; ++i) {
- if (!(i % fake_signal_check_short_d) && fake_signal_received(main)) {
+ if (!(i % fake_signal_check_short_d) && fake_signal_received(data_make->main)) {
*status = F_status_set_error(F_interrupt);
break;
if (fl_string_dynamic_partial_compare(name_settings, data_make->buffer, name_settings_range, list_objects.array[i]) == F_equal_to) {
if (!missing_settings) {
- fake_print_warning_settings_object_multiple(main, main->file_data_build_fakefile.string, "list", name_settings.string);
+ fake_print_warning_settings_object_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, "list", name_settings.string);
continue;
}
*status = fll_fss_extended_read(data_make->buffer, state, &content_range, &settings.objects, &settings.contents, 0, 0, &delimits, 0);
if (F_status_is_error(*status)) {
- fake_print_error_fss(main, F_status_set_fine(*status), "fll_fss_extended_read", main->file_data_build_fakefile.string, content_range, F_true);
+ fake_print_error_fss(data_make->main, F_status_set_fine(*status), "fll_fss_extended_read", data_make->main->file_data_build_fakefile.string, content_range, F_true);
break;
}
*status = fl_fss_apply_delimit(delimits, &data_make->buffer);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
break;
}
}
else if (fl_string_dynamic_partial_compare(name_main, data_make->buffer, name_main_range, list_objects.array[i]) == F_equal_to) {
if (!missing_main) {
- fake_print_warning_settings_object_multiple(main, main->file_data_build_fakefile.string, "list", name_main.string);
+ fake_print_warning_settings_object_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, "list", name_main.string);
continue;
}
missing_main = F_false;
- data_make->main = data_make->fakefile.used;
+ data_make->id_main = data_make->fakefile.used;
}
data_make->fakefile.array[data_make->fakefile.used].name = list_objects.array[i];
*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);
if (F_status_is_error(*status)) {
- fake_print_error_fss(main, F_status_set_fine(*status), "fll_fss_extended_read", main->file_data_build_fakefile.string, content_range, F_true);
+ fake_print_error_fss(data_make->main, F_status_set_fine(*status), "fll_fss_extended_read", data_make->main->file_data_build_fakefile.string, content_range, F_true);
break;
}
*status = fl_fss_apply_delimit(delimits, &data_make->buffer);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
break;
}
}
if (missing_main) {
- if (main->error.verbosity != f_console_verbosity_quiet) {
- flockfile(main->error.to.stream);
+ if (data_make->main->error.verbosity != f_console_verbosity_quiet) {
+ flockfile(data_make->main->error.to.stream);
- fl_print_format("%c%[%SThe fakefile '%]", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, main->file_data_build_fakefile, main->error.notable);
- fl_print_format("%[' is missing the required '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%s%]", main->error.to.stream, main->error.notable, fake_make_section_main_s, main->error.notable);
- fl_print_format("%[' object.%]%c", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s[0]);
+ fl_print_format("%c%[%SThe fakefile '%]", data_make->main->error.to.stream, f_string_eol_s[0], data_make->main->error.context, data_make->main->error.prefix, data_make->main->error.context);
+ fl_print_format("%[%Q%]", data_make->main->error.to.stream, data_make->main->error.notable, data_make->main->file_data_build_fakefile, data_make->main->error.notable);
+ fl_print_format("%[' is missing the required '%]", data_make->main->error.to.stream, data_make->main->error.context, data_make->main->error.context);
+ fl_print_format("%[%s%]", data_make->main->error.to.stream, data_make->main->error.notable, fake_make_section_main_s, data_make->main->error.notable);
+ fl_print_format("%[' object.%]%c", data_make->main->error.to.stream, data_make->main->error.context, data_make->main->error.context, f_string_eol_s[0]);
- funlockfile(main->error.to.stream);
+ funlockfile(data_make->main->error.to.stream);
}
*status = F_status_set_error(F_failure);
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), function_name, F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), function_name, F_true);
macro_f_fss_set_t_delete_simple(settings);
for (f_array_length_t i = 0; i < settings.objects.used; ++i) {
if (fl_string_dynamic_partial_compare_string(fake_make_setting_load_build_s, data_make->buffer, fake_make_setting_load_build_s_length, settings.objects.array[i]) == F_equal_to) {
- fake_make_load_fakefile_setting_build(main, data_make, &settings.objects.array[i], &settings.contents.array[i], &unmatched_build);
+ fake_make_load_fakefile_setting_build(data_make, &settings.objects.array[i], &settings.contents.array[i], &unmatched_build);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_compiler_s, data_make->buffer, fake_make_setting_compiler_s_length, settings.objects.array[i]) == F_equal_to) {
- fake_make_load_fakefile_setting_compiler(main, data_make, &settings.objects.array[i], &settings.contents.array[i], &range_compiler);
+ fake_make_load_fakefile_setting_compiler(data_make, &settings.objects.array[i], &settings.contents.array[i], &range_compiler);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_environment_s, data_make->buffer, fake_make_setting_environment_s_length, settings.objects.array[i]) == F_equal_to) {
- *status = fake_make_load_fakefile_setting_environment(main, data_make, &settings.contents.array[i]);
+ *status = fake_make_load_fakefile_setting_environment(data_make, &settings.contents.array[i]);
if (F_status_is_error(*status)) break;
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_fail_s, data_make->buffer, fake_make_setting_fail_s_length, settings.objects.array[i]) == F_equal_to) {
- fake_make_load_fakefile_setting_fail(main, data_make, &settings.objects.array[i], &settings.contents.array[i], &unmatched_fail);
+ fake_make_load_fakefile_setting_fail(data_make, &settings.objects.array[i], &settings.contents.array[i], &unmatched_fail);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_indexer_s, data_make->buffer, fake_make_setting_indexer_s_length, settings.objects.array[i]) == F_equal_to) {
- fake_make_load_fakefile_setting_indexer(main, data_make, &settings.objects.array[i], &settings.contents.array[i], &range_indexer);
+ fake_make_load_fakefile_setting_indexer(data_make, &settings.objects.array[i], &settings.contents.array[i], &range_indexer);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_parameter_s, data_make->buffer, fake_make_setting_parameter_s_length, settings.objects.array[i]) == F_equal_to) {
- *status = fake_make_load_fakefile_setting_parameter(main, data_make, &settings.objects.array[i], &settings.contents.array[i]);
+ *status = fake_make_load_fakefile_setting_parameter(data_make, &settings.objects.array[i], &settings.contents.array[i]);
if (F_status_is_error(*status)) break;
}
} // for
if (F_status_is_error_not(*status) && data_make->setting_make.load_build) {
f_string_static_t stub = f_string_static_t_initialize;
- fake_build_load_setting(main, stub, &data_make->setting_build, status);
+ fake_build_load_setting(data_make->main, stub, &data_make->setting_build, status);
if (F_status_is_error(*status) && *status != F_status_set_error(F_interrupt)) {
- fll_error_print(main->error, F_status_set_fine(*status), "fake_build_load_setting", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "fake_build_load_setting", F_true);
}
}
if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) != F_interrupt) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_partial_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_partial_append", F_true);
}
macro_f_fss_set_t_delete_simple(settings);
return;
}
- *status = fake_make_load_fakefile_setting_define_and_parameter(main, data_make, &settings);
+ *status = fake_make_load_fakefile_setting_define_and_parameter(data_make->main, data_make, &settings);
macro_f_fss_set_t_delete_simple(settings);
}
#endif // _di_fake_make_load_fakefile_
#ifndef _di_fake_make_load_fakefile_setting_build_
- void fake_make_load_fakefile_setting_build(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, bool *unmatched_build) {
+ void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, bool *unmatched_build) {
if (*unmatched_build) {
if (content->used) {
data_make->setting_make.load_build = F_false;
}
else {
- fake_print_warning_settings_content_invalid(main, main->file_data_build_fakefile.string, data_make->buffer, *object, content->array[0], fake_make_section_settings_s);
+ fake_print_warning_settings_content_invalid(data_make->main, data_make->main->file_data_build_fakefile.string, data_make->buffer, *object, content->array[0], fake_make_section_settings_s);
}
*unmatched_build = F_false;
if (content->used > 1) {
- fake_print_warning_settings_content_multiple(main, main->file_data_build_fakefile.string, fake_make_setting_load_build_s);
+ fake_print_warning_settings_content_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, fake_make_setting_load_build_s);
}
return;
}
- fake_print_warning_settings_content_empty(main, main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
+ fake_print_warning_settings_content_empty(data_make->main, data_make->main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
}
else {
- fake_print_warning_settings_content_multiple(main, main->file_data_build_fakefile.string, fake_make_setting_load_build_s);
+ fake_print_warning_settings_content_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, fake_make_setting_load_build_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_build_
#ifndef _di_fake_make_load_fakefile_setting_compiler_
- void fake_make_load_fakefile_setting_compiler(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler) {
+ void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler) {
if (*range_compiler) {
- fake_print_warning_settings_content_multiple(main, main->file_data_build_fakefile.string, fake_make_setting_compiler_s);
+ fake_print_warning_settings_content_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, fake_make_setting_compiler_s);
return;
}
*range_compiler = &content->array[0];
if (content->used > 1) {
- fake_print_warning_settings_content_multiple(main, main->file_data_build_fakefile.string, fake_make_setting_compiler_s);
+ fake_print_warning_settings_content_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, fake_make_setting_compiler_s);
}
}
else {
- fake_print_warning_settings_content_empty(main, main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
+ fake_print_warning_settings_content_empty(data_make->main, data_make->main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_compiler_
#endif // _di_fake_make_load_fakefile_setting_define_and_parameter_
#ifndef _di_fake_make_load_fakefile_setting_environment_
- f_status_t fake_make_load_fakefile_setting_environment(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_content_t * const content) {
+ f_status_t fake_make_load_fakefile_setting_environment(fake_make_data_t * const data_make, f_fss_content_t * const content) {
f_status_t status = F_none;
status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[i], &name_define);
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
break;
}
status = f_string_dynamic_terminate_after(&name_define);
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
break;
}
status = f_string_dynamics_increase(F_memory_default_allocation_small_d, &data_make->setting_build.environment);
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamics_increase", F_true);
break;
}
status = f_string_dynamic_append(name_define, &data_make->setting_build.environment.array[data_make->setting_build.environment.used]);
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
break;
}
// Set the terminating NULL to not being normally included.
--data_make->setting_build.environment.array[data_make->setting_build.environment.used++].used;
}
- else if (main->warning.verbosity == f_console_verbosity_verbose) {
- flockfile(main->warning.to.stream);
+ else if (data_make->main->warning.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->warning.to.stream);
- fl_print_format("%c%[%SThe environment name '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context);
- fl_print_format("%[%Q%]", main->warning.to.stream, main->warning.notable, name_define, main->warning.notable);
- fl_print_format("%[' is already added.%]%c", main->warning.to.stream, main->warning.context, main->warning.context, f_string_eol_s[0]);
+ fl_print_format("%c%[%SThe environment name '%]", data_make->main->warning.to.stream, f_string_eol_s[0], data_make->main->warning.context, data_make->main->warning.prefix, data_make->main->warning.context);
+ fl_print_format("%[%Q%]", data_make->main->warning.to.stream, data_make->main->warning.notable, name_define, data_make->main->warning.notable);
+ fl_print_format("%[' is already added.%]%c", data_make->main->warning.to.stream, data_make->main->warning.context, data_make->main->warning.context, f_string_eol_s[0]);
- funlockfile(main->warning.to.stream);
+ funlockfile(data_make->main->warning.to.stream);
}
}
- else if (main->warning.verbosity == f_console_verbosity_verbose) {
- flockfile(main->warning.to.stream);
+ else if (data_make->main->warning.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->warning.to.stream);
- fl_print_format("%c%[%SThe environment name '%]", main->warning.to.stream, f_string_eol_s[0], main->warning.context, main->warning.prefix, main->warning.context);
- fl_print_format("%[%Q%]", main->warning.to.stream, main->warning.notable, name_define, main->warning.notable);
- fl_print_format("%[' is invalid, ignoring.%]%c", main->warning.to.stream, main->warning.context, main->warning.context, f_string_eol_s[0]);
+ fl_print_format("%c%[%SThe environment name '%]", data_make->main->warning.to.stream, f_string_eol_s[0], data_make->main->warning.context, data_make->main->warning.prefix, data_make->main->warning.context);
+ fl_print_format("%[%Q%]", data_make->main->warning.to.stream, data_make->main->warning.notable, name_define, data_make->main->warning.notable);
+ fl_print_format("%[' is invalid, ignoring.%]%c", data_make->main->warning.to.stream, data_make->main->warning.context, data_make->main->warning.context, f_string_eol_s[0]);
- funlockfile(main->warning.to.stream);
+ funlockfile(data_make->main->warning.to.stream);
}
name_define.used = 0;
#endif // _di_fake_make_load_fakefile_setting_environment_
#ifndef _di_fake_make_load_fakefile_setting_fail_
- void fake_make_load_fakefile_setting_fail(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, bool *unmatched_fail) {
+ void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, bool *unmatched_fail) {
if (*unmatched_fail) {
if (content->used) {
data_make->setting_make.fail = fake_make_operation_fail_type_ignore;
}
else {
- fake_print_warning_settings_content_invalid(main, main->file_data_build_fakefile.string, data_make->buffer, *object, content->array[0], fake_make_section_settings_s);
+ fake_print_warning_settings_content_invalid(data_make->main, data_make->main->file_data_build_fakefile.string, data_make->buffer, *object, content->array[0], fake_make_section_settings_s);
}
if (content->used > 1) {
- fake_print_warning_settings_content_multiple(main, main->file_data_build_fakefile.string, fake_make_setting_fail_s);
+ fake_print_warning_settings_content_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, fake_make_setting_fail_s);
}
*unmatched_fail = F_false;
return;
}
- fake_print_warning_settings_content_empty(main, main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
+ fake_print_warning_settings_content_empty(data_make->main, data_make->main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
}
else {
- fake_print_warning_settings_content_multiple(main, main->file_data_build_fakefile.string, fake_make_setting_fail_s);
+ fake_print_warning_settings_content_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, fake_make_setting_fail_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_fail_
#ifndef _di_fake_make_load_fakefile_setting_indexer_
- void fake_make_load_fakefile_setting_indexer(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer) {
+ void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer) {
if (*range_indexer) {
- fake_print_warning_settings_content_multiple(main, main->file_data_build_fakefile.string, fake_make_setting_indexer_s);
+ fake_print_warning_settings_content_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, fake_make_setting_indexer_s);
return;
}
*range_indexer = &content->array[0];
if (content->used > 1) {
- fake_print_warning_settings_content_multiple(main, main->file_data_build_fakefile.string, fake_make_setting_indexer_s);
+ fake_print_warning_settings_content_multiple(data_make->main, data_make->main->file_data_build_fakefile.string, fake_make_setting_indexer_s);
}
}
else {
- fake_print_warning_settings_content_empty(main, main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
+ fake_print_warning_settings_content_empty(data_make->main, data_make->main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_indexer_
#ifndef _di_fake_make_load_fakefile_setting_parameter_
- f_status_t fake_make_load_fakefile_setting_parameter(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
+ f_status_t fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
if (content->used) {
f_status_t status = F_none;
status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[i], &data_make->setting_make.parameter.array[0].value.array[0]);
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
break;
}
status = f_string_dynamic_terminate_after(&data_make->setting_make.parameter.array[0].value.array[0]);
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
break;
}
status = f_string_append_assure(f_string_space_s, 1, &data_make->setting_make.parameter.array[0].value.array[0]);
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_append_assure", F_true);
break;
}
}
}
else {
- fake_print_warning_settings_content_empty(main, main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
+ fake_print_warning_settings_content_empty(data_make->main, data_make->main->file_data_build_fakefile.string, data_make->buffer, *object, fake_make_section_settings_s);
}
return F_none;
*
* This will process any additional files as necessary, such as the build settings file.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param status
* @see fake_build_load_setting()
*/
#ifndef _di_fake_make_load_fakefile_
- extern void fake_make_load_fakefile(fake_main_t * const main, fake_make_data_t * const data_make, f_status_t *status) F_attribute_visibility_internal_d;
+ extern void fake_make_load_fakefile(fake_make_data_t * const data_make, f_status_t *status) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_
/**
* Load the fakefile setting "build".
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param object
* Boolean designating whether or not build is matched and processed.
*/
#ifndef _di_fake_make_load_fakefile_setting_build_
- extern void fake_make_load_fakefile_setting_build(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, bool *unmatched_build) F_attribute_visibility_internal_d;
+ extern void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, bool *unmatched_build) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_build_
/**
* Load the fakefile setting "compiler".
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param object
* A pointer to the range that representing the compiler setting within the buffer.
*/
#ifndef _di_fake_make_load_fakefile_setting_compiler_
- extern void fake_make_load_fakefile_setting_compiler(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler) F_attribute_visibility_internal_d;
+ extern void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_compiler_
/**
/**
* Load the fakefile setting "environment".
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param content
* @see f_string_dynamics_increase()
*/
#ifndef _di_fake_make_load_fakefile_setting_environment_
- extern f_status_t fake_make_load_fakefile_setting_environment(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_content_t * const content) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_load_fakefile_setting_environment(fake_make_data_t * const data_make, f_fss_content_t * const content) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_environment_
/**
* Load the fakefile setting "fail".
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param object
* Boolean designating whether or not fail is matched and processed.
*/
#ifndef _di_fake_make_load_fakefile_setting_fail_
- extern void fake_make_load_fakefile_setting_fail(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, bool *unmatched_fail) F_attribute_visibility_internal_d;
+ extern void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, bool *unmatched_fail) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_fail_
/**
* Load the fakefile setting "indexer".
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param object
* A pointer to the range that representing the indexer setting within the buffer.
*/
#ifndef _di_fake_make_load_fakefile_setting_indexer_
- extern void fake_make_load_fakefile_setting_indexer(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer) F_attribute_visibility_internal_d;
+ extern void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_indexer_
/**
* This only processes special "parameter" settings, namely "return".
* For all other "parameter" settings, see fake_make_load_fakefile_setting_define_and_parameter().
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param object
* @see fake_make_load_fakefile_setting_define_and_parameter()
*/
#ifndef _di_fake_make_load_fakefile_setting_parameter_
- extern f_status_t fake_make_load_fakefile_setting_parameter(fake_main_t * const main, fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_fakefile_setting_parameter_
#ifdef __cplusplus
#endif
#ifndef _di_fake_make_load_parameters_
- void fake_make_load_parameters(fake_main_t * const main, fake_make_data_t * const data_make, f_status_t *status) {
+ void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t *status) {
if (F_status_is_error(*status)) return;
- if (main->context.mode != F_color_mode_none_d) {
+ if (data_make->main->context.mode != F_color_mode_none_d) {
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, &data_make->parameter.color);
if (F_status_is_error_not(*status)) {
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
return;
}
- if (main->context.mode == F_color_mode_no_color_d) {
- if (main->parameters[fake_parameter_no_color].type == f_console_type_normal) {
+ if (data_make->main->context.mode == F_color_mode_no_color_d) {
+ if (data_make->main->parameters[fake_parameter_no_color].type == f_console_type_normal) {
*status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (main->parameters[fake_parameter_no_color].type == f_console_type_inverse) {
+ else if (data_make->main->parameters[fake_parameter_no_color].type == f_console_type_inverse) {
*status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
*status = f_string_append(f_console_standard_short_no_color_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
- else if (main->context.mode == F_color_mode_dark_d) {
- if (main->parameters[fake_parameter_dark].type == f_console_type_normal) {
+ else if (data_make->main->context.mode == F_color_mode_dark_d) {
+ if (data_make->main->parameters[fake_parameter_dark].type == f_console_type_normal) {
*status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (main->parameters[fake_parameter_dark].type == f_console_type_inverse) {
+ else if (data_make->main->parameters[fake_parameter_dark].type == f_console_type_inverse) {
*status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
}
else {
- if (main->parameters[fake_parameter_light].type == f_console_type_normal) {
+ if (data_make->main->parameters[fake_parameter_light].type == f_console_type_normal) {
*status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (main->parameters[fake_parameter_light].type == f_console_type_inverse) {
+ else if (data_make->main->parameters[fake_parameter_light].type == f_console_type_inverse) {
*status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_append", F_true);
return;
}
*status = f_string_dynamic_append(data_make->parameter.color.array[data_make->parameter.color.used], &data_make->parameter_option.color.array[data_make->parameter_option.color.used]);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
return;
}
++data_make->parameter_option.color.used;
}
- if (main->error.verbosity != f_console_verbosity_normal) {
+ if (data_make->main->error.verbosity != f_console_verbosity_normal) {
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, &data_make->parameter.verbosity);
if (F_status_is_error_not(*status)) {
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
return;
}
- if (main->error.verbosity == f_console_verbosity_quiet) {
- if (main->parameters[fake_parameter_verbosity_quiet].type == f_console_type_normal) {
+ if (data_make->main->error.verbosity == f_console_verbosity_quiet) {
+ if (data_make->main->parameters[fake_parameter_verbosity_quiet].type == f_console_type_normal) {
*status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (main->parameters[fake_parameter_verbosity_quiet].type == f_console_type_inverse) {
+ else if (data_make->main->parameters[fake_parameter_verbosity_quiet].type == f_console_type_inverse) {
*status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
*status = f_string_append(f_console_standard_short_quiet_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
- else if (main->error.verbosity == f_console_verbosity_verbose) {
- if (main->parameters[fake_parameter_verbosity_verbose].type == f_console_type_normal) {
+ else if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ if (data_make->main->parameters[fake_parameter_verbosity_verbose].type == f_console_type_normal) {
*status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (main->parameters[fake_parameter_verbosity_verbose].type == f_console_type_inverse) {
+ else if (data_make->main->parameters[fake_parameter_verbosity_verbose].type == f_console_type_inverse) {
*status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
}
else {
- if (main->parameters[fake_parameter_verbosity_debug].type == f_console_type_normal) {
+ if (data_make->main->parameters[fake_parameter_verbosity_debug].type == f_console_type_normal) {
*status = f_string_append(f_console_symbol_short_enable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (main->parameters[fake_parameter_verbosity_debug].type == f_console_type_inverse) {
+ else if (data_make->main->parameters[fake_parameter_verbosity_debug].type == f_console_type_inverse) {
*status = f_string_append(f_console_symbol_short_disable_s, 1, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_append", F_true);
return;
}
*status = f_string_dynamic_append(data_make->parameter.verbosity.array[data_make->parameter.verbosity.used], &data_make->parameter_option.verbosity.array[data_make->parameter_option.verbosity.used]);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
return;
}
};
const f_console_parameter_t *console[] = {
- &main->parameters[fake_parameter_define],
- &main->parameters[fake_parameter_mode],
+ &data_make->main->parameters[fake_parameter_define],
+ &data_make->main->parameters[fake_parameter_mode],
};
const f_string_dynamics_t *source[] = {
- &main->define,
- &main->mode,
+ &data_make->main->define,
+ &data_make->main->mode,
};
f_string_dynamics_t * const destination[] = {
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_append", F_true);
return;
}
*status = f_string_dynamic_append(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
return;
}
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
return;
}
};
const f_console_parameter_t *console[] = {
- &main->parameters[fake_parameter_fakefile],
- &main->parameters[fake_parameter_path_build],
- &main->parameters[fake_parameter_path_data],
- &main->parameters[fake_parameter_path_sources],
- &main->parameters[fake_parameter_path_work],
- &main->parameters[fake_parameter_process],
- &main->parameters[fake_parameter_settings],
+ &data_make->main->parameters[fake_parameter_fakefile],
+ &data_make->main->parameters[fake_parameter_path_build],
+ &data_make->main->parameters[fake_parameter_path_data],
+ &data_make->main->parameters[fake_parameter_path_sources],
+ &data_make->main->parameters[fake_parameter_path_work],
+ &data_make->main->parameters[fake_parameter_process],
+ &data_make->main->parameters[fake_parameter_settings],
};
const f_string_dynamic_t *source[] = {
- &main->fakefile,
- &main->path_build,
- &main->path_data,
- &main->path_sources,
- &main->path_work,
- &main->process,
- &main->settings,
+ &data_make->main->fakefile,
+ &data_make->main->path_build,
+ &data_make->main->path_data,
+ &data_make->main->path_sources,
+ &data_make->main->path_work,
+ &data_make->main->process,
+ &data_make->main->settings,
};
f_string_dynamics_t * const destination[] = {
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase", F_true);
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_append", F_true);
return;
}
*status = f_string_dynamic_append(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
return;
}
*status = f_string_dynamics_increase_by(fake_default_allocation_small_d, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamics_increase_by", F_true);
return;
}
}
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_string_dynamic_append", F_true);
return;
}
/**
* Load the environment variables into a structure more readily available for using in parameter expansion.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param status
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_load_parameters_
- extern void fake_make_load_parameters(fake_main_t * const main, fake_make_data_t * const data_make, f_status_t *status) F_attribute_visibility_internal_d;
+ extern void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t *status) F_attribute_visibility_internal_d;
#endif // _di_fake_make_load_parameters_
#ifdef __cplusplus
#endif
#ifndef _di_fake_make_operate_process_type_copy_
- f_status_t fake_make_operate_process_type_copy(fake_main_t * const main, 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 f_string_dynamics_t arguments, const bool clone) {
f_status_t status = F_none;
f_status_t status_file = F_none;
f_mode_t mode = f_mode_t_initialize;
if (clone) {
- if (main->error.verbosity == f_console_verbosity_verbose) {
- recurse.output = main->output.to;
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ recurse.output = data_make->main->output.to;
recurse.verbose = fake_verbose_print_clone;
}
}
else {
- macro_f_mode_t_set_default_umask(mode, main->umask);
+ macro_f_mode_t_set_default_umask(mode, data_make->main->umask);
- if (main->error.verbosity == f_console_verbosity_verbose) {
- recurse.output = main->output.to;
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ recurse.output = data_make->main->output.to;
recurse.verbose = fake_verbose_print_copy;
}
}
status = F_status_set_error(F_failure);
}
- else if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.to.stream);
+ else if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->output.to.stream);
- fl_print_format("%c%s '%[%Q%]' to '", main->output.to.stream, f_string_eol_s[0], clone ? "Cloned" : "Copied", main->context.set.notable, arguments.array[i], main->context.set.notable);
- fl_print_format("%[%S%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, destination, main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("%c%s '%[%Q%]' to '", data_make->main->output.to.stream, f_string_eol_s[0], clone ? "Cloned" : "Copied", data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable);
+ fl_print_format("%[%S%]'.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, destination, data_make->main->context.set.notable, f_string_eol_s[0]);
- funlockfile(main->output.to.stream);
+ funlockfile(data_make->main->output.to.stream);
}
}
else if (F_status_is_error(status_file)) {
#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_main_t * const main, 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 f_string_dynamics_t arguments, const bool all) {
f_status_t status = F_none;
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {
- if (main->warning.verbosity == f_console_verbosity_verbose) {
- flockfile(main->warning.to.stream);
+ if (data_make->main->warning.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->warning.to.stream);
- fl_print_format("%c%[%SThe file '%]", main->warning.to.stream, main->warning.prefix, f_string_eol_s[0]);
- fl_print_format("%[%Q%]", main->warning.to.stream, main->warning.notable, arguments.array[i], main->warning.notable);
- fl_print_format("%[' cannot be found.%]%c", main->warning.to.stream, f_string_eol_s[0]);
+ fl_print_format("%c%[%SThe file '%]", data_make->main->warning.to.stream, data_make->main->warning.prefix, f_string_eol_s[0]);
+ 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("%[' cannot be found.%]%c", data_make->main->warning.to.stream, f_string_eol_s[0]);
- funlockfile(main->warning.to.stream);
+ funlockfile(data_make->main->warning.to.stream);
}
status = F_none;
}
}
else if (macro_f_file_type_is_directory(file_stat.st_mode)) {
- if (main->error.verbosity == f_console_verbosity_verbose) {
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
status = f_directory_remove_custom(arguments.array[i].string, recursion_max, F_false, fake_clean_remove_recursively_verbosely);
}
else {
}
if (F_status_set_fine(status) == F_file_found_not) {
- if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cThe directory '%[%Q%]' does not exist.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("%cThe directory '%[%Q%]' does not exist.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s[0]);
}
status = F_none;
return status;
}
- else if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cRemoved '%[%Q%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ else if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("%cRemoved '%[%Q%]'.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s[0]);
}
}
else {
status = f_file_remove(arguments.array[i].string);
if (F_status_set_fine(status) == F_file_found_not) {
- if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cThe file '%[%Q%]' does not exist.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("%cThe file '%[%Q%]' does not exist.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s[0]);
}
status = F_none;
return status;
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cRemoved '%[%Q%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("%cRemoved '%[%Q%]'.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[i], data_make->main->context.set.notable, f_string_eol_s[0]);
}
}
} // 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_main_t * const main, 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, const f_string_dynamics_t arguments) {
if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit_s, arguments.array[0], fake_make_operation_argument_exit_s_length) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_type_exit;
data_make->error.prefix = fl_print_error_s;
data_make->error.suffix = 0;
- data_make->error.context = main->context.set.error;
- data_make->error.notable = main->context.set.notable;
+ data_make->error.context = data_make->main->context.set.error;
+ data_make->error.notable = data_make->main->context.set.notable;
data_make->error.to.stream = F_type_error_d;
data_make->error.to.id = F_type_descriptor_error_d;
- data_make->error.set = &main->context.set;
+ data_make->error.set = &data_make->main->context.set;
}
else if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn_s, arguments.array[0], fake_make_operation_argument_warn_s_length) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_type_warn;
data_make->error.prefix = fl_print_warning_s;
data_make->error.suffix = 0;
- data_make->error.context = main->context.set.warning;
- data_make->error.notable = main->context.set.notable;
+ data_make->error.context = data_make->main->context.set.warning;
+ data_make->error.notable = data_make->main->context.set.notable;
data_make->error.to.stream = F_type_warning_d;
data_make->error.to.id = F_type_descriptor_warning_d;
- data_make->error.set = &main->context.set;
+ data_make->error.set = &data_make->main->context.set;
}
else {
data_make->setting_make.fail = fake_make_operation_fail_type_ignore;
data_make->error.to.id = -1;
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.to.stream);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->output.to.stream);
- f_print_terminated("Set failure state to '", main->output.to.stream);
+ f_print_terminated("Set failure state to '", data_make->main->output.to.stream);
if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) {
- fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_exit_s, main->context.set.notable);
+ fl_print_format("%[%s%]", data_make->main->output.to.stream, data_make->main->context.set.notable, fake_make_operation_argument_exit_s, data_make->main->context.set.notable);
}
else if (data_make->setting_make.fail == fake_make_operation_fail_type_warn) {
- fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_warn_s, main->context.set.notable);
+ fl_print_format("%[%s%]", data_make->main->output.to.stream, data_make->main->context.set.notable, fake_make_operation_argument_warn_s, data_make->main->context.set.notable);
}
else {
- fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_ignore_s, main->context.set.notable);
+ fl_print_format("%[%s%]", data_make->main->output.to.stream, data_make->main->context.set.notable, fake_make_operation_argument_ignore_s, data_make->main->context.set.notable);
}
- fl_print_format("'.%c", main->output.to.stream, f_string_eol_s[0]);
+ fl_print_format("'.%c", data_make->main->output.to.stream, f_string_eol_s[0]);
- funlockfile(main->output.to.stream);
+ funlockfile(data_make->main->output.to.stream);
}
}
#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_main_t * const main, 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 f_string_dynamics_t arguments, const bool all) {
f_status_t status = F_none;
f_status_t status_file = F_none;
gid_t id = 0;
- status = fake_make_get_id_group(main, data_make->error, arguments.array[0], &id);
+ status = fake_make_get_id_group(data_make->main, data_make->error, arguments.array[0], &id);
if (F_status_is_error(status)) return 0;
for (f_array_length_t i = 1; i < arguments.used; ++i) {
- status_file = fake_make_assure_inside_project(main, data_make, arguments.array[i]);
+ status_file = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(status_file)) {
status = status_file;
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
continue;
}
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].string, "change group of", fll_error_file_type_file);
}
- else if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.to.stream);
+ else if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->output.to.stream);
- fl_print_format("%s group of '%[%s%]", main->output.to.stream, all ? "Recursively changed" : "Changed", main->context.set.notable, arguments.array[i], main->context.set.notable);
- fl_print_format("' to %[%ul%].%c", main->output.to.stream, main->context.set.notable, id, main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("%s group of '%[%s%]", 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("' to %[%ul%].%c", data_make->main->output.to.stream, data_make->main->context.set.notable, id, data_make->main->context.set.notable, f_string_eol_s[0]);
- funlockfile(main->output.to.stream);
+ funlockfile(data_make->main->output.to.stream);
}
} // for
#endif // _di_fake_make_operate_process_type_groups_
#ifndef _di_fake_make_operate_process_type_if_defined_
- void fake_make_operate_process_type_if_defined(fake_main_t * const main, 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_defined(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
const f_string_static_t argument = if_not ? arguments.array[2] : arguments.array[1];
};
const bool reserved_defined[] = {
- main->path_build.used,
+ data_make->main->path_build.used,
F_true,
- main->path_data.used,
- main->define.used,
- main->fakefile.used,
- main->mode.used,
- main->process.used,
- main->settings.used,
- main->path_sources.used,
+ data_make->main->path_data.used,
+ data_make->main->define.used,
+ data_make->main->fakefile.used,
+ data_make->main->mode.used,
+ data_make->main->process.used,
+ data_make->main->settings.used,
+ data_make->main->path_sources.used,
F_true,
- main->path_work.used,
- main->parameters[fake_parameter_path_build].result == f_console_result_additional,
- main->parameters[fake_parameter_light].result == f_console_result_found || main->parameters[fake_parameter_dark].result == f_console_result_found || main->parameters[fake_parameter_no_color].result == f_console_result_found,
- main->parameters[fake_parameter_path_data].result == f_console_result_additional,
- main->parameters[fake_parameter_define].result == f_console_result_additional,
- main->parameters[fake_parameter_fakefile].result == f_console_result_additional,
- main->parameters[fake_parameter_mode].result == f_console_result_additional,
- main->parameters[fake_parameter_process].result == f_console_result_additional,
- main->parameters[fake_parameter_settings].result == f_console_result_additional,
- main->parameters[fake_parameter_path_sources].result == f_console_result_additional,
- main->parameters[fake_parameter_verbosity_quiet].result == f_console_result_found || main->parameters[fake_parameter_verbosity_normal].result == f_console_result_found || main->parameters[fake_parameter_verbosity_verbose].result == f_console_result_found || main->parameters[fake_parameter_verbosity_debug].result == f_console_result_found,
- main->parameters[fake_parameter_path_work].result == f_console_result_additional,
+ data_make->main->path_work.used,
+ data_make->main->parameters[fake_parameter_path_build].result == f_console_result_additional,
+ data_make->main->parameters[fake_parameter_light].result == f_console_result_found || data_make->main->parameters[fake_parameter_dark].result == f_console_result_found || data_make->main->parameters[fake_parameter_no_color].result == f_console_result_found,
+ data_make->main->parameters[fake_parameter_path_data].result == f_console_result_additional,
+ data_make->main->parameters[fake_parameter_define].result == f_console_result_additional,
+ data_make->main->parameters[fake_parameter_fakefile].result == f_console_result_additional,
+ data_make->main->parameters[fake_parameter_mode].result == f_console_result_additional,
+ data_make->main->parameters[fake_parameter_process].result == f_console_result_additional,
+ data_make->main->parameters[fake_parameter_settings].result == f_console_result_additional,
+ data_make->main->parameters[fake_parameter_path_sources].result == f_console_result_additional,
+ data_make->main->parameters[fake_parameter_verbosity_quiet].result == f_console_result_found || data_make->main->parameters[fake_parameter_verbosity_normal].result == f_console_result_found || data_make->main->parameters[fake_parameter_verbosity_verbose].result == f_console_result_found || data_make->main->parameters[fake_parameter_verbosity_debug].result == f_console_result_found,
+ data_make->main->parameters[fake_parameter_path_work].result == f_console_result_additional,
data_make->parameter_value.build.used,
data_make->parameter_value.color.used,
data_make->parameter_value.data.used,
#endif // _di_fake_make_operate_process_type_if_defined_
#ifndef _di_fake_make_operate_process_type_if_exists_
- f_status_t fake_make_operate_process_type_if_exists(fake_main_t * const main, 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_exists(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 status = F_none;
#endif // _di_fake_make_operate_process_type_if_exists_
#ifndef _di_fake_make_operate_process_type_if_is_
- f_status_t fake_make_operate_process_type_if_is(fake_main_t * const main, 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 f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
f_status_t status = F_none;
#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_main_t * const main, 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, const f_string_dynamics_t arguments, fake_state_process_t *state_process) {
f_status_t status = F_none;
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_done;
- if (main->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
+ if (data_make->main->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
flockfile(data_make->error.to.stream);
if ((i == 1 && number_left > F_number_t_size_unsigned_d) || (i > 1 && number_right > F_number_t_size_unsigned_d)) {
#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_main_t * const main, 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 f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
f_status_t status = F_none;
uid_t id = 0;
- status = fake_make_get_id_group(main, data_make->error, arguments.array[if_not ? 2 : 1], &id);
+ status = fake_make_get_id_group(data_make->main, data_make->error, arguments.array[if_not ? 2 : 1], &id);
if (F_status_is_error(status)) return status;
uid_t id_file = 0;
#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_main_t * const main, 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 f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
f_status_t status = F_none;
f_file_mode_t mode_rule = 0;
{
uint8_t mode_replace = 0;
- status = fake_make_get_id_mode(main, data_make->error, arguments.array[if_not ? 3 : 2], &mode_rule, &mode_replace);
+ status = fake_make_get_id_mode(data_make->main, data_make->error, arguments.array[if_not ? 3 : 2], &mode_rule, &mode_replace);
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_done;
#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_main_t * const main, 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 f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) {
f_status_t status = F_none;
uid_t id = 0;
- status = fake_make_get_id_owner(main, data_make->error, arguments.array[if_not ? 2 : 1], &id);
+ status = fake_make_get_id_owner(data_make->main, data_make->error, arguments.array[if_not ? 2 : 1], &id);
if (F_status_is_error(status)) return status;
uid_t id_file = 0;
#endif // _di_fake_make_operate_process_type_if_owner_
#ifndef _di_fake_make_operate_process_type_modes_
- f_status_t fake_make_operate_process_type_modes(fake_main_t * const main, 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 f_string_dynamics_t arguments, 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(main, data_make->error, arguments.array[0], &mode_rule, &replace);
+ status = fake_make_get_id_mode(data_make->main, data_make->error, arguments.array[0], &mode_rule, &replace);
if (F_status_is_error(status)) return 0;
mode_t mode = 0;
break;
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Changed mode of '%Q' to %#@u.%c", main->output.to.stream, arguments.array[i], mode, f_string_eol_s[0]);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("Changed mode of '%Q' to %#@u.%c", data_make->main->output.to.stream, arguments.array[i], mode, f_string_eol_s[0]);
}
} // 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_main_t * const main, 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, const f_string_dynamics_t arguments) {
f_status_t status = F_none;
f_status_t status_file = F_none;
f_array_length_t destination_length = 0;
- if (main->error.verbosity == f_console_verbosity_verbose) {
- recurse.output = main->output.to;
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ recurse.output = data_make->main->output.to;
recurse.verbose = fake_verbose_print_move;
}
#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_main_t * const main, 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 f_string_dynamics_t arguments, const bool all) {
f_status_t status = F_none;
uid_t id = 0;
- status = fake_make_get_id_owner(main, data_make->error, arguments.array[0], &id);
+ status = fake_make_get_id_owner(data_make->main, data_make->error, arguments.array[0], &id);
if (F_status_is_error(status)) return status;
f_status_t status_file = F_none;
for (f_array_length_t i = 1; i < arguments.used; ++i) {
- status_file = fake_make_assure_inside_project(main, data_make, arguments.array[i]);
+ status_file = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(status_file)) {
status = status_file;
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
continue;
}
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].string, "change owner of", fll_error_file_type_file);
}
- else if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%s owner of '%Q' to %u.%c", main->output.to.stream, all ? "Recursively changed" : "Changed", arguments.array[i], id, f_string_eol_s[0]);
+ else if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("%s owner of '%Q' to %u.%c", data_make->main->output.to.stream, all ? "Recursively changed" : "Changed", arguments.array[i], id, f_string_eol_s[0]);
}
} // 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_main_t * const main, 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, const f_string_dynamics_t arguments) {
f_status_t status = F_none;
#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_main_t * const main, 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, const f_string_dynamics_t arguments) {
f_status_t status = F_none;
status = f_path_change(data_make->path.stack.array[data_make->path.stack.used - 1].string);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_stack_max(main, data_make->error, F_status_set_fine(status), "f_path_change", data_make->path.stack.array[data_make->path.stack.used - 1].string);
+ fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_status_set_fine(status), "f_path_change", data_make->path.stack.array[data_make->path.stack.used - 1].string);
return 0;
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- status = fake_make_path_relative(main, data_make, data_make->path.stack.array[data_make->path.stack.used - 1]);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ status = fake_make_path_relative(data_make, data_make->path.stack.array[data_make->path.stack.used - 1]);
// The created relative path is for verbosity purposes and as such its failure to be processed should not be treated as a failure of the function.
if (F_status_is_error(status)) {
fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_path_relative", F_true);
- fll_print_format("Changed to project path '%[%Q%]'.%c", main->output.to.stream, main->context.set.notable, data_make->path.stack.array[data_make->path.stack.used - 1], main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("Changed to project path '%[%Q%]'.%c", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->path.stack.array[data_make->path.stack.used - 1], data_make->main->context.set.notable, f_string_eol_s[0]);
}
else {
- fll_print_format("Changed to project path '%[%Q%]'.%c", main->output.to.stream, main->context.set.notable, data_make->path_cache, main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("Changed to project path '%[%Q%]'.%c", 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[0]);
}
}
#endif // _di_fake_make_operate_process_type_pop_
#ifndef _di_fake_make_operate_process_type_to_
- f_status_t fake_make_operate_process_type_to(fake_main_t * const main, 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, const f_string_dynamics_t arguments) {
f_status_t status = F_none;
- status = fake_make_assure_inside_project(main, data_make, arguments.array[0]);
+ status = fake_make_assure_inside_project(data_make, arguments.array[0]);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string);
if (F_status_set_fine(status) == F_false) {
status = F_status_set_error(F_failure);
status = f_path_change(arguments.array[0].string);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_stack_max(main, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0].string);
+ fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0].string);
}
else {
status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, &data_make->path.stack);
if (F_status_set_fine(status) == F_array_too_large) {
- fake_print_message_section_operation_path_stack_max(main, data_make->error, F_array_too_large, "f_string_dynamics_increase_by", "path stack");
+ fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_array_too_large, "f_string_dynamics_increase_by", "path stack");
return status;
}
return status;
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- status = fake_make_path_relative(main, data_make, data_make->path.stack.array[data_make->path.stack.used]);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ status = fake_make_path_relative(data_make, data_make->path.stack.array[data_make->path.stack.used]);
// The created relative path is for verbosity purposes and as such its failure to be processed should not be treated as a failure of the function.
if (F_status_is_error(status)) {
fll_error_print(data_make->error, F_status_set_fine(status), "fake_make_path_relative", F_true);
- fll_print_format("Changed to project path '%[%Q%]'.%c", main->output.to.stream, main->context.set.notable, data_make->path.stack.array[data_make->path.stack.used], main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("Changed to project path '%[%Q%]'.%c", 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[0]);
}
else {
- fll_print_format("Changed to project path '%[%Q%]'.%c", main->output.to.stream, main->context.set.notable, data_make->path_cache, main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("Changed to project path '%[%Q%]'.%c", 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[0]);
}
}
#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_main_t * const main, 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, const f_string_dynamics_t arguments) {
{
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(main, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0].string);
+ fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0].string);
return status;
}
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Changed to project path ''.%c", main->output.to.stream, f_string_eol_s[0]);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("Changed to project path ''.%c", data_make->main->output.to.stream, f_string_eol_s[0]);
}
// Clear stack, except for the project root.
#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_main_t * const main, 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, const f_string_dynamics_t arguments) {
f_status_t status = F_none;
f_mode_t mode = f_mode_t_initialize;
- macro_f_mode_t_set_default_umask(mode, main->umask);
+ macro_f_mode_t_set_default_umask(mode, data_make->main->umask);
for (f_array_length_t i = 1; i < arguments.used; ++i) {
}
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Touched '%[%Q%]'.%c", main->output.to.stream, main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("Touched '%[%Q%]'.%c", 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[0]);
}
} // for
/**
* Perform the copy and clone operation processes.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @see fl_directory_copy()
*/
#ifndef _di_fake_make_operate_process_type_copy_
- extern f_status_t fake_make_operate_process_type_copy(fake_main_t * const main, 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 f_string_dynamics_t arguments, const bool clone) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_copy_
/**
* Perform the delete and deletes operation processes.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @see f_directory_remove_custom()
*/
#ifndef _di_fake_make_operate_process_type_deletes_
- extern f_status_t fake_make_operate_process_type_deletes(fake_main_t * const main, 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 f_string_dynamics_t arguments, const bool all) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_deletes_
/**
* Perform the fail operation process.
*
- * @param main
- * The main program data.
* @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.
*/
#ifndef _di_fake_make_operate_process_type_fail_
- extern void fake_make_operate_process_type_fail(fake_main_t * const main, 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, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_fail_
/**
* Perform the group and groups operation processes.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @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_main_t * const main, 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 f_string_dynamics_t arguments, const bool all) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_groups_
/**
* Perform the if defined operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* The operation process state.
*/
#ifndef _di_fake_make_operate_process_type_if_defined_
- extern void fake_make_operate_process_type_if_defined(fake_main_t * const main, 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_defined(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;
#endif // _di_fake_make_operate_process_type_if_defined_
/**
* Perform the if exists operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param if_not
* @see f_file_exists()
*/
#ifndef _di_fake_make_operate_process_type_if_exists_
- extern f_status_t fake_make_operate_process_type_if_exists(fake_main_t * const main, 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_exists(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;
#endif // _di_fake_make_operate_process_type_if_exists_
/**
* Perform the if >, >=, <, and <= operation processes.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @see fl_conversion_string_to_number_unsigned()
*/
#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_main_t * const main, 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, const f_string_dynamics_t arguments, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_if_greater_if_lesser_
/**
* Perform the if group operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @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_main_t * const main, 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 f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_if_group_
/**
* Perform the if is operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @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_main_t * const main, 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 f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_if_is_
/**
* Perform the if operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @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_main_t * const main, 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 f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_if_mode_
/**
* Perform the if owner operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @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_main_t * const main, 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 f_string_dynamics_t arguments, const bool if_not, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_if_owner_
/**
- * Perform the mode operation process.
- *
- * @param main
- * The main program data.
- * @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.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_path_change().
- * Errors (with error bit) from: f_string_dynamic_resize().
- *
- * @see f_path_change()
- * @see f_string_dynamic_resize()
- *
- * @see fake_make_path_relative()
- */
-#ifndef _di_fake_make_operate_process_type_mode_
- extern f_status_t fake_make_operate_process_type_mode(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d;
-#endif // _di_fake_make_operate_process_type_mode_
-
-/**
* Perform the mode and modes operation processes.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @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_main_t * const main, 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 f_string_dynamics_t arguments, const bool all) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_modes_
/**
* Perform the move operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @see fll_file_move()
*/
#ifndef _di_fake_make_operate_process_type_move_
- extern f_status_t fake_make_operate_process_type_move(fake_main_t * const main, 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, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_move_
/**
* Perform the owner and owners operation processes.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @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_main_t * const main, 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 f_string_dynamics_t arguments, const bool all) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_owners_
/**
* Perform the parameter operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @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_main_t * const main, 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, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_parameter_
/**
* Only call this function if the data_make.path.stack.used is greater than 1.
* This does not validate the size of the stack.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @see fake_make_path_relative()
*/
#ifndef _di_fake_make_operate_process_type_pop_
- extern f_status_t fake_make_operate_process_type_pop(fake_main_t * const main, 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, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_pop_
/**
* Perform the to operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @see fake_make_path_relative()
*/
#ifndef _di_fake_make_operate_process_type_to_
- extern f_status_t fake_make_operate_process_type_to(fake_main_t * const main, 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, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_to_
/**
* Perform the top operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @see f_string_dynamic_resize()
*/
#ifndef _di_fake_make_operate_process_type_top_
- extern f_status_t fake_make_operate_process_type_top(fake_main_t * const main, 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, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_top_
/**
* Perform the touch operation process.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* @see f_file_touch()
*/
#ifndef _di_fake_make_operate_process_type_touch_
- extern f_status_t fake_make_operate_process_type_touch(fake_main_t * const main, 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, const f_string_dynamics_t arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_type_touch_
#ifdef __cplusplus
f_array_lengths_t section_stack = f_array_lengths_t_initialize;
fake_make_data_t data_make = fake_make_data_t_initialize;
+ data_make.main = main;
+
status = f_string_dynamics_increase(F_memory_default_allocation_small_d, &data_make.path.stack);
if (F_status_is_error(status)) {
macro_f_mode_t_set_default_umask(mode, main->umask);
- fake_make_load_parameters(main, &data_make, &status);
+ fake_make_load_parameters(&data_make, &status);
- fake_make_load_fakefile(main, &data_make, &status);
+ fake_make_load_fakefile(&data_make, &status);
if (F_status_is_error(status)) {
macro_fake_make_data_t_delete_simple(data_make)
}
{
- const int result = fake_make_operate_section(main, &data_make, data_make.main, §ion_stack, &status);
+ const int result = fake_make_operate_section(&data_make, data_make.id_main, §ion_stack, &status);
if (status == F_child) {
main->child = result;
#endif // _di_fake_make_operate_
#ifndef _di_fake_make_operate_expand_
- void fake_make_operate_expand(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_range_t section_name, const f_array_length_t operation, const f_fss_content_t content, const f_fss_quotes_t quotes, f_string_dynamics_t *arguments, f_status_t *status) {
+ void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_array_length_t operation, const f_fss_content_t content, const f_fss_quotes_t quotes, f_string_dynamics_t *arguments, f_status_t *status) {
if (F_status_is_error(*status)) return;
if (!content.used) return;
f_iki_content_t iki_content = f_iki_content_t_initialize;
f_iki_delimits_t iki_delimits = f_iki_delimits_t_initialize;
- f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_iki, 0, (void *) main, 0);
+ f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, &fake_signal_state_interrupt_iki, 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;
if (F_status_is_error(*status)) break;
if (unmatched) {
- *status = fake_make_operate_expand_build(main, data_make, quotes.array[i], iki_content.array[j], arguments);
+ *status = fake_make_operate_expand_build(data_make, quotes.array[i], iki_content.array[j], arguments);
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 (define_is && data_make->setting_make.load_build) {
- *status = fake_make_operate_expand_environment(main, data_make, quotes.array[i], iki_content.array[j], arguments);
+ *status = fake_make_operate_expand_environment(data_make, quotes.array[i], iki_content.array[j], arguments);
if (F_status_is_error(*status)) {
fll_error_print(data_make->error, F_status_set_fine(*status), "fake_make_operate_expand_environment", F_true);
#endif // _di_fake_make_operate_expand_
#ifndef _di_fake_make_operate_expand_build_
- f_status_t fake_make_operate_expand_build(fake_main_t * const main, fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *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_string_dynamics_t *arguments) {
f_status_t status = F_none;
f_string_dynamic_t value = f_string_dynamic_t_initialize;
#endif // _di_fake_make_operate_expand_build_
#ifndef _di_fake_make_operate_expand_environment_
- f_status_t fake_make_operate_expand_environment(fake_main_t * const main, fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *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_string_dynamics_t *arguments) {
f_status_t status = F_none;
f_string_dynamic_t value = f_string_dynamic_t_initialize;
#endif // _di_fake_make_operate_expand_environment_
#ifndef _di_fake_make_operate_section_
- int fake_make_operate_section(fake_main_t * const main, fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t *section_stack, f_status_t *status) {
+ int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t *section_stack, f_status_t *status) {
- if (F_status_is_error(*status) || *status == F_child) return main->child;
+ if (F_status_is_error(*status) || *status == F_child) return data_make->main->child;
if (id_section > data_make->fakefile.used) {
*status = F_status_set_error(F_parameter);
const f_fss_named_t *section = &data_make->fakefile.array[id_section];
- if (main->output.verbosity != f_console_verbosity_quiet) {
- flockfile(main->output.to.stream);
+ if (data_make->main->output.verbosity != f_console_verbosity_quiet) {
+ flockfile(data_make->main->output.to.stream);
- fl_print_format("%c%[Processing Section '%]", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important);
- fl_print_format("%[%/Q%]", main->output.to.stream, main->context.set.notable, data_make->buffer, section->name, main->context.set.notable);
- fl_print_format("%['.%]%c", main->output.to.stream, main->context.set.important, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format("%c%[Processing Section '%]", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.important, data_make->main->context.set.important);
+ fl_print_format("%[%/Q%]", data_make->main->output.to.stream, data_make->main->context.set.notable, data_make->buffer, section->name, data_make->main->context.set.notable);
+ fl_print_format("%['.%]%c", data_make->main->output.to.stream, data_make->main->context.set.important, data_make->main->context.set.important, f_string_eol_s[0]);
- funlockfile(main->output.to.stream);
+ funlockfile(data_make->main->output.to.stream);
}
if (!section->objects.used) {
state_process.operation_previous = state_process.operation;
state_process.operation = 0;
- if (!(i % fake_signal_check_short_d) && fake_signal_received(main)) {
+ if (!(i % fake_signal_check_short_d) && fake_signal_received(data_make->main)) {
*status = F_status_set_error(F_interrupt);
break;
} // for
if (!state_process.operation) {
- fake_print_message_section_operation_unknown(main, data_make->error, data_make->buffer, section->name, section->objects.array[i]);
+ fake_print_message_section_operation_unknown(data_make->main, data_make->error, data_make->buffer, section->name, section->objects.array[i]);
*status = F_status_set_error(F_valid_not);
}
else if (state_process.operation == fake_make_operation_type_operate) {
if (section_stack->used == fake_make_section_stack_max_d) {
- fake_print_message_section_operation_stack_max(main, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_make_section_stack_max_d);
+ fake_print_message_section_operation_stack_max(data_make->main, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_make_section_stack_max_d);
*status = F_status_set_error(F_recurse);
}
}
if (F_status_is_error_not(*status)) {
- fake_make_operate_expand(main, data_make, section->name, state_process.operation, section->contents.array[i], section->quotess.array[i], &arguments, status);
+ fake_make_operate_expand(data_make, section->name, state_process.operation, section->contents.array[i], section->quotess.array[i], &arguments, status);
}
if (F_status_is_error_not(*status)) {
- fake_make_operate_validate(main, data_make, section->name, arguments, &state_process, section_stack, status);
+ fake_make_operate_validate(data_make, section->name, arguments, &state_process, section_stack, status);
}
// Block is set to the synthetic done type when an if-condition completes in order to inform any subsequent else condition.
}
}
- result = fake_make_operate_process(main, data_make, section->name, arguments, success, &state_process, section_stack, status);
+ result = fake_make_operate_process(data_make, section->name, arguments, success, &state_process, section_stack, status);
if (*status == F_child) {
f_string_dynamics_resize(0, &arguments);
data_make->setting_make.fail = fake_make_operation_fail_type_exit;
data_make->error.prefix = fl_print_error_s;
data_make->error.suffix = 0;
- data_make->error.context = main->context.set.error;
- data_make->error.notable = main->context.set.notable;
+ data_make->error.context = data_make->main->context.set.error;
+ data_make->error.notable = data_make->main->context.set.notable;
data_make->error.to.stream = F_type_error_d;
data_make->error.to.id = F_type_descriptor_error_d;
- data_make->error.set = &main->context.set;
+ data_make->error.set = &data_make->main->context.set;
}
- fake_print_message_section_operation_failed(main, data_make->error, data_make->buffer, section->name, section->objects.array[i]);
+ fake_print_message_section_operation_failed(data_make->main, data_make->error, data_make->buffer, section->name, section->objects.array[i]);
// F_signal_abort is used by the break section operation.
if (F_status_set_fine(*status) == F_signal_abort) break;
}
if (i == section->objects.used && F_status_is_error_not(*status) && state_process.condition) {
- if (main->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
+ if (data_make->main->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
flockfile(data_make->error.to.stream);
fl_print_format("%c%[%SIncomplete '%]", data_make->error.to.stream, f_string_eol_s[0], data_make->error.context, data_make->error.prefix, data_make->error.context);
funlockfile(data_make->error.to.stream);
}
- fake_print_message_section_operation_failed(main, data_make->error, data_make->buffer, section->name, section->objects.array[section->objects.used - 1]);
+ fake_print_message_section_operation_failed(data_make->main, data_make->error, data_make->buffer, section->name, section->objects.array[section->objects.used - 1]);
*status = F_status_set_error(F_failure);
}
#endif // _di_fake_make_operate_section_
#ifndef _di_fake_make_operate_process_
- int fake_make_operate_process(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, const bool success, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *status) {
+ 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, const bool success, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *status) {
- if (*status == F_child) return main->child;
+ if (*status == F_child) return data_make->main->child;
if (state_process->operation == fake_make_operation_type_index) {
- const f_status_t result = fake_execute(main, data_make->environment, data_make->setting_build.build_indexer, arguments, status);
+ const f_status_t result = fake_execute(data_make->main, data_make->environment, data_make->setting_build.build_indexer, arguments, status);
if (F_status_is_error(*status)) {
fll_error_print(data_make->error, F_status_set_fine(*status), "fake_execute", F_true);
return result;
}
- *status = fake_make_operate_process_return(main, data_make, result);
+ *status = fake_make_operate_process_return(data_make, result);
return 0;
}
if (state_process->operation == fake_make_operation_type_break) {
-
if (!arguments.used || fl_string_dynamic_compare_string(fake_make_operation_argument_success_s, arguments.array[0], fake_make_operation_argument_success_s_length) == F_equal_to) {
*status = F_signal_abort;
}
return 0;
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.to.stream);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->output.to.stream);
- fl_print_format("%cBreaking as '", main->output.to.stream, f_string_eol_s[0]);
- fl_print_format("%[%S%]", main->output.to.stream, main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success_s, main->context.set.notable);
- fl_print_format("'.%c", main->output.to.stream, f_string_eol_s[0]);
+ fl_print_format("%cBreaking as '", data_make->main->output.to.stream, f_string_eol_s[0]);
+ fl_print_format("%[%S%]", data_make->main->output.to.stream, data_make->main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success_s, data_make->main->context.set.notable);
+ fl_print_format("'.%c", data_make->main->output.to.stream, f_string_eol_s[0]);
- funlockfile(main->output.to.stream);
+ funlockfile(data_make->main->output.to.stream);
}
return 0;
if (state_process->operation == fake_make_operation_type_build) {
f_string_static_t stub = f_string_static_t_initialize;
- *status = fake_build_operate(arguments.used ? arguments.array[0] : stub, main);
+ *status = fake_build_operate(arguments.used ? arguments.array[0] : stub, data_make->main);
if (F_status_set_fine(*status) == F_interrupt) {
return 0;
}
- *status = fake_make_operate_process_return(main, data_make, F_status_is_error(*status) ? 1 : 0);
+ *status = fake_make_operate_process_return(data_make, F_status_is_error(*status) ? 1 : 0);
return 0;
}
if (state_process->operation == fake_make_operation_type_clean) {
- *status = fake_clean_operate(main);
+ *status = fake_clean_operate(data_make->main);
if (F_status_set_fine(*status) == F_interrupt) {
return 0;
}
- *status = fake_make_operate_process_return(main, data_make, F_status_is_error(*status) ? 1 : 0);
+ *status = fake_make_operate_process_return(data_make, F_status_is_error(*status) ? 1 : 0);
return 0;
}
if (state_process->operation == fake_make_operation_type_clone) {
- *status = fake_make_operate_process_type_copy(main, data_make, arguments, F_true);
+ *status = fake_make_operate_process_type_copy(data_make, arguments, F_true);
return 0;
}
if (state_process->operation == fake_make_operation_type_compile) {
- const int result = fake_execute(main, data_make->environment, data_make->setting_build.build_compiler, arguments, status);
+ const int result = fake_execute(data_make->main, data_make->environment, data_make->setting_build.build_compiler, arguments, status);
if (F_status_is_error(*status)) {
fll_error_print(data_make->error, F_status_set_fine(*status), "fake_execute", F_true);
return result;
}
- *status = fake_make_operate_process_return(main, data_make, result);
+ *status = fake_make_operate_process_return(data_make, result);
return 0;
}
if (state_process->operation == fake_make_operation_type_copy) {
- *status = fake_make_operate_process_type_copy(main, data_make, arguments, F_false);
+ *status = fake_make_operate_process_type_copy(data_make, arguments, F_false);
return 0;
}
if (F_status_is_error(*status)) {
fll_error_print(data_make->error, F_status_set_fine(*status), "f_environment_set", F_true);
}
- else if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cDefined environment variable '%[%Q%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[0], main->context.set.notable, f_string_eol_s[0]);
+ else if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("%cDefined environment variable '%[%Q%]'.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.array[0], data_make->main->context.set.notable, f_string_eol_s[0]);
}
return 0;
}
if (state_process->operation == fake_make_operation_type_delete) {
- *status = fake_make_operate_process_type_deletes(main, data_make, arguments, F_false);
+ *status = fake_make_operate_process_type_deletes(data_make, arguments, F_false);
return 0;
}
if (state_process->operation == fake_make_operation_type_deletes) {
- *status = fake_make_operate_process_type_deletes(main, data_make, arguments, F_true);
+ *status = fake_make_operate_process_type_deletes(data_make, arguments, F_true);
return 0;
}
data_make->setting_make.fail = fake_make_operation_fail_type_exit;
data_make->error.prefix = fl_print_error_s;
data_make->error.suffix = 0;
- data_make->error.context = main->context.set.error;
- data_make->error.notable = main->context.set.notable;
+ data_make->error.context = data_make->main->context.set.error;
+ data_make->error.notable = data_make->main->context.set.notable;
data_make->error.to.stream = F_type_error_d;
data_make->error.to.id = F_type_descriptor_error_d;
- data_make->error.set = &main->context.set;
+ data_make->error.set = &data_make->main->context.set;
}
else {
return 0;
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cExiting as '%[%S%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success_s, main->context.set.notable, f_string_eol_s[0]);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ fll_print_format("%cExiting as '%[%S%]'.%c", data_make->main->output.to.stream, f_string_eol_s[0], data_make->main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success_s, data_make->main->context.set.notable, f_string_eol_s[0]);
}
return 0;
}
if (state_process->operation == fake_make_operation_type_fail) {
- fake_make_operate_process_type_fail(main, data_make, arguments);
+ fake_make_operate_process_type_fail(data_make, arguments);
return 0;
}
if (state_process->operation == fake_make_operation_type_group) {
- *status = fake_make_operate_process_type_groups(main, data_make, arguments, F_false);
+ *status = fake_make_operate_process_type_groups(data_make, arguments, F_false);
return 0;
}
if (state_process->operation == fake_make_operation_type_groups) {
- *status = fake_make_operate_process_type_groups(main, data_make, arguments, F_true);
+ *status = fake_make_operate_process_type_groups(data_make, arguments, F_true);
return 0;
}
}
}
else if (state_process->condition == fake_make_operation_if_type_if_defined) {
- fake_make_operate_process_type_if_defined(main, data_make, arguments, F_false, state_process);
+ fake_make_operate_process_type_if_defined(data_make, arguments, F_false, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_exists) {
- *status = fake_make_operate_process_type_if_exists(main, data_make, arguments, F_false, state_process);
+ *status = fake_make_operate_process_type_if_exists(data_make, arguments, F_false, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_failure) {
if (success) {
}
}
else if (state_process->condition == fake_make_operation_if_type_if_group) {
- *status = fake_make_operate_process_type_if_group(main, data_make, arguments, F_false, state_process);
+ *status = fake_make_operate_process_type_if_group(data_make, arguments, F_false, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_is) {
- *status = fake_make_operate_process_type_if_is(main, data_make, arguments, F_false, state_process);
+ *status = fake_make_operate_process_type_if_is(data_make, arguments, F_false, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_mode) {
- *status = fake_make_operate_process_type_if_mode(main, data_make, arguments, F_false, state_process);
+ *status = fake_make_operate_process_type_if_mode(data_make, arguments, F_false, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_not_defined) {
- fake_make_operate_process_type_if_defined(main, data_make, arguments, F_true, state_process);
+ fake_make_operate_process_type_if_defined(data_make, arguments, F_true, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_equal) {
state_process->condition_result = fake_condition_result_true;
} // for
}
else if (state_process->condition == fake_make_operation_if_type_if_greater || state_process->condition == fake_make_operation_if_type_if_greater_equal || state_process->condition == fake_make_operation_if_type_if_less || state_process->condition == fake_make_operation_if_type_if_less_equal) {
- *status = fake_make_operate_process_type_if_greater_if_lesser(main, data_make, arguments, state_process);
+ *status = fake_make_operate_process_type_if_greater_if_lesser(data_make, arguments, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_not_exists) {
- *status = fake_make_operate_process_type_if_exists(main, data_make, arguments, F_true, state_process);
+ *status = fake_make_operate_process_type_if_exists(data_make, arguments, F_true, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_not_group) {
- *status = fake_make_operate_process_type_if_group(main, data_make, arguments, F_true, state_process);
+ *status = fake_make_operate_process_type_if_group(data_make, arguments, F_true, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_not_is) {
- *status = fake_make_operate_process_type_if_is(main, data_make, arguments, F_true, state_process);
+ *status = fake_make_operate_process_type_if_is(data_make, arguments, F_true, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_not_mode) {
- *status = fake_make_operate_process_type_if_mode(main, data_make, arguments, F_true, state_process);
+ *status = fake_make_operate_process_type_if_mode(data_make, arguments, F_true, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_not_owner) {
- *status = fake_make_operate_process_type_if_owner(main, data_make, arguments, F_true, state_process);
+ *status = fake_make_operate_process_type_if_owner(data_make, arguments, F_true, state_process);
}
else if (state_process->condition == fake_make_operation_if_type_if_owner) {
- *status = fake_make_operate_process_type_if_owner(main, data_make, arguments, F_false, state_process);
+ *status = fake_make_operate_process_type_if_owner(data_make, arguments, F_false, state_process);
}
// Setup the block for subsequent operations.
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].string, "create link", fll_error_file_type_file);
}
- else if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.to.stream);
+ else if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->output.to.stream);
- fl_print_format("Created symbolic link from '%[%Q%]", main->output.to.stream, main->context.set.notable, arguments.array[1], main->context.set.notable);
- fl_print_format("' to %[%Q%].%c", main->output.to.stream, main->context.set.notable, arguments.array[0], main->context.set.notable, f_string_eol_s[0]);
+ 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%].%c", 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[0]);
- funlockfile(main->output.to.stream);
+ funlockfile(data_make->main->output.to.stream);
}
return 0;
}
if (state_process->operation == fake_make_operation_type_mode) {
- *status = fake_make_operate_process_type_modes(main, data_make, arguments, F_false);
+ *status = fake_make_operate_process_type_modes(data_make, arguments, F_false);
return 0;
}
if (state_process->operation == fake_make_operation_type_modes) {
- *status = fake_make_operate_process_type_modes(main, data_make, arguments, F_true);
+ *status = fake_make_operate_process_type_modes(data_make, arguments, F_true);
return 0;
}
if (state_process->operation == fake_make_operation_type_move) {
- *status = fake_make_operate_process_type_move(main, data_make, arguments);
+ *status = fake_make_operate_process_type_move(data_make, arguments);
return 0;
}
return 0;
}
- const int result = fake_make_operate_section(main, data_make, id_section, section_stack, status);
+ const int result = fake_make_operate_section(data_make, id_section, section_stack, status);
// Ensure that a break only happens within its active state_process->operation stack.
if (*status == F_signal_abort) {
}
if (state_process->operation == fake_make_operation_type_owner) {
- *status = fake_make_operate_process_type_owners(main, data_make, arguments, F_false);
+ *status = fake_make_operate_process_type_owners(data_make, arguments, F_false);
return 0;
}
if (state_process->operation == fake_make_operation_type_owners) {
- *status = fake_make_operate_process_type_owners(main, data_make, arguments, F_true);
+ *status = fake_make_operate_process_type_owners(data_make, arguments, F_true);
return 0;
}
if (state_process->operation == fake_make_operation_type_parameter) {
- *status = fake_make_operate_process_type_parameter(main, data_make, arguments);
+ *status = fake_make_operate_process_type_parameter(data_make, arguments);
return 0;
}
if (state_process->operation == fake_make_operation_type_pop) {
- *status = fake_make_operate_process_type_pop(main, data_make, arguments);
+ *status = fake_make_operate_process_type_pop(data_make, arguments);
return 0;
}
if (state_process->operation == fake_make_operation_type_print) {
- flockfile(main->output.to.stream);
+ flockfile(data_make->main->output.to.stream);
for (f_array_length_t i = 0; i < arguments.used; ++i) {
- f_print_dynamic(arguments.array[i], main->output.to.stream);
+ f_print_dynamic(arguments.array[i], data_make->main->output.to.stream);
if (i + 1 < arguments.used) {
- f_print_character(f_string_space_s[0], main->output.to.stream);
+ f_print_character(f_string_space_s[0], data_make->main->output.to.stream);
}
} // for
- f_print_character(f_string_space_s[0], main->output.to.stream);
- f_print_character(f_string_eol_s[0], main->output.to.stream);
+ f_print_character(f_string_space_s[0], data_make->main->output.to.stream);
+ f_print_character(f_string_eol_s[0], data_make->main->output.to.stream);
- funlockfile(main->output.to.stream);
+ funlockfile(data_make->main->output.to.stream);
return 0;
}
if (state_process->operation == fake_make_operation_type_run) {
- *status = fake_make_operate_process_run(main, data_make, arguments, F_false);
+ *status = fake_make_operate_process_run(data_make, arguments, F_false);
return 0;
}
if (state_process->operation == fake_make_operation_type_shell) {
- *status = fake_make_operate_process_run(main, data_make, arguments, F_true);
+ *status = fake_make_operate_process_run(data_make, arguments, F_true);
return 0;
}
if (state_process->operation == fake_make_operation_type_skeleton) {
- *status = fake_skeleton_operate(main);
+ *status = fake_skeleton_operate(data_make->main);
if (F_status_set_fine(*status) == F_interrupt) {
return 0;
}
- *status = fake_make_operate_process_return(main, data_make, F_status_is_error(*status) ? 1 : 0);
+ *status = fake_make_operate_process_return(data_make, F_status_is_error(*status) ? 1 : 0);
return 0;
}
if (state_process->operation == fake_make_operation_type_to) {
- *status = fake_make_operate_process_type_to(main, data_make, arguments);
+ *status = fake_make_operate_process_type_to(data_make, arguments);
return 0;
}
if (state_process->operation == fake_make_operation_type_top) {
- *status = fake_make_operate_process_type_top(main, data_make, arguments);
+ *status = fake_make_operate_process_type_top(data_make, arguments);
return 0;
}
if (state_process->operation == fake_make_operation_type_touch) {
- *status = fake_make_operate_process_type_touch(main, data_make, arguments);
+ *status = fake_make_operate_process_type_touch(data_make, arguments);
}
return 0;
#endif // _di_fake_make_operate_process_
#ifndef _di_fake_make_operate_process_execute_
- f_status_t fake_make_operate_process_execute(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell) {
+ f_status_t fake_make_operate_process_execute(fake_make_data_t * const data_make, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell) {
- if (fake_signal_received(main)) {
+ if (fake_signal_received(data_make->main)) {
return F_status_set_error(F_interrupt);
}
return status;
}
- if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.to.stream);
+ if (data_make->main->error.verbosity == f_console_verbosity_verbose) {
+ flockfile(data_make->main->output.to.stream);
- f_print_dynamic_safely(program, main->output.to.stream);
+ f_print_dynamic_safely(program, data_make->main->output.to.stream);
for (f_array_length_t i = 0; i < arguments.used; ++i) {
if (arguments.array[i].used) {
- fll_print_format(" %Q", main->output.to.stream, arguments.array[i]);
+ fll_print_format(" %Q", data_make->main->output.to.stream, arguments.array[i]);
}
} // for
- f_print_character(f_string_eol_s[0], main->output.to.stream);
+ f_print_character(f_string_eol_s[0], data_make->main->output.to.stream);
- funlockfile(main->output.to.stream);
+ funlockfile(data_make->main->output.to.stream);
// flush to stdout before executing command.
- fflush(main->output.to.stream);
+ fflush(data_make->main->output.to.stream);
}
int return_code = 0;
status = fll_execute_program(program.string, arguments, ¶meter, 0, (void *) &return_code);
- if (fake_signal_received(main)) {
+ if (fake_signal_received(data_make->main)) {
return F_status_set_error(F_interrupt);
}
}
}
- return fake_make_operate_process_return(main, data_make, return_code);
+ return fake_make_operate_process_return(data_make, return_code);
}
#endif // _di_fake_make_operate_process_execute_
#ifndef _di_fake_make_operate_process_return_
- f_status_t fake_make_operate_process_return(fake_main_t * const main, fake_make_data_t * const data_make, const int return_code) {
+ f_status_t fake_make_operate_process_return(fake_make_data_t * const data_make, const int return_code) {
f_status_t status = F_none;
#endif // _di_fake_make_operate_process_return_
#ifndef _di_fake_make_operate_process_run_
- f_status_t fake_make_operate_process_run(fake_main_t * const main, 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 f_string_statics_t arguments, const bool as_shell) {
const f_string_static_t *program = &arguments.array[0];
} // for
}
- status = fake_make_operate_process_execute(main, data_make, *program, args, as_shell);
+ status = fake_make_operate_process_execute(data_make, *program, args, as_shell);
f_string_dynamics_resize(0, &args);
#endif // _di_fake_make_operate_process_run_
#ifndef _di_fake_make_operate_validate_
- void fake_make_operate_validate(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *status) {
+ 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 *state_process, f_array_lengths_t *section_stack, f_status_t *status) {
if (F_status_is_error(*status)) return;
}
else if (arguments.used) {
if (arguments.array[0].used) {
- char path_file[main->path_data_build.used + arguments.array[0].used + 1];
+ char path_file[data_make->main->path_data_build.used + arguments.array[0].used + 1];
- memcpy(path_file, main->path_data_build.string, main->path_data_build.used);
- memcpy(path_file + main->path_data_build.used, arguments.array[0].string, arguments.array[0].used);
+ memcpy(path_file, data_make->main->path_data_build.string, data_make->main->path_data_build.used);
+ memcpy(path_file + data_make->main->path_data_build.used, arguments.array[0].string, arguments.array[0].used);
- path_file[main->path_data_build.used + arguments.array[0].used] = 0;
+ path_file[data_make->main->path_data_build.used + arguments.array[0].used] = 0;
f_status_t status_file = f_file_is(path_file, F_file_type_regular_d, F_false);
if (arguments.used > 1) {
for (f_array_length_t i = 0; i < arguments.used; ++i) {
- *status = fake_make_assure_inside_project(main, data_make, arguments.array[i]);
+ *status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
if (arguments.used > 1) {
for (f_array_length_t i = 0; i < arguments.used; ++i) {
- *status = fake_make_assure_inside_project(main, data_make, arguments.array[i]);
+ *status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
if (arguments.used) {
for (f_array_length_t i = 0; i < arguments.used; ++i) {
- *status = fake_make_assure_inside_project(main, data_make, arguments.array[i]);
+ *status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
f_file_mode_t mode_rule = 0;
uint8_t replace = 0;
- *status = fake_make_get_id_mode(main, data_make->error, j == 6 ? arguments.array[2] : arguments.array[3], &mode_rule, &replace);
+ *status = fake_make_get_id_mode(data_make->main, data_make->error, j == 6 ? arguments.array[2] : arguments.array[3], &mode_rule, &replace);
if (F_status_is_error(*status)) return;
i = j == 6 ? 3 : 4;
else if (state_process->condition == fake_make_operation_if_type_if_group || state_process->condition == fake_make_operation_if_type_if_not_group) {
gid_t id = 0;
- *status = fake_make_get_id_group(main, data_make->error, j == 6 ? arguments.array[1] : arguments.array[2], &id);
+ *status = fake_make_get_id_group(data_make->main, data_make->error, j == 6 ? arguments.array[1] : arguments.array[2], &id);
if (F_status_is_error(*status)) return;
i = j == 6 ? 2 : 3;
else if (state_process->condition == fake_make_operation_if_type_if_owner || state_process->condition == fake_make_operation_if_type_if_not_owner) {
uid_t id = 0;
- *status = fake_make_get_id_owner(main, data_make->error, arguments.array[1], &id);
+ *status = fake_make_get_id_owner(data_make->main, data_make->error, arguments.array[1], &id);
if (F_status_is_error(*status)) return;
i = j == 6 ? 2 : 3;
if (i < arguments.used) {
for (f_status_t status_file = F_none; i < arguments.used; ++i) {
- status_file = fake_make_assure_inside_project(main, data_make, arguments.array[i]);
+ status_file = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(status_file)) {
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(status_file), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status_file), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
if (F_status_is_error_not(*status)) {
if (F_status_set_fine(status_file) == F_false) {
*status = F_status_set_error(F_failure);
}
else if (arguments.used == 2) {
- *status = fake_make_assure_inside_project(main, data_make, arguments.array[0]);
+ *status = fake_make_assure_inside_project(data_make, arguments.array[0]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
}
}
- *status = fake_make_assure_inside_project(main, data_make, arguments.array[1]);
+ *status = fake_make_assure_inside_project(data_make, arguments.array[1]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[1].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[1].string);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
if (arguments.used > 1) {
for (f_array_length_t i = 0; i < arguments.used; ++i) {
- *status = fake_make_assure_inside_project(main, data_make, arguments.array[i]);
+ *status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
}
else if (F_status_is_error(status_file)) {
if (data_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, main->file_data_build_fakefile.string, "find", fll_error_file_type_file);
+ fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, data_make->main->file_data_build_fakefile.string, "find", fll_error_file_type_file);
}
*status = status_file;
for (f_array_length_t i = 1; i < arguments.used; ++i) {
- *status = fake_make_assure_inside_project(main, data_make, arguments.array[i]);
+ *status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
*
* This prints errors via data_make.error.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param section_name
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_expand_
- extern void fake_make_operate_expand(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_range_t section_name, const f_array_length_t operation, const f_fss_content_t content, const f_fss_quotes_t quoteds, f_string_dynamics_t *arguments, f_status_t *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_array_length_t operation, const f_fss_content_t content, const f_fss_quotes_t quoteds, f_string_dynamics_t *arguments, f_status_t *status) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_expand_
/**
* Perform the expand operation, specifically for the environment variables.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param quoted
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_expand_environment_
- extern f_status_t fake_make_operate_expand_environment(fake_main_t * const main, fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *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_string_dynamics_t *arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_expand_environment_
/**
* Perform the expand operation, specifically for the build settings.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param quoted
* 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_main_t * const main, fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name, f_string_dynamics_t *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_string_dynamics_t *arguments) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_expand_build_
/**
* Perform the make operations within the given section.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param id_section
* This generally is only needed when F_child is returned, where this holds the return status of the child process.
*/
#ifndef _di_fake_make_operate_section_
- int fake_make_operate_section(fake_main_t * const main, fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d;
+ int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_section_
/**
* Perform a specific make operation within the given section.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param section_name
* 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_main_t * const main, fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, const bool success, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *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, const f_string_dynamics_t arguments, const bool success, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_
/**
* Execute either the run operation or the shell operation.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param program
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_process_execute_
- extern f_status_t fake_make_operate_process_execute(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_operate_process_execute(fake_make_data_t * const data_make, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_execute_
/**
*
* The return value is stored in: data_make.setting_make.parameter.array[0].value.array[0].
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param return_code
* @see f_string_dynamic_terminate_after()
*/
#ifndef _di_fake_make_operate_process_return_
- extern f_status_t fake_make_operate_process_return(fake_main_t * const main, fake_make_data_t * const data_make, const int return_code) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_operate_process_return(fake_make_data_t * const data_make, const int return_code) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_return_
/**
* Execute either the run operation or the shell operation.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param arguments
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_process_run_
- extern f_status_t fake_make_operate_process_run(fake_main_t * const main, 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 f_string_statics_t arguments, const bool as_shell) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_process_run_
/**
* This performs pre-operation validations.
* Additional issues may occure when running operations that are not detected nor detectable by this.
*
- * @param main
- * The main program data.
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
* @param section_name
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_validate_
- extern void fake_make_operate_validate(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_range_t section_name, const f_string_dynamics_t arguments, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *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, const f_string_dynamics_t arguments, fake_state_process_t *state_process, f_array_lengths_t *section_stack, f_status_t *status) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_validate_
/**
#endif
#ifndef _di_fake_make_assure_inside_project_
- f_status_t fake_make_assure_inside_project(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_static_t path) {
+ 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;
#endif // _di_fake_make_get_id_owner_
#ifndef _di_fake_make_path_relative_
- f_status_t fake_make_path_relative(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_static_t path) {
+ 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;
/**
* Assure that a path is within the project root path.
*
- * @param main
- * The main program data.
* @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.
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_assure_inside_project_
- extern f_status_t fake_make_assure_inside_project(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_static_t path) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_assure_inside_project(fake_make_data_t * const data_make, const f_string_static_t path) F_attribute_visibility_internal_d;
#endif // _di_fake_make_assure_inside_project_
/**
/**
* Get a path, relative to the project root.
*
- * @param main
- * The main program data.
* @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.
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_path_relative_
- extern f_status_t fake_make_path_relative(fake_main_t * const main, fake_make_data_t * const data_make, const f_string_static_t path) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_path_relative(fake_make_data_t * const data_make, const f_string_static_t path) F_attribute_visibility_internal_d;
#endif // _di_fake_make_path_relative_
#ifdef __cplusplus