if (!data || !data->main || !data_build) return;
if (F_status_is_error(data->main->setting.state.status)) return;
+ fake_main_t * const main = data->main;
+
{
f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + data->path_build_libraries_shared.used;
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) return;
} // for
}
- if (data->main->setting.work.used) {
+ if (main->setting.work.used) {
f_string_static_t buffer = f_string_static_t_initialize;
{
memcpy(buffer_string, fake_build_parameter_library_include_s.string, sizeof(f_char_t) * fake_build_parameter_library_include_s.used);
memcpy(buffer_string + fake_build_parameter_library_include_s.used, data->path_work_includes.string, sizeof(f_char_t) * data->path_work_includes.used);
- data->main->setting.state.status = fll_execute_arguments_add(buffer, &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ main->setting.state.status = fll_execute_arguments_add(buffer, &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) return;
}
if (data_build->setting.search_shared && (is_shared || !data_build->setting.search_exclusive)) {
memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_path_s.used);
memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, data->path_work_libraries_shared.string, sizeof(f_char_t) * data->path_work_libraries_shared.used);
- data->main->setting.state.status = fll_execute_arguments_add(buffer, &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ main->setting.state.status = fll_execute_arguments_add(buffer, &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) return;
}
if (data_build->setting.search_static && (!is_shared || !data_build->setting.search_exclusive)) {
memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_path_s.used);
memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, data->path_work_libraries_static.string, sizeof(f_char_t) * data->path_work_libraries_static.used);
- data->main->setting.state.status = fll_execute_arguments_add(buffer, &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ main->setting.state.status = fll_execute_arguments_add(buffer, &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) return;
}
}
: (is_shared)
? &data_build->setting.defines_program_shared
: &data_build->setting.defines_program_static,
- &data->main->setting.defines,
+ &main->setting.defines,
};
f_array_length_t i = 0;
if (!strings[s]->array[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(strings[s]->array[i], &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ main->setting.state.status = fll_execute_arguments_add(strings[s]->array[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) return;
} // for
} // for
}
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_build_arguments_standard_add_
if (data->main->setting.state.status == F_child) return;
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return;
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ fake_main_t * const main = data->main;
+
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
f_string_dynamic_t destination_directory = f_string_dynamic_t_initialize;
f_string_static_t buffer = f_string_static_t_initialize;
- if (data->main->program.message.verbosity != f_console_verbosity_quiet_e && data->main->program.message.verbosity != f_console_verbosity_error_e) {
- fll_print_format("%r%[Copying %Q.%]%r", data->main->program.message.to, f_string_eol_s, data->main->program.context.set.important, label, data->main->program.context.set.important, f_string_eol_s);
+ if (main->program.message.verbosity != f_console_verbosity_quiet_e && main->program.message.verbosity != f_console_verbosity_error_e) {
+ fll_print_format("%r%[Copying %Q.%]%r", main->program.message.to, f_string_eol_s, main->program.context.set.important, label, main->program.context.set.important, f_string_eol_s);
}
- data->main->setting.state.status = f_string_dynamic_resize(source.used, &path_source);
+ main->setting.state.status = f_string_dynamic_resize(source.used, &path_source);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_resize));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_resize));
f_string_dynamic_resize(0, &path_source);
for (f_array_length_t i = 0; i < files.used; ++i) {
- if (!((++data->main->program.signal_check) % fake_signal_check_short_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ if (!((++main->program.signal_check) % fake_signal_check_short_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
break;
}
- data->main->program.signal_check = 0;
+ main->program.signal_check = 0;
}
if (!files.array[i].used) continue;
path_source.used = source.used;
- data->main->setting.state.status = f_string_dynamic_append_nulless(files.array[i], &path_source);
+ main->setting.state.status = f_string_dynamic_append_nulless(files.array[i], &path_source);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
- data->main->setting.state.status = f_directory_is(path_source);
+ main->setting.state.status = f_directory_is(path_source);
- if (data->main->setting.state.status == F_true) {
+ if (main->setting.state.status == F_true) {
destination_directory.used = 0;
- data->main->setting.state.status = f_string_dynamic_append_nulless(destination, &destination_directory);
+ main->setting.state.status = f_string_dynamic_append_nulless(destination, &destination_directory);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
- data->main->setting.state.status = f_file_name_base(path_source, &destination_directory);
+ main->setting.state.status = f_file_name_base(path_source, &destination_directory);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_file_name_base));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_name_base));
break;
}
fl_directory_copy(path_source, destination_directory, &recurse);
- if (F_status_is_error(data->main->setting.state.status)) {
- if (data->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
+ if (F_status_is_error(main->setting.state.status)) {
+ if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
/* // @fixme
for (f_array_length_t j = 0; j < failures.used; ++j) {
- fake_print_error_build_operation_file(&data->main->program.error, macro_fake_f(fl_directory_copy), fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true);
+ fake_print_error_build_operation_file(&main->program.error, macro_fake_f(fl_directory_copy), fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true);
} // for
*/
- if (F_status_set_fine(data->main->setting.state.status) != F_failure) {
- fake_print_error(&data->main->program.error, macro_fake_f(fl_directory_copy));
+ if (F_status_set_fine(main->setting.state.status) != F_failure) {
+ fake_print_error(&main->program.error, macro_fake_f(fl_directory_copy));
}
}
- else if (data->main->program.error.verbosity > f_console_verbosity_quiet_e) {
- fake_print_error_build_operation_file(&data->main->program.error, macro_fake_f(fl_directory_copy), fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true);
+ else if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
+ fake_print_error_build_operation_file(&main->program.error, macro_fake_f(fl_directory_copy), fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true);
}
break;
}
}
- else if (data->main->setting.state.status == F_false) {
+ else if (main->setting.state.status == F_false) {
destination_file.used = 0;
destination_directory.used = 0;
- data->main->setting.state.status = f_string_dynamic_append_nulless(destination, &destination_file);
+ main->setting.state.status = f_string_dynamic_append_nulless(destination, &destination_file);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
if (perserve_offset && perserve_offset < path_source.used) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(destination, &destination_directory);
+ main->setting.state.status = f_string_dynamic_append_nulless(destination, &destination_directory);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
buffer.string = path_source.string + perserve_offset;
buffer.used = path_source.used - perserve_offset;
- data->main->setting.state.status = f_file_name_directory(buffer, &destination_directory);
+ main->setting.state.status = f_file_name_directory(buffer, &destination_directory);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_file_name_directory));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_name_directory));
break;
}
- data->main->setting.state.status = fl_directory_create(destination_directory, F_file_mode_all_rwx_d);
+ main->setting.state.status = fl_directory_create(destination_directory, F_file_mode_all_rwx_d);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(fl_directory_create), destination_directory, f_file_operation_create_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(fl_directory_create), destination_directory, f_file_operation_create_s, fll_error_file_type_directory_e);
break;
}
- data->main->setting.state.status = f_string_append(path_source.string + perserve_offset, path_source.used - perserve_offset, &destination_file);
+ main->setting.state.status = f_string_append(path_source.string + perserve_offset, path_source.used - perserve_offset, &destination_file);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_append));
break;
}
}
else {
- data->main->setting.state.status = f_file_name_base(path_source, &destination_file);
+ main->setting.state.status = f_file_name_base(path_source, &destination_file);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_file_name_base));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_name_base));
break;
}
}
- data->main->setting.state.status = f_file_copy(path_source, destination_file, mode, F_file_default_read_size_d, f_file_stat_flag_reference_e);
+ main->setting.state.status = f_file_copy(path_source, destination_file, mode, F_file_default_read_size_d, f_file_stat_flag_reference_e);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_build_operation_file(&data->main->program.error, macro_fake_f(f_file_copy), f_file_operation_copy_s, f_file_operation_to_s, path_source, destination_file, F_true);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_build_operation_file(&main->program.error, macro_fake_f(f_file_copy), f_file_operation_copy_s, f_file_operation_to_s, path_source, destination_file, F_true);
break;
}
- fake_build_print_verbose_copied_file(&data->main->program.message, path_source, destination_file);
+ fake_build_print_verbose_copied_file(&main->program.message, path_source, destination_file);
}
- else if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_is), path_source, f_file_operation_create_s, fll_error_file_type_file_e);
+ else if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_is), path_source, f_file_operation_create_s, fll_error_file_type_file_e);
break;
}
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
} // for
f_directory_recurse_copy_delete(&recurse);
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
if (!process_script.used) return 0;
- fake_string_dynamics_reset(&data->main->cache_arguments);
+ fake_main_t * const main = data->main;
+
+ fake_string_dynamics_reset(&main->cache_arguments);
- data->main->setting.state.status = fll_execute_arguments_add(fake_other_operation_build_s, &data->main->cache_arguments);
+ main->setting.state.status = fll_execute_arguments_add(fake_other_operation_build_s, &main->cache_arguments);
// Ensure console color mode is passed to the scripts so that they can also react to color mode.
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->program.context.mode != f_color_mode_none_e) {
- fake_string_dynamic_reset(&data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status) && main->program.context.mode != f_color_mode_none_e) {
+ fake_string_dynamic_reset(&main->cache_argument);
- data->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- if (data->main->program.context.mode == f_color_mode_dark_e) {
- data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_dark_s, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ if (main->program.context.mode == f_color_mode_dark_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_dark_s, &main->cache_argument);
}
- else if (data->main->program.context.mode == f_color_mode_light_e) {
- data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_light_s, &data->main->cache_argument);
+ else if (main->program.context.mode == f_color_mode_light_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_light_s, &main->cache_argument);
}
- else if (data->main->program.context.mode == f_color_mode_not_e) {
- data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_no_color_s, &data->main->cache_argument);
+ else if (main->program.context.mode == f_color_mode_not_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_no_color_s, &main->cache_argument);
}
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
return 0;
}
- data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
+ main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments);
}
// Ensure verbosity level is passed to the scripts so that they can also react to requested verbosity.
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->program.error.verbosity != f_console_verbosity_normal_e) {
- fake_string_dynamic_reset(&data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status) && main->program.error.verbosity != f_console_verbosity_normal_e) {
+ fake_string_dynamic_reset(&main->cache_argument);
- data->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- if (data->main->program.context.mode == f_console_verbosity_quiet_e) {
- data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_quiet_s, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ if (main->program.context.mode == f_console_verbosity_quiet_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_quiet_s, &main->cache_argument);
}
- else if (data->main->program.context.mode == f_console_verbosity_error_e) {
- data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_error_s, &data->main->cache_argument);
+ else if (main->program.context.mode == f_console_verbosity_error_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_error_s, &main->cache_argument);
}
- else if (data->main->program.context.mode == f_console_verbosity_verbose_e) {
- data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_verbose_s, &data->main->cache_argument);
+ else if (main->program.context.mode == f_console_verbosity_verbose_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_verbose_s, &main->cache_argument);
}
- else if (data->main->program.context.mode == f_console_verbosity_debug_e) {
- data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_debug_s, &data->main->cache_argument);
+ else if (main->program.context.mode == f_console_verbosity_debug_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_debug_s, &main->cache_argument);
}
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
return 0;
}
- data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
+ main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
return 0;
}
{
f_string_dynamic_t defines = f_string_dynamic_t_initialize;
- if (data->main->setting.defines.used) {
- for (f_array_length_t i = 0; i < data->main->setting.defines.used; ++i) {
+ if (main->setting.defines.used) {
+ for (f_array_length_t i = 0; i < main->setting.defines.used; ++i) {
- data->main->setting.state.status = f_string_dynamic_mash(f_string_space_s, data->main->setting.defines.array[i], &defines);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ main->setting.state.status = f_string_dynamic_mash(f_string_space_s, main->setting.defines.array[i], &defines);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_mash));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_mash));
f_string_dynamic_resize(0, &defines);
};
const f_string_static_t values[] = {
- data->main->setting.build,
- data->main->setting.data,
+ main->setting.build,
+ main->setting.data,
defines,
- data->main->setting.documents,
- data->main->setting.licenses,
- data->main->setting.process,
- data->main->setting.settings,
+ main->setting.documents,
+ main->setting.licenses,
+ main->setting.process,
+ main->setting.settings,
data_build->setting.path_sources,
- data->main->setting.work,
+ main->setting.work,
};
- data->main->setting.state.status = fll_execute_arguments_add_parameter_set(prefixs, names, values, 9, &data->main->cache_arguments);
+ main->setting.state.status = fll_execute_arguments_add_parameter_set(prefixs, names, values, 9, &main->cache_arguments);
f_string_dynamic_resize(0, &defines);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add_parameter_set));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add_parameter_set));
return 0;
}
}
- fake_string_dynamic_reset(&data->main->cache_argument);
+ fake_string_dynamic_reset(&main->cache_argument);
if (process_script.string[0] != f_path_separator_s.string[0]) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_data_build, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_data_build, &main->cache_argument);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(process_script, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(process_script, &main->cache_argument);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return 0;
}
fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(FL_execute_parameter_option_path_d, 0, &data_build->environment, &signals, 0);
- data->main->setting.state.status = fll_execute_program(data->main->cache_argument, data->main->cache_arguments, ¶meter, 0, (void *) &return_code);
+ main->setting.state.status = fll_execute_program(main->cache_argument, main->cache_arguments, ¶meter, 0, (void *) &return_code);
- if (!((++data->main->program.signal_check) % fake_signal_check_d) && fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ if (!((++main->program.signal_check) % fake_signal_check_d) && fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
}
- else if (data->main->setting.state.status != F_child) {
- if (F_status_is_error(data->main->setting.state.status)) {
- if (F_status_set_fine(data->main->setting.state.status) == F_failure) {
- fake_print_error_failure_script(&data->main->program.error, data->main->cache_argument);
+ else if (main->setting.state.status != F_child) {
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_failure) {
+ fake_print_error_failure_script(&main->program.error, main->cache_argument);
}
else {
- fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_program));
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_program));
}
}
else {
void fake_build_get_file_name_without_extension(fake_data_t * const data, const f_string_static_t path, f_string_dynamic_t *name) {
if (!data || !data->main) return;
+ if (F_status_is_error(data->main->setting.state.status)) return;
+
+ fake_main_t * const main = data->main;
name->used = 0;
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
if (!path.used) return;
- data->main->setting.state.status = f_file_name_base(path, name);
+ main->setting.state.status = f_file_name_base(path, name);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_file_name_base));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_name_base));
return;
}
}
} // for
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_build_get_file_name_without_extension_
if (!data || !data->main || !data_build || !path || !generic || !specific) return;
+ fake_main_t * const main = data->main;
+
f_array_length_t i = 0;
f_array_length_t j = 0;
memcpy(source_string, path->string, sizeof(f_char_t) * path->used);
memcpy(source_string + path->used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
- data->main->setting.state.status = fll_execute_arguments_add(source, &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ main->setting.state.status = fll_execute_arguments_add(source, &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) return;
} // for
} // for
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_build_objects_add_
if (!data || !data->main) return;
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ fake_main_t * const main = data->main;
+
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
}
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
f_mode_t mode = f_mode_t_initialize;
fake_build_data_t data_build = fake_build_data_t_initialize;
fake_build_stage_t stage = fake_build_stage_t_initialize;
- macro_f_mode_t_set_default_umask(mode, data->main->program.umask);
+ macro_f_mode_t_set_default_umask(mode, main->program.umask);
fake_build_load_setting(data, build_arguments, process_pipe, &data_build.setting);
- if (F_status_is_fine(data->main->setting.state.status)) {
- fake_print_message_building(&data->main->program.message, build_arguments, &data_build.setting);
+ if (F_status_is_fine(main->setting.state.status)) {
+ fake_print_message_building(&main->program.message, build_arguments, &data_build.setting);
}
fake_build_load_stage(data, build_arguments && build_arguments->array[0].used ? build_arguments->array[0] : f_string_empty_s, &stage);
fake_build_skeleton(data, &data_build, mode.directory, stage.file_skeleton);
- data->main->program.child = fake_build_execute_process_script(data, &data_build, data_build.setting.process_pre, stage.file_process_pre);
+ main->program.child = fake_build_execute_process_script(data, &data_build, data_build.setting.process_pre, stage.file_process_pre);
fake_build_copy(data, mode, fake_build_documentation_files_s, data->path_data_documentation, data->path_build_documentation, data_build.setting.build_sources_documentation, stage.file_sources_documentation, 0);
fake_build_program_script(data, &data_build, mode, stage.file_program_script);
if (data_build.setting.build_script) {
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &data->main->cache_argument);
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_path_part_script_s, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_path_part_script_s, &main->cache_argument);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
}
}
- fake_build_copy(data, mode, fake_build_scripts_s, data->main->cache_argument, data->path_build_programs_script, data_build.setting.build_sources_script, stage.file_sources_script, 0);
+ fake_build_copy(data, mode, fake_build_scripts_s, main->cache_argument, data->path_build_programs_script, data_build.setting.build_sources_script, stage.file_sources_script, 0);
}
}
else {
if (data_build.setting.build_sources_headers.used) {
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &data->main->cache_argument);
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- fake_string_dynamic_reset(&data->main->cache_1);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ fake_string_dynamic_reset(&main->cache_1);
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_includes, &data->main->cache_1);
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_includes, &main->cache_1);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data_build.setting.path_headers, &data->main->cache_1);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(data_build.setting.path_headers, &main->cache_1);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
}
}
}
- fake_build_copy(data, mode, fake_build_header_files_s, data->main->cache_argument, data->main->cache_1, data_build.setting.build_sources_headers, stage.file_sources_headers, data_build.setting.preserve_path_headers ? data->main->cache_argument.used : 0);
+ fake_build_copy(data, mode, fake_build_header_files_s, main->cache_argument, main->cache_1, data_build.setting.build_sources_headers, stage.file_sources_headers, data_build.setting.preserve_path_headers ? main->cache_argument.used : 0);
if (data_build.setting.build_shared) {
- fake_build_copy(data, mode, fake_build_header_files_shared_s, data->main->cache_argument, data->main->cache_1, data_build.setting.build_sources_headers_shared, stage.file_sources_headers, data_build.setting.preserve_path_headers ? data->main->cache_argument.used : 0);
+ fake_build_copy(data, mode, fake_build_header_files_shared_s, main->cache_argument, main->cache_1, data_build.setting.build_sources_headers_shared, stage.file_sources_headers, data_build.setting.preserve_path_headers ? main->cache_argument.used : 0);
}
if (data_build.setting.build_static) {
- fake_build_copy(data, mode, fake_build_header_files_static_s, data->main->cache_argument, data->main->cache_1, data_build.setting.build_sources_headers_static, stage.file_sources_headers, data_build.setting.preserve_path_headers ? data->main->cache_argument.used : 0);
+ fake_build_copy(data, mode, fake_build_header_files_static_s, main->cache_argument, main->cache_1, data_build.setting.build_sources_headers_static, stage.file_sources_headers, data_build.setting.preserve_path_headers ? main->cache_argument.used : 0);
}
}
if (data_build.setting.build_shared) {
- data->main->program.child = fake_build_object_shared(data, &data_build, mode, stage.file_object_shared);
+ main->program.child = fake_build_object_shared(data, &data_build, mode, stage.file_object_shared);
- data->main->program.child = fake_build_library_shared(data, &data_build, mode, stage.file_library_shared);
+ main->program.child = fake_build_library_shared(data, &data_build, mode, stage.file_library_shared);
- data->main->program.child = fake_build_program_shared(data, &data_build, mode, stage.file_program_shared);
+ main->program.child = fake_build_program_shared(data, &data_build, mode, stage.file_program_shared);
}
if (data_build.setting.build_static) {
- data->main->program.child = fake_build_object_static(data, &data_build, mode, stage.file_object_static);
+ main->program.child = fake_build_object_static(data, &data_build, mode, stage.file_object_static);
- data->main->program.child = fake_build_objects_static(data, &data_build, mode, stage.file_objects_static);
+ main->program.child = fake_build_objects_static(data, &data_build, mode, stage.file_objects_static);
- data->main->program.child = fake_build_library_static(data, &data_build, mode, stage.file_library_static);
+ main->program.child = fake_build_library_static(data, &data_build, mode, stage.file_library_static);
- data->main->program.child = fake_build_program_static(data, &data_build, mode, stage.file_program_static);
+ main->program.child = fake_build_program_static(data, &data_build, mode, stage.file_program_static);
}
if (data_build.setting.build_script) {
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &data->main->cache_argument);
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_path_part_script_s, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_path_part_script_s, &main->cache_argument);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
}
else {
- fake_build_copy(data, mode, fake_build_scripts_s, data->main->cache_argument, data->path_build_programs_script, data_build.setting.build_sources_script, stage.file_sources_script, 0);
+ fake_build_copy(data, mode, fake_build_scripts_s, main->cache_argument, data->path_build_programs_script, data_build.setting.build_sources_script, stage.file_sources_script, 0);
}
}
}
void fake_build_path_source_string(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const setting_path_source, f_string_dynamic_t * const source) {
if (!data || !data->main || !data_build || !setting_path_source || !source) return;
+ if (F_status_is_error(data->main->setting.state.status)) return;
+
+ fake_main_t * const main = data->main;
fake_string_dynamic_reset(source);
- data->main->setting.state.status = f_string_dynamic_append_nulless(*setting_path_source, source);
+ main->setting.state.status = f_string_dynamic_append_nulless(*setting_path_source, source);
- if (F_status_is_error_not(data->main->setting.state.status) && data_build->setting.has_path_standard) {
+ if (F_status_is_error_not(main->setting.state.status) && data_build->setting.has_path_standard) {
if (data_build->setting.build_language == fake_build_language_c_e) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_c_s, source);
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_c_s, source);
}
else if (data_build->setting.build_language == fake_build_language_cpp_e) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_cpp_s, source);
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_cpp_s, source);
}
else if (data_build->setting.build_language == fake_build_language_bash_e) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_bash_s, source);
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_bash_s, source);
}
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(f_path_separator_s, source);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, source);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
}
}
#endif // _di_fake_build_path_source_string_
if (!data || !data->main || !data_build || !generic || !specific) return;
+ fake_main_t * const main = data->main;
+
f_array_length_t i = 0;
f_array_length_t j = 0;
if (!sources[i]->array[j].used) continue;
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &data->main->cache_argument);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &main->cache_argument);
+ if (F_status_is_error(main->setting.state.status)) return;
- data->main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &main->cache_argument);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
- data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) return;
} // for
} // for
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_build_sources_add_
return;
}
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_object, &data->main->cache_argument);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ fake_main_t * const main = data->main;
- data->main->setting.state.status = f_string_dynamic_append_nulless(specific->used ? *specific : *generic, &data->main->cache_argument);
+ fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_object, &main->cache_argument);
+ if (F_status_is_error(main->setting.state.status)) return;
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ main->setting.state.status = f_string_dynamic_append_nulless(specific->used ? *specific : *generic, &main->cache_argument);
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
- data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) return;
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_build_sources_object_add_
if (!data || !data->main) return;
if (F_status_is_error(data->main->setting.state.status)) return;
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ fake_main_t * const main = data->main;
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
f_mode_t mode = f_mode_t_initialize;
- macro_f_mode_t_set_default_umask(mode, data->main->program.umask);
+ macro_f_mode_t_set_default_umask(mode, main->program.umask);
- data->main->setting.state.status = f_file_touch(file, mode.regular, F_false);
+ main->setting.state.status = f_file_touch(file, mode.regular, F_false);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_touch), file, f_file_operation_touch_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_touch), file, f_file_operation_touch_s, fll_error_file_type_file_e);
}
else {
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_build_touch_
* The source string to append the build path source to.
* This gets reset by fake_string_dynamics_reset().
*
+ * @see f_string_dynamic_append_assure()
* @see f_string_dynamic_append_nulless()
*
* @see fake_string_dynamics_reset()
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_shared.used) return 0;
- fake_build_print_compile_library_shared(&data->main->program.message);
+ fake_main_t * const main = data->main;
- fake_string_dynamics_reset(&data->main->cache_arguments);
+ fake_build_print_compile_library_shared(&main->program.message);
+
+ fake_string_dynamics_reset(&main->cache_arguments);
fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_shared);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_objects_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_objects_add));
return 0;
}
fake_build_sources_add(data, data_build, &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_shared);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_add));
return 0;
}
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_library_e);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
return 0;
}
{
const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
- if (F_status_is_error(data->main->setting.state.status)) return 0;
- if (data->main->setting.state.status == F_child) return result;
+ if (F_status_is_error(main->setting.state.status)) return 0;
+ if (main->setting.state.status == F_child) return result;
}
if (parameter_file_name_major.used) {
memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used);
memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name.string, sizeof(f_char_t) * parameter_file_name.used);
- data->main->setting.state.status = f_file_link(parameter_file_name_major, parameter_file_path);
+ main->setting.state.status = f_file_link(parameter_file_name_major, parameter_file_path);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- fake_build_print_verbose_linked_file(&data->main->program.message, parameter_file_path, parameter_file_name_major);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ fake_build_print_verbose_linked_file(&main->program.message, parameter_file_path, parameter_file_name_major);
}
else {
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
+ if (F_status_set_fine(main->setting.state.status) == F_file_found) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_link), parameter_file_name_major, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_link), parameter_file_name_major, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used);
memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_major.string, sizeof(f_char_t) * parameter_file_name_major.used);
- data->main->setting.state.status = f_file_link(parameter_file_name_minor, parameter_file_path);
+ main->setting.state.status = f_file_link(parameter_file_name_minor, parameter_file_path);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- fake_build_print_verbose_linked_file(&data->main->program.message, parameter_file_path, parameter_file_name_minor);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ fake_build_print_verbose_linked_file(&main->program.message, parameter_file_path, parameter_file_name_minor);
}
else {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_link), F_status_set_fine(data->main->setting.state.status) == F_file_found ? parameter_file_path : parameter_file_name_minor, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_link), F_status_set_fine(main->setting.state.status) == F_file_found ? parameter_file_path : parameter_file_name_minor, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used);
memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_minor.string, sizeof(f_char_t) * parameter_file_name_minor.used);
- data->main->setting.state.status = f_file_link(parameter_file_name_micro, parameter_file_path);
+ main->setting.state.status = f_file_link(parameter_file_name_micro, parameter_file_path);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- fake_build_print_verbose_linked_file(&data->main->program.message, parameter_file_path, parameter_file_name_micro);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ fake_build_print_verbose_linked_file(&main->program.message, parameter_file_path, parameter_file_name_micro);
}
else {
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
+ if (F_status_set_fine(main->setting.state.status) == F_file_found) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_link), parameter_file_name_micro, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_link), parameter_file_name_micro, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
memcpy(parameter_file_path_string, data->path_build_libraries_shared.string, sizeof(f_char_t) * data->path_build_libraries_shared.used);
memcpy(parameter_file_path_string + data->path_build_libraries_shared.used, parameter_file_name_micro.string, sizeof(f_char_t) * parameter_file_name_micro.used);
- data->main->setting.state.status = f_file_link(parameter_file_name_nano, parameter_file_path);
+ main->setting.state.status = f_file_link(parameter_file_name_nano, parameter_file_path);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- fake_build_print_verbose_linked_file(&data->main->program.message, parameter_file_path, parameter_file_name_nano);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ fake_build_print_verbose_linked_file(&main->program.message, parameter_file_path, parameter_file_name_nano);
}
else {
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
+ if (F_status_set_fine(main->setting.state.status) == F_file_found) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_link), parameter_file_name_nano, f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_link), parameter_file_name_nano, f_file_operation_link_s, fll_error_file_type_file_e);
return 0;
}
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_static.used) return 0;
- fake_build_print_compile_library_static(&data->main->program.message);
+ fake_main_t * const main = data->main;
+
+ fake_build_print_compile_library_static(&main->program.message);
- fake_string_dynamic_reset(&data->main->cache_1);
- fake_string_dynamic_reset(&data->main->cache_2);
- fake_string_dynamics_reset(&data->main->cache_arguments);
+ fake_string_dynamic_reset(&main->cache_1);
+ fake_string_dynamic_reset(&main->cache_2);
+ fake_string_dynamics_reset(&main->cache_arguments);
f_array_length_t i = 0;
if (!data_build->setting.build_indexer_arguments.array[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(data_build->setting.build_indexer_arguments.array[i], &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ main->setting.state.status = fll_execute_arguments_add(data_build->setting.build_indexer_arguments.array[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_libraries_static, &data->main->cache_2);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_libraries_static, &main->cache_2);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_prefix_s, &data->main->cache_2);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_prefix_s, &main->cache_2);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_2);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_2);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_suffix_static_s, &data->main->cache_2);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_suffix_static_s, &main->cache_2);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
}
else {
- data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_2, &data->main->cache_arguments);
+ main->setting.state.status = fll_execute_arguments_add(main->cache_2, &main->cache_arguments);
}
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
+ if (F_status_is_error_not(main->setting.state.status)) {
f_array_length_t j = 0;
const f_string_dynamics_t *sources[2] = {
for (j = 0; j < sources[i]->used; ++j) {
- fake_string_dynamic_reset(&data->main->cache_2);
+ fake_string_dynamic_reset(&main->cache_2);
- fake_build_get_file_name_without_extension(data, sources[i]->array[j], &data->main->cache_1);
+ fake_build_get_file_name_without_extension(data, sources[i]->array[j], &main->cache_1);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
break;
}
- data->main->setting.state.status = f_file_name_directory(sources[i]->array[j], &data->main->cache_2);
+ main->setting.state.status = f_file_name_directory(sources[i]->array[j], &main->cache_2);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_file_name_directory));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_name_directory));
break;
}
- fake_string_dynamic_reset(&data->main->cache_argument);
+ fake_string_dynamic_reset(&main->cache_argument);
- if (data->main->cache_2.used) {
- data->main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &data->main->cache_2);
+ if (main->cache_2.used) {
+ main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &main->cache_2);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_prepend));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_prepend));
break;
}
- data->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data->main->cache_2);
+ main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_2);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->cache_2, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_2, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->cache_1, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_1, &main->cache_argument);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
}
}
else {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->cache_1, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_1, &main->cache_argument);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
}
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
- data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
+ main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
break;
}
} // for
}
- int result = data->main->program.child;
-
- if (F_status_is_error_not(data->main->setting.state.status)) {
- result = fake_execute(data, data_build->environment, data_build->setting.build_indexer);
- }
+ const int result = F_status_is_error(main->setting.state.status)
+ ? main->program.child
+ : fake_execute(data, data_build->environment, data_build->setting.build_indexer);
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
+ if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
}
if (!data || !data->main || !data_build || !environment) return;
if (F_status_is_error(data->main->setting.state.status)) return;
+ fake_main_t * const main = data->main;
+
// Reset the environment.
for (f_array_length_t i = 0; i < environment->used; ++i) {
for (uint8_t i = 0; i < 2; ++i) {
- data->main->setting.state.status = fl_environment_load_name(variables[i], environment);
+ main->setting.state.status = fl_environment_load_name(variables[i], environment);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fl_environment_load_name));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fl_environment_load_name));
return;
}
if (environment->used + data_build->setting.environment.used > environment->size) {
if (environment->used + data_build->setting.environment.used > f_environment_max_length_d) {
- fake_build_print_error_setting_value_too_long(&data->main->program.error, fake_build_setting_name_environment_s, data->file_data_build_settings);
+ fake_build_print_error_setting_value_too_long(&main->program.error, fake_build_setting_name_environment_s, data->file_data_build_settings);
- data->main->setting.state.status = F_status_set_error(F_array_too_large);
+ main->setting.state.status = F_status_set_error(F_array_too_large);
return;
}
}
- data->main->setting.state.status = fl_environment_load_names(data_build->setting.environment, environment);
+ main->setting.state.status = fl_environment_load_names(data_build->setting.environment, environment);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fl_environment_load_names));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fl_environment_load_names));
}
else {
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_build_load_environment_
if (!data || !data->main || !setting) return;
if (F_status_is_error(data->main->setting.state.status)) return;
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ fake_main_t * const main = data->main;
+
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
if (build_arguments && build_arguments->used) {
path_file.used = data->path_data_build.used + build_arguments->array[0].used;
}
- else if (!process_pipe || (data->main->setting.flag & fake_main_flag_operation_e)) {
+ else if (!process_pipe || (main->setting.flag & fake_main_flag_operation_e)) {
path_file.used = data->file_data_build_settings.used;
}
else {
memcpy(path_file_string, data->path_data_build.string, sizeof(f_char_t) * data->path_data_build.used);
memcpy(path_file_string + data->path_data_build.used, build_arguments->array[0].string, sizeof(f_char_t) * build_arguments->array[0].used);
}
- else if (!process_pipe || (data->main->setting.flag & fake_main_flag_operation_e)) {
+ else if (!process_pipe || (main->setting.flag & fake_main_flag_operation_e)) {
memcpy(path_file_string, data->file_data_build_settings.string, sizeof(f_char_t) * data->file_data_build_settings.used);
}
else {
if (process_pipe) {
fake_pipe_buffer(data, &buffer);
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
buffer.used = 0;
}
else {
- data->main->setting.state.status = f_string_dynamic_append_assure(f_string_eol_s, &buffer);
+ main->setting.state.status = f_string_dynamic_append_assure(f_string_eol_s, &buffer);
}
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- if (build_arguments && build_arguments->used || !process_pipe || (data->main->setting.flag & fake_main_flag_operation_e)) {
+ if (F_status_is_error_not(main->setting.state.status)) {
+ if (build_arguments && build_arguments->used || !process_pipe || (main->setting.flag & fake_main_flag_operation_e)) {
fake_file_buffer(data, path_file, process_pipe ? F_false : F_true, &buffer);
}
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
+ if (F_status_is_error_not(main->setting.state.status)) {
f_string_range_t range = macro_f_string_range_t_initialize2(buffer.used);
f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
- // @todo make sure data->main->setting.state.custom = (void *) data->main->program;
- //f_state_t state = macro_f_state_t_initialize_1(fake_allocation_large_d, fake_allocation_small_d, F_none, 0, 0, &fll_program_standard_signal_handle, 0, (void *) data->main->program, 0);
+ // @todo make sure main->setting.state.custom = (void *) main->program;
+ //f_state_t state = macro_f_state_t_initialize_1(fake_allocation_large_d, fake_allocation_small_d, F_none, 0, 0, &fll_program_standard_signal_handle, 0, (void *) main->program, 0);
- fll_fss_extended_read(buffer, &range, &objects, &contents, 0, 0, &delimits, 0, &data->main->setting.state);
+ fll_fss_extended_read(buffer, &range, &objects, &contents, 0, 0, &delimits, 0, &main->setting.state);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_fss(&data->main->program.error, macro_fake_f(fll_fss_extended_read), data->file_data_build_settings, range, F_true);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_fss(&main->program.error, macro_fake_f(fll_fss_extended_read), data->file_data_build_settings, range, F_true);
}
else {
- f_fss_apply_delimit(delimits, &buffer, &data->main->setting.state);
+ f_fss_apply_delimit(delimits, &buffer, &main->setting.state);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_fss_apply_delimit));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_fss_apply_delimit));
}
else {
fake_build_load_setting_process(data, F_true, path_file, modes_custom.used ? &modes_custom : 0, buffer, objects, contents, setting);
}
// Error when required settings are not specified.
- if (F_status_is_error_not(data->main->setting.state.status)) {
+ if (F_status_is_error_not(main->setting.state.status)) {
bool failed = F_false;
f_string_static_t * const settings[] = {
for (uint8_t i = 0; i < 1; ++i) {
if (!settings[i]->used) {
- fake_build_print_error_missing_required_setting(&data->main->program.warning, names[i], path_file);
+ fake_build_print_error_missing_required_setting(&main->program.warning, names[i], path_file);
failed = F_true;
}
} // for
if (failed) {
- data->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
fake_build_load_setting_override(data, setting);
if (!data || !data->main || !setting) return;
if (F_status_is_error(data->main->setting.state.status) && buffer.used) return;
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ fake_main_t * const main = data->main;
+
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
f_string_t function = macro_fake_f(fll_fss_snatch_apart);
- data->main->setting.state.status = fll_fss_snatch_apart(buffer, objects, contents, settings_name, fake_build_setting_total_d, settings_value, settings_matches, 0);
+ main->setting.state.status = fll_fss_snatch_apart(buffer, objects, contents, settings_name, fake_build_setting_total_d, settings_value, settings_matches, 0);
- if (data->main->setting.state.status == F_none) {
+ if (main->setting.state.status == F_none) {
const int total_build_libraries = setting->build_libraries.used;
// Custom modes are always used if provided, otherwise if any mode is specified, the entire defaults is replaced.
const f_string_statics_t * const modes = modes_custom && modes_custom->used
? modes_custom
- : data->main->setting.modes.used
- ? &data->main->setting.modes
+ : main->setting.modes.used
+ ? &main->setting.modes
: &setting->modes_default;
f_string_dynamic_t settings_mode_names[fake_build_setting_total_d];
} // for
if (found == F_false) {
- fake_build_print_error_mode_invalid(&data->main->program.warning, modes->array[i], path_file);
+ fake_build_print_error_mode_invalid(&main->program.warning, modes->array[i], path_file);
error_printed = F_true;
- data->main->setting.state.status = F_status_set_error(F_parameter);
+ main->setting.state.status = F_status_set_error(F_parameter);
break;
}
settings_mode_names[j].used = 0;
- data->main->setting.state.status = f_string_dynamic_increase_by(settings_value[j]->used + f_string_ascii_minus_s.used + modes->array[i].used, &settings_mode_names[j]);
+ main->setting.state.status = f_string_dynamic_increase_by(settings_value[j]->used + f_string_ascii_minus_s.used + modes->array[i].used, &settings_mode_names[j]);
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
function = macro_fake_f(f_string_dynamic_increase_by);
break;
}
- data->main->setting.state.status = f_string_dynamic_append_nulless(settings_name[j], &settings_mode_names[j]);
+ main->setting.state.status = f_string_dynamic_append_nulless(settings_name[j], &settings_mode_names[j]);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(f_string_ascii_minus_s, &settings_mode_names[j]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(f_string_ascii_minus_s, &settings_mode_names[j]);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(modes->array[i], &settings_mode_names[j]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(modes->array[i], &settings_mode_names[j]);
}
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
function = macro_fake_f(f_string_dynamic_append);
break;
}
} // for
- if (data->main->setting.state.status == F_none) {
- data->main->setting.state.status = fll_fss_snatch_apart(buffer, objects, contents, settings_mode_names, fake_build_setting_total_d, settings_value, 0, 0);
+ if (main->setting.state.status == F_none) {
+ main->setting.state.status = fll_fss_snatch_apart(buffer, objects, contents, settings_mode_names, fake_build_setting_total_d, settings_value, 0, 0);
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
function = macro_fake_f(fll_fss_snatch_apart);
}
}
- if (F_status_is_error(data->main->setting.state.status)) break;
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
for (j = 0; j < fake_build_setting_total_d; ++j) {
}
}
- if (F_status_is_error(data->main->setting.state.status)) {
- if (data->main->setting.state.status == F_status_set_error(F_string_too_large)) {
- fake_build_print_error_setting_too_long(&data->main->program.warning, path_file);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (main->setting.state.status == F_status_set_error(F_string_too_large)) {
+ fake_build_print_error_setting_too_long(&main->program.warning, path_file);
}
else if (!error_printed) {
- fake_print_error(&data->main->program.error, function);
+ fake_print_error(&main->program.error, function);
}
}
else {
fake_path_part_script_s, // path_program_script
fake_path_part_shared_s, // path_program_shared
fake_path_part_static_s, // path_program_static
- data->main->setting.sources, // path_sources
+ main->setting.sources, // path_sources
f_string_empty_s, // path_sources_object
f_string_empty_s, // preserve_path_headers
f_string_empty_s, // process_post
if (!settings_single_matches[i] && settings_single_destination[i]) {
settings_single_destination[i]->used = 0;
- data->main->setting.state.status = f_string_dynamic_append(settings_single_string_default[i], settings_single_destination[i]);
+ main->setting.state.status = f_string_dynamic_append(settings_single_string_default[i], settings_single_destination[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
break;
}
else {
*settings_single_bool[i] = F_true;
- fake_build_print_warning_setting_boolean_may_only_be(&data->main->program.warning, settings_single_name[i], path_file, settings_single_version_default_name[i]);
+ fake_build_print_warning_setting_boolean_may_only_be(&main->program.warning, settings_single_name[i], path_file, settings_single_version_default_name[i]);
}
}
else if (settings_single_type[i] == 4) {
else {
*settings_single_language[i] = fake_build_language_c_e;
- fake_build_print_warning_setting_language_may_only_be(&data->main->program.warning, settings_single_name[i], path_file, fake_build_language_c_s);
+ fake_build_print_warning_setting_language_may_only_be(&main->program.warning, settings_single_name[i], path_file, fake_build_language_c_s);
}
}
else if (settings_single_type[i] == 5) {
else {
*settings_single_version[i] = settings_single_version_default[i];
- fake_build_print_warning_setting_version_may_only_be(&data->main->program.warning, settings_single_name[i], path_file, settings_single_version_default_name[i]);
+ fake_build_print_warning_setting_version_may_only_be(&main->program.warning, settings_single_name[i], path_file, settings_single_version_default_name[i]);
}
}
else if (settings_single_destination[i]) {
settings_single_destination[i]->used = 0;
if (settings_single_type[i] == 2) {
- data->main->setting.state.status = f_path_directory_cleanup(settings_single_source[i]->array[settings_single_source[i]->used - 1], settings_single_destination[i]);
+ main->setting.state.status = f_path_directory_cleanup(settings_single_source[i]->array[settings_single_source[i]->used - 1], settings_single_destination[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_path_directory_cleanup));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_path_directory_cleanup));
break;
}
}
else {
- data->main->setting.state.status = f_string_dynamic_increase_by(settings_single_source[i]->array[settings_single_source[i]->used - 1].used + 1, settings_single_destination[i]);
+ main->setting.state.status = f_string_dynamic_increase_by(settings_single_source[i]->array[settings_single_source[i]->used - 1].used + 1, settings_single_destination[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
- data->main->setting.state.status = f_string_dynamic_append_nulless(settings_single_source[i]->array[settings_single_source[i]->used - 1], settings_single_destination[i]);
+ main->setting.state.status = f_string_dynamic_append_nulless(settings_single_source[i]->array[settings_single_source[i]->used - 1], settings_single_destination[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
}
} // for
- if (F_status_is_error_not(data->main->setting.state.status)) {
+ if (F_status_is_error_not(main->setting.state.status)) {
if (checks && !setting->version_file) {
setting->version_file = fake_build_version_micro_e;
- fake_build_print_warning_setting_required_default_to(&data->main->program.warning, fake_build_setting_name_version_file_s, path_file, fake_build_version_micro_s);
+ fake_build_print_warning_setting_required_default_to(&main->program.warning, fake_build_setting_name_version_file_s, path_file, fake_build_version_micro_s);
}
if (checks && !setting->version_target) {
setting->version_target = fake_build_version_major_e;
- fake_build_print_warning_setting_required_default_to(&data->main->program.warning, fake_build_setting_name_version_target_s, path_file, fake_build_version_major_s);
+ fake_build_print_warning_setting_required_default_to(&main->program.warning, fake_build_setting_name_version_target_s, path_file, fake_build_version_major_s);
}
}
}
if (!data || !data->main || !setting) return;
if (F_status_is_error(data->main->setting.state.status)) return;
- if (data->main->program.parameters.array[fake_parameter_sources_e].result & f_console_result_value_e && setting->path_sources.used) {
- data->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &setting->path_sources);
+ fake_main_t * const main = data->main;
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
+ if (main->program.parameters.array[fake_parameter_sources_e].result & f_console_result_value_e && setting->path_sources.used) {
+ main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &setting->path_sources);
+
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
return;
}
}
- if (data->main->program.parameters.array[fake_parameter_shared_disable_e].result & f_console_result_found_e) {
- if (data->main->program.parameters.array[fake_parameter_shared_enable_e].result & f_console_result_found_e) {
- if (data->main->program.parameters.array[fake_parameter_shared_enable_e].location > data->main->program.parameters.array[fake_parameter_shared_disable_e].location) {
+ if (main->program.parameters.array[fake_parameter_shared_disable_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[fake_parameter_shared_enable_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[fake_parameter_shared_enable_e].location > main->program.parameters.array[fake_parameter_shared_disable_e].location) {
setting->build_shared = F_true;
setting->search_shared = F_true;
}
setting->search_shared = F_false;
}
- fake_build_print_warning_parameters_contradict(&data->main->program.warning, f_console_symbol_long_normal_s, fake_long_shared_disabled_s, f_console_symbol_long_normal_s, fake_long_shared_enabled_s, f_console_symbol_long_normal_s, setting->build_shared ? fake_long_shared_enabled_s : fake_long_shared_disabled_s);
+ fake_build_print_warning_parameters_contradict(&main->program.warning, f_console_symbol_long_normal_s, fake_long_shared_disabled_s, f_console_symbol_long_normal_s, fake_long_shared_enabled_s, f_console_symbol_long_normal_s, setting->build_shared ? fake_long_shared_enabled_s : fake_long_shared_disabled_s);
}
else {
setting->build_shared = F_false;
setting->search_shared = F_false;
}
}
- else if (data->main->program.parameters.array[fake_parameter_shared_enable_e].result & f_console_result_found_e) {
+ else if (main->program.parameters.array[fake_parameter_shared_enable_e].result & f_console_result_found_e) {
setting->build_shared = F_true;
setting->search_shared = F_true;
}
- if (data->main->program.parameters.array[fake_parameter_static_disable_e].result & f_console_result_found_e) {
- if (data->main->program.parameters.array[fake_parameter_static_enable_e].result & f_console_result_found_e) {
- if (data->main->program.parameters.array[fake_parameter_static_enable_e].location > data->main->program.parameters.array[fake_parameter_static_disable_e].location) {
+ if (main->program.parameters.array[fake_parameter_static_disable_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[fake_parameter_static_enable_e].result & f_console_result_found_e) {
+ if (main->program.parameters.array[fake_parameter_static_enable_e].location > main->program.parameters.array[fake_parameter_static_disable_e].location) {
setting->build_static = F_true;
setting->search_static = F_true;
}
setting->search_static = F_false;
}
- fake_build_print_warning_parameters_contradict(&data->main->program.warning, f_console_symbol_long_normal_s, fake_long_static_disabled_s, f_console_symbol_long_normal_s, fake_long_static_enabled_s, f_console_symbol_long_normal_s, setting->build_static ? fake_long_static_enabled_s : fake_long_static_disabled_s);
+ fake_build_print_warning_parameters_contradict(&main->program.warning, f_console_symbol_long_normal_s, fake_long_static_disabled_s, f_console_symbol_long_normal_s, fake_long_static_enabled_s, f_console_symbol_long_normal_s, setting->build_static ? fake_long_static_enabled_s : fake_long_static_disabled_s);
}
else {
setting->build_static = F_false;
setting->search_static = F_false;
}
}
- else if (data->main->program.parameters.array[fake_parameter_static_enable_e].result & f_console_result_found_e) {
+ else if (main->program.parameters.array[fake_parameter_static_enable_e].result & f_console_result_found_e) {
setting->build_static = F_true;
setting->search_static = F_true;
}
if (setting->build_language == fake_build_language_c_e || setting->build_language == fake_build_language_cpp_e) {
if (setting->build_shared == F_false && setting->build_static == F_false) {
- fake_build_print_warning_setting_both_cannot_when_language(&data->main->program.warning, fake_build_setting_name_build_shared_s, fake_build_setting_name_build_static_s, setting->build_language == fake_build_language_c_e ? fake_build_language_c_s : fake_build_language_cpp_s);
+ fake_build_print_warning_setting_both_cannot_when_language(&main->program.warning, fake_build_setting_name_build_shared_s, fake_build_setting_name_build_static_s, setting->build_language == fake_build_language_c_e ? fake_build_language_c_s : fake_build_language_cpp_s);
- data->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
}
if (!data || !data->main || !stage) return;
if (F_status_is_error(data->main->setting.state.status)) return;
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ fake_main_t * const main = data->main;
+
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
&stage->file_sources_settings,
};
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
f_string_dynamic_t settings_file_base = f_string_dynamic_t_initialize;
if (settings_file.used) {
- data->main->setting.state.status = f_file_name_base(settings_file, &settings_file_base);
+ main->setting.state.status = f_file_name_base(settings_file, &settings_file_base);
}
else {
- data->main->setting.state.status = f_file_name_base(data->file_data_build_settings, &settings_file_base);
+ main->setting.state.status = f_file_name_base(data->file_data_build_settings, &settings_file_base);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_file_name_base));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_name_base));
return;
}
for (uint8_t i = 0; i < fake_build_stage_total_d; ++i) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_stage, values[i]);
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_stage, values[i]);
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.process.used) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->setting.process, values[i]);
+ if (F_status_is_error_not(main->setting.state.status) && main->setting.process.used) {
+ main->setting.state.status = f_string_dynamic_append_nulless(main->setting.process, values[i]);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(names[i], values[i]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(names[i], values[i]);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_separate_s, values[i]);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(settings_file_base, values[i]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(settings_file_base, values[i]);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_built_s, values[i]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_stage_built_s, values[i]);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_shared.used) return 0;
- fake_build_print_compile_object_shared(&data->main->program.message);
+ fake_main_t * const main = data->main;
- fake_string_dynamic_reset(&data->main->cache_argument);
- fake_string_dynamics_reset(&data->main->cache_arguments);
+ fake_build_print_compile_object_shared(&main->program.message);
+
+ fake_string_dynamic_reset(&main->cache_argument);
+ fake_string_dynamics_reset(&main->cache_arguments);
fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_shared);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_object_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_object_add));
return 0;
}
{
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_shared, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_shared, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return 0;
}
const f_string_static_t values[] = {
fake_build_parameter_object_compile_s,
fake_build_parameter_object_output_s,
- data->main->cache_argument,
+ main->cache_argument,
};
for (uint8_t i = 0; i < 3; ++i) {
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
}
fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_arguments_standard_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_arguments_standard_add));
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
+ const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
+ if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
}
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_static.used) return 0;
- fake_build_print_compile_object_static(&data->main->program.message);
+ fake_main_t * const main = data->main;
+
+ fake_build_print_compile_object_static(&main->program.message);
- fake_string_dynamic_reset(&data->main->cache_argument);
- fake_string_dynamics_reset(&data->main->cache_arguments);
+ fake_string_dynamic_reset(&main->cache_argument);
+ fake_string_dynamics_reset(&main->cache_arguments);
fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_static);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_object_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_object_add));
return 0;
}
{
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_static, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_static, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return 0;
}
const f_string_static_t values[] = {
fake_build_parameter_object_compile_s,
fake_build_parameter_object_output_s,
- data->main->cache_argument,
+ main->cache_argument,
};
for (uint8_t i = 0; i < 3; ++i) {
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
}
fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_arguments_standard_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_arguments_standard_add));
return 0;
}
const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
+ if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
}
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
if (!data_build->setting.build_sources_library.used) return 0;
- fake_build_print_compile_object_static_library(&data->main->program.message);
+ fake_main_t * const main = data->main;
- fake_string_dynamics_reset(&data->main->cache_arguments);
+ fake_build_print_compile_object_static_library(&main->program.message);
+
+ fake_string_dynamics_reset(&main->cache_arguments);
fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_static);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_objects_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_objects_add));
return 0;
}
- int result = data->main->program.child;
+ int result = main->program.child;
const f_string_dynamics_t *sources[2] = {
&data_build->setting.build_sources_library,
if (!sources[i]->array[j].used) continue;
- fake_string_dynamic_reset(&data->main->cache_1);
- fake_string_dynamic_reset(&data->main->cache_2);
- fake_string_dynamic_reset(&data->main->cache_argument);
+ fake_string_dynamic_reset(&main->cache_1);
+ fake_string_dynamic_reset(&main->cache_2);
+ fake_string_dynamic_reset(&main->cache_argument);
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &data->main->cache_1);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &main->cache_1);
+ if (F_status_is_error(main->setting.state.status)) break;
- data->main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &data->main->cache_1);
+ main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &main->cache_1);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return 0;
}
- fake_build_get_file_name_without_extension(data, sources[i]->array[j], &data->main->cache_2);
+ fake_build_get_file_name_without_extension(data, sources[i]->array[j], &main->cache_2);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
break;
}
- data->main->setting.state.status = f_file_name_directory(sources[i]->array[j], &data->main->cache_argument);
+ main->setting.state.status = f_file_name_directory(sources[i]->array[j], &main->cache_argument);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_file_name_directory));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_name_directory));
break;
}
- if (data->main->cache_argument.used) {
- data->main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &data->main->cache_argument);
+ if (main->cache_argument.used) {
+ main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &main->cache_argument);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_prepend));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_prepend));
break;
}
- data->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_argument);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
- data->main->setting.state.status = f_directory_exists(data->main->cache_argument);
+ main->setting.state.status = f_directory_exists(main->cache_argument);
- if (data->main->setting.state.status == F_false) {
- fake_build_print_error_exist_not_directory(&data->main->program.message, data->main->cache_argument);
+ if (main->setting.state.status == F_false) {
+ fake_build_print_error_exist_not_directory(&main->program.message, main->cache_argument);
- data->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
break;
}
- if (data->main->setting.state.status == F_file_found_not) {
- data->main->setting.state.status = f_directory_create(data->main->cache_argument, mode.directory);
+ if (main->setting.state.status == F_file_found_not) {
+ main->setting.state.status = f_directory_create(main->cache_argument, mode.directory);
- if (F_status_is_error(data->main->setting.state.status)) {
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found_not) {
- fake_build_print_error_cannot_create_due_to_parent(&data->main->program.message, data->main->cache_argument);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ fake_build_print_error_cannot_create_due_to_parent(&main->program.message, main->cache_argument);
}
else {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_create), data->main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_create), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
}
break;
}
- fake_build_print_verbose_create_directory(&data->main->program.message, data->main->cache_argument);
+ fake_build_print_verbose_create_directory(&main->program.message, main->cache_argument);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_exists), data->main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_exists), main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
break;
}
}
- if (data->main->cache_argument.used) {
- data->main->setting.state.status = F_none;
+ if (main->cache_argument.used) {
+ main->setting.state.status = F_none;
}
else {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects, &main->cache_argument);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->cache_2, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_2, &main->cache_argument);
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &main->cache_argument);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return 0;
}
const f_string_static_t values[] = {
- data->main->cache_1,
+ main->cache_1,
fake_build_parameter_object_compile_s,
fake_build_parameter_object_static_s,
fake_build_parameter_object_output_s,
- data->main->cache_argument,
+ main->cache_argument,
};
for (k = 0; k < 5; ++k) {
if (!values[k].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[k], &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ main->setting.state.status = fll_execute_arguments_add(values[k], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_library_e);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
break;
}
result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
- if (F_status_is_error(data->main->setting.state.status) || data->main->setting.state.status == F_child) break;
+ if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child) break;
} // for
- if (F_status_is_error(data->main->setting.state.status) || data->main->setting.state.status == F_child) break;
+ if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child) break;
} // for
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
+ if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
}
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_shared.used) return 0;
- fake_build_print_compile_program_shared(&data->main->program.message);
+ fake_main_t * const main = data->main;
- fake_string_dynamics_reset(&data->main->cache_arguments);
+ fake_build_print_compile_program_shared(&main->program.message);
+
+ fake_string_dynamics_reset(&main->cache_arguments);
fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_shared);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_objects_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_objects_add));
return 0;
}
fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_shared);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_add));
return 0;
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
- fake_string_dynamic_reset(&data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ fake_string_dynamic_reset(&main->cache_argument);
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_programs_shared, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_programs_shared, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return 0;
}
const f_string_static_t values[] = {
fake_build_parameter_library_output_s,
- data->main->cache_argument,
+ main->cache_argument,
};
for (uint8_t i = 0; i < 2; ++i) {
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
}
// If project-specific library sources exist, then the -lbuild_name needs to be added to the arguments.
- if (F_status_is_error_not(data->main->setting.state.status) && data_build->setting.build_sources_library.used) {
- fake_string_dynamic_reset(&data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status) && data_build->setting.build_sources_library.used) {
+ fake_string_dynamic_reset(&main->cache_argument);
- data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_link_file_s, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_link_file_s, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &main->cache_argument);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return 0;
}
- data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
+ main->setting.state.status = fll_execute_arguments_add(main->cache_argument, &main->cache_arguments);
}
fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_program_e);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
return 0;
}
const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
+ if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
}
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_static.used) return 0;
- fake_build_print_compile_program_static(&data->main->program.message);
+ fake_main_t * const main = data->main;
+
+ fake_build_print_compile_program_static(&main->program.message);
- fake_string_dynamics_reset(&data->main->cache_arguments);
+ fake_string_dynamics_reset(&main->cache_arguments);
fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_static);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_objects_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_objects_add));
return 0;
}
fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_static);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_build_sources_add));
return 0;
}
- if (F_status_is_error_not(data->main->setting.state.status)) {
+ if (F_status_is_error_not(main->setting.state.status)) {
f_string_static_t source_library = f_string_static_t_initialize;
source_library.used = data->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used + data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used;
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ main->setting.state.status = fll_execute_arguments_add(values[i], &main->cache_arguments);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
}
fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_program_e);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_arguments_add));
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
+ const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
+ if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
}
if (F_status_is_error(data->main->setting.state.status) || data->main->setting.state.status == F_child) return;
if (f_file_exists(file_stage, F_true) == F_true) return;
- fake_string_dynamic_reset(&data->main->cache_argument);
+ fake_main_t * const main = data->main;
+
+ fake_string_dynamic_reset(&main->cache_argument);
if (data_build->setting.path_headers.used) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_includes, &data->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_includes, &main->cache_argument);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.path_headers, &data->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.path_headers, &main->cache_argument);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
data->path_build_programs_static,
data->path_build_settings,
data->path_build_stage,
- data->main->cache_argument,
+ main->cache_argument,
};
- fake_build_print_message_skeleton_build_base(&data->main->program.message);
+ fake_build_print_message_skeleton_build_base(&main->program.message);
bool created = F_false;
f_array_length_t j = 0;
if (f_path_separator_s.used && directorys[i].string[j] != f_path_separator_s.string[0]) continue;
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
directorys[i].string[j] = 0;
- data->main->setting.state.status = f_directory_exists(directorys[i]);
+ main->setting.state.status = f_directory_exists(directorys[i]);
- if (F_status_is_error(data->main->setting.state.status) || data->main->setting.state.status == F_false) {
+ if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_false) {
directorys[i].string[j] = f_path_separator_s.string[0];
break;
}
- if (data->main->setting.state.status == F_file_found_not) {
- data->main->setting.state.status = f_directory_create(directorys[i], mode);
+ if (main->setting.state.status == F_file_found_not) {
+ main->setting.state.status = f_directory_create(directorys[i], mode);
created = F_true;
}
directorys[i].string[j] = f_path_separator_s.string[0];
- if (F_status_is_error(data->main->setting.state.status)) break;
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
- if (F_status_is_fine(data->main->setting.state.status) && directorys[i].used && f_path_separator_s.used && directorys[i].string[directorys[i].used - 1] != f_path_separator_s.string[0]) {
- data->main->setting.state.status = f_directory_exists(directorys[i]);
+ if (F_status_is_fine(main->setting.state.status) && directorys[i].used && f_path_separator_s.used && directorys[i].string[directorys[i].used - 1] != f_path_separator_s.string[0]) {
+ main->setting.state.status = f_directory_exists(directorys[i]);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- if (data->main->setting.state.status == F_false) {
- data->main->setting.state.status = f_directory_create(directorys[i], mode);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ if (main->setting.state.status == F_false) {
+ main->setting.state.status = f_directory_create(directorys[i], mode);
created = F_true;
}
}
}
- if (F_status_is_error(data->main->setting.state.status)) {
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found) {
- data->main->setting.state.status = F_none;
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_file_found) {
+ main->setting.state.status = F_none;
continue;
}
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_create), directorys[i], f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_create), directorys[i], f_file_operation_create_s, fll_error_file_type_directory_e);
return;
}
if (created) {
- fake_build_print_verbose_create_directory(&data->main->program.message, directorys[i]);
+ fake_build_print_verbose_create_directory(&main->program.message, directorys[i]);
}
} // for
fake_build_touch(data, file_stage);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = F_none;
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_build_skeleton_
if (!data || !data->main) return;
- fake_print_message_delete_all_files(&data->main->program.message);
+ fake_main_t * const main = data->main;
- data->main->setting.state.status = F_none;
+ fake_print_message_delete_all_files(&main->program.message);
- if (data->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
- data->main->setting.state.status = f_directory_remove_custom(data->main->setting.build, F_directory_max_descriptors_d, F_true, fake_clean_remove_recursively_verbosely);
+ main->setting.state.status = F_none;
+
+ if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
+ main->setting.state.status = f_directory_remove_custom(main->setting.build, F_directory_max_descriptors_d, F_true, fake_clean_remove_recursively_verbosely);
}
else {
- data->main->setting.state.status = f_directory_remove(data->main->setting.build, F_directory_max_descriptors_d, F_true);
+ main->setting.state.status = f_directory_remove(main->setting.build, F_directory_max_descriptors_d, F_true);
}
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found_not || F_status_set_fine(data->main->setting.state.status) == F_directory) {
- fake_print_warning_build_directory_not_directory(&data->main->program.warning, data->main->setting.build);
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not || F_status_set_fine(main->setting.state.status) == F_directory) {
+ fake_print_warning_build_directory_not_directory(&main->program.warning, main->setting.build);
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_remove), data->main->setting.build, f_file_operation_delete_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_remove), main->setting.build, f_file_operation_delete_s, fll_error_file_type_directory_e);
}
else {
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_clean_operate_
if (!data || !data->main) return 1;
if (F_status_is_error(data->main->setting.state.status)) return 1;
- if (data->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
- f_file_stream_lock(data->main->program.message.to);
+ fake_main_t * const main = data->main;
- f_print_dynamic(program, data->main->program.message.to);
+ if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
+ f_file_stream_lock(main->program.message.to);
- for (f_array_length_t i = 0; i < data->main->cache_arguments.used; ++i) {
+ f_print_dynamic(program, main->program.message.to);
- if (!data->main->cache_arguments.array[i].used) continue;
+ for (f_array_length_t i = 0; i < main->cache_arguments.used; ++i) {
- fl_print_format(" %Q", data->main->program.message.to, data->main->cache_arguments.array[i]);
+ if (!main->cache_arguments.array[i].used) continue;
+
+ fl_print_format(" %Q", main->program.message.to, main->cache_arguments.array[i]);
} // for
- f_print_dynamic_raw(f_string_eol_s, data->main->program.message.to);
+ f_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- f_file_stream_flush(data->main->program.message.to);
- f_file_stream_unlock(data->main->program.message.to);
+ f_file_stream_flush(main->program.message.to);
+ f_file_stream_unlock(main->program.message.to);
}
int return_code = 0;
fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(0, 0, &environment, &signals, 0);
- data->main->setting.state.status = fll_execute_program(program, data->main->cache_arguments, ¶meter, 0, (void *) &return_code);
+ main->setting.state.status = fll_execute_program(program, main->cache_arguments, ¶meter, 0, (void *) &return_code);
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return 0;
}
}
- if (data->main->setting.state.status == F_child) return return_code;
+ if (main->setting.state.status == F_child) return return_code;
}
else {
- data->main->setting.state.status = F_status_set_error(F_file_found_not);
+ main->setting.state.status = F_status_set_error(F_file_found_not);
}
- if (return_code != 0) {
- data->main->setting.state.status = F_status_set_error(F_failure);
+ if (return_code) {
+ main->setting.state.status = F_status_set_error(F_failure);
}
- else if (F_status_is_error(data->main->setting.state.status)) {
+ else if (F_status_is_error(main->setting.state.status)) {
return_code = 1;
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found_not) {
- fake_print_error_execute_program_not_found(&data->main->program.error, program);
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ fake_print_error_execute_program_not_found(&main->program.error, program);
}
else {
- fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_program));
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_program));
}
}
#ifndef _di_fake_file_buffer_
void fake_file_buffer(fake_data_t * const data, const f_string_static_t path_file, const bool required, f_string_dynamic_t * const buffer) {
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ if (!data || !data->main || !buffer) return;
+
+ fake_main_t * const main = data->main;
+
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
}
- data->main->setting.state.status = f_file_exists(path_file, F_true);
+ main->setting.state.status = f_file_exists(path_file, F_true);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_exists), path_file, f_file_operation_find_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_exists), path_file, f_file_operation_find_s, fll_error_file_type_file_e);
return;
}
- if (data->main->setting.state.status == F_true) {
+ if (main->setting.state.status == F_true) {
{
off_t size_file = 0;
- data->main->setting.state.status = f_file_size(path_file, F_true, &size_file);
+ main->setting.state.status = f_file_size(path_file, F_true, &size_file);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_size), path_file, f_file_operation_read_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_size), path_file, f_file_operation_read_s, fll_error_file_type_file_e);
return;
}
size_file = fake_max_initial_buffer_d;
}
- data->main->setting.state.status = f_string_dynamic_increase_by(size_file, buffer);
+ main->setting.state.status = f_string_dynamic_increase_by(size_file, buffer);
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
const f_string_static_t message = macro_f_string_static_t_initialize("allocate buffer size for", 0, 24);
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_string_dynamic_increase_by), path_file, message, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_string_dynamic_increase_by), path_file, message, fll_error_file_type_file_e);
return;
}
- data->main->setting.state.status = F_true;
+ main->setting.state.status = F_true;
}
f_file_t file = f_file_t_initialize;
- data->main->setting.state.status = f_file_stream_open(path_file, f_string_empty_s, &file);
+ main->setting.state.status = f_file_stream_open(path_file, f_string_empty_s, &file);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_stream_open), path_file, f_file_operation_open_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stream_open), path_file, f_file_operation_open_s, fll_error_file_type_file_e);
return;
}
- data->main->setting.state.status = f_file_stream_read(file, buffer);
+ main->setting.state.status = f_file_stream_read(file, buffer);
f_file_stream_flush(file);
f_file_stream_close(&file);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_read), path_file, f_file_operation_read_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_read), path_file, f_file_operation_read_s, fll_error_file_type_file_e);
}
else {
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
else {
if (required) {
- data->main->setting.state.status = F_status_set_error(F_file_found_not);
+ main->setting.state.status = F_status_set_error(F_file_found_not);
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_exists), path_file, f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_exists), path_file, f_file_operation_find_s, fll_error_file_type_file_e);
}
}
}
if (!data || !data->main || !buffer) return;
+ fake_main_t * const main = data->main;
+
f_file_t file = f_file_t_initialize;
file.id = F_type_descriptor_input_d;
file.stream = F_type_input_d;
file.size_read = fake_allocation_pipe_d;
- data->main->setting.state.status = f_string_dynamic_increase_by(fake_max_initial_buffer_d, buffer);
+ main->setting.state.status = f_string_dynamic_increase_by(fake_max_initial_buffer_d, buffer);
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
const f_string_static_t message = macro_f_string_static_t_initialize("allocate buffer size for", 0, 24);
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_string_dynamic_increase_by), f_string_ascii_minus_s, message, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_string_dynamic_increase_by), f_string_ascii_minus_s, message, fll_error_file_type_file_e);
return;
}
clearerr(F_type_input_d);
do {
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
}
- data->main->setting.state.status = f_file_stream_read_block(file, buffer);
+ main->setting.state.status = f_file_stream_read_block(file, buffer);
- } while (F_status_is_fine(data->main->setting.state.status) && data->main->setting.state.status != F_interrupt && data->main->setting.state.status != F_none_eof);
+ } while (F_status_is_fine(main->setting.state.status) && main->setting.state.status != F_interrupt && main->setting.state.status != F_none_eof);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_stream_read_block), f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stream_read_block), f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_file_e);
}
else {
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_pipe_buffer_
if (!data || !data->main) return;
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ fake_main_t * const main = data->main;
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
};
const f_string_dynamic_t values[] = {
- data->main->setting.build,
- data->main->setting.data,
- data->main->setting.documents,
- data->main->setting.licenses,
- data->main->setting.sources,
- data->main->setting.work,
+ main->setting.build,
+ main->setting.data,
+ main->setting.documents,
+ main->setting.licenses,
+ main->setting.sources,
+ main->setting.work,
};
uint8_t requireds[] = {
F_false, // fake_long_build_s
- (data->main->program.pipe & fll_program_data_pipe_input_e) ? F_false : F_true, // fake_long_data_s
+ (main->program.pipe & fll_program_data_pipe_input_e) ? F_false : F_true, // fake_long_data_s
F_false, // fake_long_documents_s
F_false, // fake_long_licenses_s
F_false, // fake_long_sources_s
struct stat directory_stat;
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
// Check only expected operations (fake_operation_clean_e and fake_operation_skeleton_e should not call this function).
if (data->operation == fake_operation_make_e) {
- if (data->main->program.parameters.array[fake_parameter_fakefile_e].result == f_console_result_none_e) {
- if (data->main->setting.build.used && f_file_exists(data->main->setting.build, F_false) != F_true) {
+ if (main->program.parameters.array[fake_parameter_fakefile_e].result == f_console_result_none_e) {
+ if (main->setting.build.used && f_file_exists(main->setting.build, F_false) != F_true) {
if (f_file_exists(fake_default_fakefile_s, F_false) == F_true) {
requireds[1] = F_false; // fake_long_data_s
}
// If a custom --data or a custom --fakefile parameter is passed and uses an absolute or relative to current path, then do not check.
if (data->operation == fake_operation_make_e || data->operation == fake_operation_build_e) {
- f_console_parameter_t * const parameter = &data->main->program.parameters.array[
+ f_console_parameter_t * const parameter = &main->program.parameters.array[
data->operation == fake_operation_make_e
? fake_parameter_fakefile_e
: fake_parameter_settings_e
if (parameter->result & f_console_result_value_e) {
const f_array_length_t index = parameter->values.array[parameter->values.used - 1];
- if (f_path_is_absolute(data->main->program.parameters.arguments.array[index]) == F_true || f_path_is_relative_current(data->main->program.parameters.arguments.array[index]) == F_true) {
+ if (f_path_is_absolute(main->program.parameters.arguments.array[index]) == F_true || f_path_is_relative_current(main->program.parameters.arguments.array[index]) == F_true) {
requireds[1] = F_none; // fake_long_data_s
}
else {
- data->main->setting.state.status = f_file_exists(data->main->program.parameters.arguments.array[index], F_true);
+ main->setting.state.status = f_file_exists(main->program.parameters.arguments.array[index], F_true);
- if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status == F_true) {
+ if (F_status_is_error_not(main->setting.state.status) && main->setting.state.status == F_true) {
requireds[1] = F_none; // fake_long_data_s
}
}
if (requireds[i] != F_none && values[i].used) {
memset(&directory_stat, 0, sizeof(struct stat));
- data->main->setting.state.status = f_file_stat(values[i], F_true, &directory_stat);
+ main->setting.state.status = f_file_stat(values[i], F_true, &directory_stat);
- if (data->main->setting.state.status == F_status_set_error(F_file_found_not)) {
- data->main->setting.state.status = F_status_set_error(F_directory_found_not);
+ if (main->setting.state.status == F_status_set_error(F_file_found_not)) {
+ main->setting.state.status = F_status_set_error(F_directory_found_not);
}
- if (F_status_is_error(data->main->setting.state.status)) {
- if (F_status_set_fine(data->main->setting.state.status) != F_directory_found_not || requireds[i]) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_stat), values[i], f_file_operation_access_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) != F_directory_found_not || requireds[i]) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stat), values[i], f_file_operation_access_s, fll_error_file_type_directory_e);
return;
}
}
}
else if (requireds[i] == F_true) {
- fake_print_error_parameter_directory_not_found_path(&data->main->program.error, f_console_symbol_long_normal_s, names[i], values[i]);
+ fake_print_error_parameter_directory_not_found_path(&main->program.error, f_console_symbol_long_normal_s, names[i], values[i]);
- data->main->setting.state.status = F_status_set_error(F_directory_found_not);
+ main->setting.state.status = F_status_set_error(F_directory_found_not);
return;
}
} // for
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_validate_parameter_paths_
if (!data || !data->main) return;
- data->main->setting.state.status = F_none;
+ fake_main_t * const main = data->main;
+
+ main->setting.state.status = F_none;
uint8_t i = 0;
{
uint8_t j = 0;
const f_string_dynamic_t sources[] = {
- data->main->setting.build,
- data->main->setting.data,
+ main->setting.build,
+ main->setting.data,
};
const uint8_t parameters_size[] = {
fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_path_generate_string_dynamic));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_path_generate_string_dynamic));
return;
}
for (i = 0; i < 13; ++i) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]);
+ main->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_path_generate_string_dynamic));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_path_generate_string_dynamic));
return;
}
}
// When custom fakefile or settings are used and they are paths to a file, remove the default path.
- if (f_path_is(data->main->setting.fakefile) == F_true || f_file_exists(data->main->setting.fakefile, F_true) == F_true) {
+ if (f_path_is(main->setting.fakefile) == F_true || f_file_exists(main->setting.fakefile, F_true) == F_true) {
data->file_data_build_fakefile.used = 0;
}
- if (f_path_is(data->main->setting.settings) == F_true || f_file_exists(data->main->setting.settings, F_true) == F_true) {
+ if (f_path_is(main->setting.settings) == F_true || f_file_exists(main->setting.settings, F_true) == F_true) {
data->file_data_build_settings.used = 0;
}
fake_file_dependencies_s,
fake_file_process_post_s,
fake_file_process_pre_s,
- data->main->setting.fakefile,
- data->main->setting.settings,
+ main->setting.fakefile,
+ main->setting.settings,
fake_file_readme_s,
};
for (i = 0; i < 16; ++i) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]);
+ main->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
} // for
}
- if (data->main->setting.work.used) {
+ if (main->setting.work.used) {
{
f_string_dynamic_t * const values[] = {
&data->path_work_includes,
values[i]->used = 0;
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->setting.work, values[i]);
+ main->setting.state.status = f_string_dynamic_append_nulless(main->setting.work, values[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
for (i = 0; i < 3; ++i) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]);
+ main->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_path_generate_string_dynamic));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_path_generate_string_dynamic));
return;
}
for (i = 0; i < 6; ++i) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]);
+ main->setting.state.status = f_string_dynamic_append_nulless(sources[i], values[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
}
}
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_path_generate_
if (!data || !data->main || !destination) return;
- data->main->setting.state.status = F_none;
+ fake_main_t * const main = data->main;
+
+ main->setting.state.status = F_none;
for (uint8_t i = 0; i < length; ++i) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(source, destination[i]);
- if (F_status_is_error(data->main->setting.state.status)) break;
+ main->setting.state.status = f_string_dynamic_append_nulless(source, destination[i]);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
}
#endif // _di_fake_path_generate_string_dynamic_
if (!data_make || !data_make->main) return;
- fake_string_dynamic_reset(&data_make->main->cache_argument);
+ fake_main_t * const main = data_make->main;
- data_make->main->setting.state.status = fl_path_canonical(path, &data_make->main->cache_argument);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ fake_string_dynamic_reset(&main->cache_argument);
- if (data_make->main->cache_argument.used < data_make->path.stack.array[0].used) {
- data_make->main->setting.state.status = F_status_set_error(F_false);
+ main->setting.state.status = fl_path_canonical(path, &main->cache_argument);
+ if (F_status_is_error(main->setting.state.status)) return;
+
+ if (main->cache_argument.used < data_make->path.stack.array[0].used) {
+ main->setting.state.status = F_status_set_error(F_false);
return;
}
const f_string_range_t range = macro_f_string_range_t_initialize2(data_make->path.stack.array[0].used);
if (range.start <= range.stop) {
- data_make->main->setting.state.status = f_compare_dynamic_partial(data_make->path.stack.array[0], data_make->main->cache_argument, range, range);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ main->setting.state.status = f_compare_dynamic_partial(data_make->path.stack.array[0], main->cache_argument, range, range);
+ if (F_status_is_error(main->setting.state.status)) return;
- if (data_make->main->setting.state.status) {
- if (data_make->main->cache_argument.used == data_make->path.stack.array[0].used || data_make->main->cache_argument.string[data_make->path.stack.array[0].used] == f_path_separator_s.string[0]) {
- data_make->main->setting.state.status = F_true;
+ if (main->setting.state.status) {
+ if (main->cache_argument.used == data_make->path.stack.array[0].used || main->cache_argument.string[data_make->path.stack.array[0].used] == f_path_separator_s.string[0]) {
+ main->setting.state.status = F_true;
return;
}
}
}
- data_make->main->setting.state.status = F_status_set_error(F_false);
+ main->setting.state.status = F_status_set_error(F_false);
}
#endif // _di_fake_make_assure_inside_project_
if (!data_make || !data_make->main) return 0;
+ fake_main_t * const main = data_make->main;
+
if (!buffer.used) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id));
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_get_id));
- data_make->main->setting.state.status = F_status_set_error(F_parameter);
+ main->setting.state.status = F_status_set_error(F_parameter);
return 0;
}
f_number_unsigned_t number = 0;
- data_make->main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, buffer, &number);
+ main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, buffer, &number);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
// When the buffer is not a number, then check to see if this is a group or owner name.
- if (F_status_set_fine(data_make->main->setting.state.status) == F_number) {
+ if (F_status_set_fine(main->setting.state.status) == F_number) {
if (is_owner) {
uid_t uid = 0;
- data_make->main->setting.state.status = f_account_id_by_name(buffer, &uid);
+ main->setting.state.status = f_account_id_by_name(buffer, &uid);
}
else {
gid_t gid = 0;
- data_make->main->setting.state.status = f_account_group_id_by_name(buffer, &gid);
+ main->setting.state.status = f_account_group_id_by_name(buffer, &gid);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, is_owner ? macro_fake_f(f_account_id_by_name) : macro_fake_f(f_account_group_id_by_name));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, is_owner ? macro_fake_f(f_account_id_by_name) : macro_fake_f(f_account_group_id_by_name));
}
else {
- if (data_make->main->setting.state.status == F_exist_not) {
- fake_print_error_group_not_found(&data_make->main->program.error, buffer);
+ if (main->setting.state.status == F_exist_not) {
+ fake_print_error_group_not_found(&main->program.error, buffer);
- data_make->main->setting.state.status = F_status_set_error(F_exist_not);
+ main->setting.state.status = F_status_set_error(F_exist_not);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
}
else {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fl_conversion_dynamic_to_unsigned_detect));
+ fake_print_error(&main->program.error, macro_fake_f(fl_conversion_dynamic_to_unsigned_detect));
}
return 0;
}
if (number > F_type_size_32_unsigned_d) {
- fake_print_error_number_too_large(&data_make->main->program.error, buffer);
+ fake_print_error_number_too_large(&main->program.error, buffer);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return 0;
}
if (!data_make || !data_make->main || !mode || !replace) return;
+ fake_main_t * const main = data_make->main;
+
if (!buffer.used) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id_mode));
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_get_id_mode));
- data_make->main->setting.state.status = F_status_set_error(F_parameter);
+ main->setting.state.status = F_status_set_error(F_parameter);
return;
}
- data_make->main->setting.state.status = f_file_mode_from_string(buffer, data_make->main->program.umask, mode, replace);
+ main->setting.state.status = f_file_mode_from_string(buffer, main->program.umask, mode, replace);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_set_fine(data_make->main->setting.state.status) == F_syntax) {
- fake_print_error_mode_invalid(&data_make->main->program.error, buffer);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_syntax) {
+ fake_print_error_mode_invalid(&main->program.error, buffer);
}
else {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id_mode));
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_get_id_mode));
}
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_get_id_mode_
if (!data_make || !data_make->main) return;
- fake_string_dynamic_reset(&data_make->main->cache_argument);
+ fake_main_t * const main = data_make->main;
+
+ fake_string_dynamic_reset(&main->cache_argument);
if (!path.used || path.used == data_make->path.stack.array[0].used) {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
return;
}
if (path.used < data_make->path.stack.array[0].used) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
range.start = data_make->path.stack.array[0].used + 1;
range.stop = range.start + (path.used - range.start) - 1;
- data_make->main->setting.state.status = f_string_dynamic_partial_append(path, range, &data_make->main->cache_argument);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ main->setting.state.status = f_string_dynamic_partial_append(path, range, &main->cache_argument);
+ if (F_status_is_error(main->setting.state.status)) return;
- data_make->main->setting.state.status = f_string_dynamic_terminate(&data_make->main->cache_argument);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ main->setting.state.status = f_string_dynamic_terminate(&main->cache_argument);
+ if (F_status_is_error(main->setting.state.status)) return;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_path_relative_
for (; i < define.used; ++i) {
- fake_make_operate_validate_define_name(define.array[i].name);
-
- if (data_make->main->setting.state.status) {
+ if (fake_make_operate_validate_define_name(define.array[i].name) == F_true) {
combined.used = 0;
for (j = 0; j < define.array[i].value.used; ++j) {
if (!data_make || !data_make->main) return;
if (F_status_is_error(data_make->main->setting.state.status)) return;
- if (data_make->main->program.context.mode != f_color_mode_none_e) {
- data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter.color);
+ fake_main_t * const main = data_make->main;
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter_option.color);
+ if (main->program.context.mode != f_color_mode_none_e) {
+ main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter.color);
+
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter_option.color);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
- if (data_make->main->program.context.mode == f_color_mode_not_e) {
- if (data_make->main->program.parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ if (main->program.context.mode == f_color_mode_not_e) {
+ if (main->program.parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (data_make->main->program.parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ else if (main->program.parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_no_color_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_no_color_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
- else if (data_make->main->program.context.mode == f_color_mode_dark_e) {
- if (data_make->main->program.parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ else if (main->program.context.mode == f_color_mode_dark_e) {
+ if (main->program.parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (data_make->main->program.parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ else if (main->program.parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_dark_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_dark_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
else {
- if (data_make->main->program.parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ if (main->program.parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (data_make->main->program.parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ else if (main->program.parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_light_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_light_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.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_not(main->setting.state.status)) {
+ main->setting.state.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(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
return;
}
++data_make->parameter_option.color.used;
}
- if (data_make->main->program.error.verbosity != f_console_verbosity_normal_e) {
- data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter.verbosity);
+ if (main->program.error.verbosity != f_console_verbosity_normal_e) {
+ main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter.verbosity);
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter_option.verbosity);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter_option.verbosity);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
- if (data_make->main->program.error.verbosity == f_console_verbosity_quiet_e) {
- if (data_make->main->program.parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ if (main->program.error.verbosity == f_console_verbosity_quiet_e) {
+ if (main->program.parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (data_make->main->program.parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ else if (main->program.parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_quiet_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_quiet_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
- else if (data_make->main->program.error.verbosity == f_console_verbosity_error_e) {
- if (data_make->main->program.parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ else if (main->program.error.verbosity == f_console_verbosity_error_e) {
+ if (main->program.parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (data_make->main->program.parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ else if (main->program.parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_error_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_error_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
- else if (data_make->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
- if (data_make->main->program.parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ else if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
+ if (main->program.parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (data_make->main->program.parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ else if (main->program.parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_verbose_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_verbose_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
else {
- if (data_make->main->program.parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ if (main->program.parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (data_make->main->program.parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ else if (main->program.parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
+ main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_debug_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append(f_console_standard_short_debug_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.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_not(main->setting.state.status)) {
+ main->setting.state.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(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
return;
}
};
const f_console_parameter_t *console[] = {
- &data_make->main->program.parameters.array[fake_parameter_define_e],
- &data_make->main->program.parameters.array[fake_parameter_mode_e],
+ &main->program.parameters.array[fake_parameter_define_e],
+ &main->program.parameters.array[fake_parameter_mode_e],
};
const f_string_dynamics_t source[] = {
for (j = 0; j < source[i].used; ++j) {
if (destination[i]->used + 2 > destination[i]->size) {
- data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
+ main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
- data_make->main->setting.state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_option[i]);
+ main->setting.state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_option[i]);
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_value[i]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_value[i]);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase));
return;
}
if (console[i]->flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(f_console_symbol_short_normal_s, &destination[i]->array[destination[i]->used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(f_console_symbol_short_normal_s, &destination[i]->array[destination[i]->used]);
}
else if (console[i]->flag & f_console_flag_inverse_e) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(f_console_symbol_short_inverse_s, &destination[i]->array[destination[i]->used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(f_console_symbol_short_inverse_s, &destination[i]->array[destination[i]->used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
++destination[i]->used;
++destination_option[i]->used;
- data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
+ main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(source[i].array[j], &destination[i]->array[destination[i]->used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(source[i].array[j], &destination[i]->array[destination[i]->used]);
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(source[i].array[j], &destination_value[i]->array[destination_value[i]->used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(source[i].array[j], &destination_value[i]->array[destination_value[i]->used]);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
};
const f_console_parameter_t *console[] = {
- &data_make->main->program.parameters.array[fake_parameter_build_e],
- &data_make->main->program.parameters.array[fake_parameter_data_e],
- &data_make->main->program.parameters.array[fake_parameter_documents_e],
- &data_make->main->program.parameters.array[fake_parameter_fakefile_e],
- &data_make->main->program.parameters.array[fake_parameter_licenses_e],
- &data_make->main->program.parameters.array[fake_parameter_process_e],
- &data_make->main->program.parameters.array[fake_parameter_settings_e],
- &data_make->main->program.parameters.array[fake_parameter_sources_e],
- &data_make->main->program.parameters.array[fake_parameter_work_e],
+ &main->program.parameters.array[fake_parameter_build_e],
+ &main->program.parameters.array[fake_parameter_data_e],
+ &main->program.parameters.array[fake_parameter_documents_e],
+ &main->program.parameters.array[fake_parameter_fakefile_e],
+ &main->program.parameters.array[fake_parameter_licenses_e],
+ &main->program.parameters.array[fake_parameter_process_e],
+ &main->program.parameters.array[fake_parameter_settings_e],
+ &main->program.parameters.array[fake_parameter_sources_e],
+ &main->program.parameters.array[fake_parameter_work_e],
};
const f_string_dynamic_t source[] = {
if (!(console[i]->result & f_console_result_found_e)) continue;
if (destination[i]->used + 2 > destination[i]->size) {
- data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
+ main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
- data_make->main->setting.state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_option[i]);
+ main->setting.state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_option[i]);
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_value[i]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_value[i]);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase));
return;
}
if (console[i]->flag & f_console_flag_normal_e) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(f_console_symbol_short_normal_s, &destination[i]->array[destination[i]->used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(f_console_symbol_short_normal_s, &destination[i]->array[destination[i]->used]);
}
else if (console[i]->flag & f_console_flag_inverse_e) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(f_console_symbol_short_inverse_s, &destination[i]->array[destination[i]->used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(f_console_symbol_short_inverse_s, &destination[i]->array[destination[i]->used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(destination[i]->array[destination[i]->used], &destination_option[i]->array[destination_option[i]->used]);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
++destination[i]->used;
++destination_option[i]->used;
- data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
+ main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(source[i], &destination[i]->array[destination[i]->used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(source[i], &destination[i]->array[destination[i]->used]);
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(source[i], &destination_value[i]->array[destination_value[i]->used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(source[i], &destination_value[i]->array[destination_value[i]->used]);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
if (!data || !data->main) return;
- if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
- if (fll_program_standard_signal_received(&data->main->program)) {
- fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
+ fake_main_t * const main = data->main;
- data->main->setting.state.status = F_status_set_error(F_interrupt);
+ if (!((++main->program.signal_check) % fake_signal_check_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
+
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
}
- fake_make_print_message_now_making(&data->main->program.message, data->main->setting.fakefile);
+ fake_make_print_message_now_making(&main->program.message, main->setting.fakefile);
f_array_lengths_t section_stack = f_array_lengths_t_initialize;
fake_make_data_t data_make = fake_make_data_t_initialize;
data_make.data = data;
- data_make.main = data->main;
+ data_make.main = main;
- data->main->setting.state.status = f_string_dynamics_increase(data->main->setting.state.step_small, &data_make.path.stack);
+ main->setting.state.status = f_string_dynamics_increase(main->setting.state.step_small, &data_make.path.stack);
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
fake_print_error(&data_make.main->program.error, macro_fake_f(f_string_dynamics_increase));
return;
}
- data->main->setting.state.status = f_path_current(F_true, &data_make.path.stack.array[0]);
+ main->setting.state.status = f_path_current(F_true, &data_make.path.stack.array[0]);
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
fake_print_error(&data_make.main->program.error, macro_fake_f(f_path_current));
fake_make_data_delete(&data_make);
return;
}
- data->main->setting.state.status = f_directory_open(data_make.path.stack.array[0], F_false, &data_make.path.top.id);
+ main->setting.state.status = f_directory_open(data_make.path.stack.array[0], F_false, &data_make.path.top.id);
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
fake_print_error(&data_make.main->program.error, macro_fake_f(f_directory_open));
fake_make_data_delete(&data_make);
fake_make_load_parameters(&data_make);
- fake_make_load_fakefile(&data_make, data->main->program.pipe & fll_program_data_pipe_input_e);
+ fake_make_load_fakefile(&data_make, main->program.pipe & fll_program_data_pipe_input_e);
- if (F_status_is_error(data->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
fake_make_data_delete(&data_make);
return;
if (!data_make.main->buffer.used) {
fake_make_data_delete(&data_make);
- data->main->setting.state.status = F_data_not;
+ main->setting.state.status = F_data_not;
return;
}
if (data_make.setting_make.fail == fake_make_operation_fail_exit_e) {
data_make.error.prefix = fl_print_error_s;
data_make.error.suffix = f_string_empty_s;
- data_make.error.context = data->main->program.context.set.error;
- data_make.error.notable = data->main->program.context.set.notable;
+ data_make.error.context = main->program.context.set.error;
+ data_make.error.notable = main->program.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 = &data->main->program.context.set;
+ data_make.error.set = &main->program.context.set;
}
else if (data_make.setting_make.fail == fake_make_operation_fail_warn_e) {
data_make.error.prefix = fl_print_warning_s;
data_make.error.suffix = f_string_empty_s;
- data_make.error.context = data->main->program.context.set.warning;
- data_make.error.notable = data->main->program.context.set.notable;
+ data_make.error.context = main->program.context.set.warning;
+ data_make.error.notable = main->program.context.set.notable;
data_make.error.to.stream = F_type_output_d;
data_make.error.to.id = F_type_descriptor_output_d;
- data_make.error.set = &data->main->program.context.set;
+ data_make.error.set = &main->program.context.set;
}
else {
data_make.error.to.stream = 0;
data_make.error.prefix = f_string_empty_s;
data_make.error.suffix = f_string_empty_s;
data_make.error.to.id = -1;
- data_make.error.set = &data->main->program.context.set;
+ data_make.error.set = &main->program.context.set;
}
- data_make.error.verbosity = data->main->program.message.verbosity;
- data_make.error.custom = data->main;
+ data_make.error.verbosity = main->program.message.verbosity;
+ data_make.error.custom = main;
- if (data->main->program.parameters.remaining.used) {
+ if (main->program.parameters.remaining.used) {
f_array_length_t i = 0;
f_array_length_t j = 0;
f_string_range_t range = f_string_range_t_initialize;
f_array_length_t index = 0;
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
// Validate the remaining parameters.
- for (i = 0; i < data->main->program.parameters.remaining.used; ++i) {
+ for (i = 0; i < main->program.parameters.remaining.used; ++i) {
- index = data->main->program.parameters.remaining.array[i];
+ index = main->program.parameters.remaining.array[i];
- if (!data->main->program.parameters.arguments.array[index].used) {
- data->main->setting.state.status = F_status_set_error(F_parameter);
+ if (!main->program.parameters.arguments.array[index].used) {
+ main->setting.state.status = F_status_set_error(F_parameter);
break;
}
range.start = 0;
- range.stop = data->main->program.parameters.arguments.array[index].used - 1;
+ range.stop = main->program.parameters.arguments.array[index].used - 1;
for (j = 0; j < data_make.fakefile.used; ++j) {
- if (f_compare_dynamic_partial(data->main->program.parameters.arguments.array[index], data_make.main->buffer, range, data_make.fakefile.array[j].name) == F_equal_to) break;
+ if (f_compare_dynamic_partial(main->program.parameters.arguments.array[index], data_make.main->buffer, range, data_make.fakefile.array[j].name) == F_equal_to) break;
} // for
if (j == data_make.fakefile.used) {
- data->main->setting.state.status = F_status_set_error(F_parameter);
+ main->setting.state.status = F_status_set_error(F_parameter);
break;
}
} // for
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_make_print_error_argument_invalid_section(&data->main->program.error, data->main->program.parameters.arguments.array[data->main->program.parameters.remaining.array[i]]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_make_print_error_argument_invalid_section(&main->program.error, main->program.parameters.arguments.array[main->program.parameters.remaining.array[i]]);
}
else {
int result = 0;
- for (i = 0; i < data->main->program.parameters.remaining.used; ++i) {
+ for (i = 0; i < main->program.parameters.remaining.used; ++i) {
- index = data->main->program.parameters.remaining.array[i];
+ index = main->program.parameters.remaining.array[i];
range.start = 0;
- range.stop = data->main->program.parameters.arguments.array[index].used - 1;
+ range.stop = main->program.parameters.arguments.array[index].used - 1;
for (j = 0; j < data_make.fakefile.used; ++j) {
- if (f_compare_dynamic_partial(data->main->program.parameters.arguments.array[index], data_make.main->buffer, range, data_make.fakefile.array[j].name) == F_equal_to) {
+ if (f_compare_dynamic_partial(main->program.parameters.arguments.array[index], data_make.main->buffer, range, data_make.fakefile.array[j].name) == F_equal_to) {
{
int result = fake_make_operate_section(&data_make, j, §ion_stack);
- if (data->main->setting.state.status == F_child) {
- data->main->program.child = result;
+ if (main->setting.state.status == F_child) {
+ main->program.child = result;
break;
}
}
- const f_status_t status = data->main->setting.state.status;
+ const f_status_t status = main->setting.state.status;
- data->main->setting.state.status = f_path_change_at(data_make.path.top.id);
+ main->setting.state.status = f_path_change_at(data_make.path.top.id);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_make_print_warning_cannot_change_back(&data->main->program.warning, data_make.path.stack.array[0]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_make_print_warning_cannot_change_back(&main->program.warning, data_make.path.stack.array[0]);
}
- data->main->setting.state.status = status;
+ main->setting.state.status = status;
break;
}
- if (F_status_is_error(data->main->setting.state.status)) break;
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
- if (data->main->setting.state.status == F_child || F_status_is_error(data->main->setting.state.status)) break;
+ if (main->setting.state.status == F_child || F_status_is_error(main->setting.state.status)) break;
} // for
}
}
else {
if (data_make.id_main == data_make.fakefile.used) {
- fake_make_print_error_fakefile_section_missing(&data->main->program.error, data->file_data_build_fakefile, fake_make_item_main_s);
+ fake_make_print_error_fakefile_section_missing(&main->program.error, data->file_data_build_fakefile, fake_make_item_main_s);
- data->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
{
const int result = fake_make_operate_section(&data_make, data_make.id_main, §ion_stack);
- if (data->main->setting.state.status == F_child) {
- data->main->program.child = result;
+ if (main->setting.state.status == F_child) {
+ main->program.child = result;
}
}
- if (data->main->setting.state.status != F_child) {
- const f_status_t status = data->main->setting.state.status;
+ if (main->setting.state.status != F_child) {
+ const f_status_t status = main->setting.state.status;
- data->main->setting.state.status = f_path_change_at(data_make.path.top.id);
+ main->setting.state.status = f_path_change_at(data_make.path.top.id);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_make_print_warning_cannot_change_back(&data->main->program.warning, data_make.path.stack.array[0]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_make_print_warning_cannot_change_back(&main->program.warning, data_make.path.stack.array[0]);
}
- data->main->setting.state.status = status;
+ main->setting.state.status = status;
}
}
}
f_array_lengths_resize(0, §ion_stack);
fake_make_data_delete(&data_make);
- if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = F_none;
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_
if (F_status_is_error(data_make->main->setting.state.status)) return;
if (!content.used) return;
+ fake_main_t * const main = data_make->main;
+
// Pre-allocate the known arguments size.
- data_make->main->setting.state.status = f_string_dynamics_increase_by(content.used, &data_make->main->cache_arguments);
+ main->setting.state.status = f_string_dynamics_increase_by(content.used, &main->cache_arguments);
- if (F_status_is_error(data_make->main->setting.state.status) || data_make->main->setting.state.status == F_string_too_large) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase_by));
+ if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_string_too_large) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
const f_string_static_t vocabulary_define = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_define_s, 0, F_iki_vocabulary_0002_define_s_length);
const f_string_static_t vocabulary_parameter = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_parameter_s, 0, F_iki_vocabulary_0002_parameter_s_length);
- f_iki_data_t *iki_data = &data_make->main->cache_iki;
+ f_iki_data_t *iki_data = &main->cache_iki;
f_string_range_t range = f_string_range_t_initialize;
f_string_map_multis_t *parameter = &data_make->setting_make.parameter;
&data_make->parameter_value.work,
};
- data_make->main->setting.state.flag = 0;
- data_make->main->setting.state.handle = 0;
- data_make->main->setting.state.data = 0;
+ main->setting.state.flag = 0;
+ main->setting.state.handle = 0;
+ main->setting.state.data = 0;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
+ main->setting.state.status = f_string_dynamics_increase(main->setting.state.step_small, &main->cache_arguments);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase));
return;
}
- data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
+ main->cache_arguments.array[main->cache_arguments.used].used = 0;
for (; i < content.used; ++i) {
// Skip content that is unused, but quoted content, even if empty, should remain.
if (content.array[i].start > content.array[i].stop) {
if (quotes.array[i]) {
- ++data_make->main->cache_arguments.used;
+ ++main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
+ main->setting.state.status = f_string_dynamics_increase(main->setting.state.step_small, &main->cache_arguments);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
+ main->cache_arguments.array[main->cache_arguments.used].used = 0;
}
continue;
range = content.array[i];
- fl_iki_read(&data_make->main->buffer, &range, iki_data, &data_make->main->setting.state);
+ fl_iki_read(&main->buffer, &range, iki_data, &main->setting.state);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_set_fine(data_make->main->setting.state.status) != F_interrupt) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fl_iki_read));
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) != F_interrupt) {
+ fake_print_error(&main->program.error, macro_fake_f(fl_iki_read));
}
break;
// Apply the IKI delimits to the buffer.
for (j = 0; j < iki_data->delimits.used; ++j) {
- data_make->main->buffer.string[iki_data->delimits.array[j]] = f_iki_syntax_placeholder_s.string[0];
+ main->buffer.string[iki_data->delimits.array[j]] = f_iki_syntax_placeholder_s.string[0];
} // for
if (iki_data->variable.used) {
range.start = content.array[i].start;
range.stop = iki_data->variable.array[0].start - 1;
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, range, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_partial_append_nulless(main->buffer, range, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
is = 0;
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_define.string, data_make->main->buffer, vocabulary_define.used, iki_data->vocabulary.array[j]);
+ main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_define.string, main->buffer, vocabulary_define.used, iki_data->vocabulary.array[j]);
- if (data_make->main->setting.state.status == F_equal_to) {
+ if (main->setting.state.status == F_equal_to) {
is = 2;
iki_type |= 0x2;
}
- else if (data_make->main->setting.state.status == F_equal_to_not) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_parameter.string, data_make->main->buffer, vocabulary_parameter.used, iki_data->vocabulary.array[j]);
+ else if (main->setting.state.status == F_equal_to_not) {
+ main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_parameter.string, main->buffer, vocabulary_parameter.used, iki_data->vocabulary.array[j]);
- if (data_make->main->setting.state.status == F_equal_to) {
+ if (main->setting.state.status == F_equal_to) {
is = 1;
iki_type |= 0x1;
}
- else if (data_make->main->setting.state.status == F_equal_to_not) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_context.string, data_make->main->buffer, vocabulary_context.used, iki_data->vocabulary.array[j]);
+ else if (main->setting.state.status == F_equal_to_not) {
+ main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_context.string, main->buffer, vocabulary_context.used, iki_data->vocabulary.array[j]);
- if (data_make->main->setting.state.status == F_equal_to) {
+ if (main->setting.state.status == F_equal_to) {
is = 3;
iki_type |= 0x4;
}
}
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_compare_dynamic_partial));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_compare_dynamic_partial));
break;
}
unmatched = F_true;
// Check against reserved parameter names and if matches use them instead.
- if (f_compare_dynamic_partial_string(fake_make_parameter_variable_return_s.string, data_make->main->buffer, fake_make_parameter_variable_return_s.used, iki_data->content.array[j]) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(fake_make_parameter_variable_return_s.string, main->buffer, fake_make_parameter_variable_return_s.used, iki_data->content.array[j]) == F_equal_to) {
if (data_make->setting_make.parameter.array[0].value.array[0].used) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->setting_make.parameter.array[0].value.array[0], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(data_make->setting_make.parameter.array[0].value.array[0], &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
}
else {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append(f_string_ascii_0_s, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
break;
}
unmatched = F_false;
}
- else if (f_compare_dynamic_partial_string(fake_make_parameter_variable_top_s.string, data_make->main->buffer, fake_make_parameter_variable_top_s.used, iki_data->content.array[j]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_make_parameter_variable_top_s.string, main->buffer, fake_make_parameter_variable_top_s.used, iki_data->content.array[j]) == F_equal_to) {
if (data_make->path.stack.used) {
- data_make->main->setting.state.status = f_string_dynamic_increase_by(data_make->path.stack.array[0].used + f_path_separator_s.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_increase_by(data_make->path.stack.array[0].used + f_path_separator_s.used + 1, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
- data_make->main->setting.state.status = f_string_dynamic_append(data_make->path.stack.array[0], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append(data_make->path.stack.array[0], &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
break;
}
// For safe path handling, always append the trailing slash.
- data_make->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
unmatched = F_false;
}
- else if (f_compare_dynamic_partial_string(fake_make_parameter_variable_current_s.string, data_make->main->buffer, fake_make_parameter_variable_current_s.used, iki_data->content.array[j]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_make_parameter_variable_current_s.string, main->buffer, fake_make_parameter_variable_current_s.used, iki_data->content.array[j]) == F_equal_to) {
if (data_make->path.stack.used) {
- data_make->main->setting.state.status = f_string_dynamic_increase_by(data_make->path.stack.array[data_make->path.stack.used - 1].used + f_path_separator_s.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_increase_by(data_make->path.stack.array[data_make->path.stack.used - 1].used + f_path_separator_s.used + 1, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
- data_make->main->setting.state.status = f_string_dynamic_append(data_make->path.stack.array[data_make->path.stack.used - 1], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append(data_make->path.stack.array[data_make->path.stack.used - 1], &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
break;
}
// For safe path handling, always append the trailing slash.
- data_make->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
else {
for (k = 0; k < 39; ++k) {
- if (f_compare_dynamic_partial_string(reserved_name[k].string, data_make->main->buffer, reserved_name[k].used, iki_data->content.array[j]) != F_equal_to) {
+ if (f_compare_dynamic_partial_string(reserved_name[k].string, main->buffer, reserved_name[k].used, iki_data->content.array[j]) != F_equal_to) {
continue;
}
} // for
} // for
- data_make->main->setting.state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
if (!reserved_value[k]->array[l].used) continue;
if (separate) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_space_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append(f_string_space_s, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
break;
}
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
// Unquoted use separate parameters rather then being separated by a space.
if (separate) {
- ++data_make->main->cache_arguments.used;
+ ++main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
+ main->setting.state.status = f_string_dynamics_increase(main->setting.state.step_small, &main->cache_arguments);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
+ main->cache_arguments.array[main->cache_arguments.used].used = 0;
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
break;
} // for
- if (F_status_is_error(data_make->main->setting.state.status)) break;
+ if (F_status_is_error(main->setting.state.status)) break;
}
- if (unmatched && F_status_is_error_not(data_make->main->setting.state.status)) {
+ if (unmatched && F_status_is_error_not(main->setting.state.status)) {
for (k = 0; k < parameter->used; ++k) {
// Check against IKI variable list.
- if (f_compare_dynamic_partial_dynamic(parameter->array[k].name, data_make->main->buffer, iki_data->content.array[j]) != F_equal_to) {
+ if (f_compare_dynamic_partial_dynamic(parameter->array[k].name, main->buffer, iki_data->content.array[j]) != F_equal_to) {
continue;
}
} // for
} // for
- data_make->main->setting.state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_increase_by));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
if (separate) {
if (quotes.array[i]) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_space_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append(f_string_space_s, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
break;
}
// Unquoted use separate parameters rather then being separated by a space.
else {
- ++data_make->main->cache_arguments.used;
+ ++main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
+ main->setting.state.status = f_string_dynamics_increase(main->setting.state.step_small, &main->cache_arguments);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
+ main->cache_arguments.array[main->cache_arguments.used].used = 0;
}
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
separate = F_true;
} // for
- if (F_status_is_error(data_make->main->setting.state.status)) break;
+ if (F_status_is_error(main->setting.state.status)) break;
}
break;
} // for
}
- if (F_status_is_error(data_make->main->setting.state.status)) break;
+ if (F_status_is_error(main->setting.state.status)) break;
if (unmatched) {
fake_make_operate_expand_build(data_make, quotes.array[i], iki_data->content.array[j]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_operate_expand_build));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_operate_expand_build));
break;
}
- if (data_make->main->setting.state.status == F_true) {
+ if (main->setting.state.status == F_true) {
iki_type |= 0x8;
}
}
else if (is == 2) {
fake_make_operate_expand_environment(data_make, quotes.array[i], iki_data->content.array[j]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_operate_expand_environment));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_operate_expand_environment));
break;
}
- if (data_make->main->setting.state.status == F_true) {
+ if (main->setting.state.status == F_true) {
iki_type |= 0x8;
}
}
else if (is == 3) {
fake_make_operate_expand_context(data_make, quotes.array[i], iki_data->content.array[j]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_operate_expand_context));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_operate_expand_context));
break;
}
range.start = iki_data->variable.array[j].stop + 1;
range.stop = iki_data->variable.array[j + 1].start - 1;
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, range, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_partial_append_nulless(main->buffer, range, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
}
} // for
- if (F_status_is_error(data_make->main->setting.state.status)) break;
+ if (F_status_is_error(main->setting.state.status)) break;
// Copy everything after the last IKI variable to the end of the content.
if (iki_data->variable.used && content.array[i].stop > iki_data->variable.array[iki_data->variable.used - 1].stop) {
range.start = iki_data->variable.array[iki_data->variable.used - 1].stop + 1;
range.stop = content.array[i].stop;
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, range, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_partial_append_nulless(main->buffer, range, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
}
if (!(content.array[i].start == iki_data->variable.array[0].start && content.array[i].stop == iki_data->variable.array[0].stop && !quotes.array[i]) || (iki_type & 0xb) && !quotes.array[i] || i && content.used > 1 && i + 1 == content.used) {
- ++data_make->main->cache_arguments.used;
+ ++main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
+ main->setting.state.status = f_string_dynamics_increase(main->setting.state.step_small, &main->cache_arguments);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
+ main->cache_arguments.array[main->cache_arguments.used].used = 0;
}
}
else {
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, content.array[i], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_partial_append_nulless(main->buffer, content.array[i], &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
- ++data_make->main->cache_arguments.used;
+ ++main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
+ main->setting.state.status = f_string_dynamics_increase(main->setting.state.step_small, &main->cache_arguments);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
+ main->cache_arguments.array[main->cache_arguments.used].used = 0;
}
} // for
}
#ifndef _di_fake_make_operate_expand_build_
void fake_make_operate_expand_build(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) {
+ if (!data_make || !data_make->main) return;
+ if (F_status_is_error(data_make->main->setting.state.status)) return;
+
+ fake_main_t * const main = data_make->main;
+
bool unmatched = F_true;
uint8_t i = 0;
- fake_string_dynamic_reset(&data_make->main->cache_1);
+ fake_string_dynamic_reset(&main->cache_1);
{
const f_string_static_t uint8_name[] = {
for (; i < 3; ++i) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(uint8_name[i].string, data_make->main->buffer, uint8_name[i].used, range_name);
+ main->setting.state.status = f_compare_dynamic_partial_string(uint8_name[i].string, main->buffer, uint8_name[i].used, range_name);
- if (data_make->main->setting.state.status == F_equal_to) {
+ if (main->setting.state.status == F_equal_to) {
unmatched = F_false;
- data_make->main->setting.state.status = f_conversion_number_unsigned_to_string(uint8_value[i], f_conversion_data_base_10_c, &data_make->main->cache_1);
+ main->setting.state.status = f_conversion_number_unsigned_to_string(uint8_value[i], f_conversion_data_base_10_c, &main->cache_1);
break;
}
for (i = 0; i < 7; ++i) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(bool_name[i].string, data_make->main->buffer, bool_name[i].used, range_name);
+ main->setting.state.status = f_compare_dynamic_partial_string(bool_name[i].string, main->buffer, bool_name[i].used, range_name);
- if (data_make->main->setting.state.status == F_equal_to) {
+ if (main->setting.state.status == F_equal_to) {
unmatched = F_false;
if (bool_value[i]) {
- data_make->main->setting.state.status = f_string_dynamic_append(fake_common_setting_bool_yes_s, &data_make->main->cache_1);
+ main->setting.state.status = f_string_dynamic_append(fake_common_setting_bool_yes_s, &main->cache_1);
}
else {
- data_make->main->setting.state.status = f_string_dynamic_append(fake_common_setting_bool_no_s, &data_make->main->cache_1);
+ main->setting.state.status = f_string_dynamic_append(fake_common_setting_bool_no_s, &main->cache_1);
}
break;
for (i = 0; i < 17; ++i) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(dynamic_name[i].string, data_make->main->buffer, dynamic_name[i].used, range_name);
+ main->setting.state.status = f_compare_dynamic_partial_string(dynamic_name[i].string, main->buffer, dynamic_name[i].used, range_name);
- if (data_make->main->setting.state.status == F_equal_to) {
+ if (main->setting.state.status == F_equal_to) {
unmatched = F_false;
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(dynamic_value[i], &data_make->main->cache_1);
+ main->setting.state.status = f_string_dynamic_append_nulless(dynamic_value[i], &main->cache_1);
break;
}
for (i = 0; i < 36; ++i) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(dynamics_name[i].string, data_make->main->buffer, dynamics_name[i].used, range_name);
+ main->setting.state.status = f_compare_dynamic_partial_string(dynamics_name[i].string, main->buffer, dynamics_name[i].used, range_name);
- if (data_make->main->setting.state.status == F_equal_to) {
+ if (main->setting.state.status == F_equal_to) {
unmatched = F_false;
for (j = 0; j < dynamics_value[i].used; ++j) {
- data_make->main->setting.state.status = f_string_dynamic_mash(f_string_space_s, dynamics_value[i].array[j], &data_make->main->cache_1);
- if (F_status_is_error(data_make->main->setting.state.status)) break;
+ main->setting.state.status = f_string_dynamic_mash(f_string_space_s, dynamics_value[i].array[j], &main->cache_1);
+ if (F_status_is_error(main->setting.state.status)) break;
} // for
if (dynamics_flag[i]) {
} // for
}
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
if (unmatched) {
- data_make->main->setting.state.status = F_false;
+ main->setting.state.status = F_false;
return;
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_1, &main->cache_arguments.array[main->cache_arguments.used]);
- if (F_status_is_error_not(data_make->main->setting.state.status) && !quote) {
- ++data_make->main->cache_arguments.used;
+ if (F_status_is_error_not(main->setting.state.status) && !quote) {
+ ++main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
+ main->setting.state.status = f_string_dynamics_increase(main->setting.state.step_small, &main->cache_arguments);
}
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
- if (data_make->main->cache_1.used) {
- data_make->main->setting.state.status = F_true;
+ if (main->cache_1.used) {
+ main->setting.state.status = F_true;
return;
}
- data_make->main->setting.state.status = F_data_not;
+ main->setting.state.status = F_data_not;
}
#endif // _di_fake_make_operate_expand_build_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
const f_string_static_t *context = 0;
const f_string_static_t context_name[] = {
};
const f_color_set_t context_value[] = {
- data_make->main->program.context.set.error,
- data_make->main->program.context.set.important,
- data_make->main->program.context.set.normal,
- data_make->main->program.context.set.notable,
- data_make->main->program.context.set.reset,
- data_make->main->program.context.set.standout,
- data_make->main->program.context.set.success,
- data_make->main->program.context.set.title,
- data_make->main->program.context.set.warning,
+ main->program.context.set.error,
+ main->program.context.set.important,
+ main->program.context.set.normal,
+ main->program.context.set.notable,
+ main->program.context.set.reset,
+ main->program.context.set.standout,
+ main->program.context.set.success,
+ main->program.context.set.title,
+ main->program.context.set.warning,
};
for (f_array_length_t i = 0; i < 9; ++i) {
- if (f_compare_dynamic_partial_string(context_name[i].string, data_make->main->buffer, context_name[i].used, range_name) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(context_name[i].string, main->buffer, context_name[i].used, range_name) == F_equal_to) {
context = context_value[i].before;
break;
} // for
if (context) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(*context, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ main->setting.state.status = f_string_dynamic_append_nulless(*context, &main->cache_arguments.array[main->cache_arguments.used]);
+ if (F_status_is_error(main->setting.state.status)) return;
}
- data_make->main->setting.state.status = F_true;
+ main->setting.state.status = F_true;
}
#endif // _di_fake_make_operate_expand_context_
if (!data_make || !data_make->main) return;
- data_make->main->setting.state.status = F_none;
+ fake_main_t * const main = data_make->main;
- fake_string_dynamic_reset(&data_make->main->cache_1);
- fake_string_dynamic_reset(&data_make->main->cache_2);
+ main->setting.state.status = F_none;
- data_make->main->setting.state.status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 2, &data_make->main->cache_1);
+ fake_string_dynamic_reset(&main->cache_1);
+ fake_string_dynamic_reset(&main->cache_2);
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, range_name, &data_make->main->cache_1);
+ main->setting.state.status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 2, &main->cache_1);
+
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_partial_append_nulless(main->buffer, range_name, &main->cache_1);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_environment_get(data_make->main->cache_1, &data_make->main->cache_2);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_environment_get(main->cache_1, &main->cache_2);
}
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
- if (data_make->main->setting.state.status == F_exist_not) {
- data_make->main->setting.state.status = F_false;
+ if (main->setting.state.status == F_exist_not) {
+ main->setting.state.status = F_false;
return;
}
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
+ main->setting.state.status = f_string_dynamics_increase(main->setting.state.step_small, &main->cache_arguments);
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_increase_by(data_make->main->cache_2.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_increase_by(main->cache_2.used + 1, &main->cache_arguments.array[main->cache_arguments.used]);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_2, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_2, &main->cache_arguments.array[main->cache_arguments.used]);
}
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
- if (!quote) {
- ++data_make->main->cache_arguments.used;
-
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
- }
-
- data_make->main->setting.state.status = data_make->main->cache_2.used ? F_true : F_data_not;
+ main->setting.state.status = main->cache_2.used ? F_true : F_data_not;
}
#endif // _di_fake_make_operate_expand_environment_
if (!data_make || !data_make->main || !section_stack) return 0;
if (F_status_is_error(data_make->main->setting.state.status) || data_make->main->setting.state.status == F_child) return data_make->main->program.child;
+ fake_main_t * const main = data_make->main;
+
if (id_section >= data_make->fakefile.used) {
- data_make->main->setting.state.status = F_status_set_error(F_parameter);
+ main->setting.state.status = F_status_set_error(F_parameter);
fake_print_error(&data_make->error, macro_fake_f(fake_make_operate_section));
}
// Add the operation id to the operation stack.
- data_make->main->setting.state.status = f_array_lengths_increase(data_make->main->setting.state.step_small, section_stack);
+ main->setting.state.status = f_array_lengths_increase(main->setting.state.step_small, section_stack);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
fake_print_error(&data_make->error, macro_fake_f(f_array_lengths_increase));
return 0;
const f_fss_named_t *section = &data_make->fakefile.array[id_section];
- fake_make_print_message_processing_section(&data_make->main->program.message, data_make->main->buffer, *section);
+ fake_make_print_message_processing_section(&main->program.message, main->buffer, *section);
if (!section->objects.used) {
--section_stack->used;
f_array_length_t i = 0;
f_array_length_t j = 0;
- for (i = 0; i < section->objects.used; ++i, data_make->main->setting.state.status = F_none) {
-
- for (j = 0; j < data_make->main->cache_arguments.size; ++j) {
- data_make->main->cache_arguments.array[j].used = 0;
- } // for
+ for (i = 0; i < section->objects.used; ++i, main->setting.state.status = F_none) {
- fake_string_dynamics_reset(&data_make->main->cache_arguments);
+ fake_string_dynamics_reset(&main->cache_arguments);
state_process.condition = 0;
state_process.condition_result = 0;
state_process.operation_previous = state_process.operation;
state_process.operation = 0;
- if (!((++data_make->main->program.signal_check) % fake_signal_check_short_d)) {
- if (fll_program_standard_signal_received(&data_make->main->program)) {
- fll_program_print_signal_received(&data_make->main->program.warning, data_make->main->program.signal_received);
+ if (!((++main->program.signal_check) % fake_signal_check_short_d)) {
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data_make->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
break;
}
- data_make->main->program.signal_check = 0;
+ main->program.signal_check = 0;
}
for (j = 0; j < fake_max_operation_d; ++j) {
- if (f_compare_dynamic_partial_string(operations_name[j].string, data_make->main->buffer, operations_name[j].used, section->objects.array[i]) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(operations_name[j].string, main->buffer, operations_name[j].used, section->objects.array[i]) == F_equal_to) {
state_process.operation = operations_type[j];
break;
} // for
if (!state_process.operation) {
- fake_print_error_operation_unknown(&data_make->error, data_make->main->buffer, section->name, section->objects.array[i]);
+ fake_print_error_operation_unknown(&data_make->error, main->buffer, section->name, section->objects.array[i]);
- data_make->main->setting.state.status = F_status_set_error(F_valid_not);
+ main->setting.state.status = F_status_set_error(F_valid_not);
}
else if (state_process.operation == fake_make_operation_type_operate_e) {
if (section_stack->used == fake_max_stack_d) {
- fake_print_error_operation_stack_max(&data_make->error, data_make->main->buffer, section->name, section->objects.array[i], fake_max_stack_d);
+ fake_print_error_operation_stack_max(&data_make->error, main->buffer, section->name, section->objects.array[i], fake_max_stack_d);
- data_make->main->setting.state.status = F_status_set_error(F_recurse);
+ main->setting.state.status = F_status_set_error(F_recurse);
}
}
fake_make_operate_validate(data_make, section->name, &state_process, section_stack);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
if (state_process.block || state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_or_e) {
state_process.success_block = F_false;
else {
if (!state_process.block || state_process.block == fake_state_process_block_operate_e) {
result = fake_make_operate_process(data_make, section->name, &state_process, section_stack);
- if (data_make->main->setting.state.status == F_child) return result;
+ if (main->setting.state.status == F_child) return result;
}
fake_make_operate_block_postprocess(data_make, i == section->objects.used, &state_process);
}
- if (F_status_set_fine(data_make->main->setting.state.status) == F_interrupt) break;
+ if (F_status_set_fine(main->setting.state.status) == F_interrupt) break;
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process.success = F_false;
// Break acts identical to fail when at the top of the stack.
- if (F_status_set_fine(data_make->main->setting.state.status) == F_signal_abort && !section_stack->used) {
+ if (F_status_set_fine(main->setting.state.status) == F_signal_abort && !section_stack->used) {
data_make->setting_make.fail = fake_make_operation_fail_exit_e;
data_make->error.prefix = fl_print_error_s;
data_make->error.suffix = f_string_empty_s;
- data_make->error.context = data_make->main->program.context.set.error;
- data_make->error.notable = data_make->main->program.context.set.notable;
- data_make->main->program.error.to.stream = F_type_error_d;
- data_make->main->program.error.to.id = F_type_descriptor_error_d;
- data_make->error.set = &data_make->main->program.context.set;
+ data_make->error.context = main->program.context.set.error;
+ data_make->error.notable = main->program.context.set.notable;
+ main->program.error.to.stream = F_type_error_d;
+ main->program.error.to.id = F_type_descriptor_error_d;
+ data_make->error.set = &main->program.context.set;
}
- fake_print_error_operation_failed(&data_make->error, data_make->main->buffer, section->name, section->objects.array[i]);
+ fake_print_error_operation_failed(&data_make->error, main->buffer, section->name, section->objects.array[i]);
// F_signal_abort is used by the break section operation.
- if (F_status_set_fine(data_make->main->setting.state.status) == F_signal_abort) break;
+ if (F_status_set_fine(main->setting.state.status) == F_signal_abort) break;
// F_signal_abort is used by the exit section operation.
- if (F_status_set_fine(data_make->main->setting.state.status) == F_signal_quit) {
+ if (F_status_set_fine(main->setting.state.status) == F_signal_quit) {
if (!section_stack->used) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
break;
if (data_make->setting_make.fail == fake_make_operation_fail_exit_e) break;
}
- else if (data_make->main->setting.state.status == F_signal_abort) {
+ else if (main->setting.state.status == F_signal_abort) {
state_process.success = F_true;
// F_signal_abort is used by the break section operation.
break;
}
- else if (data_make->main->setting.state.status == F_signal_quit) {
+ else if (main->setting.state.status == F_signal_quit) {
state_process.success = F_true;
// F_signal_quit is used by the exit section operation.
if (!section_stack->used) {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
break;
}
- else if (data_make->main->setting.state.status == F_failure) {
+ else if (main->setting.state.status == F_failure) {
// When F_failure (without the error bit) is returned, an error occured but the exit mode is not set to exit.
// Record the success state and set the status to F_none.
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
state_process.success = F_false;
}
else {
}
} // for
- if (F_status_set_error(data_make->main->setting.state.status) == F_interrupt) return 0;
+ if (F_status_set_error(main->setting.state.status) == F_interrupt) return 0;
- if (i == section->objects.used && F_status_is_error_not(data_make->main->setting.state.status) && (state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_else_e || state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_or_e)) {
- fake_make_print_error_operation_incomplete(&data_make->main->program.error, state_process.operation);
+ if (i == section->objects.used && F_status_is_error_not(main->setting.state.status) && (state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_else_e || state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_or_e)) {
+ fake_make_print_error_operation_incomplete(&main->program.error, state_process.operation);
- fake_print_error_operation_failed(&data_make->error, data_make->main->buffer, section->name, section->objects.array[section->objects.used - 1]);
+ fake_print_error_operation_failed(&data_make->error, main->buffer, section->name, section->objects.array[section->objects.used - 1]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
// Ensure an error is returned during recursion if the last known section operation failed, except for the main operation.
- if (state_process.success == F_false && F_status_is_error_not(data_make->main->setting.state.status) && section_stack->used > 1) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (state_process.success == F_false && F_status_is_error_not(main->setting.state.status) && section_stack->used > 1) {
+ main->setting.state.status = F_status_set_error(F_failure);
}
--section_stack->used;
if (!data_make || !data_make->main || !state_process) return;
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ fake_main_t * const main = data_make->main;
+
+ if (F_status_is_error(main->setting.state.status)) {
state_process->block_result = fake_condition_result_error_e;
state_process->success_block = F_false;
return;
}
- data_make->main->setting.state.status = f_string_dynamic_increase_by(source.used, destination);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ fake_main_t * const main = data_make->main;
+
+ main->setting.state.status = f_string_dynamic_increase_by(source.used, destination);
+ if (F_status_is_error(main->setting.state.status)) return;
for (f_array_length_t i = 0; i < source.used; ++i) {
// A slash by itself at the end of the string is invalid.
if (++i >= source.used) break;
- data_make->main->setting.state.status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, destination);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ main->setting.state.status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, destination);
+ if (F_status_is_error(main->setting.state.status)) return;
if (source.string[i] == f_string_ascii_slash_backward_s.string[0]) {
destination->string[destination->used++] = f_string_ascii_slash_backward_s.string[0];
if (buffer.used > 2) {
uint32_t codepoint = 0;
- data_make->main->setting.state.status = f_utf_unicode_string_to(buffer.string, buffer.used, &codepoint);
+ main->setting.state.status = f_utf_unicode_string_to(buffer.string, buffer.used, &codepoint);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (!(data_make->main->setting.state.status == F_failure || data_make->main->setting.state.status == F_utf_not || data_make->main->setting.state.status == F_complete_not_utf || data_make->main->setting.state.status == F_utf_fragment || data_make->main->setting.state.status == F_valid_not)) {
+ if (F_status_is_error(main->setting.state.status)) {
+ if (!(main->setting.state.status == F_failure || main->setting.state.status == F_utf_not || main->setting.state.status == F_complete_not_utf || main->setting.state.status == F_utf_fragment || main->setting.state.status == F_valid_not)) {
break;
}
}
else {
// Reserve 4-bytes (the max size of a Unicode UTF-8 sequence).
- data_make->main->setting.state.status = f_string_dynamic_increase_by(4, destination);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ main->setting.state.status = f_string_dynamic_increase_by(4, destination);
+ if (F_status_is_error(main->setting.state.status)) return;
if (!codepoint) {
destination->string[destination->used++] = f_string_null_s.string[0];
{
f_string_t address = destination->string + destination->used;
- data_make->main->setting.state.status = f_utf_unicode_from(codepoint, 4, &address);
+ main->setting.state.status = f_utf_unicode_from(codepoint, 4, &address);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
destination->string[destination->used] = 0;
}
else {
}
}
else {
- data_make->main->setting.state.status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, destination);
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ main->setting.state.status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, destination);
+ if (F_status_is_error(main->setting.state.status)) return;
destination->string[destination->used++] = source.string[i];
}
} // for
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_buffer_escape_
return;
}
- if (fll_program_standard_signal_received(&data_make->main->program)) {
- fll_program_print_signal_received(&data_make->main->program.warning, data_make->main->program.signal_received);
+ fake_main_t * const main = data_make->main;
+
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data_make->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
data_make->environment.used = 0;
if (data_make->setting_build.flag & data_build_setting_flag_has_environment_e) {
- data_make->main->setting.state.status = fl_environment_load_names(data_make->setting_build.environment, &data_make->environment);
+ main->setting.state.status = fl_environment_load_names(data_make->setting_build.environment, &data_make->environment);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fl_environment_load_names));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fl_environment_load_names));
return;
}
}
else {
- data_make->main->setting.state.status = f_environment_get_all(&data_make->environment);
+ main->setting.state.status = f_environment_get_all(&data_make->environment);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_environment_get_all));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_environment_get_all));
return;
}
}
- fake_make_print_verbose_operate_program(&data_make->main->program.message, program, arguments);
+ fake_make_print_verbose_operate_program(&main->program.message, program, arguments);
// Child processes should receive all signals, without blocking.
f_signal_how_t signals = f_signal_how_t_initialize;
int return_code = 0;
- data_make->main->setting.state.status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code);
+ main->setting.state.status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code);
- if (fll_program_standard_signal_received(&data_make->main->program)) {
- fll_program_print_signal_received(&data_make->main->program.warning, data_make->main->program.signal_received);
+ if (fll_program_standard_signal_received(&main->program)) {
+ fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
- data_make->main->setting.state.status = F_status_set_error(F_interrupt);
+ main->setting.state.status = F_status_set_error(F_interrupt);
return;
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_set_fine(data_make->main->setting.state.status) == F_interrupt) return;
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_interrupt) return;
- if (F_status_set_fine(data_make->main->setting.state.status) == F_file_found_not) {
- fake_make_print_error_program_not_found(&data_make->main->program.error, program);
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ fake_make_print_error_program_not_found(&main->program.error, program);
}
- else if (F_status_set_fine(data_make->main->setting.state.status) != F_failure) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fll_execute_program));
+ else if (F_status_set_fine(main->setting.state.status) != F_failure) {
+ fake_print_error(&main->program.error, macro_fake_f(fll_execute_program));
}
}
if (!data_make || !data_make->main) return;
- const f_status_t status_original = data_make->main->setting.state.status;
+ fake_main_t * const main = data_make->main;
+
+ const f_status_t status_original = main->setting.state.status;
data_make->setting_make.parameter.array[0].value.array[0].used = 0;
if (return_code) {
f_string_dynamic_t number = f_string_dynamic_t_initialize;
- data_make->main->setting.state.status = f_conversion_number_signed_to_string(WEXITSTATUS(return_code), f_conversion_data_base_10_c, &number);
+ main->setting.state.status = f_conversion_number_signed_to_string(WEXITSTATUS(return_code), f_conversion_data_base_10_c, &number);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_conversion_number_signed_to_string));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_conversion_number_signed_to_string));
f_string_dynamic_resize(0, &number);
return;
}
- data_make->main->setting.state.status = f_string_dynamic_append(number, &data_make->setting_make.parameter.array[0].value.array[0]);
+ main->setting.state.status = f_string_dynamic_append(number, &data_make->setting_make.parameter.array[0].value.array[0]);
f_string_dynamic_resize(0, &number);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
return;
}
- fake_make_print_error_program_failed(&data_make->main->program.error, return_code);
+ fake_make_print_error_program_failed(&main->program.error, return_code);
- data_make->main->setting.state.status = (data_make->setting_make.fail == fake_make_operation_fail_exit_e) ? F_status_set_error(F_failure) : F_failure;
+ main->setting.state.status = (data_make->setting_make.fail == fake_make_operation_fail_exit_e) ? F_status_set_error(F_failure) : F_failure;
return;
}
if (F_status_is_error(status_original)) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_ascii_1_s, &data_make->setting_make.parameter.array[0].value.array[0]);
+ main->setting.state.status = f_string_dynamic_append(f_string_ascii_1_s, &data_make->setting_make.parameter.array[0].value.array[0]);
}
else {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->setting_make.parameter.array[0].value.array[0]);
+ main->setting.state.status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->setting_make.parameter.array[0].value.array[0]);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fll_error_print(&data_make->error, F_status_set_fine(data_make->main->setting.state.status), macro_fake_f(f_string_dynamic_append), F_true);
+ if (F_status_is_error(main->setting.state.status)) {
+ fll_error_print(&data_make->error, F_status_set_fine(main->setting.state.status), macro_fake_f(f_string_dynamic_append), F_true);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_process_return_
if (!data_make || !data_make->main) return;
- data_make->main->setting.state.status = F_none;
+ fake_main_t * const main = data_make->main;
- if (!data_make->main->cache_arguments.used || f_compare_dynamic(fake_make_operation_argument_success_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
- data_make->main->setting.state.status = F_signal_abort;
+ main->setting.state.status = F_none;
+
+ if (!main->cache_arguments.used || f_compare_dynamic(fake_make_operation_argument_success_s, main->cache_arguments.array[0]) == F_equal_to) {
+ main->setting.state.status = F_signal_abort;
}
- else if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
- data_make->main->setting.state.status = F_status_set_error(F_signal_abort);
+ else if (f_compare_dynamic(fake_make_operation_argument_failure_s, main->cache_arguments.array[0]) == F_equal_to) {
+ main->setting.state.status = F_status_set_error(F_signal_abort);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
return;
}
- fake_make_print_verbose_operate_break(&data_make->main->program.message, data_make->main->cache_arguments);
+ fake_make_print_verbose_operate_break(&main->program.message, main->cache_arguments);
}
#endif // _di_fake_make_operate_process_type_break_
if (!data_make || !data_make->main) return;
- fake_build_operate(data_make->data, data_make->main->cache_arguments.used ? &data_make->main->cache_arguments : 0, F_false);
- if (F_status_set_fine(data_make->main->setting.state.status) == F_interrupt) return;
+ fake_main_t * const main = data_make->main;
+
+ fake_build_operate(data_make->data, main->cache_arguments.used ? &main->cache_arguments : 0, F_false);
+ if (F_status_set_fine(main->setting.state.status) == F_interrupt) return;
- fake_make_operate_process_return(data_make, F_status_is_error(data_make->main->setting.state.status) ? 1 : 0);
+ fake_make_operate_process_return(data_make, F_status_is_error(main->setting.state.status) ? 1 : 0);
}
#endif // _di_fake_make_operate_process_type_build_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
fake_clean_operate(data_make->data);
- if (F_status_set_fine(data_make->main->setting.state.status) == F_interrupt) return;
+ if (F_status_set_fine(main->setting.state.status) == F_interrupt) return;
- fake_make_operate_process_return(data_make, F_status_is_error(data_make->main->setting.state.status) ? 1 : 0);
+ fake_make_operate_process_return(data_make, F_status_is_error(main->setting.state.status) ? 1 : 0);
}
#endif // _di_fake_make_operate_process_type_clean_
if (!data_make || !data_make->main) return 0;
+ fake_main_t * const main = data_make->main;
+
const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_compiler);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_execute));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_execute));
}
- else if (data_make->main->setting.state.status == F_child) {
+ else if (main->setting.state.status == F_child) {
return result;
}
if (!data_make || !data_make->main) return;
- data_make->main->setting.state.status = F_none;
+ fake_main_t * const main = data_make->main;
+
+ main->setting.state.status = F_none;
if (state_process->condition == fake_make_operation_if_type_if_define_e) {
fake_make_operate_process_type_if_define(data_make, F_false, state_process);
else if (state_process->condition == fake_make_operation_if_type_if_equal_e) {
state_process->condition_result = fake_condition_result_true_e;
- for (f_array_length_t i = 2; i < data_make->main->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 2; i < main->cache_arguments.used; ++i) {
- if (f_compare_dynamic(data_make->main->cache_arguments.array[1], data_make->main->cache_arguments.array[i]) == F_equal_to_not) {
+ if (f_compare_dynamic(main->cache_arguments.array[1], main->cache_arguments.array[i]) == F_equal_to_not) {
state_process->condition_result = fake_condition_result_false_e;
break;
f_array_length_t i = 1;
f_array_length_t j = 0;
- for (; i < data_make->main->cache_arguments.used; ++i) {
+ for (; i < main->cache_arguments.used; ++i) {
- for (j = i + 1; j < data_make->main->cache_arguments.used; ++j) {
+ for (j = i + 1; j < main->cache_arguments.used; ++j) {
- if (f_compare_dynamic(data_make->main->cache_arguments.array[i], data_make->main->cache_arguments.array[j]) == F_equal_to) {
+ if (f_compare_dynamic(main->cache_arguments.array[i], main->cache_arguments.array[j]) == F_equal_to) {
state_process->condition_result = fake_condition_result_false_e;
- i = data_make->main->cache_arguments.used;
+ i = main->cache_arguments.used;
break;
}
if (!data_make || !data_make->main) return;
- const f_array_length_t total = data_make->main->cache_arguments.used - 1;
+ fake_main_t * const main = data_make->main;
+
+ const f_array_length_t total = main->cache_arguments.used - 1;
f_string_static_t destination = f_string_static_t_initialize;
f_directory_recurse_copy_t recurse = f_directory_recurse_copy_t_initialize;
- if (data_make->main->program.error.verbosity > f_console_verbosity_normal_e) {
- recurse.state.custom = data_make->main;
+ if (main->program.error.verbosity > f_console_verbosity_normal_e) {
+ recurse.state.custom = main;
recurse.verbose = clone ? fake_print_verbose_recursive_clone : fake_print_verbose_recursive_copy;
}
recurse.flag = f_file_stat_flag_group_e | f_file_stat_flag_owner_e;
}
else {
- macro_f_mode_t_set_default_umask(recurse.mode, data_make->main->program.umask);
+ macro_f_mode_t_set_default_umask(recurse.mode, main->program.umask);
}
bool existing = F_true;
f_array_length_t i = 0;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, main->cache_arguments.array[i]) == F_equal_to) {
++i;
recurse.flag |= f_file_stat_flag_reference_e;
}
// In this case, the destination could be a file, so confirm this.
- if (data_make->main->cache_arguments.used == 2 + i) {
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
+ if (main->cache_arguments.used == 2 + i) {
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[1]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_path_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_is), main->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_path_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
f_directory_recurse_copy_delete(&recurse);
return;
}
- if (data_make->main->setting.state.status == F_false || data_make->main->setting.state.status == F_file_found_not || data_make->main->setting.state.status == F_data_not) {
+ if (main->setting.state.status == F_false || main->setting.state.status == F_file_found_not || main->setting.state.status == F_data_not) {
existing = F_false;
}
}
for (; i < total; ++i) {
- destination.used = data_make->main->cache_arguments.array[total].used + 1;
+ destination.used = main->cache_arguments.array[total].used + 1;
if (existing) {
- fake_string_dynamic_reset(&data_make->main->cache_argument);
+ fake_string_dynamic_reset(&main->cache_argument);
- data_make->main->setting.state.status = f_file_name_base(data_make->main->cache_arguments.array[i], &data_make->main->cache_argument);
+ main->setting.state.status = f_file_name_base(main->cache_arguments.array[i], &main->cache_argument);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_name_base), data_make->main->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_name_base), main->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
f_directory_recurse_copy_delete(&recurse);
return;
}
- destination.used += data_make->main->cache_argument.used + 1;
+ destination.used += main->cache_argument.used + 1;
}
f_char_t destination_string[destination.used + 1];
destination_string[destination.used - 2] = 0;
}
- memcpy(destination_string, data_make->main->cache_arguments.array[total].string, sizeof(f_char_t) * data_make->main->cache_arguments.array[total].used);
+ memcpy(destination_string, main->cache_arguments.array[total].string, sizeof(f_char_t) * main->cache_arguments.array[total].used);
if (existing) {
- if (destination_string[data_make->main->cache_arguments.array[total].used - 1] == f_path_separator_s.string[0]) {
- memcpy(destination_string + data_make->main->cache_arguments.array[total].used, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_argument.used);
+ if (destination_string[main->cache_arguments.array[total].used - 1] == f_path_separator_s.string[0]) {
+ memcpy(destination_string + main->cache_arguments.array[total].used, main->cache_argument.string, sizeof(f_char_t) * main->cache_argument.used);
--destination.used;
}
else {
- memcpy(destination_string + data_make->main->cache_arguments.array[total].used + 1, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_arguments.array[i].used);
+ memcpy(destination_string + main->cache_arguments.array[total].used + 1, main->cache_argument.string, sizeof(f_char_t) * main->cache_arguments.array[i].used);
- destination_string[data_make->main->cache_arguments.array[total].used] = f_path_separator_s.string[0];
+ destination_string[main->cache_arguments.array[total].used] = f_path_separator_s.string[0];
}
}
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[i]);
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[i]);
- if (data_make->main->setting.state.status == F_true) {
+ if (main->setting.state.status == F_true) {
if (clone) {
recurse.flag |= f_directory_recurse_copy_flag_clone_e;
}
recurse.flag -= recurse.flag & f_directory_recurse_copy_flag_clone_e;
}
- fl_directory_copy(data_make->main->cache_arguments.array[i], destination, &recurse);
+ fl_directory_copy(main->cache_arguments.array[i], destination, &recurse);
if (F_status_is_error(recurse.state.status)) {
- data_make->main->setting.state.status = recurse.state.status;
+ main->setting.state.status = recurse.state.status;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(fl_directory_copy), data_make->main->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(fl_directory_copy), main->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
- else if (data_make->main->setting.state.status == F_false) {
+ else if (main->setting.state.status == F_false) {
if (clone) {
- data_make->main->setting.state.status = f_file_clone(data_make->main->cache_arguments.array[i], destination, recurse.size_block, recurse.flag);
+ main->setting.state.status = f_file_clone(main->cache_arguments.array[i], destination, recurse.size_block, recurse.flag);
}
else {
- data_make->main->setting.state.status = f_file_copy(data_make->main->cache_arguments.array[i], destination, recurse.mode, recurse.size_block, recurse.flag);
+ main->setting.state.status = f_file_copy(main->cache_arguments.array[i], destination, recurse.mode, recurse.size_block, recurse.flag);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, clone ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), data_make->main->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, clone ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), main->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
break;
}
- fake_make_print_verbose_operate_copy(&data_make->main->program.message, clone, data_make->main->cache_arguments.array[i], destination);
+ fake_make_print_verbose_operate_copy(&main->program.message, clone, main->cache_arguments.array[i], destination);
}
- else if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[i], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ else if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_is), main->cache_arguments.array[i], f_file_operation_identify_s, fll_error_file_type_directory_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
break;
}
f_directory_recurse_copy_delete(&recurse);
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = F_none;
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_process_type_copy_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used > 1) {
- data_make->main->setting.state.status = f_environment_set(data_make->main->cache_arguments.array[0], data_make->main->cache_arguments.array[1], F_true);
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used > 1) {
+ main->setting.state.status = f_environment_set(main->cache_arguments.array[0], main->cache_arguments.array[1], F_true);
}
else {
- data_make->main->setting.state.status = f_environment_set(data_make->main->cache_arguments.array[0], f_string_empty_s, F_true);
+ main->setting.state.status = f_environment_set(main->cache_arguments.array[0], f_string_empty_s, F_true);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_environment_set));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_environment_set));
}
else {
- fake_make_print_verbose_operate_define(&data_make->main->program.message, data_make->main->cache_arguments.array[0]);
+ fake_make_print_verbose_operate_define(&main->program.message, main->cache_arguments.array[0]);
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_process_type_define_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
const int recursion_max = all ? F_directory_max_descriptors_d : 0;
struct stat file_stat;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
- for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 0; i < main->cache_arguments.used; ++i) {
memset(&file_stat, 0, sizeof(struct stat));
- data_make->main->setting.state.status = f_file_stat(data_make->main->cache_arguments.array[i], F_false, &file_stat);
+ main->setting.state.status = f_file_stat(main->cache_arguments.array[i], F_false, &file_stat);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_set_fine(data_make->main->setting.state.status) == F_file_found_not) {
- fake_make_print_warning_file_not_found(&data_make->main->program.warning, data_make->main->cache_arguments.array[i]);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ fake_make_print_warning_file_not_found(&main->program.warning, main->cache_arguments.array[i]);
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stat), data_make->main->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stat), main->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
else if (macro_f_file_type_is_directory(file_stat.st_mode)) {
- if (data_make->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
- data_make->main->setting.state.status = f_directory_remove_custom(data_make->main->cache_arguments.array[i], recursion_max, F_false, fake_clean_remove_recursively_verbosely);
+ if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
+ main->setting.state.status = f_directory_remove_custom(main->cache_arguments.array[i], recursion_max, F_false, fake_clean_remove_recursively_verbosely);
}
else {
- data_make->main->setting.state.status = f_directory_remove(data_make->main->cache_arguments.array[i], recursion_max, F_false);
+ main->setting.state.status = f_directory_remove(main->cache_arguments.array[i], recursion_max, F_false);
}
- if (F_status_set_fine(data_make->main->setting.state.status) == F_file_found_not) {
- fake_make_print_verbose_operate_file_not_found(&data_make->main->program.message, F_true, data_make->main->cache_arguments.array[i]);
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ fake_make_print_verbose_operate_file_not_found(&main->program.message, F_true, main->cache_arguments.array[i]);
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_remove), data_make->main->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_remove), main->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_directory_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
else {
- data_make->main->setting.state.status = f_file_remove(data_make->main->cache_arguments.array[i]);
+ main->setting.state.status = f_file_remove(main->cache_arguments.array[i]);
- if (F_status_set_fine(data_make->main->setting.state.status) == F_file_found_not) {
- if (data_make->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
- fake_make_print_verbose_operate_file_not_found(&data_make->main->program.message, F_false, data_make->main->cache_arguments.array[i]);
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
+ fake_make_print_verbose_operate_file_not_found(&main->program.message, F_false, main->cache_arguments.array[i]);
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_remove), data_make->main->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_remove), main->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
- fake_make_print_verbose_operate_delete(&data_make->main->program.message, data_make->main->cache_arguments.array[i]);
+ fake_make_print_verbose_operate_delete(&main->program.message, main->cache_arguments.array[i]);
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_deletes_
if (!data_make || !data_make->main) return;
- data_make->main->setting.state.status = F_none;
+ fake_main_t * const main = data_make->main;
+
+ main->setting.state.status = F_none;
- if (!data_make->main->cache_arguments.used || f_compare_dynamic(fake_make_operation_argument_success_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
- data_make->main->setting.state.status = F_signal_quit;
+ if (!main->cache_arguments.used || f_compare_dynamic(fake_make_operation_argument_success_s, main->cache_arguments.array[0]) == F_equal_to) {
+ main->setting.state.status = F_signal_quit;
}
- else if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
- data_make->main->setting.state.status = F_status_set_error(F_signal_quit);
+ else if (f_compare_dynamic(fake_make_operation_argument_failure_s, main->cache_arguments.array[0]) == F_equal_to) {
+ main->setting.state.status = F_status_set_error(F_signal_quit);
// Forcing exit forces fail mode.
data_make->setting_make.fail = fake_make_operation_fail_exit_e;
data_make->error.prefix = fl_print_error_s;
data_make->error.suffix = f_string_empty_s;
- data_make->error.context = data_make->main->program.context.set.error;
- data_make->error.notable = data_make->main->program.context.set.notable;
- data_make->main->program.error.to.stream = F_type_error_d;
- data_make->main->program.error.to.id = F_type_descriptor_error_d;
- data_make->error.set = &data_make->main->program.context.set;
+ data_make->error.context = main->program.context.set.error;
+ data_make->error.notable = main->program.context.set.notable;
+ main->program.error.to.stream = F_type_error_d;
+ main->program.error.to.id = F_type_descriptor_error_d;
+ data_make->error.set = &main->program.context.set;
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
return;
}
- fake_make_print_verbose_operate_exiting_as(&data_make->main->program.message, data_make->main->cache_arguments);
+ fake_make_print_verbose_operate_exiting_as(&main->program.message, main->cache_arguments);
}
#endif // _di_fake_make_operate_process_type_exit_
if (!data_make || !data_make->main) return;
- if (f_compare_dynamic(fake_make_operation_argument_exit_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
+ fake_main_t * const main = data_make->main;
+
+ if (f_compare_dynamic(fake_make_operation_argument_exit_s, main->cache_arguments.array[0]) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_exit_e;
data_make->error.prefix = fl_print_error_s;
data_make->error.suffix = f_string_empty_s;
- data_make->error.context = data_make->main->program.context.set.error;
- data_make->error.notable = data_make->main->program.context.set.notable;
- data_make->main->program.error.to.stream = F_type_error_d;
- data_make->main->program.error.to.id = F_type_descriptor_error_d;
- data_make->error.set = &data_make->main->program.context.set;
+ data_make->error.context = main->program.context.set.error;
+ data_make->error.notable = main->program.context.set.notable;
+ main->program.error.to.stream = F_type_error_d;
+ main->program.error.to.id = F_type_descriptor_error_d;
+ data_make->error.set = &main->program.context.set;
}
- else if (f_compare_dynamic(fake_make_operation_argument_warn_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_warn_s, main->cache_arguments.array[0]) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_warn_e;
data_make->error.prefix = fl_print_warning_s;
data_make->error.suffix = f_string_empty_s;
- data_make->error.context = data_make->main->program.context.set.warning;
- data_make->error.notable = data_make->main->program.context.set.notable;
- data_make->main->program.error.to.stream = F_type_output_d;
- data_make->main->program.error.to.id = F_type_descriptor_output_d;
- data_make->error.set = &data_make->main->program.context.set;
+ data_make->error.context = main->program.context.set.warning;
+ data_make->error.notable = main->program.context.set.notable;
+ main->program.error.to.stream = F_type_output_d;
+ main->program.error.to.id = F_type_descriptor_output_d;
+ data_make->error.set = &main->program.context.set;
}
else {
data_make->setting_make.fail = fake_make_operation_fail_ignore_e;
- data_make->main->program.error.to.stream = 0;
- data_make->main->program.error.to.id = -1;
+ main->program.error.to.stream = 0;
+ main->program.error.to.id = -1;
}
- fake_make_print_verbose_operate_set_failure_state(&data_make->main->program.message, data_make->setting_make.fail);
+ fake_make_print_verbose_operate_set_failure_state(&main->program.message, data_make->setting_make.fail);
}
#endif // _di_fake_make_operate_process_type_fail_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
gid_t id = 0;
bool dereference = F_true;
f_array_length_t i = 0;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- id = (gid_t) fake_make_get_id(data_make, F_false, data_make->main->cache_arguments.array[i++]);
+ id = (gid_t) fake_make_get_id(data_make, F_false, main->cache_arguments.array[i++]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (F_status_is_error(main->setting.state.status)) {
+ main->setting.state.status = F_status_set_error(F_failure);
}
- for (; i < data_make->main->cache_arguments.used; ++i) {
+ for (; i < main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[i]);
continue;
}
if (all) {
- data_make->main->setting.state.status = fll_file_role_change_all(data_make->main->cache_arguments.array[i], -1, id, dereference, fake_max_recursion_depth_d);
+ main->setting.state.status = fll_file_role_change_all(main->cache_arguments.array[i], -1, id, dereference, fake_max_recursion_depth_d);
}
else {
- data_make->main->setting.state.status = f_file_role_change(data_make->main->cache_arguments.array[i], -1, id, dereference);
+ main->setting.state.status = f_file_role_change(main->cache_arguments.array[i], -1, id, dereference);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), data_make->main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_print_verbose_operate_set_role(&data_make->main->program.message, all ? 0x1 : 0x0, data_make->main->cache_arguments.array[i], (f_number_unsigned_t) id);
+ fake_make_print_verbose_operate_set_role(&main->program.message, all ? 0x1 : 0x0, main->cache_arguments.array[i], (f_number_unsigned_t) id);
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_groups_
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
state_process->condition_result = fake_condition_result_true_e;
// Multiple properties may pass and so if any of them fail, then they all fail.
if (if_not) {
- for (f_array_length_t i = 2; i < data_make->main->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 2; i < main->cache_arguments.used; ++i) {
- if (f_environment_exists(data_make->main->cache_arguments.array[i]) == F_true) {
+ if (f_environment_exists(main->cache_arguments.array[i]) == F_true) {
state_process->condition_result = fake_condition_result_false_e;
break;
} // for
}
else {
- for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 1; i < main->cache_arguments.used; ++i) {
- if (f_environment_exists(data_make->main->cache_arguments.array[i]) != F_true) {
+ if (f_environment_exists(main->cache_arguments.array[i]) != F_true) {
state_process->condition_result = fake_condition_result_false_e;
break;
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
f_array_length_t i = if_not ? 2 : 1;
bool dereference = F_true;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
- if (i == data_make->main->cache_arguments.used) {
+ if (i == main->cache_arguments.used) {
if (if_not) {
state_process->condition_result = fake_condition_result_true_e;
}
state_process->condition_result = fake_condition_result_false_e;
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
return;
}
state_process->condition_result = fake_condition_result_true_e;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- for (; i < data_make->main->cache_arguments.used; ++i) {
+ for (; i < main->cache_arguments.used; ++i) {
- data_make->main->setting.state.status = f_file_exists(data_make->main->cache_arguments.array[i], dereference);
+ main->setting.state.status = f_file_exists(main->cache_arguments.array[i], dereference);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_exists), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_exists), main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
if (if_not) {
- if (data_make->main->setting.state.status == F_true) {
+ if (main->setting.state.status == F_true) {
state_process->condition_result = fake_condition_result_false_e;
break;
}
}
else {
- if (data_make->main->setting.state.status != F_true) {
+ if (main->setting.state.status != F_true) {
state_process->condition_result = fake_condition_result_false_e;
break;
}
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_if_exist_
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
// block = 0x1 (0000 0001) link = 0x10 (0001 0000)
// character = 0x2 (0000 0010) regular = 0x20 (0010 0000)
// directory = 0x4 (0000 0100) socket = 0x40 (0100 0000)
f_array_length_t i = if_not ? 2 : 1;
bool dereference = F_true;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- if (i == data_make->main->cache_arguments.used) {
+ if (i == main->cache_arguments.used) {
if (if_not) {
state_process->condition_result = fake_condition_result_true_e;
}
state_process->condition_result = fake_condition_result_false_e;
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
return;
}
- for (; i < data_make->main->cache_arguments.used; ++i) {
+ for (; i < main->cache_arguments.used; ++i) {
- if (f_compare_dynamic(fake_make_operation_argument_if_is_for_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_if_is_for_s, main->cache_arguments.array[i]) == F_equal_to) {
++i;
break;
}
- if (f_compare_dynamic(f_file_type_name_block_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(f_file_type_name_block_s, main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x1;
}
- else if (f_compare_dynamic(f_file_type_name_character_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_character_s, main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x2;
}
- else if (f_compare_dynamic(f_file_type_name_directory_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_directory_s, main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x4;
}
- else if (f_compare_dynamic(f_file_type_name_fifo_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_fifo_s, main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x8;
}
- else if (f_compare_dynamic(f_file_type_name_link_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_link_s, main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x10;
}
- else if (f_compare_dynamic(f_file_type_name_regular_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_regular_s, main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x20;
}
- else if (f_compare_dynamic(f_file_type_name_socket_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_socket_s, main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x40;
}
} // for
state_process->condition_result = fake_condition_result_true_e;
- for (; i < data_make->main->cache_arguments.used; ++i, mode_file = 0) {
+ for (; i < main->cache_arguments.used; ++i, mode_file = 0) {
- data_make->main->setting.state.status = f_file_mode_read(data_make->main->cache_arguments.array[i], dereference, &mode_file);
+ main->setting.state.status = f_file_mode_read(main->cache_arguments.array[i], dereference, &mode_file);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_read), data_make->main->cache_arguments.array[i], f_file_operation_get_type_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_mode_read), main->cache_arguments.array[i], f_file_operation_get_type_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_if_is_
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
f_string_range_t range = f_string_range_t_initialize;
f_number_unsigned_t number_left = 0;
f_number_unsigned_t number_right = 0;
f_array_length_t i = 1;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
state_process->condition_result = fake_condition_result_true_e;
range.start = 0;
- range.stop = data_make->main->cache_arguments.array[i].used - 1;
+ range.stop = main->cache_arguments.array[i].used - 1;
- if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
+ if (main->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
range.start = 1;
}
- else if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
+ else if (main->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
range.start = 1;
is_negative_left = F_true;
}
if (range.start > range.stop) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->main->cache_arguments.array[i], range, &number_left);
+ main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, main->cache_arguments.array[i], range, &number_left);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- for (i = 2; i < data_make->main->cache_arguments.used; ++i, data_make->main->setting.state.status = F_none, number_left = number_right, is_negative_left = is_negative_right) {
+ if (F_status_is_error_not(main->setting.state.status)) {
+ for (i = 2; i < main->cache_arguments.used; ++i, main->setting.state.status = F_none, number_left = number_right, is_negative_left = is_negative_right) {
- if (data_make->main->cache_arguments.array[i].used) {
+ if (main->cache_arguments.array[i].used) {
range.start = 0;
- range.stop = data_make->main->cache_arguments.array[i].used - 1;
+ range.stop = main->cache_arguments.array[i].used - 1;
is_negative_right = F_false;
- if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
+ if (main->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
range.start = 1;
}
- else if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
+ else if (main->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
range.start = 1;
is_negative_right = F_true;
}
if (range.start > range.stop) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->main->cache_arguments.array[i], range, &number_right);
+ main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, main->cache_arguments.array[i], range, &number_right);
}
}
else {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
- if (F_status_is_error(data_make->main->setting.state.status)) break;
+ if (F_status_is_error(main->setting.state.status)) break;
if (state_process->condition == fake_make_operation_if_type_if_greater_e) {
} // for
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
if ((i == 1 && number_left > F_number_t_size_unsigned_d) || (i > 1 && number_right > F_number_t_size_unsigned_d)) {
- fake_make_print_error_out_of_range_number(&data_make->main->program.error, data_make->main->cache_arguments.array[i], F_number_t_size_unsigned_d, F_number_t_size_unsigned_d);
+ fake_make_print_error_out_of_range_number(&main->program.error, main->cache_arguments.array[i], F_number_t_size_unsigned_d, F_number_t_size_unsigned_d);
}
else {
- fake_make_print_error_unsupported_number(&data_make->main->program.error, data_make->main->cache_arguments.array[i]);
+ fake_make_print_error_unsupported_number(&main->program.error, main->cache_arguments.array[i]);
}
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_process_type_if_greater_if_lesser_
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
uid_t id = 0;
f_array_length_t i = if_not ? 2 : 1;
bool dereference = F_true;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- id = (uid_t) fake_make_get_id(data_make, F_true, data_make->main->cache_arguments.array[i++]);
+ id = (uid_t) fake_make_get_id(data_make, F_true, main->cache_arguments.array[i++]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id));
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_get_id));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
state_process->condition_result = fake_condition_result_true_e;
- for (uid_t id_file = 0; i < data_make->main->cache_arguments.used; ++i, id_file = 0) {
+ for (uid_t id_file = 0; i < main->cache_arguments.used; ++i, id_file = 0) {
- data_make->main->setting.state.status = f_file_group_read(data_make->main->cache_arguments.array[i], dereference, &id_file);
+ main->setting.state.status = f_file_group_read(main->cache_arguments.array[i], dereference, &id_file);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_group_read), data_make->main->cache_arguments.array[i], f_file_operation_get_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_group_read), main->cache_arguments.array[i], f_file_operation_get_group_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_if_group_
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
f_file_mode_t mode_rule = 0;
mode_t mode_match = 0;
bool is = F_false;
- if (f_compare_dynamic(fake_make_operation_argument_is_s, data_make->main->cache_arguments.array[if_not ? 2 : 1]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_is_s, main->cache_arguments.array[if_not ? 2 : 1]) == F_equal_to) {
is = F_true;
}
{
uint8_t mode_replace = 0;
- fake_make_get_id_mode(data_make, data_make->main->cache_arguments.array[if_not ? 3 : 2], &mode_rule, &mode_replace);
+ fake_make_get_id_mode(data_make, main->cache_arguments.array[if_not ? 3 : 2], &mode_rule, &mode_replace);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id_mode));
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_get_id_mode));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- data_make->main->setting.state.status = f_file_mode_to_mode(mode_rule, &mode_match);
+ main->setting.state.status = f_file_mode_to_mode(mode_rule, &mode_match);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_file_mode_to_mode));
+ fake_print_error(&main->program.error, macro_fake_f(f_file_mode_to_mode));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
state_process->condition_result = fake_condition_result_true_e;
- for (f_array_length_t i = if_not ? 4 : 3; i < data_make->main->cache_arguments.used; ++i, mode_file = 0) {
+ for (f_array_length_t i = if_not ? 4 : 3; i < main->cache_arguments.used; ++i, mode_file = 0) {
- data_make->main->setting.state.status = f_file_mode_read(data_make->main->cache_arguments.array[i], F_true, &mode_file);
+ main->setting.state.status = f_file_mode_read(main->cache_arguments.array[i], F_true, &mode_file);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_read), data_make->main->cache_arguments.array[i], f_file_operation_get_mode_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_mode_read), main->cache_arguments.array[i], f_file_operation_get_mode_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_if_mode_
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
uid_t id = 0;
f_array_length_t i = if_not ? 2 : 1;
bool dereference = F_true;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- id = (uid_t) fake_make_get_id(data_make, F_true, data_make->main->cache_arguments.array[i++]);
+ id = (uid_t) fake_make_get_id(data_make, F_true, main->cache_arguments.array[i++]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id));
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_get_id));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
state_process->condition_result = fake_condition_result_true_e;
- for (uid_t id_file = 0; i < data_make->main->cache_arguments.used; ++i, id_file = 0) {
+ for (uid_t id_file = 0; i < main->cache_arguments.used; ++i, id_file = 0) {
- data_make->main->setting.state.status = f_file_owner_read(data_make->main->cache_arguments.array[i], dereference, &id_file);
+ main->setting.state.status = f_file_owner_read(main->cache_arguments.array[i], dereference, &id_file);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_owner_read), data_make->main->cache_arguments.array[i], f_file_operation_get_owner_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_owner_read), main->cache_arguments.array[i], f_file_operation_get_owner_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_if_owner_
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
const f_string_static_t reserved_name[] = {
fake_make_parameter_variable_build_s,
fake_make_parameter_variable_color_s,
};
const bool reserved_parameter[] = {
- data_make->main->setting.build.used,
+ main->setting.build.used,
F_true,
- data_make->main->setting.data.used,
- data_make->main->setting.defines.used,
- data_make->main->setting.fakefile.used,
- data_make->main->setting.modes.used,
- data_make->main->setting.process.used,
- data_make->main->setting.settings.used,
- data_make->main->setting.sources.used,
+ main->setting.data.used,
+ main->setting.defines.used,
+ main->setting.fakefile.used,
+ main->setting.modes.used,
+ main->setting.process.used,
+ main->setting.settings.used,
+ main->setting.sources.used,
F_true,
- data_make->main->setting.work.used,
- data_make->main->program.parameters.array[fake_parameter_build_e].result & f_console_result_value_e,
- (data_make->main->program.parameters.array[fake_parameter_light_e].result & f_console_result_found_e) || (data_make->main->program.parameters.array[fake_parameter_dark_e].result & f_console_result_found_e) || (data_make->main->program.parameters.array[fake_parameter_no_color_e].result & f_console_result_found_e),
- data_make->main->program.parameters.array[fake_parameter_data_e].result & f_console_result_value_e,
- data_make->main->program.parameters.array[fake_parameter_define_e].result & f_console_result_value_e,
- data_make->main->program.parameters.array[fake_parameter_fakefile_e].result & f_console_result_value_e,
- data_make->main->program.parameters.array[fake_parameter_mode_e].result & f_console_result_value_e,
- data_make->main->program.parameters.array[fake_parameter_process_e].result & f_console_result_value_e,
- data_make->main->program.parameters.array[fake_parameter_settings_e].result & f_console_result_value_e,
- data_make->main->program.parameters.array[fake_parameter_sources_e].result & f_console_result_value_e,
- (data_make->main->program.parameters.array[fake_parameter_verbosity_quiet_e].result & f_console_result_found_e) || (data_make->main->program.parameters.array[fake_parameter_verbosity_normal_e].result & f_console_result_found_e) || (data_make->main->program.parameters.array[fake_parameter_verbosity_verbose_e].result & f_console_result_found_e) || (data_make->main->program.parameters.array[fake_parameter_verbosity_debug_e].result & f_console_result_found_e),
- data_make->main->program.parameters.array[fake_parameter_work_e].result & f_console_result_value_e,
+ main->setting.work.used,
+ main->program.parameters.array[fake_parameter_build_e].result & f_console_result_value_e,
+ (main->program.parameters.array[fake_parameter_light_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_dark_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_no_color_e].result & f_console_result_found_e),
+ main->program.parameters.array[fake_parameter_data_e].result & f_console_result_value_e,
+ main->program.parameters.array[fake_parameter_define_e].result & f_console_result_value_e,
+ main->program.parameters.array[fake_parameter_fakefile_e].result & f_console_result_value_e,
+ main->program.parameters.array[fake_parameter_mode_e].result & f_console_result_value_e,
+ main->program.parameters.array[fake_parameter_process_e].result & f_console_result_value_e,
+ main->program.parameters.array[fake_parameter_settings_e].result & f_console_result_value_e,
+ main->program.parameters.array[fake_parameter_sources_e].result & f_console_result_value_e,
+ (main->program.parameters.array[fake_parameter_verbosity_quiet_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_verbosity_normal_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_verbosity_verbose_e].result & f_console_result_found_e) || (main->program.parameters.array[fake_parameter_verbosity_debug_e].result & f_console_result_found_e),
+ main->program.parameters.array[fake_parameter_work_e].result & f_console_result_value_e,
data_make->parameter_value.build.used,
data_make->parameter_value.color.used,
data_make->parameter_value.data.used,
state_process->condition_result = fake_condition_result_true_e;
// Multiple properties may pass and so if any of them fail, then they all fail.
- for (; i < data_make->main->cache_arguments.used && !result; ++i) {
+ for (; i < main->cache_arguments.used && !result; ++i) {
for (j = 0; j < 33; ++j) {
- if (f_compare_dynamic(reserved_name[j], data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(reserved_name[j], main->cache_arguments.array[i]) == F_equal_to) {
result = reserved_parameter[j] ? 2 : 1;
break;
if (!result) {
for (j = 0; j < data_make->setting_make.parameter.used; ++j) {
- if (f_compare_dynamic(data_make->main->cache_arguments.array[i], data_make->setting_make.parameter.array[j].name) == F_equal_to) {
+ if (f_compare_dynamic(main->cache_arguments.array[i], data_make->setting_make.parameter.array[j].name) == F_equal_to) {
result = 2;
break;
}
}
- if (result == 2 && i + 1 < data_make->main->cache_arguments.used) {
+ if (result == 2 && i + 1 < main->cache_arguments.used) {
result = 0;
}
} // for
#ifndef _di_fake_make_operate_process_type_index_
int fake_make_operate_process_type_index(fake_make_data_t * const data_make) {
- if (!data_make) return 0;
+ if (!data_make || !data_make->main) return 0;
+
+ fake_main_t * const main = data_make->main;
const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_indexer);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_execute));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_execute));
}
- if (data_make->main->setting.state.status == F_child) return result;
+ if (main->setting.state.status == F_child) return result;
fake_make_operate_process_return(data_make, result);
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
// 0x1 = force, 0x2 = strict.
uint8_t flag = 0;
- if (data_make->main->cache_arguments.used > 2) {
- if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->main->cache_arguments.array[1]) != F_equal_to) {
+ if (main->cache_arguments.used > 2) {
+ if (f_compare_dynamic(fake_make_operation_argument_force_s, main->cache_arguments.array[1]) != F_equal_to) {
flag |= 0x1;
}
- else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->main->cache_arguments.array[1]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_strict_s, main->cache_arguments.array[1]) == F_equal_to) {
flag |= 0x2;
}
- if (data_make->main->cache_arguments.used > 3) {
- if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->main->cache_arguments.array[2]) != F_equal_to) {
+ if (main->cache_arguments.used > 3) {
+ if (f_compare_dynamic(fake_make_operation_argument_force_s, main->cache_arguments.array[2]) != F_equal_to) {
flag |= 0x1;
}
- else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->main->cache_arguments.array[2]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_strict_s, main->cache_arguments.array[2]) == F_equal_to) {
flag |= 0x2;
}
}
}
- if ((flag & 0x1) && f_file_exists(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], F_false) == F_true) {
- if (f_directory_is(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]) == F_true) {
- data_make->main->setting.state.status = f_directory_remove(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], F_directory_max_descriptors_d, F_false);
+ if ((flag & 0x1) && f_file_exists(main->cache_arguments.array[main->cache_arguments.used - 1], F_false) == F_true) {
+ if (f_directory_is(main->cache_arguments.array[main->cache_arguments.used - 1]) == F_true) {
+ main->setting.state.status = f_directory_remove(main->cache_arguments.array[main->cache_arguments.used - 1], F_directory_max_descriptors_d, F_false);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_remove), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_remove), main->cache_arguments.array[main->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_directory_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
else {
- data_make->main->setting.state.status = f_file_remove(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ main->setting.state.status = f_file_remove(main->cache_arguments.array[main->cache_arguments.used - 1]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_remove), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_remove), main->cache_arguments.array[main->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
}
- data_make->main->setting.state.status = f_file_link(data_make->main->cache_arguments.array[0], data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ main->setting.state.status = f_file_link(main->cache_arguments.array[0], main->cache_arguments.array[main->cache_arguments.used - 1]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_link), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_link_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_link), main->cache_arguments.array[main->cache_arguments.used - 1], f_file_operation_link_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_print_verbose_operate_symbolic_link(&data_make->main->program.message, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], data_make->main->cache_arguments.array[0]);
+ fake_make_print_verbose_operate_symbolic_link(&main->program.message, main->cache_arguments.array[main->cache_arguments.used - 1], main->cache_arguments.array[0]);
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_link_
if (!data_make || !data_make->main) return;
- data_make->main->setting.state.status = F_none;
+ fake_main_t * const main = data_make->main;
+
+ main->setting.state.status = F_none;
f_file_mode_t mode_rule = 0;
uint8_t replace = 0;
- fake_make_get_id_mode(data_make, data_make->main->cache_arguments.array[0], &mode_rule, &replace);
+ fake_make_get_id_mode(data_make, main->cache_arguments.array[0], &mode_rule, &replace);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id_mode));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_get_id_mode));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
mode_t mode = 0;
mode_t mode_file = 0;
- for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i, mode = 0) {
+ for (f_array_length_t i = 1; i < main->cache_arguments.used; ++i, mode = 0) {
- data_make->main->setting.state.status = f_file_mode_read(data_make->main->cache_arguments.array[i], F_true, &mode_file);
+ main->setting.state.status = f_file_mode_read(main->cache_arguments.array[i], F_true, &mode_file);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_read), data_make->main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_mode_read), main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- data_make->main->setting.state.status = f_file_mode_determine(mode_file, mode_rule, replace, macro_f_file_type_is_directory(mode_file), &mode);
+ main->setting.state.status = f_file_mode_determine(mode_file, mode_rule, replace, macro_f_file_type_is_directory(mode_file), &mode);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_determine), data_make->main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_mode_determine), main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
if (all) {
- data_make->main->setting.state.status = fll_file_mode_set_all(data_make->main->cache_arguments.array[i], F_true, mode, fake_max_recursion_depth_d);
+ main->setting.state.status = fll_file_mode_set_all(main->cache_arguments.array[i], F_true, mode, fake_max_recursion_depth_d);
}
else {
- data_make->main->setting.state.status = f_file_mode_set(data_make->main->cache_arguments.array[i], mode);
+ main->setting.state.status = f_file_mode_set(main->cache_arguments.array[i], mode);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, all ? macro_fake_f(fll_file_mode_set_all) : macro_fake_f(f_file_mode_set), data_make->main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, all ? macro_fake_f(fll_file_mode_set_all) : macro_fake_f(f_file_mode_set), main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_print_verbose_operate_set_mode(&data_make->main->program.message, data_make->main->cache_arguments.array[i], mode);
+ fake_make_print_verbose_operate_set_mode(&main->program.message, main->cache_arguments.array[i], mode);
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_modes_
if (!data_make || !data_make->main) return;
- const f_array_length_t total = data_make->main->cache_arguments.used -1;
+ fake_main_t * const main = data_make->main;
+
+ const f_array_length_t total = main->cache_arguments.used -1;
f_directory_recurse_copy_t recurse = f_directory_recurse_copy_t_initialize;
f_string_static_t destination = f_string_static_t_initialize;
- if (data_make->main->program.error.verbosity > f_console_verbosity_normal_e) {
- recurse.state.custom = data_make->main;
+ if (main->program.error.verbosity > f_console_verbosity_normal_e) {
+ recurse.state.custom = main;
recurse.verbose = fake_print_verbose_recursive_move;
}
bool existing = F_true;
// In this case, the destination could be a file, so confirm this.
- if (data_make->main->cache_arguments.used == 2) {
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
+ if (main->cache_arguments.used == 2) {
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[1]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_is), main->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
f_directory_recurse_copy_delete(&recurse);
return;
}
- if (data_make->main->setting.state.status == F_false || data_make->main->setting.state.status == F_file_found_not) {
+ if (main->setting.state.status == F_false || main->setting.state.status == F_file_found_not) {
existing = F_false;
}
}
for (f_array_length_t i = 0; i < total; ++i) {
- destination.used = data_make->main->cache_arguments.array[total].used;
+ destination.used = main->cache_arguments.array[total].used;
if (existing) {
- fake_string_dynamic_reset(&data_make->main->cache_argument);
+ fake_string_dynamic_reset(&main->cache_argument);
- data_make->main->setting.state.status = f_file_name_base(data_make->main->cache_arguments.array[i], &data_make->main->cache_argument);
+ main->setting.state.status = f_file_name_base(main->cache_arguments.array[i], &main->cache_argument);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_name_base), data_make->main->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_name_base), main->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
f_directory_recurse_copy_delete(&recurse);
return;
}
- destination.used += data_make->main->cache_argument.used + 1;
+ destination.used += main->cache_argument.used + 1;
}
f_char_t destination_string[destination.used + 1];
destination_string[destination.used - 1] = 0;
}
- memcpy(destination_string, data_make->main->cache_arguments.array[total].string, sizeof(f_char_t) * data_make->main->cache_arguments.array[total].used);
+ memcpy(destination_string, main->cache_arguments.array[total].string, sizeof(f_char_t) * main->cache_arguments.array[total].used);
if (existing) {
- if (destination_string[data_make->main->cache_arguments.array[total].used - 1] == f_path_separator_s.string[0]) {
- memcpy(destination_string + data_make->main->cache_arguments.array[total].used, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_argument.used);
+ if (destination_string[main->cache_arguments.array[total].used - 1] == f_path_separator_s.string[0]) {
+ memcpy(destination_string + main->cache_arguments.array[total].used, main->cache_argument.string, sizeof(f_char_t) * main->cache_argument.used);
--destination.used;
}
else {
- memcpy(destination_string + data_make->main->cache_arguments.array[total].used + 1, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_arguments.array[i].used);
+ memcpy(destination_string + main->cache_arguments.array[total].used + 1, main->cache_argument.string, sizeof(f_char_t) * main->cache_arguments.array[i].used);
- destination_string[data_make->main->cache_arguments.array[total].used] = f_path_separator_s.string[0];
+ destination_string[main->cache_arguments.array[total].used] = f_path_separator_s.string[0];
}
}
- fll_file_move(data_make->main->cache_arguments.array[i], destination, &recurse);
+ fll_file_move(main->cache_arguments.array[i], destination, &recurse);
if (F_status_is_error(recurse.state.status)) {
- data_make->main->setting.state.status = recurse.state.status;
+ main->setting.state.status = recurse.state.status;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(fll_file_move), data_make->main->cache_arguments.array[i], f_file_operation_move_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(fll_file_move), main->cache_arguments.array[i], f_file_operation_move_s, fll_error_file_type_directory_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
f_directory_recurse_copy_delete(&recurse);
f_directory_recurse_copy_delete(&recurse);
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_move_
if (!data_make || !data_make->main) return 0;
+ fake_main_t * const main = data_make->main;
+
f_array_length_t id_section = 0;
for (; id_section < data_make->fakefile.used; ++id_section) {
- if (f_compare_dynamic_partial_string(data_make->main->cache_arguments.array[0].string, data_make->main->buffer, data_make->main->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(main->cache_arguments.array[0].string, main->buffer, main->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
break;
}
} // for
const int result = fake_make_operate_section(data_make, id_section, section_stack);
// Ensure that a break only happens within its active state_process->operation stack.
- if (data_make->main->setting.state.status == F_signal_abort) {
- data_make->main->setting.state.status = F_none;
+ if (main->setting.state.status == F_signal_abort) {
+ main->setting.state.status = F_none;
}
- else if (F_status_set_fine(data_make->main->setting.state.status) == F_signal_abort) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ else if (F_status_set_fine(main->setting.state.status) == F_signal_abort) {
+ main->setting.state.status = F_status_set_error(F_failure);
}
return result;
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
uid_t id = 0;
bool dereference = F_true;
f_array_length_t i = 0;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- id = (uid_t) fake_make_get_id(data_make, F_true, data_make->main->cache_arguments.array[i++]);
+ id = (uid_t) fake_make_get_id(data_make, F_true, main->cache_arguments.array[i++]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_get_id));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- for (; i < data_make->main->cache_arguments.used; ++i) {
+ for (; i < main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[i]);
continue;
}
if (all) {
- data_make->main->setting.state.status = fll_file_role_change_all(data_make->main->cache_arguments.array[i], id, -1, dereference, fake_max_recursion_depth_d);
+ main->setting.state.status = fll_file_role_change_all(main->cache_arguments.array[i], id, -1, dereference, fake_max_recursion_depth_d);
}
else {
- data_make->main->setting.state.status = f_file_role_change(data_make->main->cache_arguments.array[i], id, -1, dereference);
+ main->setting.state.status = f_file_role_change(main->cache_arguments.array[i], id, -1, dereference);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), data_make->main->cache_arguments.array[i], f_file_operation_change_owner_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), main->cache_arguments.array[i], f_file_operation_change_owner_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_print_verbose_operate_set_role(&data_make->main->program.message, all ? 0x3 : 0x2, data_make->main->cache_arguments.array[i], (f_number_unsigned_t) id);
+ fake_make_print_verbose_operate_set_role(&main->program.message, all ? 0x3 : 0x2, main->cache_arguments.array[i], (f_number_unsigned_t) id);
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_owners_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
bool found = F_false;
f_array_length_t i = 0;
for (; i < data_make->setting_make.parameter.used; ++i) {
- if (f_compare_dynamic(data_make->main->cache_arguments.array[0], data_make->setting_make.parameter.array[i].name) == F_equal_to) {
+ if (f_compare_dynamic(main->cache_arguments.array[0], data_make->setting_make.parameter.array[i].name) == F_equal_to) {
found = F_true;
break;
if (found) {
for (f_array_length_t j = 0; j < data_make->setting_make.parameter.array[i].value.size; ++j) {
- data_make->main->setting.state.status = f_string_dynamic_resize(0, &data_make->setting_make.parameter.array[i].value.array[j]);
+ main->setting.state.status = f_string_dynamic_resize(0, &data_make->setting_make.parameter.array[i].value.array[j]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_resize));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_resize));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
} // for
if (data_make->setting_make.parameter.array[i].value.size) {
- data_make->main->setting.state.status = f_string_dynamics_resize(0, &data_make->setting_make.parameter.array[i].value);
+ main->setting.state.status = f_string_dynamics_resize(0, &data_make->setting_make.parameter.array[i].value);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_resize));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_resize));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
}
else {
- data_make->main->setting.state.status = f_string_map_multis_resize(fake_allocation_small_d, &data_make->setting_make.parameter);
+ main->setting.state.status = f_string_map_multis_resize(fake_allocation_small_d, &data_make->setting_make.parameter);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_map_multis_resize));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_map_multis_resize));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_arguments.array[0], &data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name);
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_arguments.array[0], &data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
data_make->setting_make.parameter.array[i].value.used = 0;
- if (data_make->main->cache_arguments.used > 1) {
- data_make->main->setting.state.status = f_string_dynamics_resize(data_make->main->cache_arguments.used - 1, &data_make->setting_make.parameter.array[i].value);
+ if (main->cache_arguments.used > 1) {
+ main->setting.state.status = f_string_dynamics_resize(main->cache_arguments.used - 1, &data_make->setting_make.parameter.array[i].value);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_resize));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_resize));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
for (f_array_length_t j = 0; j < data_make->setting_make.parameter.array[i].value.size; ++j) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_arguments.array[j + 1], &data_make->setting_make.parameter.array[i].value.array[j]);
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_arguments.array[j + 1], &data_make->setting_make.parameter.array[i].value.array[j]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
++data_make->setting_make.parameter.array[i].value.used;
} // for
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_parameter_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
f_string_dynamic_t *argument = &data_make->path.stack.array[data_make->path.stack.used - 1];
f_string_dynamic_resize(0, argument);
--data_make->path.stack.used;
- data_make->main->setting.state.status = f_path_change(*argument);
+ main->setting.state.status = f_path_change(*argument);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_path_change), *argument);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
+ if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
fake_make_path_relative(data_make, *argument);
// 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(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_path_relative));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_path_relative));
- fake_make_print_verbose_operate_set_path(&data_make->main->program.message, *argument);
+ fake_make_print_verbose_operate_set_path(&main->program.message, *argument);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_print_verbose_operate_set_path(&data_make->main->program.message, data_make->main->cache_argument);
+ fake_make_print_verbose_operate_set_path(&main->program.message, main->cache_argument);
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_pop_
if (!data_make || !data_make->main) return;
- fake_string_dynamic_reset(&data_make->main->cache_1);
+ fake_main_t * const main = data_make->main;
+
+ fake_string_dynamic_reset(&main->cache_1);
{
f_array_length_t i = 0;
// Pre-allocate the cache to reduce allocations.
{
- f_array_length_t total = data_make->main->cache_arguments.used;
+ f_array_length_t total = main->cache_arguments.used;
- for (; i < data_make->main->cache_arguments.used; ++i) {
- total += data_make->main->cache_arguments.array[i].used;
+ for (; i < main->cache_arguments.used; ++i) {
+ total += main->cache_arguments.array[i].used;
} // for
- data_make->main->setting.state.status = f_string_dynamic_increase_by(total, &data_make->main->cache_1);
+ main->setting.state.status = f_string_dynamic_increase_by(total, &main->cache_1);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_file_stream_open));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_stream_open));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
- for (i = 0; i < data_make->main->cache_arguments.used; ++i) {
+ for (i = 0; i < main->cache_arguments.used; ++i) {
if (i) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_space_s, &data_make->main->cache_1);
+ main->setting.state.status = f_string_dynamic_append(f_string_space_s, &main->cache_1);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
- fake_make_operate_process_buffer_escape(data_make, data_make->main->cache_arguments.array[i], &data_make->main->cache_1);
+ fake_make_operate_process_buffer_escape(data_make, main->cache_arguments.array[i], &main->cache_1);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_file_stream_open));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_stream_open));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
} // for
}
- f_file_stream_lock(data_make->main->program.message.to);
+ f_file_stream_lock(main->program.message.to);
- fll_print_dynamic_raw(data_make->main->cache_1, data_make->main->program.message.to);
- fll_print_dynamic_raw(f_string_eol_s, data_make->main->program.message.to);
+ fll_print_dynamic_raw(main->cache_1, main->program.message.to);
+ fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- f_file_stream_unlock(data_make->main->program.message.to);
+ f_file_stream_unlock(main->program.message.to);
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_print_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
fake_skeleton_operate(data_make->data);
- if (F_status_set_fine(data_make->main->setting.state.status) == F_interrupt) return;
+ if (F_status_set_fine(main->setting.state.status) == F_interrupt) return;
- fake_make_operate_process_return(data_make, F_status_is_error(data_make->main->setting.state.status) ? 1 : 0);
+ fake_make_operate_process_return(data_make, F_status_is_error(main->setting.state.status) ? 1 : 0);
}
#endif // _di_fake_make_operate_process_type_skeleton_
if (!data_make || !data_make->main) return;
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[0]);
+ fake_main_t * const main = data_make->main;
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[0]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[0]);
- if (F_status_set_fine(data_make->main->setting.state.status) == F_false) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[0]);
+
+ if (F_status_set_fine(main->setting.state.status) == F_false) {
+ main->setting.state.status = F_status_set_error(F_failure);
}
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- data_make->main->setting.state.status = f_path_change(data_make->main->cache_arguments.array[0]);
+ main->setting.state.status = f_path_change(main->cache_arguments.array[0]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_path_change), data_make->main->cache_arguments.array[0]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_path_change), main->cache_arguments.array[0]);
}
else {
- data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->path.stack);
+ main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->path.stack);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_set_fine(data_make->main->setting.state.status) == F_array_too_large) {
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_array_too_large) {
fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_string_dynamics_increase_by), fake_common_file_path_stack_s);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase_by));
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamics_increase_by));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
// Copy the entire real path, including the trailing NULL.
- ++data_make->main->cache_argument.used;
+ ++main->cache_argument.used;
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_argument, &data_make->path.stack.array[data_make->path.stack.used]);
+ main->setting.state.status = f_string_dynamic_append_nulless(main->cache_argument, &data_make->path.stack.array[data_make->path.stack.used]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
+ if (main->program.error.verbosity >= f_console_verbosity_verbose_e) {
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(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_path_relative));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_make_path_relative));
- fake_make_print_verbose_operate_set_path(&data_make->main->program.message, data_make->path.stack.array[data_make->path.stack.used]);
+ fake_make_print_verbose_operate_set_path(&main->program.message, data_make->path.stack.array[data_make->path.stack.used]);
}
else {
- fake_make_print_verbose_operate_set_path(&data_make->main->program.message, data_make->main->cache_argument);
+ fake_make_print_verbose_operate_set_path(&main->program.message, main->cache_argument);
}
}
++data_make->path.stack.used;
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_to_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
{
- data_make->main->setting.state.status = f_path_change_at(data_make->path.top.id);
+ main->setting.state.status = f_path_change_at(data_make->path.top.id);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_path_change), data_make->main->cache_arguments.array[0]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_path_change), main->cache_arguments.array[0]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
- fake_make_print_verbose_operate_set_path(&data_make->main->program.message, f_string_empty_s);
+ fake_make_print_verbose_operate_set_path(&main->program.message, f_string_empty_s);
// Clear stack, except for the project root.
for (f_array_length_t i = 1; i < data_make->path.stack.used; ++i) {
data_make->path.stack.used = 1;
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_top_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
f_mode_t mode = f_mode_t_initialize;
- macro_f_mode_t_set_default_umask(mode, data_make->main->program.umask);
+ macro_f_mode_t_set_default_umask(mode, main->program.umask);
- for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 1; i < main->cache_arguments.used; ++i) {
- if (f_compare_dynamic(fake_make_operation_argument_file_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
- data_make->main->setting.state.status = f_file_touch(data_make->main->cache_arguments.array[i], mode.regular, F_false);
+ if (f_compare_dynamic(fake_make_operation_argument_file_s, main->cache_arguments.array[0]) == F_equal_to) {
+ main->setting.state.status = f_file_touch(main->cache_arguments.array[i], mode.regular, F_false);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[i], &data_make->main->cache_argument))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_touch), data_make->main->cache_argument, f_file_operation_touch_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_is_error_not(fl_path_canonical(main->cache_arguments.array[i], &main->cache_argument))) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_touch), main->cache_argument, f_file_operation_touch_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_touch), data_make->main->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_touch), main->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_file_e);
}
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
- else if (f_compare_dynamic(fake_make_operation_argument_directory_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
- data_make->main->setting.state.status = f_directory_touch(data_make->main->cache_arguments.array[i], mode.directory);
+ else if (f_compare_dynamic(fake_make_operation_argument_directory_s, main->cache_arguments.array[0]) == F_equal_to) {
+ main->setting.state.status = f_directory_touch(main->cache_arguments.array[i], mode.directory);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[i], &data_make->main->cache_argument))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_touch), data_make->main->cache_argument, f_file_operation_touch_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_is_error_not(fl_path_canonical(main->cache_arguments.array[i], &main->cache_argument))) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_touch), main->cache_argument, f_file_operation_touch_s, fll_error_file_type_directory_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_touch), data_make->main->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_touch), main->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_directory_e);
}
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
- fake_make_print_verbose_operate_touch(&data_make->main->program.message, data_make->main->cache_arguments.array[i]);
+ fake_make_print_verbose_operate_touch(&main->program.message, main->cache_arguments.array[i]);
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_process_type_touch_
if (!data_make || !data_make->main) return;
+ fake_main_t * const main = data_make->main;
+
f_file_t file = f_file_t_initialize;
- data_make->main->setting.state.status = f_file_exists(data_make->main->cache_arguments.array[0], F_true);
+ main->setting.state.status = f_file_exists(main->cache_arguments.array[0], F_true);
- if (data_make->main->cache_arguments.used == 1 || data_make->main->setting.state.status == F_false) {
- data_make->main->setting.state.status = f_file_stream_open(data_make->main->cache_arguments.array[0], f_file_open_mode_truncate_s, &file);
+ if (main->cache_arguments.used == 1 || main->setting.state.status == F_false) {
+ main->setting.state.status = f_file_stream_open(main->cache_arguments.array[0], f_file_open_mode_truncate_s, &file);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[0], &data_make->main->cache_argument))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->main->cache_argument, f_file_operation_open_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_is_error_not(fl_path_canonical(main->cache_arguments.array[0], &main->cache_argument))) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stream_open), main->cache_argument, f_file_operation_open_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->main->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stream_open), main->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
}
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
// Keep the stream open if there is a string to write to it.
- if (data_make->main->cache_arguments.used > 1) {
- data_make->main->setting.state.status = F_false;
+ if (main->cache_arguments.used > 1) {
+ main->setting.state.status = F_false;
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
f_file_stream_flush(file);
f_file_stream_close(&file);
}
}
- if (F_status_is_error_not(data_make->main->setting.state.status) && data_make->main->cache_arguments.used > 1) {
- if (data_make->main->setting.state.status != F_false) {
- data_make->main->setting.state.status = f_file_stream_open(data_make->main->cache_arguments.array[0], f_file_open_mode_append_s, &file);
+ if (F_status_is_error_not(main->setting.state.status) && main->cache_arguments.used > 1) {
+ if (main->setting.state.status != F_false) {
+ main->setting.state.status = f_file_stream_open(main->cache_arguments.array[0], f_file_open_mode_append_s, &file);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[0], &data_make->main->cache_argument))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->main->cache_argument, f_file_operation_open_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_is_error_not(fl_path_canonical(main->cache_arguments.array[0], &main->cache_argument))) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stream_open), main->cache_argument, f_file_operation_open_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->main->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stream_open), main->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i) {
+ if (F_status_is_error_not(main->setting.state.status)) {
+ for (f_array_length_t i = 1; i < main->cache_arguments.used; ++i) {
- fake_string_dynamic_reset(&data_make->main->cache_1);
+ fake_string_dynamic_reset(&main->cache_1);
- fake_make_operate_process_buffer_escape(data_make, data_make->main->cache_arguments.array[i], &data_make->main->cache_1);
+ fake_make_operate_process_buffer_escape(data_make, main->cache_arguments.array[i], &main->cache_1);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[0], &data_make->main->cache_argument))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(fake_make_operate_process_buffer_escape), data_make->main->cache_argument, f_file_operation_write_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_is_error_not(fl_path_canonical(main->cache_arguments.array[0], &main->cache_argument))) {
+ fake_print_error_file(&main->program.error, macro_fake_f(fake_make_operate_process_buffer_escape), main->cache_argument, f_file_operation_write_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(fake_make_operate_process_buffer_escape), data_make->main->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(fake_make_operate_process_buffer_escape), main->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
}
break;
}
- data_make->main->setting.state.status = f_file_stream_write(file, data_make->main->cache_1, 0);
+ main->setting.state.status = f_file_stream_write(file, main->cache_1, 0);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[0], &data_make->main->cache_argument))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_write), data_make->main->cache_argument, f_file_operation_write_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_is_error_not(fl_path_canonical(main->cache_arguments.array[0], &main->cache_argument))) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stream_write), main->cache_argument, f_file_operation_write_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_write), data_make->main->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_stream_write), main->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
}
break;
}
- if (i + 1 < data_make->main->cache_arguments.used) {
- data_make->main->setting.state.status = f_file_stream_write(file, f_string_ascii_space_s, 0);
+ if (i + 1 < main->cache_arguments.used) {
+ main->setting.state.status = f_file_stream_write(file, f_string_ascii_space_s, 0);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_file_stream_write));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_file_stream_write));
break;
}
f_file_stream_close(&file);
}
- data_make->main->setting.state.status = F_status_is_error(data_make->main->setting.state.status) ? F_status_set_error(F_failure) : F_none;
+ main->setting.state.status = F_status_is_error(main->setting.state.status) ? F_status_set_error(F_failure) : F_none;
}
#endif // _di_fake_make_operate_process_type_write_
#ifndef _di_fake_make_operate_validate_define_name_
f_status_t fake_make_operate_validate_define_name(const f_string_static_t name) {
- if (!name.used) return F_none;
+ if (!name.used) return F_data_not;
if (!isalpha(name.string[0]) && name.string[0] != '_') return F_false;
for (f_array_length_t i = 1; i < name.used; ++i) {
* The variable name string to validate.
*
* @return
- * F_none if there is no string to validate (used = 0).
+ * F_data_not if there is no string to validate (used = 0).
* F_true on valid.
* F_false on invalid.
*
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used > 1) {
- fake_print_error_too_many_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (main->cache_arguments.used > 1) {
+ fake_print_error_too_many_arguments(&main->program.error);
+
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->main->cache_arguments.used) {
- if (f_compare_dynamic(fake_make_operation_argument_success_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_break_s, data_make->main->cache_arguments.array[0]);
+ if (main->cache_arguments.used) {
+ if (f_compare_dynamic(fake_make_operation_argument_success_s, main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_failure_s, main->cache_arguments.array[0]) == F_equal_to_not) {
+ fake_make_print_error_unsupported_type(&main->program.error, fake_make_operation_break_s, main->cache_arguments.array[0]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_validate_type_break_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used) {
- if (data_make->main->cache_arguments.array[0].used) {
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used) {
+ if (main->cache_arguments.array[0].used) {
f_string_static_t path_file = f_string_static_t_initialize;
- path_file.used = data_make->data->path_data_build.used + data_make->main->cache_arguments.array[0].used;
+ path_file.used = data_make->data->path_data_build.used + main->cache_arguments.array[0].used;
f_char_t path_file_string[path_file.used + 1];
path_file.string = path_file_string;
path_file_string[path_file.used] = 0;
memcpy(path_file_string, data_make->data->path_data_build.string, sizeof(f_char_t) * data_make->data->path_data_build.used);
- memcpy(path_file_string + data_make->data->path_data_build.used, data_make->main->cache_arguments.array[0].string, sizeof(f_char_t) * data_make->main->cache_arguments.array[0].used);
+ memcpy(path_file_string + data_make->data->path_data_build.used, main->cache_arguments.array[0].string, sizeof(f_char_t) * main->cache_arguments.array[0].used);
- data_make->main->setting.state.status = f_file_is(path_file, F_file_type_regular_d, F_false);
+ main->setting.state.status = f_file_is(path_file, F_file_type_regular_d, F_false);
- if (data_make->main->setting.state.status == F_file_found_not || F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), path_file, f_file_operation_find_s, fll_error_file_type_file_e);
+ if (main->setting.state.status == F_file_found_not || F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file_simple(&main->program.error, macro_fake_f(f_file_is), path_file, f_file_operation_find_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (!data_make->main->setting.state.status) {
- fake_make_print_error_file_type(&data_make->main->program.message, f_file_type_name_regular_s, path_file);
+ if (!main->setting.state.status) {
+ fake_make_print_error_file_type(&main->program.message, f_file_type_name_regular_s, path_file);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
else {
- fake_make_print_error_file_name_empty(&data_make->main->program.error);
+ fake_make_print_error_file_name_empty(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_validate_type_build_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used) {
- fake_print_error_too_many_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used) {
+ fake_print_error_too_many_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_validate_type_clean_top_skeleton_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used > 1) {
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used > 1) {
f_status_t status = F_none;
- for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 0; i < main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[i]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
} // for
- for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used - 1; ++i) {
+ for (f_array_length_t i = 0; i < main->cache_arguments.used - 1; ++i) {
- if (f_file_exists(data_make->main->cache_arguments.array[i], F_true) != F_true) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ if (f_file_exists(main->cache_arguments.array[i], F_true) != F_true) {
+ fake_print_error_file_simple(&main->program.error, macro_fake_f(f_file_is), main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
} // for
- if (data_make->main->cache_arguments.used > 2) {
+ if (main->cache_arguments.used > 2) {
// The last file must be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[main->cache_arguments.used - 1]);
- if (data_make->main->setting.state.status == F_false || data_make->main->setting.state.status == F_file_found_not) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "last", data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ if (main->setting.state.status == F_false || main->setting.state.status == F_file_found_not) {
+ fake_make_print_error_content_not_directory(&main->program.error, "last", main->cache_arguments.array[main->cache_arguments.used - 1]);
status = F_status_set_error(F_failure);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_find_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_is), main->cache_arguments.array[main->cache_arguments.used - 1], f_file_operation_find_s, fll_error_file_type_directory_e);
status = F_status_set_error(F_failure);
}
else {
// When the first file is a directory, then the second, if it exists, must also be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[0]);
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[0]);
- if (data_make->main->setting.state.status == F_true) {
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
+ if (main->setting.state.status == F_true) {
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[1]);
- if (data_make->main->setting.state.status == F_false) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "second", data_make->main->cache_arguments.array[1]);
+ if (main->setting.state.status == F_false) {
+ fake_make_print_error_content_not_directory(&main->program.error, "second", main->cache_arguments.array[1]);
status = F_status_set_error(F_failure);
}
}
}
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
return;
}
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
#endif // _di_fake_make_operate_validate_type_clone_
if (!data_make || !data_make->main) return;
- if (!data_make->main->cache_arguments.used) {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
+
+ if (!main->cache_arguments.used) {
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else if (data_make->setting_build.build_compiler.used) {
- fake_make_print_error_compiler_not_specified(&data_make->main->program.error, fake_make_operation_compile_s);
+ fake_make_print_error_compiler_not_specified(&main->program.error, fake_make_operation_compile_s);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_validate_type_compile_
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
if (state_process->operation == fake_make_operation_type_if_e) {
if (state_process->operation_previous == fake_make_operation_type_if_e) {
- fake_make_print_error_after_condition_must_not(&data_make->main->program.error);
+ fake_make_print_error_after_condition_must_not(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
else {
if (!(state_process->operation_previous == fake_make_operation_type_if_e || state_process->operation_previous == fake_make_operation_type_and_e || state_process->operation_previous == fake_make_operation_type_or_e)) {
- fake_make_print_error_after_condition_may_only(&data_make->main->program.error);
+ fake_make_print_error_after_condition_may_only(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
- if (data_make->main->cache_arguments.used) {
+ if (main->cache_arguments.used) {
const f_string_static_t if_type_strings[] = {
fake_make_operation_argument_if_define_s,
fake_make_operation_argument_if_equal_s,
if_and_or = fake_make_operation_if_s;
}
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[k]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, main->cache_arguments.array[k]) == F_equal_to) {
++k;
dereference = F_false;
}
// Skip the "if not XXX" types as they are determined later on.
if (i > 12 && i < 21) continue;
- if (f_compare_dynamic(if_type_strings[i], data_make->main->cache_arguments.array[k]) == F_equal_to) {
+ if (f_compare_dynamic(if_type_strings[i], main->cache_arguments.array[k]) == F_equal_to) {
state_process->condition = if_type_codes[i];
break;
} // for
if (i == 23) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, if_and_or, data_make->main->cache_arguments.array[k]);
+ fake_make_print_error_unsupported_type(&main->program.error, if_and_or, main->cache_arguments.array[k]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
// Identify and convert to the appropriate if not condition.
if (state_process->condition == fake_make_operation_if_type_if_not_e) {
- if (data_make->main->cache_arguments.used < 1 + k) {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ if (main->cache_arguments.used < 1 + k) {
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
for (; j < 7; ++j) {
- if (f_compare_dynamic(if_not_type_strings[j], data_make->main->cache_arguments.array[k]) == F_equal_to) {
+ if (f_compare_dynamic(if_not_type_strings[j], main->cache_arguments.array[k]) == F_equal_to) {
state_process->condition = if_not_type_codes[j];
break;
} // for
if (j == 7) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, if_and_or, data_make->main->cache_arguments.array[k]);
+ fake_make_print_error_unsupported_type(&main->program.error, if_and_or, main->cache_arguments.array[k]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
j = 7;
}
- if (j == 7 && data_make->main->cache_arguments.used >= if_type_minimum[i] || j < 7 && data_make->main->cache_arguments.used >= if_not_type_minimum[j]) {
+ if (j == 7 && main->cache_arguments.used >= if_type_minimum[i] || j < 7 && main->cache_arguments.used >= if_not_type_minimum[j]) {
if (state_process->condition == fake_make_operation_if_type_if_success_e || state_process->condition == fake_make_operation_if_type_if_failure_e) {
// The success and failure operations minimum is also the maximum.
- if (data_make->main->cache_arguments.used > if_type_minimum[i]) {
- fake_print_error_too_many_arguments(&data_make->main->program.error);
+ if (main->cache_arguments.used > if_type_minimum[i]) {
+ fake_print_error_too_many_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
return;
}
if (state_process->condition == fake_make_operation_if_type_if_equal_e || state_process->condition == fake_make_operation_if_type_if_equal_not_e) {
- if (data_make->main->cache_arguments.used < 2 + k) {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ if (main->cache_arguments.used < 2 + k) {
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
return;
}
if (state_process->condition == fake_make_operation_if_type_if_exist_e || state_process->condition == fake_make_operation_if_type_if_not_exist_e) {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
return;
}
if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_is_e || state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition > fake_make_operation_if_type_if_not_exist_e && state_process->condition < fake_make_operation_if_type_if_success_e) {
if (state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition == fake_make_operation_if_type_if_not_mode_e) {
- if (f_compare_dynamic(fake_make_operation_argument_is_s, data_make->main->cache_arguments.array[k]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_has_s, data_make->main->cache_arguments.array[k]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_is_s, main->cache_arguments.array[k]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_has_s, main->cache_arguments.array[k]) == F_equal_to_not) {
if (j == 6) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_mode_s, data_make->main->cache_arguments.array[k]);
+ fake_make_print_error_unsupported_type(&main->program.error, fake_make_operation_mode_s, main->cache_arguments.array[k]);
}
else {
f_char_t message[4 + fake_make_operation_mode_s.used + 1];
f_string_static_t message_s = macro_f_string_static_t_initialize(message, 0, 4 + fake_make_operation_mode_s.used);
- fake_make_print_error_unsupported_type(&data_make->main->program.error, message_s, data_make->main->cache_arguments.array[k]);
+ fake_make_print_error_unsupported_type(&main->program.error, message_s, main->cache_arguments.array[k]);
}
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
f_file_mode_t mode_rule = 0;
uint8_t replace = 0;
- fake_make_get_id_mode(data_make, data_make->main->cache_arguments.array[++k], &mode_rule, &replace);
+ fake_make_get_id_mode(data_make, main->cache_arguments.array[++k], &mode_rule, &replace);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (F_status_is_error(main->setting.state.status)) {
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
i = ++k;
}
else if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_not_group_e) {
- fake_make_get_id(data_make, F_false, data_make->main->cache_arguments.array[k++]);
+ fake_make_get_id(data_make, F_false, main->cache_arguments.array[k++]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (F_status_is_error(main->setting.state.status)) {
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
// fifo = 0x8 (0000 1000) invalid = 0x80 (1000 0000)
uint8_t type_file = 0;
- for (i = k; i < data_make->main->cache_arguments.used; ++i) {
+ for (i = k; i < main->cache_arguments.used; ++i) {
- if (f_compare_dynamic(fake_make_operation_argument_if_is_for_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_if_is_for_s, main->cache_arguments.array[i]) == F_equal_to) {
++i;
break;
}
- if (f_compare_dynamic(f_file_type_name_block_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(f_file_type_name_block_s, main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x1;
}
- else if (f_compare_dynamic(f_file_type_name_character_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_character_s, main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x2;
}
- else if (f_compare_dynamic(f_file_type_name_directory_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_directory_s, main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x4;
}
- else if (f_compare_dynamic(f_file_type_name_fifo_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_fifo_s, main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x8;
}
- else if (f_compare_dynamic(f_file_type_name_link_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_link_s, main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x10;
}
- else if (f_compare_dynamic(f_file_type_name_regular_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_regular_s, main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x20;
}
- else if (f_compare_dynamic(f_file_type_name_socket_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_socket_s, main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x40;
}
else {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, f_file_type_name_file_s, data_make->main->cache_arguments.array[i]);
+ fake_make_print_error_unsupported_type(&main->program.error, f_file_type_name_file_s, main->cache_arguments.array[i]);
type_file |= 0x80;
}
} // for
if (type_file & 0x80) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
else if (state_process->condition == fake_make_operation_if_type_if_owner_e || state_process->condition == fake_make_operation_if_type_if_not_owner_e) {
- fake_make_get_id(data_make, F_true, data_make->main->cache_arguments.array[k++]);
+ fake_make_get_id(data_make, F_true, main->cache_arguments.array[k++]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (F_status_is_error(main->setting.state.status)) {
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
i = k;
}
- if (i < data_make->main->cache_arguments.used) {
+ if (i < main->cache_arguments.used) {
f_status_t status = F_none;
- for (; i < data_make->main->cache_arguments.used; ++i) {
+ for (; i < main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
else if (state_process->condition != fake_make_operation_if_type_if_exist_e && state_process->condition != fake_make_operation_if_type_if_is_e) {
// The existence tests do not need to happen here for *_if_exists and *_if_is as those two types will handle performing them during the process stage.
- data_make->main->setting.state.status = f_file_exists(data_make->main->cache_arguments.array[i], dereference);
+ main->setting.state.status = f_file_exists(main->cache_arguments.array[i], dereference);
- if (data_make->main->setting.state.status == F_false) {
- data_make->main->setting.state.status = F_status_set_error(F_file_found_not);
+ if (main->setting.state.status == F_false) {
+ main->setting.state.status = F_status_set_error(F_file_found_not);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_exists), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_exists), main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
}
} // for
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
return;
}
if (state_process->condition == fake_make_operation_if_type_if_greater_e || state_process->condition == fake_make_operation_if_type_if_greater_equal_e || state_process->condition == fake_make_operation_if_type_if_less_e || state_process->condition == fake_make_operation_if_type_if_less_equal_e) {
- if (data_make->main->cache_arguments.used < 2 + k) {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ if (main->cache_arguments.used < 2 + k) {
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
f_string_range_t range = f_string_range_t_initialize;
f_number_unsigned_t number = 0;
- for (i = k; i < data_make->main->cache_arguments.used; ++i, data_make->main->setting.state.status = F_none) {
+ for (i = k; i < main->cache_arguments.used; ++i, main->setting.state.status = F_none) {
- if (data_make->main->cache_arguments.array[i].used) {
+ if (main->cache_arguments.array[i].used) {
range.start = 0;
- range.stop = data_make->main->cache_arguments.array[i].used - 1;
+ range.stop = main->cache_arguments.array[i].used - 1;
- if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
+ if (main->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
range.start = 1;
}
- else if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
+ else if (main->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
range.start = 1;
}
if (range.start > range.stop) {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->main->cache_arguments.array[i], range, &number);
+ main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, main->cache_arguments.array[i], range, &number);
}
}
else {
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
status = F_status_set_error(F_failure);
if (number > F_number_t_size_unsigned_d) {
- fake_make_print_error_out_of_range_number(&data_make->main->program.error, data_make->main->cache_arguments.array[i], F_number_t_size_unsigned_d, F_number_t_size_unsigned_d);
+ fake_make_print_error_out_of_range_number(&main->program.error, main->cache_arguments.array[i], F_number_t_size_unsigned_d, F_number_t_size_unsigned_d);
}
else {
- fake_make_print_error_unsupported_number(&data_make->main->program.error, data_make->main->cache_arguments.array[i]);
+ fake_make_print_error_unsupported_number(&main->program.error, main->cache_arguments.array[i]);
}
}
} // for
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
return;
}
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_condition_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used > 1) {
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used > 1) {
f_status_t status = F_none;
f_array_length_t i = 0;
- for (; i < data_make->main->cache_arguments.used; ++i) {
+ for (; i < main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
} // for
- for (i = 0; i < data_make->main->cache_arguments.used - 1; ++i) {
+ for (i = 0; i < main->cache_arguments.used - 1; ++i) {
- if (f_file_exists(data_make->main->cache_arguments.array[i], F_true) != F_true) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ if (f_file_exists(main->cache_arguments.array[i], F_true) != F_true) {
+ fake_print_error_file_simple(&main->program.error, macro_fake_f(f_file_is), main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
} // for
- if (data_make->main->cache_arguments.used > 2) {
+ if (main->cache_arguments.used > 2) {
// The last file must be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[main->cache_arguments.used - 1]);
- if (data_make->main->setting.state.status == F_false || data_make->main->setting.state.status == F_file_found_not) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "last", data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ if (main->setting.state.status == F_false || main->setting.state.status == F_file_found_not) {
+ fake_make_print_error_content_not_directory(&main->program.error, "last", main->cache_arguments.array[main->cache_arguments.used - 1]);
status = F_status_set_error(F_failure);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_is), main->cache_arguments.array[main->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
status = F_status_set_error(F_failure);
}
else {
// When the first file is a directory, then the second, if it exists, must also be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[0]);
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[0]);
- if (data_make->main->setting.state.status == F_true) {
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
+ if (main->setting.state.status == F_true) {
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[1]);
- if (data_make->main->setting.state.status == F_false) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "second", data_make->main->cache_arguments.array[1]);
+ if (main->setting.state.status == F_false) {
+ fake_make_print_error_content_not_directory(&main->program.error, "second", main->cache_arguments.array[1]);
status = F_status_set_error(F_failure);
}
}
}
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_copy_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used) {
- fake_make_operate_validate_define_name(data_make->main->cache_arguments.array[0]);
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used) {
+ main->setting.state.status = fake_make_operate_validate_define_name(main->cache_arguments.array[0]);
- if (data_make->main->setting.state.status == F_true) {
- data_make->main->setting.state.status = F_none;
+ if (main->setting.state.status == F_true) {
+ main->setting.state.status = F_none;
return;
}
- if (data_make->main->setting.state.status == F_none) {
- fake_make_print_error_define_name_empty(&data_make->main->program.error);
+ if (main->setting.state.status == F_data_not) {
+ fake_make_print_error_define_name_empty(&main->program.error);
}
else {
- fake_make_print_error_define_invalid_character(&data_make->main->program.error, data_make->main->cache_arguments.array[0]);
+ fake_make_print_error_define_invalid_character(&main->program.error, main->cache_arguments.array[0]);
}
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
}
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
#endif // _di_fake_make_operate_validate_type_define_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used) {
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used) {
f_status_t status = F_none;
- for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 0; i < main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
} // for
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_delete_
if (!data_make || !data_make->main || !state_process) return;
+ fake_main_t * const main = data_make->main;
+
if (state_process->operation_previous == fake_make_operation_type_else_e) {
- fake_make_print_error_after_condition_must_not(&data_make->main->program.error);
+ fake_make_print_error_after_condition_must_not(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
if (state_process->operation_previous == fake_make_operation_type_if_e || state_process->operation_previous == fake_make_operation_type_and_e || state_process->operation_previous == fake_make_operation_type_or_e) {
- fake_make_print_error_after_condition_must_not(&data_make->main->program.error);
+ fake_make_print_error_after_condition_must_not(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
if (!state_process->block) {
- fake_make_print_error_after_condition_no_preceding(&data_make->main->program.error);
+ fake_make_print_error_after_condition_no_preceding(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->main->cache_arguments.used) {
- fake_print_error_too_many_arguments(&data_make->main->program.error);
+ if (main->cache_arguments.used) {
+ fake_print_error_too_many_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_validate_type_else_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used > 1) {
- fake_print_error_too_many_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used > 1) {
+ fake_print_error_too_many_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->main->cache_arguments.used) {
- if (f_compare_dynamic(fake_make_operation_argument_success_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_exit_s, data_make->main->cache_arguments.array[0]);
+ if (main->cache_arguments.used) {
+ if (f_compare_dynamic(fake_make_operation_argument_success_s, main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_failure_s, main->cache_arguments.array[0]) == F_equal_to_not) {
+ fake_make_print_error_unsupported_type(&main->program.error, fake_make_operation_exit_s, main->cache_arguments.array[0]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_make_operate_validate_type_exit_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used) {
- if (f_compare_dynamic(fake_make_operation_argument_exit_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_warn_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_ignore_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_fail_s, data_make->main->cache_arguments.array[0]);
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used) {
+ if (f_compare_dynamic(fake_make_operation_argument_exit_s, main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_warn_s, main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_ignore_s, main->cache_arguments.array[0]) == F_equal_to_not) {
+ fake_make_print_error_unsupported_type(&main->program.error, fake_make_operation_fail_s, main->cache_arguments.array[0]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_fail_
if (!data_make || !data_make->main) return;
- if (!data_make->main->cache_arguments.used) {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (!main->cache_arguments.used) {
+ fake_print_error_requires_more_arguments(&main->program.error);
+
+ main->setting.state.status = F_status_set_error(F_failure);
}
else if (!data_make->setting_build.build_indexer.used) {
- fake_make_print_error_indexer_not_specified(&data_make->main->program.error, fake_make_operation_index_s);
+ fake_make_print_error_indexer_not_specified(&main->program.error, fake_make_operation_index_s);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_validate_type_index_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used > 4) {
- fake_print_error_too_many_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used > 4) {
+ fake_print_error_too_many_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->main->cache_arguments.used > 1) {
+ if (main->cache_arguments.used > 1) {
f_status_t status = F_none;
// 0x1 = force, 0x2 = strict.
uint8_t flag = 0;
- if (data_make->main->cache_arguments.used > 2) {
- if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
+ if (main->cache_arguments.used > 2) {
+ if (f_compare_dynamic(fake_make_operation_argument_force_s, main->cache_arguments.array[0]) == F_equal_to) {
flag |= 0x1;
}
- else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_strict_s, main->cache_arguments.array[0]) == F_equal_to) {
flag |= 0x2;
}
else {
- fake_print_error_operation_link_argument_unknown(&data_make->error, data_make->main->cache_arguments.array[0]);
+ fake_print_error_operation_link_argument_unknown(&data_make->error, main->cache_arguments.array[0]);
status = F_status_set_error(F_failure);
}
- if (data_make->main->cache_arguments.used > 3) {
- if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->main->cache_arguments.array[1]) == F_equal_to) {
+ if (main->cache_arguments.used > 3) {
+ if (f_compare_dynamic(fake_make_operation_argument_force_s, main->cache_arguments.array[1]) == F_equal_to) {
flag |= 0x1;
}
- else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->main->cache_arguments.array[1]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_strict_s, main->cache_arguments.array[1]) == F_equal_to) {
flag |= 0x2;
}
else {
- fake_print_error_operation_link_argument_unknown(&data_make->error, data_make->main->cache_arguments.array[1]);
+ fake_print_error_operation_link_argument_unknown(&data_make->error, main->cache_arguments.array[1]);
status = F_status_set_error(F_failure);
}
}
}
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[main->cache_arguments.used - 1]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[main->cache_arguments.used - 1]);
status = F_status_set_error(F_failure);
}
else {
if (!(flag & 0x1)) {
- if (!data_make->main->cache_argument.used || f_file_exists(data_make->main->cache_argument, F_false) == F_true) {
- fake_print_error_operation_link_point_exists(&data_make->error, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ if (!main->cache_argument.used || f_file_exists(main->cache_argument, F_false) == F_true) {
+ fake_print_error_operation_link_point_exists(&data_make->error, main->cache_arguments.array[main->cache_arguments.used - 1]);
status = F_status_set_error(F_failure);
}
}
- if (f_path_is_absolute(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2]) == F_true) {
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2]);
+ if (f_path_is_absolute(main->cache_arguments.array[main->cache_arguments.used - 2]) == F_true) {
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[main->cache_arguments.used - 2]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_arguments.array[main->cache_arguments.used - 2]);
status = F_status_set_error(F_failure);
}
- if ((flag & 0x2) && F_status_is_error_not(data_make->main->setting.state.status)) {
- if (f_file_exists(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2], F_false) != F_true) {
- fake_print_error_operation_link_target_exists_not(&data_make->error, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2]);
+ if ((flag & 0x2) && F_status_is_error_not(main->setting.state.status)) {
+ if (f_file_exists(main->cache_arguments.array[main->cache_arguments.used - 2], F_false) != F_true) {
+ fake_print_error_operation_link_target_exists_not(&data_make->error, main->cache_arguments.array[main->cache_arguments.used - 2]);
status = F_status_set_error(F_failure);
}
}
// The target path is relative to the point path so construct the path for performing checks.
- else if (data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2].used) {
+ else if (main->cache_arguments.array[main->cache_arguments.used - 2].used) {
// The cache_path contains the full path to the point file, save this so that the cache_path can be re-used.
- f_char_t full_string[data_make->main->cache_argument.used + 1];
- f_string_static_t full = macro_f_string_static_t_initialize(full_string, 0, data_make->main->cache_argument.used);
+ f_char_t full_string[main->cache_argument.used + 1];
+ f_string_static_t full = macro_f_string_static_t_initialize(full_string, 0, main->cache_argument.used);
- memcpy(full_string, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_argument.used);
- full_string[data_make->main->cache_argument.used] = 0;
+ memcpy(full_string, main->cache_argument.string, sizeof(f_char_t) * main->cache_argument.used);
+ full_string[main->cache_argument.used] = 0;
- data_make->main->cache_argument.used = 0;
+ main->cache_argument.used = 0;
- data_make->main->setting.state.status = f_file_name_directory(full, &data_make->main->cache_argument);
+ main->setting.state.status = f_file_name_directory(full, &main->cache_argument);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_name_directory), full, f_file_operation_analyze_s, fll_error_file_type_path_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_name_directory), full, f_file_operation_analyze_s, fll_error_file_type_path_e);
status = F_status_set_error(F_failure);
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->main->cache_argument);
+ if (F_status_is_error_not(main->setting.state.status)) {
+ main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &main->cache_argument);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append_assure));
status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = f_string_dynamic_append(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2], &data_make->main->cache_argument);
+ main->setting.state.status = f_string_dynamic_append(main->cache_arguments.array[main->cache_arguments.used - 2], &main->cache_argument);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(f_string_dynamic_append));
status = F_status_set_error(F_failure);
}
}
- if (F_status_is_error_not(data_make->main->setting.state.status)) {
+ if (F_status_is_error_not(main->setting.state.status)) {
// The cache_path is used by fake_make_assure_inside_project(), so copy the contents into another buffer.
- f_char_t target_string[data_make->main->cache_argument.used + 1];
- f_string_static_t target = macro_f_string_static_t_initialize(target_string, 0, data_make->main->cache_argument.used);
+ f_char_t target_string[main->cache_argument.used + 1];
+ f_string_static_t target = macro_f_string_static_t_initialize(target_string, 0, main->cache_argument.used);
- memcpy(target_string, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_argument.used);
- target_string[data_make->main->cache_argument.used] = 0;
+ memcpy(target_string, main->cache_argument.string, sizeof(f_char_t) * main->cache_argument.used);
+ target_string[main->cache_argument.used] = 0;
fake_make_assure_inside_project(data_make, target);
- if (F_status_is_error(data_make->main->setting.state.status)) {
+ if (F_status_is_error(main->setting.state.status)) {
fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), target);
status = F_status_set_error(F_failure);
}
- if ((flag & 0x2) && F_status_is_error_not(data_make->main->setting.state.status)) {
+ if ((flag & 0x2) && F_status_is_error_not(main->setting.state.status)) {
if (f_file_exists(target, F_false) != F_true) {
fake_print_error_operation_link_target_exists_not(&data_make->error, target);
}
}
else {
- fake_make_print_error_target_file_name_empty(&data_make->main->program.error);
+ fake_make_print_error_target_file_name_empty(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_link_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used > 1) {
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used > 1) {
{
f_status_t status = F_none;
- for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 0; i < main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
} // for
if (F_status_is_error_not(status)) {
- for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used - 1; ++i) {
+ for (f_array_length_t i = 0; i < main->cache_arguments.used - 1; ++i) {
- if (f_file_exists(data_make->main->cache_arguments.array[i], F_true) != F_true) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ if (f_file_exists(main->cache_arguments.array[i], F_true) != F_true) {
+ fake_print_error_file_simple(&main->program.error, macro_fake_f(f_file_is), main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
} // for
}
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
- if (F_status_is_error(data_make->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
}
- if (data_make->main->cache_arguments.used > 2) {
+ if (main->cache_arguments.used > 2) {
// The last file must be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[main->cache_arguments.used - 1]);
- if (data_make->main->setting.state.status == F_false || data_make->main->setting.state.status == F_file_found_not) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "last", data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
+ if (main->setting.state.status == F_false || main->setting.state.status == F_file_found_not) {
+ fake_make_print_error_content_not_directory(&main->program.error, "last", main->cache_arguments.array[main->cache_arguments.used - 1]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_is), main->cache_arguments.array[main->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
else {
// When the first file is a directory, then the second, if it exists, must also be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[0]);
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[0]);
- if (data_make->main->setting.state.status == F_true) {
- data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
+ if (main->setting.state.status == F_true) {
+ main->setting.state.status = f_directory_is(main->cache_arguments.array[1]);
- if (data_make->main->setting.state.status == F_false) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "second", data_make->main->cache_arguments.array[1]);
+ if (main->setting.state.status == F_false) {
+ fake_make_print_error_content_not_directory(&main->program.error, "second", main->cache_arguments.array[1]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
}
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_move_
if (!data_make || !data_make->main || !section_stack) return;
- if (data_make->main->cache_arguments.used > 1) {
- fake_print_error_too_many_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (main->cache_arguments.used > 1) {
+ fake_print_error_too_many_arguments(&main->program.error);
+
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->main->cache_arguments.used == 1) {
+ if (main->cache_arguments.used == 1) {
f_array_length_t id_section = 0;
for (; id_section < data_make->fakefile.used; ++id_section) {
- if (f_compare_dynamic_partial_string(data_make->main->cache_arguments.array[0].string, data_make->main->buffer, data_make->main->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(main->cache_arguments.array[0].string, main->buffer, main->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
break;
}
} // for
if (id_section == data_make->fakefile.used) {
- fake_make_print_error_operation_section_not_found(&data_make->main->program.error, data_make->main->cache_arguments.array[0]);
+ fake_make_print_error_operation_section_not_found(&main->program.error, main->cache_arguments.array[0]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
for (f_array_length_t i = 0; i < section_stack->used; ++i) {
if (section_stack->array[i] == id_section) {
- fake_make_print_error_operation_recursion(&data_make->main->program.error, data_make->main->buffer, data_make->fakefile.array[id_section].name);
+ fake_make_print_error_operation_recursion(&main->program.error, main->buffer, data_make->fakefile.array[id_section].name);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
} // for
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_operate_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used) {
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used) {
const f_string_static_t reserved_name[] = {
fake_make_parameter_variable_build_s,
fake_make_parameter_variable_color_s,
for (f_array_length_t i = 0; i < 33; ++i) {
- if (f_compare_dynamic(reserved_name[i], data_make->main->cache_arguments.array[0]) == F_equal_to) {
- fake_make_print_error_reserved_parameter_name(&data_make->main->program.error, reserved_name[i]);
+ if (f_compare_dynamic(reserved_name[i], main->cache_arguments.array[0]) == F_equal_to) {
+ fake_make_print_error_reserved_parameter_name(&main->program.error, reserved_name[i]);
status = F_status_set_error(F_failure);
}
} // for
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_parameter_
if (!data_make || !data_make->main || !state_process) return;
- if (data_make->main->cache_arguments.used) {
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used) {
f_array_length_t i = 1;
if (state_process->operation == fake_make_operation_type_group_e || state_process->operation == fake_make_operation_type_groups_e || state_process->operation == fake_make_operation_type_owner_e || state_process->operation == fake_make_operation_type_owners_e) {
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, main->cache_arguments.array[i]) == F_equal_to) {
i = 2;
}
}
- if (data_make->main->cache_arguments.used > i) {
+ if (main->cache_arguments.used > i) {
f_status_t status = F_none;
- for (; i < data_make->main->cache_arguments.used; ++i) {
+ for (; i < main->cache_arguments.used; ++i) {
- data_make->main->setting.state.status = f_file_is(data_make->main->cache_arguments.array[i], F_file_type_regular_d, F_false);
+ main->setting.state.status = f_file_is(main->cache_arguments.array[i], F_file_type_regular_d, F_false);
- if (data_make->main->setting.state.status == F_file_found_not) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ if (main->setting.state.status == F_file_found_not) {
+ fake_print_error_file_simple(&main->program.error, macro_fake_f(f_file_is), main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->program.error.to.stream) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (data_make->error.verbosity != f_console_verbosity_quiet_e && main->program.error.to.stream) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_is), main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e);
}
status = F_status_set_error(F_failure);
}
} // for
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
}
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_permission_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used) {
- fake_print_error_too_many_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (main->cache_arguments.used) {
+ fake_print_error_too_many_arguments(&main->program.error);
+
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
if (data_make->path.stack.used == 1) {
- fake_make_print_error_pop_last_path(&data_make->main->program.error);
+ fake_make_print_error_pop_last_path(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_validate_type_pop_
if (!data_make || !data_make->main) return;
- if (!data_make->main->cache_arguments.used) {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
+
+ if (!main->cache_arguments.used) {
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
#endif // _di_fake_make_operate_validate_type_run_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used > 1) {
- fake_print_error_too_many_arguments(&data_make->main->program.error);
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used > 1) {
+ fake_print_error_too_many_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->main->cache_arguments.used) {
- if (data_make->main->cache_arguments.array[0].used) {
- data_make->main->setting.state.status = f_file_is(data_make->main->cache_arguments.array[0], F_file_type_directory_d, F_false);
+ if (main->cache_arguments.used) {
+ if (main->cache_arguments.array[0].used) {
+ main->setting.state.status = f_file_is(main->cache_arguments.array[0], F_file_type_directory_d, F_false);
- if (data_make->main->setting.state.status == F_file_found_not) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[0], f_file_operation_find_s, fll_error_file_type_file_e);
+ if (main->setting.state.status == F_file_found_not) {
+ fake_print_error_file_simple(&main->program.error, macro_fake_f(f_file_is), main->cache_arguments.array[0], f_file_operation_find_s, fll_error_file_type_file_e);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (F_status_is_error(data_make->main->setting.state.status)) {
- if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->program.error.to.stream) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->data->file_data_build_fakefile, f_file_operation_find_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (data_make->error.verbosity != f_console_verbosity_quiet_e && main->program.error.to.stream) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_is), data_make->data->file_data_build_fakefile, f_file_operation_find_s, fll_error_file_type_file_e);
}
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->main->setting.state.status) {
- data_make->main->setting.state.status = F_none;
+ if (main->setting.state.status) {
+ main->setting.state.status = F_none;
}
else {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, 0, data_make->main->cache_arguments.array[0]);
+ fake_make_print_error_content_not_directory(&main->program.error, 0, main->cache_arguments.array[0]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
else {
- fake_make_print_error_file_name_empty(&data_make->main->program.error);
+ fake_make_print_error_file_name_empty(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_to_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used > 1) {
- if (f_compare_dynamic(fake_make_operation_argument_file_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_directory_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, f_file_type_name_file_s, data_make->main->cache_arguments.array[0]);
+ fake_main_t * const main = data_make->main;
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ if (main->cache_arguments.used > 1) {
+ if (f_compare_dynamic(fake_make_operation_argument_file_s, main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_directory_s, main->cache_arguments.array[0]) == F_equal_to_not) {
+ fake_make_print_error_unsupported_type(&main->program.error, f_file_type_name_file_s, main->cache_arguments.array[0]);
+
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
f_status_t status = F_none;
- for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 1; i < main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[i]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
} // for
- data_make->main->setting.state.status = status;
+ main->setting.state.status = status;
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_touch_
if (!data_make || !data_make->main) return;
- if (data_make->main->cache_arguments.used) {
- if (!data_make->main->cache_arguments.array[0].used) {
+ fake_main_t * const main = data_make->main;
+
+ if (main->cache_arguments.used) {
+ if (!main->cache_arguments.array[0].used) {
fake_print_error_argument_empty(&data_make->error, 1);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[0]);
+ fake_make_assure_inside_project(data_make, main->cache_arguments.array[0]);
- if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[0]);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), main->cache_argument.used ? main->cache_argument : main->cache_arguments.array[0]);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
}
else {
- fake_print_error_requires_more_arguments(&data_make->main->program.error);
+ fake_print_error_requires_more_arguments(&main->program.error);
- data_make->main->setting.state.status = F_status_set_error(F_failure);
+ main->setting.state.status = F_status_set_error(F_failure);
}
}
#endif // _di_fake_make_operate_validate_type_write_
if (!print) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not;
- fake_print_context_simple_variable(print, "Breaking as", arguments.used ? arguments.array[0] : fake_make_operation_argument_success_s, 0);
+ fake_print_context_simple_variable(print, "Breaking as ", arguments.used ? arguments.array[0] : fake_make_operation_argument_success_s, 0);
return F_none;
}
if (!print) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not;
- fake_print_context_simple_variable(print, "Defined environment variable", variable, 0);
+ fake_print_context_simple_variable(print, "Defined environment variable ", variable, 0);
return F_none;
}
if (!print) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not;
- fake_print_context_simple_variable(print, "Removed", path, 0);
+ fake_print_context_simple_variable(print, "Removed ", path, 0);
return F_none;
}
if (!print) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not;
- fake_print_context_simple_variable(print, "Exiting as", arguments.used ? arguments.array[0] : fake_make_operation_argument_success_s, 0);
+ fake_print_context_simple_variable(print, "Exiting as ", arguments.used ? arguments.array[0] : fake_make_operation_argument_success_s, 0);
return F_none;
}
if (!print) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not;
- fake_print_context_simple_variable(print, "Changed project path to", path, 0);
+ fake_print_context_simple_variable(print, "Changed project path to ", path, 0);
return F_none;
}
if (!print) return F_status_set_error(F_output_not);
if (print->verbosity < f_console_verbosity_verbose_e) return F_output_not;
- fake_print_context_simple_variable(print, "Touched", path, 0);
+ fake_print_context_simple_variable(print, "Touched ", path, 0);
return F_none;
}
f_array_length_t line = 1;
f_state_t state = f_state_t_initialize;
+ const f_status_t status = main->setting.state.status;
f_fss_count_lines(buffer, operation_name.start, &line, &main->setting.state);
+ main->setting.state.status = status;
+
f_file_stream_lock(print->to);
fl_print_format("%[%QThe section operation '%]", print->to, print->context, print->prefix, print->context);
f_array_length_t line = 1;
f_state_t state = f_state_t_initialize;
+ const f_status_t status = main->setting.state.status;
f_fss_count_lines(buffer, operation_name.start, &line, &main->setting.state);
+ main->setting.state.status = status;
+
f_file_stream_lock(print->to);
fl_print_format("%[%QThe section operation '%]", print->to, print->context, print->prefix, print->context);
f_array_length_t line = 1;
f_state_t state = f_state_t_initialize;
+ const f_status_t status = main->setting.state.status;
f_fss_count_lines(buffer, operation_name.start, &line, &main->setting.state);
+ main->setting.state.status = status;
+
f_file_stream_lock(print->to);
fl_print_format("%[%QThe section operation '%]", print->to, print->context, print->prefix, print->context);
if (!data || !data->main) return;
- if (data->main->program.message.verbosity != f_console_verbosity_quiet_e && data->main->program.message.verbosity != f_console_verbosity_error_e) {
- fake_print_message_generating_skeleton(&data->main->program.message);
+ fake_main_t * const main = data->main;
- if (data->main->program.message.verbosity >= f_console_verbosity_verbose_e) {
- fll_print_dynamic(f_string_eol_s, data->main->program.message.to);
+ if (main->program.message.verbosity != f_console_verbosity_quiet_e && main->program.message.verbosity != f_console_verbosity_error_e) {
+ fake_print_message_generating_skeleton(&main->program.message);
+
+ if (main->program.message.verbosity >= f_console_verbosity_verbose_e) {
+ fll_print_dynamic(f_string_eol_s, main->program.message.to);
}
}
const f_string_static_t path[] = {
data->path_build,
- data->main->setting.data,
+ main->setting.data,
data->path_data_build,
data->path_data_documentation,
data->path_data_settings,
data->path_documents,
data->path_licenses,
- data->main->setting.sources,
+ main->setting.sources,
sources,
sources_bash,
sources_c,
sources_cpp,
sources_script,
- data->main->setting.work,
+ main->setting.work,
data->path_work_includes,
data->path_work_libraries,
data->path_work_libraries_script,
fake_skeleton_operate_directory_create(data, path[i]);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error(&data->main->program.error, macro_fake_f(fake_skeleton_operate_directory_create));
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error(&main->program.error, macro_fake_f(fake_skeleton_operate_directory_create));
return;
}
} // for
- if (data->main->program.message.verbosity >= f_console_verbosity_verbose_e) {
- fll_print_dynamic(f_string_eol_s, data->main->program.message.to);
+ if (main->program.message.verbosity >= f_console_verbosity_verbose_e) {
+ fll_print_dynamic(f_string_eol_s, main->program.message.to);
}
}
fake_skeleton_operate_file_create(data, data->file_data_build_defines, F_false, fake_make_skeleton_content_defines_s);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
fake_skeleton_operate_file_create(data, data->file_data_build_dependencies, F_false, fake_make_skeleton_content_dependencies_s);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
fake_skeleton_operate_file_create(data, data->file_data_build_process_post, F_true, fake_make_skeleton_content_process_post_s);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
fake_skeleton_operate_file_create(data, data->file_data_build_process_pre, F_true, fake_make_skeleton_content_process_pre_s);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
fake_skeleton_operate_file_create(data, data->file_data_build_settings, F_false, fake_make_skeleton_content_settings_s);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
fake_skeleton_operate_file_create(data, data->file_documents_readme, F_false, f_string_empty_s);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
fake_skeleton_operate_file_create(data, data->file_data_build_fakefile, F_false, fake_make_skeleton_content_fakefile_s);
- if (F_status_is_error(data->main->setting.state.status)) return;
+ if (F_status_is_error(main->setting.state.status)) return;
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_skeleton_operate_
if (!data || !data->main || !path.used) return;
- data->main->setting.state.status = f_directory_exists(path);
+ fake_main_t * const main = data->main;
+
+ main->setting.state.status = f_directory_exists(path);
- if (data->main->setting.state.status == F_true) {
- fake_print_verbose_directory_exists(&data->main->program.message, path);
+ if (main->setting.state.status == F_true) {
+ fake_print_verbose_directory_exists(&main->program.message, path);
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
return;
}
- if (data->main->setting.state.status == F_false) {
- fake_print_warning_path_exists_not_directory(&data->main->program.warning, path);
+ if (main->setting.state.status == F_false) {
+ fake_print_warning_path_exists_not_directory(&main->program.warning, path);
- data->main->setting.state.status = F_status_set_warning(F_failure);
+ main->setting.state.status = F_status_set_warning(F_failure);
return;
}
- if (data->main->setting.state.status == F_file_found_not) {
- data->main->setting.state.status = f_directory_create(path, F_file_mode_all_rwx_d);
+ if (main->setting.state.status == F_file_found_not) {
+ main->setting.state.status = f_directory_create(path, F_file_mode_all_rwx_d);
- if (F_status_is_error(data->main->setting.state.status)) {
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found_not) {
- fake_print_error_directory_create_parent_missing(&data->main->program.error, path);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ fake_print_error_directory_create_parent_missing(&main->program.error, path);
}
else {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_create), path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_create), path, f_file_operation_create_s, fll_error_file_type_directory_e);
}
return;
}
- fake_print_verbose_create_directory(&data->main->program.message, path);
+ fake_print_verbose_create_directory(&main->program.message, path);
}
- else if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_exists), path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ else if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_directory_exists), path, f_file_operation_create_s, fll_error_file_type_directory_e);
return;
}
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_skeleton_operate_directory_create_
if (!data || !data->main || !path.used) return;
- data->main->setting.state.status = f_file_is(path, F_file_type_regular_d, F_false);
+ fake_main_t * const main = data->main;
+
+ main->setting.state.status = f_file_is(path, F_file_type_regular_d, F_false);
- if (data->main->setting.state.status == F_true) {
- fake_print_verbose_file_exists(&data->main->program.message, path);
+ if (main->setting.state.status == F_true) {
+ fake_print_verbose_file_exists(&main->program.message, path);
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
return;
}
// symbolic links might also be fine.
- if (data->main->setting.state.status == F_false) {
- data->main->setting.state.status = f_file_is(path, F_file_type_link_d, F_false);
+ if (main->setting.state.status == F_false) {
+ main->setting.state.status = f_file_is(path, F_file_type_link_d, F_false);
- if (data->main->setting.state.status == F_true) {
- fake_print_verbose_file_exists_as_link(&data->main->program.message, path);
+ if (main->setting.state.status == F_true) {
+ fake_print_verbose_file_exists_as_link(&main->program.message, path);
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
return;
}
}
- if (data->main->setting.state.status == F_false) {
- fake_print_verbose_file_exists_not_regular_or_link(&data->main->program.message, path);
+ if (main->setting.state.status == F_false) {
+ fake_print_verbose_file_exists_not_regular_or_link(&main->program.message, path);
- data->main->setting.state.status = F_status_set_warning(F_none);
+ main->setting.state.status = F_status_set_warning(F_none);
return;
}
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found_not) {
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
mode_t mode = F_file_mode_all_rw_d;
if (executable) {
mode = F_file_mode_all_rwx_d;
}
- data->main->setting.state.status = f_file_create(path, mode, F_true);
+ main->setting.state.status = f_file_create(path, mode, F_true);
- if (F_status_is_error(data->main->setting.state.status)) {
- if (F_status_set_fine(data->main->setting.state.status) == F_file_found_not) {
- fake_print_error_file_create_parent_missing(&data->main->program.error, path);
+ if (F_status_is_error(main->setting.state.status)) {
+ if (F_status_set_fine(main->setting.state.status) == F_file_found_not) {
+ fake_print_error_file_create_parent_missing(&main->program.error, path);
}
else {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_create), path, f_file_operation_create_s, fll_error_file_type_file_e);
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_create), path, f_file_operation_create_s, fll_error_file_type_file_e);
}
return;
}
- fake_print_verbose_create_file(&data->main->program.message, path);
+ fake_print_verbose_create_file(&main->program.message, path);
if (content.used) {
f_file_t file = f_file_t_initialize;
file.flag = F_file_flag_append_wo_d;
file.size_write = content.used;
- data->main->setting.state.status = f_file_open(path, 0, &file);
+ main->setting.state.status = f_file_open(path, 0, &file);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_open), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_open), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
return;
}
- data->main->setting.state.status = f_file_write(file, content, 0);
+ main->setting.state.status = f_file_write(file, content, 0);
- if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_write), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
+ if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_write), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
f_file_stream_flush(file);
f_file_stream_close(&file);
return;
}
- fake_print_verbose_file_pre_populated(&data->main->program.message, path);
+ fake_print_verbose_file_pre_populated(&main->program.message, path);
f_file_stream_flush(file);
f_file_stream_close(&file);
}
}
- else if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_file_is), path, f_file_operation_create_s, fll_error_file_type_file_e);
+ else if (F_status_is_error(main->setting.state.status)) {
+ fake_print_error_file(&main->program.error, macro_fake_f(f_file_is), path, f_file_operation_create_s, fll_error_file_type_file_e);
return;
}
- data->main->setting.state.status = F_none;
+ main->setting.state.status = F_none;
}
#endif // _di_fake_skeleton_operate_file_create_