This gets Featureless Make compiling again.
The program also appears to work.
I need to now start reviewing the code, fixing non-compile time catching mistakes, resolving any todd or fixme cases, and optimization.
There may also be some directory and file structure manipulation.
#ifndef _di_fake_build_arguments_standard_add_
void fake_build_arguments_standard_add(fake_data_t * const data, fake_build_data_t * const data_build, const bool is_shared, const uint8_t type, f_string_dynamics_t *arguments) {
- if (!data || !data_build || !arguments) return;
+ if (!data || !data->main || !data->setting || !data_build || !arguments) return;
if (F_status_is_error(data->setting->state.status)) return;
{
#ifndef _di_fake_build_copy_
void fake_build_copy(fake_data_t * const data, const f_mode_t mode, const f_string_static_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_array_length_t perserve_offset) {
- if (!data) return;
+ if (!data || !data->main || !data->setting) return;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return;
if (!((++data->main->signal_check) % fake_signal_check_d)) {
#ifndef _di_fake_build_get_file_name_without_extension_
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) return;
+ if (!data || !data->main || !data->setting) return;
name->used = 0;
data->setting->state.status = F_none;
#ifndef _di_fake_build_objects_add_
void fake_build_objects_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *path, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) {
- if (!data || !data_build || !path || !generic || !specific || !arguments) return;
+ if (!data || !data->main || !data->setting || !data_build || !path || !generic || !specific || !arguments) return;
f_array_length_t i = 0;
f_array_length_t j = 0;
#ifndef _di_fake_build_operate_
void fake_build_operate(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe) {
- if (!data) return;
+ if (!data || !data->main || !data->setting) return;
if (!((++data->main->signal_check) % fake_signal_check_d)) {
if (fll_program_standard_signal_received(data->main)) {
#ifndef _di_fake_build_path_source_length_
void fake_build_path_source_length(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const setting_path_source, f_string_static_t * const source) {
- if (!data || !data_build || !setting_path_source || !source) return;
+ if (!data || !data->main || !data->setting || !data_build || !setting_path_source || !source) return;
source->used = 0;
#endif // _di_fake_build_path_source_length_
#ifndef _di_fake_build_path_source_string_
- 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) {
+ 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_static_t * const source) {
- if (!data || !data_build || !setting_path_source) return;
+ if (!data || !data->main || !data->setting || !data_build || !setting_path_source || !source) return;
source->used = 0;
#ifndef _di_fake_build_sources_add_
void fake_build_sources_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_statics_t *generic, const f_string_statics_t *specific, f_string_dynamics_t *arguments) {
- if (!data || !data_build || !generic || !specific || !arguments) return;
+ if (!data || !data->main || !data->setting || !data_build || !generic || !specific || !arguments) return;
f_array_length_t i = 0;
f_array_length_t j = 0;
#ifndef _di_fake_build_sources_object_add_
void fake_build_sources_object_add(fake_data_t * const data, fake_build_data_t * const data_build, const f_string_static_t *generic, const f_string_static_t *specific, f_string_dynamics_t *arguments) {
- if (!data || !data_build || !generic || !specific || !arguments) return;
+ if (!data || !data->main || !data->setting || !data_build || !generic || !specific || !arguments) return;
if (!generic->used && !specific->used) {
data->setting->state.status = F_none;
#ifndef _di_fake_build_touch_
void fake_build_touch(fake_data_t * const data, const f_string_dynamic_t file) {
- if (!data) return;
+ if (!data || !data->main || !data->setting) return;
if (F_status_is_error(data->setting->state.status)) return;
if (!((++data->main->signal_check) % fake_signal_check_d)) {
#ifndef _di_fake_build_library_script_
int fake_build_library_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
- if (!data) return 0;
+ if (!data || !data->main || !data->setting) return 0;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
#ifndef _di_fake_build_library_shared_
int fake_build_library_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
- if (!data || !data_build) return 0;
+ if (!data || !data->main || !data->setting || !data_build) return 0;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_shared.used) return 0;
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
- data->setting->state.status = 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, &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, &arguments);
- if (F_status_is_error(*data->setting->state.status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_objects_add));
f_string_dynamics_resize(0, &arguments);
return 0;
}
- data->setting->state.status = fake_build_sources_add(data, data_build, &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_shared, &arguments);
+ fake_build_sources_add(data, data_build, &data_build->setting.build_sources_library, &data_build->setting.build_sources_library_shared, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_sources_add));
#ifndef _di_fake_build_library_static_
int fake_build_library_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
- if (!data || !data_build) return 0;
+ if (!data || !data->main || !data->setting || !data_build) return 0;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_static.used) return 0;
source_path.used = 0;
- data->setting->state.status = fake_build_get_file_name_without_extension(data, sources[i]->array[j], &file_name);
+ fake_build_get_file_name_without_extension(data, sources[i]->array[j], &file_name);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_get_file_name_without_extension));
int result = data->main->child;
if (F_status_is_error_not(data->setting->state.status)) {
- result = fake_execute(data, data_build->environment, data_build->setting.build_indexer, arguments, status);
+ result = fake_execute(data, data_build->environment, data_build->setting.build_indexer, arguments);
}
f_string_dynamic_resize(0, &file_name);
#ifndef _di_fake_build_load_environment_
void fake_build_load_environment(fake_data_t * const data, fake_build_data_t * const data_build, f_string_maps_t * const environment) {
- if (!data || !data_build || !environment) return;
+ if (!data || !data->main || !data->setting || !data_build || !environment) return;
if (F_status_is_error(data->setting->state.status)) return;
// Reset the environment.
#ifndef _di_fake_build_load_setting_
void fake_build_load_setting(fake_data_t * const data, const f_string_statics_t * const build_arguments, const bool process_pipe, fake_build_setting_t * const setting) {
- if (!data || !setting) return;
+ if (!data || !data->main || !data->setting || !setting) return;
if (F_status_is_error(data->setting->state.status)) return;
if (!((++data->main->signal_check) % fake_signal_check_d)) {
// @todo make sure data->setting->state.custom = (void *) data->main;
//f_state_t state = macro_f_state_t_initialize_1(fake_allocation_large_d, fake_allocation_small_d, F_none, 0, 0, &fll_program_standard_signal_handle, 0, (void *) data->main, 0);
- data->setting->state.status = fll_fss_extended_read(buffer, &range, &objects, &contents, 0, 0, &delimits, 0, &data->setting.state);
+ fll_fss_extended_read(buffer, &range, &objects, &contents, 0, 0, &delimits, 0, &data->setting->state);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error_fss(data->setting, data->main->error, macro_fake_f(fll_fss_extended_read), data->file_data_build_settings, range, F_true);
}
else {
- data->setting->state.status = f_fss_apply_delimit(state, delimits, &buffer);
+ f_fss_apply_delimit(delimits, &buffer, &data->setting->state);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(f_fss_apply_delimit));
#endif // _di_fake_build_load_setting_
#ifndef _di_fake_build_load_setting_process_
- void fake_build_load_setting_process(fake_data_t * const data, const bool checks, const f_string_static_t path_file, const f_string_statics_t * const modes_custom, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t * const setting, f_status_t * const status) {
+ void fake_build_load_setting_process(fake_data_t * const data, const bool checks, const f_string_static_t path_file, const f_string_statics_t * const modes_custom, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t * const setting) {
- if (F_status_is_error(*status) && buffer.used) return;
+ if (!data || !data->main || !data->setting || !setting) return;
+ if (F_status_is_error(data->setting->state.status) && buffer.used) return;
if (!((++data->main->signal_check) % fake_signal_check_d)) {
if (fll_program_standard_signal_received(data->main)) {
fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received);
- *status = F_status_set_error(F_interrupt);
+ data->setting->state.status = F_status_set_error(F_interrupt);
return;
}
f_string_t function = macro_fake_f(fll_fss_snatch_apart);
- *status = fll_fss_snatch_apart(buffer, objects, contents, settings_name, fake_build_setting_total_d, settings_value, settings_matches, 0);
+ data->setting->state.status = fll_fss_snatch_apart(buffer, objects, contents, settings_name, fake_build_setting_total_d, settings_value, settings_matches, 0);
- if (*status == F_none) {
+ if (data->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.
fake_build_print_error_mode_invalid(data->setting, data->main->warning, modes->array[i], path_file);
error_printed = F_true;
- *status = F_status_set_error(F_parameter);
+ data->setting->state.status = F_status_set_error(F_parameter);
break;
}
settings_mode_names[j].used = 0;
- *status = f_string_dynamic_increase_by(settings_value[j]->used + f_string_ascii_minus_s.used + modes->array[i].used, &settings_mode_names[j]);
+ data->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(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
function = macro_fake_f(f_string_dynamic_increase_by);
break;
}
- *status = f_string_dynamic_append_nulless(settings_name[j], &settings_mode_names[j]);
+ data->setting->state.status = f_string_dynamic_append_nulless(settings_name[j], &settings_mode_names[j]);
- if (F_status_is_error_not(*status)) {
- *status = f_string_dynamic_append_nulless(f_string_ascii_minus_s, &settings_mode_names[j]);
+ if (F_status_is_error_not(data->setting->state.status)) {
+ data->setting->state.status = f_string_dynamic_append_nulless(f_string_ascii_minus_s, &settings_mode_names[j]);
}
- if (F_status_is_error_not(*status)) {
- *status = f_string_dynamic_append_nulless(modes->array[i], &settings_mode_names[j]);
+ if (F_status_is_error_not(data->setting->state.status)) {
+ data->setting->state.status = f_string_dynamic_append_nulless(modes->array[i], &settings_mode_names[j]);
}
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
function = macro_fake_f(f_string_dynamic_append);
break;
}
} // for
- if (*status == F_none) {
- *status = fll_fss_snatch_apart(buffer, objects, contents, settings_mode_names, fake_build_setting_total_d, settings_value, 0, 0);
+ if (data->setting->state.status == F_none) {
+ data->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(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
function = macro_fake_f(fll_fss_snatch_apart);
}
}
- if (F_status_is_error(*status)) break;
+ if (F_status_is_error(data->setting->state.status)) break;
} // for
for (j = 0; j < fake_build_setting_total_d; ++j) {
}
}
- if (F_status_is_error(*status)) {
- if (*status == F_status_set_error(F_string_too_large)) {
+ if (F_status_is_error(data->setting->state.status)) {
+ if (data->setting->state.status == F_status_set_error(F_string_too_large)) {
fake_build_print_error_setting_too_long(data->setting, data->main->warning, path_file);
}
else if (!error_printed) {
if (!settings_single_matches[i] && settings_single_destination[i]) {
settings_single_destination[i]->used = 0;
- *status = f_string_dynamic_append(settings_single_string_default[i], settings_single_destination[i]);
+ data->setting->state.status = f_string_dynamic_append(settings_single_string_default[i], settings_single_destination[i]);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_append));
break;
settings_single_destination[i]->used = 0;
if (settings_single_type[i] == 2) {
- *status = f_path_directory_cleanup(settings_single_source[i]->array[settings_single_source[i]->used - 1], settings_single_destination[i]);
+ data->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(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(f_path_directory_cleanup));
break;
}
}
else {
- *status = f_string_dynamic_increase_by(settings_single_source[i]->array[settings_single_source[i]->used - 1].used + 1, settings_single_destination[i]);
+ data->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(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
- *status = f_string_dynamic_append_nulless(settings_single_source[i]->array[settings_single_source[i]->used - 1], settings_single_destination[i]);
+ data->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(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
} // for
- if (F_status_is_error_not(*status)) {
+ if (F_status_is_error_not(data->setting->state.status)) {
if (checks && !setting->version_file) {
setting->version_file = fake_build_version_micro_e;
#endif // _di_fake_build_load_setting_process_
#ifndef _di_fake_build_load_setting_override_
- void fake_build_load_setting_override(fake_data_t * const data, fake_build_setting_t * const setting, f_status_t * const status) {
+ void fake_build_load_setting_override(fake_data_t * const data, fake_build_setting_t * const setting) {
- if (F_status_is_error(*status)) return;
+ if (!data || !data->main || !data->setting || !setting) return;
+ if (F_status_is_error(data->setting->state.status)) return;
if (data->main->parameters.array[fake_parameter_sources_e].result & f_console_result_value_e && setting->path_sources.used) {
- *status = f_string_dynamic_append_assure(f_path_separator_s, &setting->path_sources);
+ data->setting->state.status = f_string_dynamic_append_assure(f_path_separator_s, &setting->path_sources);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_append_assure));
return;
if (setting->build_shared == F_false && setting->build_static == F_false) {
fake_build_print_warning_setting_both_cannot_when_language(data->setting, data->main->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);
- *status = F_status_set_error(F_failure);
+ data->setting->state.status = F_status_set_error(F_failure);
}
}
}
#ifndef _di_fake_build_load_stage_
void fake_build_load_stage(fake_data_t * const data, const f_string_static_t settings_file, fake_build_stage_t * const stage) {
- if (!data || !stage) return;
+ if (!data || !data->main || !data->setting || !stage) return;
if (F_status_is_error(data->setting->state.status)) return;
if (!((++data->main->signal_check) % fake_signal_check_d)) {
#ifndef _di_fake_build_object_script_
int fake_build_object_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
- if (!data || !data_build) return 0;
+ if (!data || !data->main || !data->setting || !data_build) return 0;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
fake_build_touch(data, file_stage);
#ifndef _di_fake_build_object_shared_
int fake_build_object_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
- if (!data || !data_build) return 0;
+ if (!data || !data->main || !data->setting || !data_build) return 0;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_shared.used) return 0;
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
- data->setting->state.status = fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_shared, &arguments);
+ fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_shared, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_sources_object_add));
} // for
}
- fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e, &arguments, status);
+ fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_arguments_standard_add));
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
+ int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
macro_f_string_dynamics_t_delete_simple(arguments);
#ifndef _di_fake_build_object_static_
int fake_build_object_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
- if (!data || !data_build) return 0;
+ if (!data || !data->main || !data->setting || !data_build) return 0;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_static.used) return 0;
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
- data->setting->state.status = fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_static, &arguments);
+ fake_build_sources_object_add(data, data_build, &data_build->setting.build_sources_object, &data_build->setting.build_sources_object_static, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_sources_object_add));
} // for
}
- fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e, &arguments, status);
+ fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_arguments_standard_add));
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
+ int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
macro_f_string_dynamics_t_delete_simple(arguments);
#endif
#ifndef _di_fake_build_objects_static_
- int fake_build_objects_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status) {
+ int fake_build_objects_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
- if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child;
+ if (!data || !data->main || !data->setting) return 0;
+ if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
if (!data_build->setting.build_sources_library.used) return 0;
fake_build_print_compile_object_static_library(data->setting, data->main->message);
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
- *status = 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, &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, &arguments);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_objects_add));
f_string_dynamics_resize(0, &arguments);
source.used += sources[i]->array[j].used;
source.string[source.used] = 0;
- *status = fake_build_get_file_name_without_extension(data, sources[i]->array[j], &file_name);
+ fake_build_get_file_name_without_extension(data, sources[i]->array[j], &file_name);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_get_file_name_without_extension));
break;
}
- *status = f_file_name_directory(sources[i]->array[j], &destination_path);
+ data->setting->state.status = f_file_name_directory(sources[i]->array[j], &destination_path);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(f_file_name_directory));
break;
}
if (destination_path.used) {
- *status = f_string_dynamic_prepend(data->path_build_objects, &destination_path);
+ data->setting->state.status = f_string_dynamic_prepend(data->path_build_objects, &destination_path);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_prepend));
break;
}
- *status = f_string_dynamic_append_assure(f_path_separator_s, &destination_path);
+ data->setting->state.status = f_string_dynamic_append_assure(f_path_separator_s, &destination_path);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
- *status = f_directory_exists(destination_path);
+ data->setting->state.status = f_directory_exists(destination_path);
- if (*status == F_false) {
+ if (data->setting->state.status == F_false) {
fake_build_print_error_exist_not_directory(data->setting, data->main->message, destination_path);
- *status = F_status_set_error(F_failure);
+ data->setting->state.status = F_status_set_error(F_failure);
break;
}
- if (*status == F_file_found_not) {
- *status = f_directory_create(destination_path, mode.directory);
+ if (data->setting->state.status == F_file_found_not) {
+ data->setting->state.status = f_directory_create(destination_path, mode.directory);
- if (F_status_is_error(*status)) {
- if (F_status_set_fine(*status) == F_file_found_not) {
+ if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_set_fine(data->setting->state.status) == F_file_found_not) {
fake_build_print_error_cannot_create_due_to_parent(data->setting, data->main->message, destination_path);
}
else {
- fake_print_error_file(data->setting, data->main->error, *status, macro_fake_f(f_directory_create), destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_directory_create), destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
}
break;
fake_build_print_verbose_create_directory(data->setting, data->main->message, destination_path);
}
- if (F_status_is_error(*status)) {
- fake_print_error_file(data->setting, data->main->error, *status, macro_fake_f(f_directory_exists), destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ if (F_status_is_error(data->setting->state.status)) {
+ fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_directory_exists), destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
break;
}
if (!values[k].used) continue;
- *status = fll_execute_arguments_add(values[k], &arguments);
- if (F_status_is_error(*status)) break;
+ data->setting->state.status = fll_execute_arguments_add(values[k], &arguments);
+ if (F_status_is_error(data->setting->state.status)) break;
} // for
- fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_library_e, &arguments, status);
+ fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_library_e, &arguments);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fll_execute_arguments_add));
break;
}
- result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
+ result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
macro_f_string_dynamics_t_delete_simple(arguments);
- if (F_status_is_error(*status) || *status == F_child) break;
+ if (F_status_is_error(data->setting->state.status) || data->setting->state.status == F_child) break;
} // for
- if (F_status_is_error(*status) || *status == F_child) break;
+ if (F_status_is_error(data->setting->state.status) || data->setting->state.status == F_child) break;
} // for
f_string_dynamic_resize(0, &file_name);
f_string_dynamic_resize(0, &destination_path);
f_string_dynamics_resize(0, &arguments);
- if (F_status_is_error_not(*status) && *status != F_child) {
+ if (F_status_is_error_not(data->setting->state.status) && data->setting->state.status != F_child) {
fake_build_touch(data, file_stage);
}
*
* @param data
* The program data.
+ *
+ * This alters data.settings.state.status:
+ * F_none on success.
+ *
+ * Status codes (with error bit) are returned on any problem.
* @param data_build
* The build data.
* @param mode
* The file mode.
* @param file_stage
* The specific stage file path.
- * @param status
- * F_none on success.
- *
- * Status codes (with error bit) are returned on any problem.
*
* @return
* The return code of the execution process.
* This generally is only needed when F_child is returned, where this holds the return status of the child process.
*/
#ifndef _di_fake_build_objects_static_
- extern int fake_build_objects_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t * const status);
+ extern int fake_build_objects_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage);
#endif // _di_fake_build_objects_static_
#ifdef __cplusplus
#ifndef _di_fake_build_program_script_
int fake_build_program_script(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
+ if (!data || !data->main || !data->setting || !data_build) return 0;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
fake_build_touch(data, file_stage);
#ifndef _di_fake_build_program_shared_
int fake_build_program_shared(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
+ if (!data || !data->main || !data->setting || !data_build) return 0;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_shared.used) return 0;
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
- data->setting->state.status = 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, &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, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_objects_add));
return 0;
}
- data->setting->state.status = fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_shared, &arguments);
+ fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_shared, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_sources_add));
data->setting->state.status = fll_execute_arguments_add(link_project_library, &arguments);
}
- fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_program_e, &arguments, status);
+ fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_program_e, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fll_execute_arguments_add));
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
+ int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
macro_f_string_dynamics_t_delete_simple(arguments);
#ifndef _di_fake_build_program_static_
int fake_build_program_static(fake_data_t * const data, fake_build_data_t * const data_build, const f_mode_t mode, const f_string_static_t file_stage) {
+ if (!data || !data->main || !data->setting || !data_build) return 0;
if (F_status_is_error(data->setting->state.status) || f_file_exists(file_stage, F_true) == F_true || data->setting->state.status == F_child) return data->main->child;
if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_static.used) return 0;
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
- data->setting->state.status = 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, &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, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_objects_add));
return 0;
}
- data->setting->state.status = fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_static, &arguments);
+ fake_build_sources_add(data, data_build, &data_build->setting.build_sources_program, &data_build->setting.build_sources_program_static, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_build_sources_add));
} // for
}
- fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_program_e, &arguments, status);
+ fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_program_e, &arguments);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fll_execute_arguments_add));
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments, status);
+ int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
macro_f_string_dynamics_t_delete_simple(arguments);
#ifndef _di_fake_build_skeleton_
void fake_build_skeleton(fake_data_t * const data, fake_build_data_t * const data_build, const mode_t mode, const f_string_static_t file_stage) {
- if (!data || !data_build) return;
+ if (!data || !data->main || !data->setting || !data_build) return;
if (F_status_is_error(data->setting->state.status) || data->setting->state.status == F_child) return;
if (f_file_exists(file_stage, F_true) == F_true) return;
if (f_path_separator_s.used && directorys[i].string[j] != f_path_separator_s.string[0]) continue;
- if (!((++main->signal_check) % fake_signal_check_d)) {
+ if (!((++data->main->signal_check) % fake_signal_check_d)) {
if (fll_program_standard_signal_received(data->main)) {
fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received);
#ifndef _di_fake_clean_operate_
void fake_clean_operate(fake_data_t * const data) {
- if (!data) return;
+ if (!data || !data->main || !data->setting) return;
if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
f_file_stream_lock(data->main->message.to);
#if !defined(_di_fake_clean_operate_)
int fake_clean_remove_recursively_verbosely(const char * const path, const struct stat *file_stat, int type, struct FTW *entity) {
- if (!entity->level || !path) return 0;
+ if (!path || !entity || !entity->level) return 0;
const int result = remove(path);
setting->state.step_small = 4;
- f_console_parameter_process(arguments, &main->parameters, &setting->state.status, (void *) &data);
+ f_console_parameter_process(arguments, &main->parameters, &setting->state, (void *) &data);
setting->state.step_small = step_original;
}
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_first(setting, main->message);
- fake_print_error(setting, main->error, setting->state.status, macro_fake_f(f_console_parameter_process));
+ fake_print_error(setting, main->error, macro_fake_f(f_console_parameter_process));
return;
}
setting->state.status = fll_program_parameter_process_context(choices, modes, F_true, main);
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_first(setting, main->message);
- fake_print_error(setting, main->error, setting->state.status, macro_fake_f(fll_program_parameter_process_context));
+ fake_print_error(setting, main->error, macro_fake_f(fll_program_parameter_process_context));
return;
}
setting->state.status = fll_program_parameter_process_verbosity(choices, verbosity, F_true, main);
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_first(setting, main->message);
- fake_print_error(setting, main->error, setting->state.status, macro_fake_f(fll_program_parameter_process_verbosity));
+ fake_print_error(setting, main->error, macro_fake_f(fll_program_parameter_process_verbosity));
return;
}
// @todo fix this to print an error about the actual invalid character so that it can be investigated.
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_first(setting, main->message);
- if (fake_print_error_fallback(setting, main->error, setting->state.status, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
+ if (fake_print_error_fallback(setting, main->error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
fll_program_print_error_parameter_process(main->error, f_console_symbol_long_normal_s, names[i]);
}
if (cleanups[i]) {
setting->state.status = f_path_directory_cleanup(main->parameters.arguments.array[index], variable[i]);
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_first(setting, main->message);
if (main->error.verbosity > f_console_verbosity_quiet_e) {
fake_print_line_first(setting, main->message);
- if (fake_print_error_fallback(setting, main->error, setting->state.status, macro_fake_f(f_path_directory_cleanup)) == F_false) {
+ /*if (fake_print_error_fallback(setting, main->error, macro_fake_f(f_path_directory_cleanup)) == F_false) {
fll_program_print_error_parameter_process(main->error, f_console_symbol_long_normal_s, names[i]);
- }
+ }*/
}
return;
if (variable[i]->size) {
setting->state.status = f_string_dynamic_resize(0, variable[i]);
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_first(setting, main->message);
- fake_print_error(setting, main->error, setting->state.status, macro_fake_f(f_string_dynamic_resize));
+ fake_print_error(setting, main->error, macro_fake_f(f_string_dynamic_resize));
return;
}
if (variable[i]->size) {
setting->state.status = f_string_dynamic_resize(0, variable[i]);
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_first(setting, main->message);
- fake_print_error(setting, main->error, setting->state.status, macro_fake_f(f_string_dynamic_resize));
+ fake_print_error(setting, main->error, macro_fake_f(f_string_dynamic_resize));
return;
}
if (main->parameters.array[parameters[i]].result & f_console_result_value_e) {
setting->state.status = fll_program_parameter_additional_rip(main->parameters.arguments.array, main->parameters.array[parameters[i]].values, variable[i]);
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
if (main->error.verbosity > f_console_verbosity_quiet_e) {
fake_print_line_first(setting, main->message);
- if (fake_print_error_fallback(setting, main->error, setting->state.status, macro_fake_f(fll_program_parameter_additional_rip)) == F_false) {
+ /*if (fake_print_error_fallback(setting, main->error, macro_fake_f(fll_program_parameter_additional_rip)) == F_false) {
fll_program_print_error_parameter_process(main->error, f_console_symbol_long_normal_s, names[i]);
- }
+ }*/
}
return;
setting->state.status = f_utf_is_word_dash_plus(main->parameters.arguments.array[i].string + j, width_max, F_false);
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_first(setting, main->message);
// @todo fix this to print an error about the actual invalid character so that it can be investigated.
- if (fake_print_error_fallback(setting, main->error, setting->state.status, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
+ /*if (fake_print_error_fallback(setting, main->error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
fll_program_print_error_parameter_process(main->error, f_console_symbol_long_normal_s, names[i]);
- }
+ }*/
return;
}
setting->state.status = f_uint8s_increase_by(1, &setting->operations);
- if (F_status_is_error(main->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_first(setting, main->message);
- fake_print_error(setting, main->error, setting->state.status, macro_fake_f(f_uint8s_increase_by));
+ fake_print_error(setting, main->error, macro_fake_f(f_uint8s_increase_by));
return;
}
#endif // _di_fake_setting_load_
#ifndef _di_fake_setting_load_parameter_callback_
- void fake_setting_load_parameter_callback(const f_console_arguments_t arguments, void * const void_parameters, f_console_parameter_state_t * const state, void * const void_data) {
+ void fake_setting_load_parameter_callback(const f_console_arguments_t arguments, void * const void_parameters, f_console_parameter_state_t * const state_parameter, void * const void_data) {
- if (!state) return;
+ if (!state_parameter || !state_parameter->state) return;
- if (!void_parameters || !void_data || (state->type != f_console_parameter_state_type_simple_e && state->type != f_console_parameter_state_type_miss_e)) {
- state->state->status = F_process;
+ if (!void_parameters || !void_data || (state_parameter->type != f_console_parameter_state_type_simple_e && state_parameter->type != f_console_parameter_state_type_miss_e)) {
+ state_parameter->state->status = F_process;
return;
}
f_console_parameters_t * const parameters = (f_console_parameters_t * const) void_parameters;
fake_data_t * const data = (fake_data_t * const) void_data;
- state->state->status = f_uint8s_increase(fake_allocation_small_d, &data->setting->operations);
+ if (!data->setting) return;
- if (F_status_is_error(state->state->status)) {
- fake_print_line_first(setting, main->message);
+ state_parameter->state->status = f_uint8s_increase(state_parameter->state->step_small, &data->setting->operations);
+
+ if (F_status_is_error(state_parameter->state->status)) {
+ fake_print_line_first(data->setting, data->main->message);
- fake_print_error(data->setting, data->main->error, state->state->status, macro_fake_f(f_uint8s_increase));
+ fake_print_error(data->setting, data->main->error, macro_fake_f(f_uint8s_increase));
return;
}
- switch (state->at) {
+ switch (state_parameter->at) {
case fake_parameter_operation_build_e:
data->setting->operations.array[data->setting->operations.used++] = fake_operation_build_e;
data->setting->flag |= fake_main_flag_operation_build_e;
break;
default:
- state->state->status = F_process;
+ state_parameter->state->status = F_process;
return;
}
- state->state->status = F_none;
+ state_parameter->state->status = F_none;
}
#endif // _di_fake_setting_load_parameter_callback_
if (!main || !setting) return;
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_line_last(setting, main->message);
return;
fake_path_generate(&data);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_data_delete(&data);
return;
setting->state.status = f_string_dynamic_append(f_string_ascii_minus_s, &setting->fakefile);
}
- if (F_status_is_error(data->setting->state.status)) {
- fake_print_error(setting, main->error, setting->state.status, macro_fake_f(f_string_dynamic_append));
+ if (F_status_is_error(setting->state.status)) {
+ fake_print_error(setting, main->error, macro_fake_f(f_string_dynamic_append));
}
}
setting->state.status = F_status_set_error(F_file_not);
}
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
fake_print_error_file(
setting,
main->error,
main->signal_check = 0;
}
- if (F_status_is_error(data->setting->state.status)) break;
+ if (F_status_is_error(setting->state.status)) break;
} // for
}
}
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(setting->state.status)) {
if (F_status_set_fine(setting->state.status) == F_interrupt) {
fake_print_operation_cancelled(setting, main->message, data.operation);
}
#ifndef _di_fake_execute_
int fake_execute(fake_data_t * const data, const f_string_maps_t environment, const f_string_static_t program, const f_string_statics_t arguments) {
- if (!data) return;
+ if (!data || !data->main || !data->setting) return 1;
if (F_status_is_error(data->setting->state.status)) return 1;
if (data->main->error.verbosity >= f_console_verbosity_verbose_e) {
data->setting->state.status = f_file_size(path_file, F_true, &size_file);
if (F_status_is_error(data->setting->state.status)) {
- fake_print_error_file(data->setting, data->main->error, , macro_fake_f(f_file_size), path_file, f_file_operation_read_s, fll_error_file_type_file_e);
+ fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_size), path_file, f_file_operation_read_s, fll_error_file_type_file_e);
return;
}
#ifndef _di_fake_pipe_buffer_
void fake_pipe_buffer(fake_data_t * const data, f_string_dynamic_t * const buffer) {
- if (!data || !buffer) return;
+ if (!data || !data->main || !data->setting || !buffer) return;
f_file_t file = f_file_t_initialize;
if (fll_program_standard_signal_received(data->main)) {
fll_program_print_signal_received(data->main->warning, data->setting->line_first, data->main->signal_received);
- f_file_stream_read_block = F_status_set_error(F_interrupt);
+ data->setting->state.status = F_status_set_error(F_interrupt);
return;
}
#ifndef _di_fake_validate_parameter_paths_
void fake_validate_parameter_paths(fake_data_t * const data) {
- if (!data) return;
+ if (!data || !data->main || !data->setting) return;
if (!((++data->main->signal_check) % fake_signal_check_d)) {
if (fll_program_standard_signal_received(data->main)) {
data->setting->state.status = F_status_set_error(F_interrupt);
- return
+ return;
}
}
#include <program/fake/main/fake/path_generate.h>
#include <program/fake/main/make.h>
#include <program/fake/main/make/load_fakefile.h>
+#include <program/fake/main/make/load_parameters.h>
#include <program/fake/main/make/operate.h>
#include <program/fake/main/make/operate_block.h>
#include <program/fake/main/make/operate_process.h>
#ifndef _di_fake_path_generate_
void fake_path_generate(fake_data_t * const data) {
- if (!data) return;
+ if (!data || !data->main || !data->setting) return;
data->setting->state.status = F_none;
uint8_t i = 0;
for (i = 0; i < 2; ++i) {
- data->setting->state.status = fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]);
+ fake_path_generate_string_dynamic(data, sources[i], values[i], parameters_size[i]);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_path_generate_string_dynamic));
#ifndef _di_fake_path_generate_string_dynamic_
void fake_path_generate_string_dynamic(fake_data_t * const data, const f_string_dynamic_t source, f_string_dynamic_t *destination[], const uint8_t length) {
- if (!data) return;
+ if (!data || !data->main || !data->setting) return;
data->setting->state.status = F_none;
fll_program_standard_set_down(&data);
- if (setting.status == F_child) {
+ if (setting.state.status == F_child) {
exit(data.child);
}
#ifndef _di_fake_make_assure_inside_project_
void fake_make_assure_inside_project(fake_make_data_t * const data_make, const f_string_static_t path) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
data_make->cache_path.used = 0;
- data.setting.state.status = fll_path_canonical(path, &data_make->cache_path);
- if (F_status_is_error(data.setting.state.status)) return;
+ data_make->setting->state.status = fll_path_canonical(path, &data_make->cache_path);
+ if (F_status_is_error(data_make->setting->state.status)) return;
if (data_make->cache_path.used < data_make->path.stack.array[0].used) {
- data.setting.state.status = F_status_set_error(F_false);
+ data_make->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.setting.state.status = fl_string_dynamic_partial_compare(data_make->path.stack.array[0], data_make->cache_path, range, range);
- if (F_status_is_error(data.setting.state.status)) return;
+ data_make->setting->state.status = fl_string_dynamic_partial_compare(data_make->path.stack.array[0], data_make->cache_path, range, range);
+ if (F_status_is_error(data_make->setting->state.status)) return;
- if (data.setting.state.status) {
+ if (data_make->setting->state.status) {
if (data_make->cache_path.used == data_make->path.stack.array[0].used || data_make->cache_path.string[data_make->path.stack.array[0].used] == f_path_separator_s.string[0]) {
- data.setting.state.status = F_true;
+ data_make->setting->state.status = F_true;
return;
}
}
}
- data.setting.state.status = F_status_set_error(F_false);
+ data_make->setting->state.status = F_status_set_error(F_false);
}
#endif // _di_fake_make_assure_inside_project_
#ifndef _di_fake_make_get_id_
- void fake_make_get_id(fake_make_data_t * const data_make, const bool is_owner, const f_string_static_t buffer, void *id) {
+ f_number_unsigned_t fake_make_get_id(fake_make_data_t * const data_make, const bool is_owner, const f_string_static_t buffer) {
- if (!data || !id) return;
+ if (!data_make || !data_make->main || !data_make->setting) return 0;
if (!buffer.used) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_make_get_id));
data_make->setting->state.status = F_status_set_error(F_parameter);
- return;
+ return 0;
}
f_number_unsigned_t number = 0;
data_make->setting->state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, buffer, &number);
if (F_status_is_error(data_make->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->setting->state.status) == F_number) {
+ if (is_owner) {
+ uid_t uid = 0;
- data_make->setting->state.status = is_owner
- ? f_account_id_by_name(buffer, (uid_t *) id)
- : f_account_group_id_by_name(buffer, (gid_t *) id);
+ data_make->setting->state.status = f_account_id_by_name(buffer, &uid);
+ }
+ else {
+ gid_t gid = 0;
+
+ data_make->setting->state.status = f_account_group_id_by_name(buffer, &gid);
+ }
if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(
data_make->setting,
data_make->main->error,
- macro_fake_f(is_owner
- ? f_account_id_by_name
- : f_account_group_id_by_name
- )
+ is_owner
+ ? macro_fake_f(f_account_id_by_name)
+ : macro_fake_f(f_account_group_id_by_name)
);
}
else {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fl_conversion_dynamic_to_unsigned_detect));
}
- return;
+ return 0;
}
if (number > F_type_size_32_unsigned_d) {
fake_print_error_number_too_large(data_make->setting, data_make->main->error, buffer);
- data.setting.state.status = F_status_set_error(F_failure);
+ data_make->setting->state.status = F_status_set_error(F_failure);
- return;
+ return 0;
}
- *id = is_owner ? (uid_t) number : (gid_t) number;
+ return number;
}
#endif // _di_fake_make_get_id_
#ifndef _di_fake_make_get_id_mode_
void fake_make_get_id_mode(fake_make_data_t * const data_make, const f_string_static_t buffer, f_file_mode_t *mode, uint8_t *replace) {
- if (!data_make || !mode || !replace) return;
+ if (!data_make || !data_make->main || !data_make->setting || !mode || !replace) return;
if (!buffer.used) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_make_get_id_mode));
- data.setting.state.status = F_status_set_error(F_parameter);
+ data_make->setting->state.status = F_status_set_error(F_parameter);
return;
}
- data_make->setting->state.status = f_file_mode_from_string(buffer, data->main->umask, mode, replace);
+ data_make->setting->state.status = f_file_mode_from_string(buffer, data_make->main->umask, mode, replace);
if (F_status_is_error(data_make->setting->state.status)) {
if (F_status_set_fine(data_make->setting->state.status) == F_syntax) {
}
}
else {
- data.setting.state.status = F_none;
+ data_make->setting->state.status = F_none;
}
}
#endif // _di_fake_make_get_id_mode_
#ifndef _di_fake_make_path_relative_
void fake_make_path_relative(fake_make_data_t * const data_make, const f_string_static_t path) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
data_make->cache_path.used = 0;
if (!path.used || path.used == data_make->path.stack.array[0].used) {
- data.setting.state.status = F_none;
+ data_make->setting->state.status = F_none;
return;
}
if (path.used < data_make->path.stack.array[0].used) {
- data.setting.state.status = F_status_set_error(F_failure);
+ data_make->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.setting.state.status = f_string_dynamic_partial_append(path, range, &data_make->cache_path);
- if (F_status_is_error(data.setting.state.status)) return;
+ data_make->setting->state.status = f_string_dynamic_partial_append(path, range, &data_make->cache_path);
+ if (F_status_is_error(data_make->setting->state.status)) return;
- data.setting.state.status = f_string_dynamic_terminate(&data_make->cache_path);
- if (F_status_is_error(data.setting.state.status)) return;
+ data_make->setting->state.status = f_string_dynamic_terminate(&data_make->cache_path);
+ if (F_status_is_error(data_make->setting->state.status)) return;
- data.setting.state.status = F_none;
+ data_make->setting->state.status = F_none;
}
#endif // _di_fake_make_path_relative_
* F_parameter (with error bit) on invalid parameter.
*
* Errors (with error bit) from: fl_conversion_dynamic_to_unsigned_detect()
- * @param
+ * @param is_owner
+ * If TRUE, then buffer represents a UID.
+ * If FALSE, then buffer represents a GID.
* @param buffer
* The string containing the name or number.
- * @param id
+ *
+ * @return
* The detected owner id or group id.
- * When is_owner is TRUE, then this must be of type (uid_t *).
- * When is_owner is TRUE, then this must be of type (gid_t *).
+ * When is_owner is TRUE, then this should be cast to type (uid_t *).
+ * When is_owner is TRUE, then this should be cast to type (gid_t *).
+ * This is set to 0 on any error, check data_make.setting.state.status for error.
*
* @see fl_conversion_dynamic_to_unsigned_detect()
*/
#ifndef _di_fake_make_get_id_
- extern void fake_make_get_id(fake_make_data_t * const data_make, const bool is_owner, const f_string_static_t buffer, void *id);
+ extern f_number_unsigned_t fake_make_get_id(fake_make_data_t * const data_make, const bool is_owner, const f_string_static_t buffer);
#endif // _di_fake_make_get_id_
/**
#ifndef _di_fake_make_load_fakefile_
void fake_make_load_fakefile(fake_make_data_t * const data_make, const bool process_pipe) {
- if (!data_make) return;
- if (F_status_is_error(data->setting->state.status)) return;
+ if (!data_make || !data_make->data || !data_make->main || !data_make->setting) return;
+ if (F_status_is_error(data_make->setting->state.status)) return;
if (fll_program_standard_signal_received(data_make->main)) {
- fll_program_print_signal_received(data_make->main->warning, data_make->data->setting->line_first, data_make->main->signal_received);
+ fll_program_print_signal_received(data_make->main->warning, data_make->setting->line_first, data_make->main->signal_received);
- data->setting->state.status = F_status_set_error(F_interrupt);
+ data_make->setting->state.status = F_status_set_error(F_interrupt);
return;
}
if (process_pipe) {
fake_pipe_buffer(data_make->data, &data_make->buffer);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
data_make->buffer.used = 0;
}
else {
- data->setting->state.status = f_string_dynamic_append_assure(f_string_eol_s, &data_make->buffer);
+ data_make->setting->state.status = f_string_dynamic_append_assure(f_string_eol_s, &data_make->buffer);
}
}
- if (F_status_is_error_not(data->setting->state.status)) {
+ if (F_status_is_error_not(data_make->setting->state.status)) {
fake_file_buffer(data_make->data, data_make->data->file_data_build_fakefile, process_pipe ? F_false : F_true, &data_make->buffer);
}
- if (F_status_is_error(data->setting->state.status)) return;
+ if (F_status_is_error(data_make->setting->state.status)) return;
if (!data_make->buffer.used) {
fake_make_print_warning_fakefile_empty(data_make->setting, data_make->main->warning, data_make->data->file_data_build_fakefile);
f_string_range_t range = macro_f_string_range_t_initialize2(data_make->buffer.used);
f_fss_comments_t comments = f_fss_comments_t_initialize;
- fll_fss_basic_list_read(data_make->buffer, data->setting->state, &range, &list_objects, &list_contents, &delimits, 0, &comments);
+ fll_fss_basic_list_read(data_make->buffer, &range, &list_objects, &list_contents, &delimits, 0, &comments, &data_make->setting->state);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error_fss(data_make->setting, data_make->main->error, macro_fake_f(fll_fss_basic_list_read), data_make->data->file_data_build_fakefile, range, F_true);
}
else {
- data->setting->state.status = f_fss_apply_delimit(state, delimits, &data_make->buffer);
+ f_fss_apply_delimit(delimits, &data_make->buffer, &data_make->setting->state);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_fss_apply_delimit));
}
macro_f_fss_comments_t_delete_simple(comments);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
macro_f_fss_objects_t_delete_simple(list_objects);
macro_f_fss_contents_t_delete_simple(list_contents);
macro_f_fss_delimits_t_delete_simple(delimits);
f_fss_set_t settings = f_fss_set_t_initialize;
if (list_objects.used > data_make->fakefile.size) {
- macro_f_fss_nameds_t_resize((data->setting->state.status), data_make->fakefile, list_objects.used);
+ macro_f_fss_nameds_t_resize((data_make->setting->state.status), data_make->fakefile, list_objects.used);
}
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(macro_f_fss_nameds_t_resize));
macro_f_fss_set_t_delete_simple(settings);
if (!(i % fake_signal_check_short_d)) {
if (fll_program_standard_signal_received(data_make->main)) {
- fll_program_print_signal_received(data_make->main->warning, data_make->data->setting->line_first, data_make->main->signal_received);
+ fll_program_print_signal_received(data_make->main->warning, data_make->setting->line_first, data_make->main->signal_received);
- data->setting->state.status = F_status_set_error(F_interrupt);
+ data_make->setting->state.status = F_status_set_error(F_interrupt);
break;
}
delimits.used = 0;
content_range = list_contents.array[i].array[0];
- data->setting->state.status = fll_fss_extended_read(data_make->buffer, &content_range, &settings.objects, &settings.contents, 0, 0, &delimits, 0, &data->setting->state);
+ fll_fss_extended_read(data_make->buffer, &content_range, &settings.objects, &settings.contents, 0, 0, &delimits, 0, &data_make->setting->state);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error_fss(data_make->setting, data_make->main->error, macro_fake_f(fll_fss_extended_read), data_make->data->file_data_build_fakefile, content_range, F_true);
break;
}
- data->setting->state.status = f_fss_apply_delimit(state, delimits, &data_make->buffer);
+ f_fss_apply_delimit(delimits, &data_make->buffer, &data_make->setting->state);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_fss_apply_delimit));
break;
if (list_contents.array[i].used) {
content_range = list_contents.array[i].array[0];
- fll_fss_extended_read(data_make->buffer, &content_range, &data_make->fakefile.array[data_make->fakefile.used].objects, &data_make->fakefile.array[data_make->fakefile.used].contents, 0, &data_make->fakefile.array[data_make->fakefile.used].quotess, &delimits, 0, &data->setting->state);
+ fll_fss_extended_read(data_make->buffer, &content_range, &data_make->fakefile.array[data_make->fakefile.used].objects, &data_make->fakefile.array[data_make->fakefile.used].contents, 0, &data_make->fakefile.array[data_make->fakefile.used].quotess, &delimits, 0, &data_make->setting->state);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error_fss(data_make->setting, data_make->main->error, macro_fake_f(fll_fss_extended_read), data_make->data->file_data_build_fakefile, content_range, F_true);
break;
}
- data->setting->state.status = f_fss_apply_delimit(state, delimits, &data_make->buffer);
+ f_fss_apply_delimit(delimits, &data_make->buffer, &data_make->setting->state);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_fss_apply_delimit));
break;
macro_f_fss_contents_t_delete_simple(list_contents);
macro_f_fss_delimits_t_delete_simple(delimits);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
macro_f_fss_set_t_delete_simple(settings);
return;
if (missing_main) {
fake_make_print_error_fakefile_section_missing(data_make->setting, data_make->main->warning, data_make->data->file_data_build_fakefile, fake_make_item_main_s);
- data->setting->state.status = F_status_set_error(F_failure);
+ data_make->setting->state.status = F_status_set_error(F_failure);
macro_f_fss_set_t_delete_simple(settings);
{
f_string_t function_name = macro_fake_f(macro_f_string_map_multis_t_resize);
- data->setting->state.status = f_string_map_multis_resize(data->setting->state.step_small, &data_make->setting_make.parameter);
+ data_make->setting->state.status = f_string_map_multis_resize(data_make->setting->state.step_small, &data_make->setting_make.parameter);
- if (F_status_is_error_not(data->setting->state.status)) {
+ if (F_status_is_error_not(data_make->setting->state.status)) {
data_make->setting_make.parameter.used = 1;
function_name = macro_fake_f(f_string_dynamic_append);
- data->setting->state.status = f_string_dynamic_append(fake_make_setting_return_s, &data_make->setting_make.parameter.array[0].name);
+ data_make->setting->state.status = f_string_dynamic_append(fake_make_setting_return_s, &data_make->setting_make.parameter.array[0].name);
}
- if (F_status_is_error_not(data->setting->state.status)) {
+ if (F_status_is_error_not(data_make->setting->state.status)) {
function_name = macro_fake_f(f_string_dynamics_resize);
- data->setting->state.status = f_string_dynamics_resize(1, &data_make->setting_make.parameter.array[0].value);
+ data_make->setting->state.status = f_string_dynamics_resize(1, &data_make->setting_make.parameter.array[0].value);
}
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, function_name);
macro_f_fss_set_t_delete_simple(settings);
fake_make_load_fakefile_setting_compiler(data_make, &settings.objects.array[i], &settings.contents.array[i], &range_compiler);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_environment_s.string, data_make->buffer, fake_make_setting_environment_s.used, settings.objects.array[i]) == F_equal_to) {
- data->setting->state.status = fake_make_load_fakefile_setting_environment(data_make, &settings.contents.array[i]);
- if (F_status_is_error(data->setting->state.status)) break;
+ fake_make_load_fakefile_setting_environment(data_make, &settings.contents.array[i]);
+ if (F_status_is_error(data_make->setting->state.status)) break;
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_fail_s.string, data_make->buffer, fake_make_setting_fail_s.used, settings.objects.array[i]) == F_equal_to) {
fake_make_load_fakefile_setting_fail(data_make, &settings.objects.array[i], &settings.contents.array[i]);
fake_make_load_fakefile_setting_indexer(data_make, &settings.objects.array[i], &settings.contents.array[i], &range_indexer);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_parameter_s.string, data_make->buffer, fake_make_setting_parameter_s.used, settings.objects.array[i]) == F_equal_to) {
- data->setting->state.status = fake_make_load_fakefile_setting_parameter(data_make, &settings.objects.array[i], &settings.contents.array[i]);
- if (F_status_is_error(data->setting->state.status)) break;
+ fake_make_load_fakefile_setting_parameter(data_make, &settings.objects.array[i], &settings.contents.array[i]);
+ if (F_status_is_error(data_make->setting->state.status)) break;
}
} // for
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
macro_f_fss_set_t_delete_simple(settings);
return;
}
}
- if (F_status_is_error_not(data->setting->state.status) && data_make->setting_make.load_build) {
+ if (F_status_is_error_not(data_make->setting->state.status) && data_make->setting_make.load_build) {
fake_build_load_setting(data_make->data, 0, F_false, &data_make->setting_build);
- if (F_status_is_error(data->setting->state.status) && data->setting->state.status != F_status_set_error(F_interrupt)) {
+ if (F_status_is_error(data_make->setting->state.status) && data_make->setting->state.status != F_status_set_error(F_interrupt)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_build_load_setting));
}
}
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
macro_f_fss_set_t_delete_simple(settings);
return;
if (range_compiler) {
data_make->setting_build.build_compiler.used = 0;
- data->setting->state.status = f_string_dynamic_partial_append(data_make->buffer, *range_compiler, &data_make->setting_build.build_compiler);
+ data_make->setting->state.status = f_string_dynamic_partial_append(data_make->buffer, *range_compiler, &data_make->setting_build.build_compiler);
}
- if (F_status_is_error_not(data->setting->state.status) && range_indexer) {
+ if (F_status_is_error_not(data_make->setting->state.status) && range_indexer) {
data_make->setting_build.build_indexer.used = 0;
- data->setting->state.status = f_string_dynamic_partial_append(data_make->buffer, *range_indexer, &data_make->setting_build.build_indexer);
+ data_make->setting->state.status = f_string_dynamic_partial_append(data_make->buffer, *range_indexer, &data_make->setting_build.build_indexer);
}
- if (F_status_is_error(data->setting->state.status)) {
- if (F_status_set_fine(data->setting->state.status) != F_interrupt) {
+ if (F_status_is_error(data_make->setting->state.status)) {
+ if (F_status_set_fine(data_make->setting->state.status) != F_interrupt) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append));
}
return;
}
- data->setting->state.status = fake_make_load_fakefile_setting_define_and_parameter(data_make->data, data_make, &settings);
+ fake_make_load_fakefile_setting_define_and_parameter(data_make, &settings);
macro_f_fss_set_t_delete_simple(settings);
}
- data->setting->state.status = F_none;
+ data_make->setting->state.status = F_none;
}
#endif // _di_fake_make_load_fakefile_
#ifndef _di_fake_make_load_fakefile_setting_build_
void fake_make_load_fakefile_setting_build(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
- if (!data_make || !object || !content) return;
+ if (!data_make || !data_make->data || !data_make->main || !data_make->setting || !object || !content) return;
if (content->used) {
if (fl_string_dynamic_partial_compare_string(fake_common_setting_bool_yes_s.string, data_make->buffer, fake_common_setting_bool_yes_s.used, content->array[0]) == F_equal_to) {
#ifndef _di_fake_make_load_fakefile_setting_compiler_
void fake_make_load_fakefile_setting_compiler(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_compiler) {
- if (!data_make || !object || !content || !range_compiler) return;
+ if (!data_make || !data_make->data || !data_make->main || !data_make->setting || !object || !content || !range_compiler) return;
if (content->used) {
*range_compiler = &content->array[content->used - 1];
#endif // _di_fake_make_load_fakefile_setting_compiler_
#ifndef _di_fake_make_load_fakefile_setting_define_and_parameter_
- void fake_make_load_fakefile_setting_define_and_parameter(fake_data_t * const data, fake_make_data_t * const data_make, f_fss_set_t * const settings) {
+ void fake_make_load_fakefile_setting_define_and_parameter(fake_make_data_t * const data_make, f_fss_set_t * const settings) {
- if (!data || !data_make || !settings) return;
+ if (!data_make || !data_make->data || !data_make->data || !data_make->main || !data_make->setting || !settings) return;
;
f_string_map_multis_t define = f_string_map_multis_t_initialize;
// Load the fakefile "settings" as if they are build "settings".
- fake_build_load_setting_process(data, F_false, data->file_data_build_fakefile, 0, data_make->buffer, settings->objects, settings->contents, &data_make->setting_build);
+ fake_build_load_setting_process(data_make->data, F_false, data_make->data->file_data_build_fakefile, 0, data_make->buffer, settings->objects, settings->contents, &data_make->setting_build);
- if (F_status_is_error_not(data->setting->state.status) && settings->objects.used) {
+ if (F_status_is_error_not(data_make->setting->state.status) && settings->objects.used) {
const f_string_static_t settings_name[] = {
fake_make_setting_define_s,
fake_make_setting_parameter_s,
&data_make->setting_make.parameter,
};
- data->setting->state.status = fll_fss_snatch_map_apart(data_make->buffer, settings->objects, settings->contents, settings_name, 2, settings_value, 0, 0);
+ data_make->setting->state.status = fll_fss_snatch_map_apart(data_make->buffer, settings->objects, settings->contents, settings_name, 2, settings_value, 0, 0);
- if (F_status_is_error(data->setting->state.status)) {
- fake_print_error(data->setting, data->main->error, macro_fake_f(fll_fss_snatch_map_apart));
+ if (F_status_is_error(data_make->setting->state.status)) {
+ fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fll_fss_snatch_map_apart));
f_string_map_multis_resize(0, &define);
fake_make_operate_validate_define_name(define.array[i].name);
- if (data->setting->state.status) {
+ if (data_make->setting->state.status) {
combined.used = 0;
for (j = 0; j < define.array[i].value.used; ++j) {
- data->setting->state.status = f_string_dynamic_mash(f_string_space_s, define.array[i].value.array[j], &combined);
+ data_make->setting->state.status = f_string_dynamic_mash(f_string_space_s, define.array[i].value.array[j], &combined);
- if (F_status_is_error(data->setting->state.status)) {
- fake_print_error(data->setting, data->main->error, macro_fake_f(f_string_dynamic_mash));
+ if (F_status_is_error(data_make->setting->state.status)) {
+ fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_mash));
break;
}
} // for
- if (F_status_is_error(data->setting->state.status)) break;
+ if (F_status_is_error(data_make->setting->state.status)) break;
- data->setting->state.status = f_environment_set(define.array[i].name, combined, F_true);
+ data_make->setting->state.status = f_environment_set(define.array[i].name, combined, F_true);
- if (F_status_is_error(data->setting->state.status)) {
- fake_print_error(data->setting, data->main->error, macro_fake_f(f_environment_set));
+ if (F_status_is_error(data_make->setting->state.status)) {
+ fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_environment_set));
break;
}
else {
fake_make_print_error_define_invalid_character(data_make->setting, data_make->main->error, define.array[i].name);
- data->setting->state.status = F_status_set_error(F_failure);
+ data_make->setting->state.status = F_status_set_error(F_failure);
break;
}
f_string_map_multis_resize(0, &define);
- if (F_status_is_error(data->setting->state.status)) return;
+ if (F_status_is_error(data_make->setting->state.status)) return;
- data->setting->state.status = F_none;
+ data_make->setting->state.status = F_none;
}
#endif // _di_fake_make_load_fakefile_setting_define_and_parameter_
#ifndef _di_fake_make_load_fakefile_setting_environment_
void fake_make_load_fakefile_setting_environment(fake_make_data_t * const data_make, f_fss_content_t * const content) {
+ if (!data_make || !data_make->data || !data_make->data || !data_make->main || !data_make->setting || !content) return;
+
f_string_dynamic_t name_define = f_string_dynamic_t_initialize;
f_array_length_t i = 0;
for (; i < content->used; ++i) {
- data->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[i], &name_define);
+ data_make->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[i], &name_define);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
} // for
if (j == data_make->setting_build.environment.used) {
- data->setting->state.status = f_string_dynamics_increase(fake_allocation_small_d, &data_make->setting_build.environment);
+ data_make->setting->state.status = f_string_dynamics_increase(fake_allocation_small_d, &data_make->setting_build.environment);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
data_make->setting_build.environment.array[j].used = 0;
- data->setting->state.status = f_string_dynamic_increase_by(name_define.used + 1, &data_make->setting_build.environment.array[j]);
+ data_make->setting->state.status = f_string_dynamic_increase_by(name_define.used + 1, &data_make->setting_build.environment.array[j]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
- data->setting->state.status = f_string_dynamic_append_nulless(name_define, &data_make->setting_build.environment.array[j]);
+ data_make->setting->state.status = f_string_dynamic_append_nulless(name_define, &data_make->setting_build.environment.array[j]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
data_make->setting_build.environment.array[j].used = 0;
- data->setting->state.status = f_string_dynamic_append_nulless(name_define, &data_make->setting_build.environment.array[j]);
+ data_make->setting->state.status = f_string_dynamic_append_nulless(name_define, &data_make->setting_build.environment.array[j]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
f_string_dynamic_resize(0, &name_define);
- if (F_status_is_error(data->setting->state.status)) return;
+ if (F_status_is_error(data_make->setting->state.status)) return;
- data->setting->state.status = F_none;
+ data_make->setting->state.status = F_none;
}
#endif // _di_fake_make_load_fakefile_setting_environment_
#ifndef _di_fake_make_load_fakefile_setting_fail_
void fake_make_load_fakefile_setting_fail(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
+ if (!data_make || !data_make->data || !data_make->data || !data_make->main || !data_make->setting || !object || !content) return;
+
if (content->used) {
if (fl_string_dynamic_partial_compare_string(fake_make_operation_argument_exit_s.string, data_make->buffer, fake_make_operation_argument_exit_s.used, content->array[content->used - 1]) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_exit_e;
#ifndef _di_fake_make_load_fakefile_setting_indexer_
void fake_make_load_fakefile_setting_indexer(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content, f_string_range_t **range_indexer) {
+ if (!data_make || !data_make->data || !data_make->data || !data_make->main || !data_make->setting || !object || !content || !range_indexer) return;
+
if (content->used) {
*range_indexer = &content->array[content->used - 1];
#ifndef _di_fake_make_load_fakefile_setting_parameter_
void fake_make_load_fakefile_setting_parameter(fake_make_data_t * const data_make, f_fss_object_t * const object, f_fss_content_t * const content) {
+ if (!data_make || !data_make->data || !data_make->data || !data_make->main || !data_make->setting || !object || !content) return;
+
if (content->used) {
if (fl_string_dynamic_partial_compare_string(fake_make_setting_return_s.string, data_make->buffer, fake_make_setting_return_s.used, content->array[0]) == F_equal_to) {
if (content->used > 1) {
for (f_array_length_t i = 1; i < content->used; ++i) {
- data->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[i], &data_make->setting_make.parameter.array[0].value.array[0]);
+ data_make->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[i], &data_make->setting_make.parameter.array[0].value.array[0]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
- data->setting->state.status = f_string_dynamic_append_assure(f_string_space_s, &data_make->setting_make.parameter.array[0].value.array[0]);
+ data_make->setting->state.status = f_string_dynamic_append_assure(f_string_space_s, &data_make->setting_make.parameter.array[0].value.array[0]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
} // for
- if (F_status_is_error(data->setting->state.status)) return;
+ if (F_status_is_error(data_make->setting->state.status)) return;
}
}
}
fake_make_print_warning_setting_content_empty(data_make->setting, data_make->main->warning, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_return_s);
}
- data->setting->state.status = F_none;
+ data_make->setting->state.status = F_none;
}
#endif // _di_fake_make_load_fakefile_setting_parameter_
/**
* Load the fakefile setting "parameter".
*
- * @param data
- * The program data.
+ * @param data_make
+ * All make related setting data, including data from the fakefile and the build settings file.
*
* This alters data_make.setting.state.status:
* F_none on success.
* Errors (with error bit) from: f_environment_set().
* Errors (with error bit) from: f_string_dynamic_mash_nulless().
* Errors (with error bit) from: fll_fss_snatch_map_apart().
- * @param data_make
- * All make related setting data, including data from the fakefile and the build settings file.
* @param settings
* The settings data.
*
* @see fll_fss_snatch_map_apart()
*/
#ifndef _di_fake_make_load_fakefile_setting_define_and_parameter_
- extern void fake_make_load_fakefile_setting_define_and_parameter(fake_data_t * const data, fake_make_data_t * const data_make, f_fss_set_t * const settings);
+ extern void fake_make_load_fakefile_setting_define_and_parameter(fake_make_data_t * const data_make, f_fss_set_t * const settings);
#endif // _di_fake_make_load_fakefile_setting_define_and_parameter_
/**
#endif
#ifndef _di_fake_make_load_parameters_
- void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t * const status) {
+ void fake_make_load_parameters(fake_make_data_t * const data_make) {
- if (F_status_is_error(*status)) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
+ if (F_status_is_error(data_make->setting->state.status)) return;
if (data_make->main->context.mode != f_color_mode_none_e) {
- *status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter.color);
+ data_make->setting->state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter.color);
- if (F_status_is_error_not(*status)) {
- *status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter_option.color);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter_option.color);
}
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
if (data_make->main->context.mode == f_color_mode_not_e) {
if (data_make->main->parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ data_make->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->parameters.array[fake_parameter_no_color_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ data_make->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(*status)) {
- *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(data_make->setting->state.status)) {
+ data_make->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->context.mode == f_color_mode_dark_e) {
if (data_make->main->parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ data_make->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->parameters.array[fake_parameter_dark_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ data_make->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(*status)) {
- *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(data_make->setting->state.status)) {
+ data_make->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->parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ data_make->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->parameters.array[fake_parameter_light_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
+ data_make->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(*status)) {
- *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->setting->state.status)) {
+ data_make->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(*status)) {
- *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(data_make->setting->state.status)) {
+ data_make->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(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append));
return;
}
if (data_make->main->error.verbosity != f_console_verbosity_normal_e) {
- *status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter.verbosity);
+ data_make->setting->state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter.verbosity);
- if (F_status_is_error_not(*status)) {
- *status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter_option.verbosity);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->parameter_option.verbosity);
}
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
if (data_make->main->error.verbosity == f_console_verbosity_quiet_e) {
if (data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ data_make->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->parameters.array[fake_parameter_verbosity_quiet_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ data_make->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(*status)) {
- *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(data_make->setting->state.status)) {
+ data_make->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->error.verbosity == f_console_verbosity_error_e) {
if (data_make->main->parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ data_make->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->parameters.array[fake_parameter_verbosity_error_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ data_make->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(*status)) {
- *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(data_make->setting->state.status)) {
+ data_make->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->error.verbosity >= f_console_verbosity_verbose_e) {
if (data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ data_make->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->parameters.array[fake_parameter_verbosity_verbose_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ data_make->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(*status)) {
- *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(data_make->setting->state.status)) {
+ data_make->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->parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_normal_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ data_make->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->parameters.array[fake_parameter_verbosity_debug_e].flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
+ data_make->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(*status)) {
- *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->setting->state.status)) {
+ data_make->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(*status)) {
- *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(data_make->setting->state.status)) {
+ data_make->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(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append));
return;
for (j = 0; j < source[i].used; ++j) {
if (destination[i]->used + 2 > destination[i]->size) {
- *status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
+ data_make->setting->state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
- *status = f_string_dynamics_increase(fake_allocation_small_d, destination_option[i]);
+ data_make->setting->state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_option[i]);
- if (F_status_is_error_not(*status)) {
- *status = f_string_dynamics_increase(fake_allocation_small_d, destination_value[i]);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_value[i]);
}
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
return;
}
if (console[i]->flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append_nulless(f_console_symbol_short_normal_s, &destination[i]->array[destination[i]->used]);
+ data_make->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) {
- *status = f_string_dynamic_append_nulless(f_console_symbol_short_inverse_s, &destination[i]->array[destination[i]->used]);
+ data_make->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(*status)) {
- *status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]);
}
- if (F_status_is_error_not(*status)) {
- *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(data_make->setting->state.status)) {
+ data_make->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(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return;
++destination[i]->used;
++destination_option[i]->used;
- *status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
+ data_make->setting->state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
- *status = f_string_dynamic_append_nulless(source[i].array[j], &destination[i]->array[destination[i]->used]);
+ data_make->setting->state.status = f_string_dynamic_append_nulless(source[i].array[j], &destination[i]->array[destination[i]->used]);
- if (F_status_is_error_not(*status)) {
- *status = f_string_dynamic_append_nulless(source[i].array[j], &destination_value[i]->array[destination_value[i]->used]);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->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(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return;
if (!(console[i]->result & f_console_result_found_e)) continue;
if (destination[i]->used + 2 > destination[i]->size) {
- *status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
+ data_make->setting->state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
}
- *status = f_string_dynamics_increase(fake_allocation_small_d, destination_option[i]);
+ data_make->setting->state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_option[i]);
- if (F_status_is_error_not(*status)) {
- *status = f_string_dynamics_increase(fake_allocation_small_d, destination_value[i]);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamics_increase(fake_allocation_small_d, destination_value[i]);
}
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
return;
}
if (console[i]->flag & f_console_flag_normal_e) {
- *status = f_string_dynamic_append_nulless(f_console_symbol_short_normal_s, &destination[i]->array[destination[i]->used]);
+ data_make->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) {
- *status = f_string_dynamic_append_nulless(f_console_symbol_short_inverse_s, &destination[i]->array[destination[i]->used]);
+ data_make->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(*status)) {
- *status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamic_append_nulless(parameter[i], &destination[i]->array[destination[i]->used]);
}
- if (F_status_is_error_not(*status)) {
- *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(data_make->setting->state.status)) {
+ data_make->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(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return;
++destination[i]->used;
++destination_option[i]->used;
- *status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
+ data_make->setting->state.status = f_string_dynamics_increase_by(fake_allocation_small_d, destination[i]);
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
}
- *status = f_string_dynamic_append_nulless(source[i], &destination[i]->array[destination[i]->used]);
+ data_make->setting->state.status = f_string_dynamic_append_nulless(source[i], &destination[i]->array[destination[i]->used]);
- if (F_status_is_error_not(*status)) {
- *status = f_string_dynamic_append_nulless(source[i], &destination_value[i]->array[destination_value[i]->used]);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamic_append_nulless(source[i], &destination_value[i]->array[destination_value[i]->used]);
}
- if (F_status_is_error(*status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
return;
*
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
- * @param status
- * The return status.
*
- * F_none on success.
+ * This alters data_make.settings.state.status:
+ * F_none on success.
*
- * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal.
+ * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal.
*
- * Status codes (with error bit) are returned on any problem.
+ * Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_load_parameters_
- extern void fake_make_load_parameters(fake_make_data_t * const data_make, f_status_t * const status);
+ extern void fake_make_load_parameters(fake_make_data_t * const data_make);
#endif // _di_fake_make_load_parameters_
#ifdef __cplusplus
#ifndef _di_fake_make_operate_
void fake_make_operate(fake_data_t * const data) {
- if (!data) return;
+ if (!data || !data->main || !data->setting) return;
if (!((++data->main->signal_check) % fake_signal_check_d)) {
if (fll_program_standard_signal_received(data->main)) {
data_make.main = data->main;
data_make.setting = data->setting;
- data->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make.path.stack);
+ data->setting->state.status = f_string_dynamics_increase(data->setting->state.step_small, &data_make.path.stack);
if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data_make.setting, data_make.main->error, macro_fake_f(f_string_dynamics_increase));
if (fl_string_dynamic_partial_compare(data->main->parameters.arguments.array[index], data_make.buffer, range, data_make.fakefile.array[j].name) == F_equal_to) {
{
- int result = fake_make_operate_section(&data_make, j, §ion_stack,);
+ int result = fake_make_operate_section(&data_make, j, §ion_stack);
if (data->setting->state.status == F_child) {
data->main->child = result;
#ifndef _di_fake_make_operate_expand_
void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_uint8s_t quotes) {
- if (!data_make) return;
- if (F_status_is_error(data->setting->state.status)) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
+ if (F_status_is_error(data_make->setting->state.status)) return;
if (!content.used) return;
// Pre-allocate the known arguments size.
- data->setting->state.status = f_string_dynamics_increase_by(content.used, &data_make->cache_arguments);
+ data_make->setting->state.status = f_string_dynamics_increase_by(content.used, &data_make->cache_arguments);
- if (F_status_is_error(data->setting->state.status) || data->setting->state.status == F_string_too_large) {
+ if (F_status_is_error(data_make->setting->state.status) || data_make->setting->state.status == F_string_too_large) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase_by));
return;
&data_make->parameter_value.work,
};
- data->setting->state.flag = 0;
- data->setting->state.handle = 0;
- data->setting->state.data = 0;
+ data_make->setting->state.flag = 0;
+ data_make->setting->state.handle = 0;
+ data_make->setting->state.data = 0;
- data->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
+ data_make->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
return;
if (quotes.array[i]) {
++data_make->cache_arguments.used;
- data->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
+ data_make->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
range = content.array[i];
- data->setting->state.status = fl_iki_read(&data_make->buffer, &range, iki_data, state);
+ fl_iki_read(&data_make->buffer, &range, iki_data, &data_make->setting->state);
- if (F_status_is_error(data->setting->state.status)) {
- if (F_status_set_fine(data->setting->state.status) != F_interrupt) {
+ if (F_status_is_error(data_make->setting->state.status)) {
+ if (F_status_set_fine(data_make->setting->state.status) != F_interrupt) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fl_iki_read));
}
range.start = content.array[i].start;
range.stop = iki_data->variable.array[0].start - 1;
- data->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
is = 0;
- data->setting->state.status = fl_string_dynamic_partial_compare_string(vocabulary_define.string, data_make->buffer, vocabulary_define.used, iki_data->vocabulary.array[j]);
+ data_make->setting->state.status = fl_string_dynamic_partial_compare_string(vocabulary_define.string, data_make->buffer, vocabulary_define.used, iki_data->vocabulary.array[j]);
- if (data->setting->state.status == F_equal_to) {
+ if (data_make->setting->state.status == F_equal_to) {
is = 2;
iki_type |= 0x2;
}
- else if (data->setting->state.status == F_equal_to_not) {
- data->setting->state.status = fl_string_dynamic_partial_compare_string(vocabulary_parameter.string, data_make->buffer, vocabulary_parameter.used, iki_data->vocabulary.array[j]);
+ else if (data_make->setting->state.status == F_equal_to_not) {
+ data_make->setting->state.status = fl_string_dynamic_partial_compare_string(vocabulary_parameter.string, data_make->buffer, vocabulary_parameter.used, iki_data->vocabulary.array[j]);
- if (data->setting->state.status == F_equal_to) {
+ if (data_make->setting->state.status == F_equal_to) {
is = 1;
iki_type |= 0x1;
}
- else if (data->setting->state.status == F_equal_to_not) {
- data->setting->state.status = fl_string_dynamic_partial_compare_string(vocabulary_context.string, data_make->buffer, vocabulary_context.used, iki_data->vocabulary.array[j]);
+ else if (data_make->setting->state.status == F_equal_to_not) {
+ data_make->setting->state.status = fl_string_dynamic_partial_compare_string(vocabulary_context.string, data_make->buffer, vocabulary_context.used, iki_data->vocabulary.array[j]);
- if (data->setting->state.status == F_equal_to) {
+ if (data_make->setting->state.status == F_equal_to) {
is = 3;
iki_type |= 0x4;
}
}
}
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fl_string_dynamic_partial_compare));
break;
if (fl_string_dynamic_partial_compare_string(fake_make_parameter_variable_return_s.string, data_make->buffer, fake_make_parameter_variable_return_s.used, iki_data->content.array[j]) == F_equal_to) {
if (data_make->setting_make.parameter.array[0].value.array[0].used) {
- data->setting->state.status = f_string_dynamic_append_nulless(data_make->setting_make.parameter.array[0].value.array[0], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append_nulless(data_make->setting_make.parameter.array[0].value.array[0], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
}
}
else {
- data->setting->state.status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
else if (fl_string_dynamic_partial_compare_string(fake_make_parameter_variable_top_s.string, data_make->buffer, fake_make_parameter_variable_top_s.used, iki_data->content.array[j]) == F_equal_to) {
if (data_make->path.stack.used) {
- data->setting->state.status = f_string_dynamic_increase_by(data_make->path.stack.array[0].used + f_path_separator_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_increase_by(data_make->path.stack.array[0].used + f_path_separator_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
- data->setting->state.status = f_string_dynamic_append(data_make->path.stack.array[0], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append(data_make->path.stack.array[0], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
}
// For safe path handling, always append the trailing slash.
- data->setting->state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_assure));
break;
else if (fl_string_dynamic_partial_compare_string(fake_make_parameter_variable_current_s.string, data_make->buffer, fake_make_parameter_variable_current_s.used, iki_data->content.array[j]) == F_equal_to) {
if (data_make->path.stack.used) {
- data->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->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->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->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
- data->setting->state.status = f_string_dynamic_append(data_make->path.stack.array[data_make->path.stack.used - 1], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append(data_make->path.stack.array[data_make->path.stack.used - 1], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
}
// For safe path handling, always append the trailing slash.
- data->setting->state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_assure));
break;
} // for
} // for
- data->setting->state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
if (!reserved_value[k]->array[l].used) continue;
if (separate) {
- data->setting->state.status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
}
}
- data->setting->state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
if (separate) {
++data_make->cache_arguments.used;
- data->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
+ data_make->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
data_make->cache_arguments.array[data_make->cache_arguments.used].used = 0;
}
- data->setting->state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
break;
} // for
- if (F_status_is_error(data->setting->state.status)) break;
+ if (F_status_is_error(data_make->setting->state.status)) break;
}
- if (unmatched && F_status_is_error_not(data->setting->state.status)) {
+ if (unmatched && F_status_is_error_not(data_make->setting->state.status)) {
for (k = 0; k < parameter->used; ++k) {
// Check against IKI variable list.
} // for
} // for
- data->setting->state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_increase_by));
break;
if (separate) {
if (quotes.array[i]) {
- data->setting->state.status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append));
break;
else {
++data_make->cache_arguments.used;
- data->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
+ data_make->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
}
}
- data->setting->state.status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append_nulless));
break;
separate = F_true;
} // for
- if (F_status_is_error(data->setting->state.status)) break;
+ if (F_status_is_error(data_make->setting->state.status)) break;
}
break;
} // for
}
- if (F_status_is_error(data->setting->state.status)) break;
+ if (F_status_is_error(data_make->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->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_make_operate_expand_build));
break;
}
- if (data->setting->state.status == F_true) {
+ if (data_make->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->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_make_operate_expand_environment));
break;
}
- if (data->setting->state.status == F_true) {
+ if (data_make->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->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->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->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
} // for
- if (F_status_is_error(data->setting->state.status)) break;
+ if (F_status_is_error(data_make->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->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->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->cache_arguments.used;
- data->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
+ data_make->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
}
}
else {
- data->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, content.array[i], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, content.array[i], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
++data_make->cache_arguments.used;
- data->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
+ data_make->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamics_increase));
break;
data_make->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
}
- if (F_status_is_error(data->setting->state.status)) return;
+ if (F_status_is_error(data_make->setting->state.status)) return;
if (data_make->cache_1.used) {
data_make->setting->state.status = F_true;
#ifndef _di_fake_make_operate_expand_context_
void fake_make_operate_expand_context(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
const f_string_static_t *context = 0;
} // for
if (context) {
- data->setting->state.status = f_string_dynamic_append_nulless(*context, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
- if (F_status_is_error(data->setting->state.status)) return;
+ data_make->setting->state.status = f_string_dynamic_append_nulless(*context, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ if (F_status_is_error(data_make->setting->state.status)) return;
}
- data->setting->state.status = F_true;
+ data_make->setting->state.status = F_true;
}
#endif // _di_fake_make_operate_expand_context_
#ifndef _di_fake_make_operate_expand_environment_
void fake_make_operate_expand_environment(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
- data->setting->state.status = F_none;
+ data_make->setting->state.status = F_none;
data_make->cache_1.used = 0;
data_make->cache_2.used = 0;
- data->setting->state.status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 2, &data_make->cache_1);
+ data_make->setting->state.status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 2, &data_make->cache_1);
- if (F_status_is_error_not(data->setting->state.status)) {
- data->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range_name, &data_make->cache_1);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range_name, &data_make->cache_1);
}
- if (F_status_is_error_not(data->setting->state.status)) {
- data->setting->state.status = f_environment_get(data_make->cache_1, &data_make->cache_2);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_environment_get(data_make->cache_1, &data_make->cache_2);
}
if (F_status_is_error(data_make->setting->state.status)) return;
- if (data->setting->state.status == F_exist_not) {
- data->setting->state.status = F_false;
+ if (data_make->setting->state.status == F_exist_not) {
+ data_make->setting->state.status = F_false;
return;
}
- data->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
+ data_make->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
- if (F_status_is_error_not(data->setting->state.status)) {
- data->setting->state.status = f_string_dynamic_increase_by(data_make->cache_2.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamic_increase_by(data_make->cache_2.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
}
- if (F_status_is_error_not(data->setting->state.status)) {
- data->setting->state.status = f_string_dynamic_append_nulless(data_make->cache_2, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = f_string_dynamic_append_nulless(data_make->cache_2, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
}
if (F_status_is_error(data_make->setting->state.status)) return;
if (!quote) {
++data_make->cache_arguments.used;
- data->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
+ data_make->setting->state.status = f_string_dynamics_increase(data_make->setting->state.step_small, &data_make->cache_arguments);
if (F_status_is_error(data_make->setting->state.status)) return;
}
- data->setting->state.status = data_make->cache_2.used ? F_true : F_data_not;
+ data_make->setting->state.status = data_make->cache_2.used ? F_true : F_data_not;
}
#endif // _di_fake_make_operate_expand_environment_
#ifndef _di_fake_make_operate_section_
int fake_make_operate_section(fake_make_data_t * const data_make, const f_array_length_t id_section, f_array_lengths_t * const section_stack) {
- if (!data_make || !section_stack) return 0;
- if (F_status_is_error(data->setting->state.status) || data->setting->state.status == F_child) return data_make->data->main->child;
+ if (!data_make || !data_make->main || !data_make->setting || !section_stack) return 0;
+ if (F_status_is_error(data_make->setting->state.status) || data_make->setting->state.status == F_child) return data_make->main->child;
if (id_section >= data_make->fakefile.used) {
- data->setting->state.status = F_status_set_error(F_parameter);
+ data_make->setting->state.status = F_status_set_error(F_parameter);
fake_print_error(data_make->setting, data_make->error, macro_fake_f(fake_make_operate_section));
}
// Add the operation id to the operation stack.
- data->setting->state.status = f_array_lengths_increase(data_make->setting->state.step_small, section_stack);
+ data_make->setting->state.status = f_array_lengths_increase(data_make->setting->state.step_small, section_stack);
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->error, macro_fake_f(f_array_lengths_increase));
return 0;
f_array_length_t i = 0;
f_array_length_t j = 0;
- for (i = 0; i < section->objects.used; ++i, data->setting->state.status = F_none) {
+ for (i = 0; i < section->objects.used; ++i, data_make->setting->state.status = F_none) {
for (j = 0; j < data_make->cache_arguments.size; ++j) {
data_make->cache_arguments.array[j].used = 0;
if (!((++data_make->main->signal_check) % fake_signal_check_short_d)) {
if (fll_program_standard_signal_received(data_make->main)) {
- fll_program_print_signal_received(data_make->main->warning, data_make->data->setting->line_first, data_make->main->signal_received);
+ fll_program_print_signal_received(data_make->main->warning, data_make->setting->line_first, data_make->main->signal_received);
- data->setting->state.status = F_status_set_error(F_interrupt);
+ data_make->setting->state.status = F_status_set_error(F_interrupt);
break;
}
if (!state_process.operation) {
fake_print_error_operation_unknown(data_make->setting, data_make->error, data_make->buffer, section->name, section->objects.array[i]);
- data->setting->state.status = F_status_set_error(F_valid_not);
+ data_make->setting->state.status = F_status_set_error(F_valid_not);
}
else if (state_process.operation == fake_make_operation_type_operate_e) {
if (section_stack->used == fake_max_stack_d) {
fake_print_error_operation_stack_max(data_make->setting, data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_max_stack_d);
- data->setting->state.status = F_status_set_error(F_recurse);
+ data_make->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->setting->state.status)) {
+ if (F_status_is_error(data_make->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->setting->state.status == F_child) return result;
+ if (data_make->setting->state.status == F_child) return result;
}
fake_make_operate_block_postprocess(data_make, i == section->objects.used, &state_process);
}
- if (F_status_set_fine(data->setting->state.status) == F_interrupt) break;
+ if (F_status_set_fine(data_make->setting->state.status) == F_interrupt) break;
- if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
state_process.success = F_false;
// Break acts identical to fail when at the top of the stack.
- if (F_status_set_fine(data->setting->state.status) == F_signal_abort && !section_stack->used) {
+ if (F_status_set_fine(data_make->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;
fake_print_error_operation_failed(data_make->setting, data_make->error, data_make->buffer, section->name, section->objects.array[i]);
// F_signal_abort is used by the break section operation.
- if (F_status_set_fine(data->setting->state.status) == F_signal_abort) break;
+ if (F_status_set_fine(data_make->setting->state.status) == F_signal_abort) break;
// F_signal_abort is used by the exit section operation.
- if (F_status_set_fine(data->setting->state.status) == F_signal_quit) {
+ if (F_status_set_fine(data_make->setting->state.status) == F_signal_quit) {
if (!section_stack->used) {
- data->setting->state.status = F_status_set_error(F_failure);
+ data_make->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->setting->state.status == F_signal_abort) {
+ else if (data_make->setting->state.status == F_signal_abort) {
state_process.success = F_true;
// F_signal_abort is used by the break section operation.
break;
}
- else if (data->setting->state.status == F_signal_quit) {
+ else if (data_make->setting->state.status == F_signal_quit) {
state_process.success = F_true;
// F_signal_quit is used by the exit section operation.
if (!section_stack->used) {
- data->setting->state.status = F_none;
+ data_make->setting->state.status = F_none;
}
break;
}
- else if (data->setting->state.status == F_failure) {
+ else if (data_make->setting->state.status == F_failure) {
// When F_failure (without the error bit) is returned, an error occured but the exit mode is not set to exit.
// Record the success state and set the status to F_none.
- data->setting->state.status = F_none;
+ data_make->setting->state.status = F_none;
state_process.success = F_false;
}
else {
}
} // for
- if (F_status_set_error(data->setting->state.status) == F_interrupt) return 0;
+ if (F_status_set_error(data_make->setting->state.status) == F_interrupt) return 0;
- if (i == section->objects.used && F_status_is_error_not(data->setting->state.status) && (state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_else_e || state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_or_e)) {
+ if (i == section->objects.used && F_status_is_error_not(data_make->setting->state.status) && (state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_else_e || state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_or_e)) {
fake_make_print_error_operation_incomplete(data_make->setting, data_make->main->error, state_process.operation);
fake_print_error_operation_failed(data_make->setting, data_make->error, data_make->buffer, section->name, section->objects.array[section->objects.used - 1]);
- data->setting->state.status = F_status_set_error(F_failure);
+ data_make->setting->state.status = F_status_set_error(F_failure);
}
// Ensure an error is returned during recursion if the last known section operation failed, except for the main operation.
- if (state_process.success == F_false && F_status_is_error_not(data->setting->state.status) && section_stack->used > 1) {
- data->setting->state.status = F_status_set_error(F_failure);
+ if (state_process.success == F_false && F_status_is_error_not(data_make->setting->state.status) && section_stack->used > 1) {
+ data_make->setting->state.status = F_status_set_error(F_failure);
}
--section_stack->used;
#ifndef _di_fake_make_operate_block_postprocess_
void fake_make_operate_block_postprocess(fake_make_data_t * const data_make, const bool last, fake_state_process_t * const state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
- if (F_status_is_error(data_make->setting.state.status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
state_process->block_result = fake_condition_result_error_e;
state_process->success_block = F_false;
#ifndef _di_fake_make_operate_process_
int fake_make_operate_process(fake_make_data_t * const data_make, const f_string_range_t section_name, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack) {
- if (!data_make || !state_process || !section_stack) return 0;
- if (data->setting->state.status == F_child) return data_make->data->main->child;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process || !section_stack) return 0;
+ if (data_make->setting->state.status == F_child) return data_make->data->main->child;
if (state_process->operation == fake_make_operation_type_break_e) {
fake_make_operate_process_type_break(data_make);
fake_make_operate_process_type_copy(data_make, F_true);
}
else if (state_process->operation == fake_make_operation_type_compile_e) {
- return fake_make_operate_process_type_compile(data_make, status);
+ return fake_make_operate_process_type_compile(data_make);
}
else if (state_process->operation == fake_make_operation_type_copy_e) {
fake_make_operate_process_type_copy(data_make, F_false);
fake_make_operate_process_type_condition(data_make, state_process);
}
else if (state_process->operation == fake_make_operation_type_index_e) {
- return fake_make_operate_process_type_index(data_make, status);
+ return fake_make_operate_process_type_index(data_make);
}
else if (state_process->operation == fake_make_operation_type_link_e) {
fake_make_operate_process_type_link(data_make);
fake_make_operate_process_type_move(data_make);
}
else if (state_process->operation == fake_make_operation_type_operate_e) {
- return fake_make_operate_process_type_operate(data_make, section_stack, status);
+ return fake_make_operate_process_type_operate(data_make, section_stack);
}
else if (state_process->operation == fake_make_operation_type_owner_e) {
fake_make_operate_process_type_owners(data_make, F_false);
#ifndef _di_fake_make_operate_process_buffer_escape_
void fake_make_operate_process_buffer_escape(fake_make_data_t * const data_make, const f_string_static_t source, f_string_dynamic_t * const destination) {
- if (!data_make || !destination) return;
+ if (!data_make || !data_make->main || !data_make->setting || !destination) return;
if (!source.used) {
- data_make->setting->status = F_data_not;
+ data_make->setting->state.status = F_data_not;
return;
}
- data_make->setting->status = f_string_dynamic_increase_by(source.used, destination);
- if (F_status_is_error(data_make->setting->status)) return;
+ data_make->setting->state.status = f_string_dynamic_increase_by(source.used, destination);
+ if (F_status_is_error(data_make->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->setting->status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, destination);
- if (F_status_is_error(data_make->setting->status)) return;
+ data_make->setting->state.status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, destination);
+ if (F_status_is_error(data_make->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->setting->status = f_utf_unicode_string_to(buffer.string, buffer.used, &codepoint);
+ data_make->setting->state.status = f_utf_unicode_string_to(buffer.string, buffer.used, &codepoint);
- if (F_status_is_error(data_make->setting->status)) {
- if (!(data_make->setting->status == F_failure || data_make->setting->status == F_utf_not || data_make->setting->status == F_complete_not_utf || data_make->setting->status == F_utf_fragment || data_make->setting->status == F_valid_not)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
+ if (!(data_make->setting->state.status == F_failure || data_make->setting->state.status == F_utf_not || data_make->setting->state.status == F_complete_not_utf || data_make->setting->state.status == F_utf_fragment || data_make->setting->state.status == F_valid_not)) {
break;
}
}
else {
// Reserve 4-bytes (the max size of a Unicode UTF-8 sequence).
- data_make->setting->status = f_string_dynamic_increase_by(4, destination);
- if (F_status_is_error(data_make->setting->status)) return;
+ data_make->setting->state.status = f_string_dynamic_increase_by(4, destination);
+ if (F_status_is_error(data_make->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->setting->status = f_utf_unicode_from(codepoint, 4, &address);
+ data_make->setting->state.status = f_utf_unicode_from(codepoint, 4, &address);
}
- if (F_status_is_error(data_make->setting->status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
destination->string[destination->used] = 0;
}
else {
}
}
else {
- data_make->setting->status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, destination);
- if (F_status_is_error(data_make->setting->status)) return;
+ data_make->setting->state.status = f_string_dynamic_increase_by(F_memory_default_allocation_small_d, destination);
+ if (F_status_is_error(data_make->setting->state.status)) return;
destination->string[destination->used++] = source.string[i];
}
} // for
- if (F_status_is_error(data_make->setting->status)) return;
+ if (F_status_is_error(data_make->setting->state.status)) return;
- data_make->setting->status = F_none;
+ data_make->setting->state.status = F_none;
}
#endif // _di_fake_make_operate_process_buffer_escape_
#ifndef _di_fake_make_operate_process_execute_
void fake_make_operate_process_execute(fake_make_data_t * const data_make, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (!program.used && !arguments.used) {
- data_make->setting->status = F_data_not;
+ data_make->setting->state.status = F_data_not;
return;
}
if (fll_program_standard_signal_received(data_make->main)) {
fll_program_print_signal_received(data_make->main->warning, data_make->data->setting->line_first, data_make->main->signal_received);
- data_make->setting->status = F_status_set_error(F_interrupt);
+ data_make->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->setting->status = fl_environment_load_names(data_make->setting_build.environment, &data_make->environment);
+ data_make->setting->state.status = fl_environment_load_names(data_make->setting_build.environment, &data_make->environment);
- if (F_status_is_error(data_make->setting->status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fl_environment_load_names));
return;
}
}
else {
- data_make->setting->status = f_environment_get_all(&data_make->environment);
+ data_make->setting->state.status = f_environment_get_all(&data_make->environment);
- if (F_status_is_error(data_make->setting->status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_environment_get_all));
return;
int return_code = 0;
- data_make->setting->status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code);
+ data_make->setting->state.status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code);
if (fll_program_standard_signal_received(data_make->main)) {
fll_program_print_signal_received(data_make->main->warning, data_make->data->setting->line_first, data_make->main->signal_received);
- data_make->setting->status = F_status_set_error(F_interrupt);
+ data_make->setting->state.status = F_status_set_error(F_interrupt);
return;
}
- if (F_status_is_error(data_make->setting->status)) {
- if (F_status_set_fine(data_make->setting->status) == F_interrupt) return;
+ if (F_status_is_error(data_make->setting->state.status)) {
+ if (F_status_set_fine(data_make->setting->state.status) == F_interrupt) return;
- if (F_status_set_fine(data_make->setting->status) == F_file_found_not) {
+ if (F_status_set_fine(data_make->setting->state.status) == F_file_found_not) {
fake_make_print_error_program_not_found(data_make->setting, data_make->main->error, program);
}
- else if (F_status_set_fine(data_make->setting->status) != F_failure) {
+ else if (F_status_set_fine(data_make->setting->state.status) != F_failure) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fll_execute_program));
}
}
#ifndef _di_fake_make_operate_process_return_
void fake_make_operate_process_return(fake_make_data_t * const data_make, const int return_code) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
+
+ const f_status_t status_original = data_make->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;
- result = f_conversion_number_signed_to_string(WEXITSTATUS(return_code), f_conversion_data_base_10_c, &number);
+ data_make->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->setting->status)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_conversion_number_signed_to_string));
f_string_dynamic_resize(0, &number);
- data_make->setting.state.status = result;
-
return;
}
- result = f_string_dynamic_append(number, &data_make->setting_make.parameter.array[0].value.array[0]);
+ data_make->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(result)) {
+ if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(f_string_dynamic_append));
- data_make->setting.state.status = result;
-
return;
}
fake_make_print_error_program_failed(data_make->setting, data_make->main->error, return_code);
- data_make->setting.state.status = data_make->setting_make.fail == fake_make_operation_fail_type_exit_e ? F_status_set_error(F_failure) : F_failure;
+ data_make->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(data_make->setting.state.status)) {
- data_make->setting.state.status = f_string_dynamic_append(f_string_ascii_1_s, &data_make->setting_make.parameter.array[0].value.array[0]);
+ if (F_status_is_error(status_original)) {
+ data_make->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->setting.state.status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->setting_make.parameter.array[0].value.array[0]);
+ data_make->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(result)) {
- fll_error_print(data_make->error, F_status_set_fine(result), "f_string_dynamic_append", F_true);
+ if (F_status_is_error(data_make->setting->state.status)) {
+ fll_error_print(data_make->error, F_status_set_fine(data_make->setting->state.status), macro_fake_f(f_string_dynamic_append), F_true);
}
else {
- data_make->setting.state.status = F_none;
+ data_make->setting->state.status = F_none;
}
}
#endif // _di_fake_make_operate_process_return_
#ifndef _di_fake_make_operate_process_run_
void fake_make_operate_process_run(fake_make_data_t * const data_make, const bool as_shell) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (!data_make->cache_arguments.used) {
- data_make->setting->status = F_data_not;
+ data_make->setting->state.status = F_data_not;
return;
}
#ifndef _di_fake_make_operate_process_type_break_
void fake_make_operate_process_type_break(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
data_make->setting->state.status = F_none;
#ifndef _di_fake_make_operate_process_type_build_
void fake_make_operate_process_type_build(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
fake_build_operate(data_make->data, data_make->cache_arguments.used ? &data_make->cache_arguments : 0, F_false);
if (F_status_set_fine(data_make->setting->state.status) == F_interrupt) return;
- data_make->setting->state.status = fake_make_operate_process_return(data_make, F_status_is_error(data_make->setting->state.status) ? 1 : 0);
+ fake_make_operate_process_return(data_make, F_status_is_error(data_make->setting->state.status) ? 1 : 0);
}
#endif // _di_fake_make_operate_process_type_build_
#ifndef _di_fake_make_operate_process_type_clean_
void fake_make_operate_process_type_clean(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
- data_make->setting->state.status = fake_clean_operate(data_make->data);
+ fake_clean_operate(data_make->data);
if (F_status_set_fine(data_make->setting->state.status) == F_interrupt) return;
- data_make->setting->state.status = fake_make_operate_process_return(data_make, F_status_is_error(data_make->setting->state.status) ? 1 : 0);
+ fake_make_operate_process_return(data_make, F_status_is_error(data_make->setting->state.status) ? 1 : 0);
}
#endif // _di_fake_make_operate_process_type_clean_
#ifndef _di_fake_make_operate_process_type_compile_
int fake_make_operate_process_type_compile(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make) return 0;
const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_compiler, data_make->cache_arguments);
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_execute));
}
else if (data_make->setting->state.status == F_child) {
- return;
+ return result;
}
fake_make_operate_process_return(data_make, result);
#ifndef _di_fake_make_operate_process_type_condition_
void fake_make_operate_process_type_condition(fake_make_data_t * const data_make, fake_state_process_t * const state_process) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
data_make->setting->state.status = F_none;
#ifndef _di_fake_make_operate_process_type_copy_
void fake_make_operate_process_type_copy(fake_make_data_t * const data_make, const bool clone) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
const f_array_length_t total = data_make->cache_arguments.used - 1;
f_string_static_t destination = f_string_static_t_initialize;
}
else {
recurse.verbose = fake_print_verbose_copy;
- macro_f_mode_t_set_default_umask(recurse.state.mode, data_make->main->umask);
+ macro_f_mode_t_set_default_umask(recurse.mode, data_make->main->umask);
}
bool existing = F_true;
recurse.flag -= recurse.flag & f_directory_recurse_flag_clone_e;
}
- fl_directory_copy(data_make->cache_arguments.array[i], destination, mode, &recurse);
+ fl_directory_copy(data_make->cache_arguments.array[i], destination, &recurse);
+
+ if (F_status_is_error(recurse.state.status)) {
+ data_make->setting->state.status = recurse.state.status;
- if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(fl_directory_copy), data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
data_make->setting->state.status = F_status_set_error(F_failure);
data_make->setting->state.status = f_file_clone(data_make->cache_arguments.array[i], destination, recurse.size_block, recurse.flag);
}
else {
- data_make->setting->state.status = f_file_copy(data_make->cache_arguments.array[i], destination, mode, recurse.size_block, recurse.flag);
+ data_make->setting->state.status = f_file_copy(data_make->cache_arguments.array[i], destination, recurse.mode, recurse.size_block, recurse.flag);
}
if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error_file(data_make->setting, data_make->main->error, clone ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_file_e);
- f_directory_recurse_delete(&recurse);
-
data_make->setting->state.status = F_status_set_error(F_failure);
- return;
+ break;
}
fake_make_print_verbose_operate_copy(data_make->setting, data_make->main->message, clone, data_make->cache_arguments.array[i], destination);
else if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[i], f_file_operation_identify_s, fll_error_file_type_directory_e);
- f_directory_recurse_delete(&recurse);
-
data_make->setting->state.status = F_status_set_error(F_failure);
- return;
+ break;
}
} // for
f_directory_recurse_delete(&recurse);
- data_make->setting->state.status = F_none;
+ if (F_status_is_error_not(data_make->setting->state.status)) {
+ data_make->setting->state.status = F_none;
+ }
}
#endif // _di_fake_make_operate_process_type_copy_
#ifndef _di_fake_make_operate_process_type_define_
void fake_make_operate_process_type_define(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used > 1) {
data_make->setting->state.status = f_environment_set(data_make->cache_arguments.array[0], data_make->cache_arguments.array[1], F_true);
#ifndef _di_fake_make_operate_process_type_deletes_
void fake_make_operate_process_type_deletes(fake_make_data_t * const data_make, const bool all) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
const int recursion_max = all ? F_directory_max_descriptors_d : 0;
struct stat file_stat;
#ifndef _di_fake_make_operate_process_type_exit_
void fake_make_operate_process_type_exit(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
data_make->setting->state.status = F_none;
#ifndef _di_fake_make_operate_process_type_fail_
void fake_make_operate_process_type_fail(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (fl_string_dynamic_compare(fake_make_operation_argument_exit_s, data_make->cache_arguments.array[0]) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_exit_e;
#ifndef _di_fake_make_operate_process_type_groups_
void fake_make_operate_process_type_groups(fake_make_data_t * const data_make, const bool all) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
gid_t id = 0;
bool dereference = F_true;
dereference = F_false;
}
- fake_make_get_id(data_make, F_false, data_make->cache_arguments.array[i++], (void *) &id);
+ id = (gid_t) fake_make_get_id(data_make, F_false, data_make->cache_arguments.array[i++]);
if (F_status_is_error(data_make->setting->state.status)) {
data_make->setting->state.status = F_status_set_error(F_failure);
#ifndef _di_fake_make_operate_process_type_if_define_
void fake_make_operate_process_type_if_define(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
state_process->condition_result = fake_condition_result_true_e;
#ifndef _di_fake_make_operate_process_type_if_exist_
void fake_make_operate_process_type_if_exist(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
f_array_length_t i = if_not ? 2 : 1;
bool dereference = F_true;
#ifndef _di_fake_make_operate_process_type_if_is_
void fake_make_operate_process_type_if_is(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
// block = 0x1 (0000 0001) link = 0x10 (0001 0000)
// character = 0x2 (0000 0010) regular = 0x20 (0010 0000)
#ifndef _di_fake_make_operate_process_type_if_greater_if_lesser_
void fake_make_operate_process_type_if_greater_if_lesser(fake_make_data_t * const data_make, fake_state_process_t *state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
f_string_range_t range = f_string_range_t_initialize;
f_number_unsigned_t number_left = 0;
#ifndef _di_fake_make_operate_process_type_if_group_
void fake_make_operate_process_type_if_group(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
uid_t id = 0;
f_array_length_t i = if_not ? 2 : 1;
dereference = F_false;
}
- fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[i++], (void *) &id);
+ id = (uid_t) fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[i++]);
if (F_status_is_error(data_make->setting->state.status)) {
state_process->condition_result = fake_condition_result_error_e;
#ifndef _di_fake_make_operate_process_type_if_mode_
void fake_make_operate_process_type_if_mode(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
f_file_mode_t mode_rule = 0;
mode_t mode_match = 0;
#ifndef _di_fake_make_operate_process_type_if_owner_
void fake_make_operate_process_type_if_owner(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
uid_t id = 0;
f_array_length_t i = if_not ? 2 : 1;
dereference = F_false;
}
- fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[i++], (void *) &id);
+ id = (uid_t) fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[i++]);
if (F_status_is_error(data_make->setting->state.status)) {
state_process->condition_result = fake_condition_result_error_e;
#ifndef _di_fake_make_operate_process_type_if_parameter_
void fake_make_operate_process_type_if_parameter(fake_make_data_t * const data_make, const bool if_not, fake_state_process_t *state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
const f_string_static_t reserved_name[] = {
fake_make_parameter_variable_build_s,
#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;
+ if (!data_make) return 0;
const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_indexer, data_make->cache_arguments);
#ifndef _di_fake_make_operate_process_type_link_
void fake_make_operate_process_type_link(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
// 0x1 = force, 0x2 = strict.
uint8_t flag = 0;
#ifndef _di_fake_make_operate_process_type_modes_
void fake_make_operate_process_type_modes(fake_make_data_t * const data_make, const bool all) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
data_make->setting->state.status = F_none;
#ifndef _di_fake_make_operate_process_type_move_
void fake_make_operate_process_type_move(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
const f_array_length_t total = data_make->cache_arguments.used -1;
fll_file_move(data_make->cache_arguments.array[i], destination, &recurse);
- if (F_status_is_error(data_make->setting->state.status)) {
+ if (F_status_is_error(recurse.state.status)) {
+ data_make->setting->state.status = recurse.state.status;
+
fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(fll_file_move), data_make->cache_arguments.array[i], f_file_operation_move_s, fll_error_file_type_directory_e);
data_make->setting->state.status = F_status_set_error(F_failure);
#ifndef _di_fake_make_operate_process_type_owners_
void fake_make_operate_process_type_owners(fake_make_data_t * const data_make, const bool all) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
uid_t id = 0;
bool dereference = F_true;
dereference = F_false;
}
- fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[i++], (void *) &id);
+ id = (uid_t) fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[i++]);
if (F_status_is_error(data_make->setting->state.status)) {
fake_print_error(data_make->setting, data_make->main->error, macro_fake_f(fake_make_get_id));
#ifndef _di_fake_make_operate_process_type_parameter_
void fake_make_operate_process_type_parameter(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
bool found = F_false;
f_array_length_t i = 0;
#ifndef _di_fake_make_operate_process_type_pop_
void fake_make_operate_process_type_pop(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
f_string_dynamic_t *argument = &data_make->path.stack.array[data_make->path.stack.used - 1];
#ifndef _di_fake_make_operate_process_type_print_
void fake_make_operate_process_type_print(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
data_make->cache_1.used = 0;
#ifndef _di_fake_make_operate_process_type_skeleton_
void fake_make_operate_process_type_skeleton(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
fake_skeleton_operate(data_make->data);
if (F_status_set_fine(data_make->setting->state.status) == F_interrupt) return;
#ifndef _di_fake_make_operate_process_type_to_
void fake_make_operate_process_type_to(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]);
#ifndef _di_fake_make_operate_process_type_top_
void fake_make_operate_process_type_top(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
{
data_make->setting->state.status = f_path_change_at(data_make->path.top.id);
#ifndef _di_fake_make_operate_process_type_touch_
void fake_make_operate_process_type_touch(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
f_mode_t mode = f_mode_t_initialize;
#ifndef _di_fake_make_operate_process_type_write_
void fake_make_operate_process_type_write(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
f_file_t file = f_file_t_initialize;
#ifndef _di_fake_make_operate_validate_
void fake_make_operate_validate(fake_make_data_t * const data_make, const f_string_range_t section_name, fake_state_process_t * const state_process, f_array_lengths_t * const section_stack) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (F_status_is_error(data_make->setting->state.status)) return;
if (!section_stack) {
#ifndef _di_fake_make_operate_validate_type_break_
void fake_make_operate_validate_type_break(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used > 1) {
fake_print_error_too_many_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_build_
void fake_make_operate_validate_type_build(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used) {
if (data_make->cache_arguments.array[0].used) {
#ifndef _di_fake_make_operate_validate_type_clean_top_skeleton_
void fake_make_operate_validate_type_clean_top_skeleton(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used) {
fake_print_error_too_many_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_clone_
void fake_make_operate_validate_type_clone(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used > 1) {
f_status_t status = F_none;
#ifndef _di_fake_make_operate_validate_type_compile_
void fake_make_operate_validate_type_compile(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (!data_make->cache_arguments.used) {
fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_condition_
void fake_make_operate_validate_type_condition(fake_make_data_t * const data_make, fake_state_process_t * const state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
if (state_process->operation == fake_make_operation_type_if_e) {
if (state_process->operation_previous == fake_make_operation_type_if_e) {
i = ++k;
}
else if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_not_group_e) {
- gid_t id = 0;
-
- fake_make_get_id(data_make, F_false, data_make->cache_arguments.array[k++], (void *) &id);
+ fake_make_get_id(data_make, F_false, data_make->cache_arguments.array[k++]);
if (F_status_is_error(data_make->setting->state.status)) {
data_make->setting->state.status = F_status_set_error(F_failure);
}
}
else if (state_process->condition == fake_make_operation_if_type_if_owner_e || state_process->condition == fake_make_operation_if_type_if_not_owner_e) {
- uid_t id = 0;
-
- fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[k++], (void *) &id);
+ fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[k++]);
if (F_status_is_error(data_make->setting->state.status)) {
data_make->setting->state.status = F_status_set_error(F_failure);
#ifndef _di_fake_make_operate_validate_type_copy_
void fake_make_operate_validate_type_copy(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used > 1) {
f_status_t status = F_none;
#ifndef _di_fake_make_operate_validate_type_define_
void fake_make_operate_validate_type_define(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used) {
fake_make_operate_validate_define_name(data_make->cache_arguments.array[0]);
#ifndef _di_fake_make_operate_validate_type_delete_
void fake_make_operate_validate_type_delete(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used) {
f_status_t status = F_none;
#ifndef _di_fake_make_operate_validate_type_else_
void fake_make_operate_validate_type_else(fake_make_data_t * const data_make, fake_state_process_t * const state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
if (state_process->operation_previous == fake_make_operation_type_else_e) {
fake_make_print_error_after_condition_must_not(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_exit_
void fake_make_operate_validate_type_exit(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used > 1) {
fake_print_error_too_many_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_fail_
void fake_make_operate_validate_type_fail(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used) {
if (fl_string_dynamic_compare(fake_make_operation_argument_exit_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
#ifndef _di_fake_make_operate_validate_type_index_
void fake_make_operate_validate_type_index(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (!data_make->cache_arguments.used) {
fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_link_
void fake_make_operate_validate_type_link(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used > 4) {
fake_print_error_too_many_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_move_
void fake_make_operate_validate_type_move(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used > 1) {
{
#ifndef _di_fake_make_operate_validate_type_operate_
void fake_make_operate_validate_type_operate(fake_make_data_t * const data_make, f_array_lengths_t * const section_stack) {
- if (!data_make || !section_stack) return;
+ if (!data_make || !data_make->main || !data_make->setting || !section_stack) return;
if (data_make->cache_arguments.used > 1) {
fake_print_error_too_many_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_parameter_
void fake_make_operate_validate_type_parameter(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used) {
const f_string_static_t reserved_name[] = {
#ifndef _di_fake_make_operate_validate_type_permission_
void fake_make_operate_validate_type_permission(fake_make_data_t * const data_make, fake_state_process_t * const state_process) {
- if (!data_make || !state_process) return;
+ if (!data_make || !data_make->main || !data_make->setting || !state_process) return;
if (data_make->cache_arguments.used) {
f_array_length_t i = 1;
#ifndef _di_fake_make_operate_validate_type_pop_
void fake_make_operate_validate_type_pop(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used) {
fake_print_error_too_many_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_run_
void fake_make_operate_validate_type_run(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (!data_make->cache_arguments.used) {
fake_print_error_requires_more_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_to_
void fake_make_operate_validate_type_to(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used > 1) {
fake_print_error_too_many_arguments(data_make->setting, data_make->main->error);
#ifndef _di_fake_make_operate_validate_type_touch_
void fake_make_operate_validate_type_touch(fake_make_data_t * const data_make) {
- if (!data_make) return;
+ if (!data_make || !data_make->main || !data_make->setting) return;
if (data_make->cache_arguments.used > 1) {
if (fl_string_dynamic_compare(fake_make_operation_argument_file_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
#endif
#ifndef _di_fake_make_print_warning_cannot_change_back_
- f_status_t fake_make_print_warning_cannot_change_back(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path, const f_status_t status) {
+ f_status_t fake_make_print_warning_cannot_change_back(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path) {
if (!setting) return F_status_set_error(F_output_not);
if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not;
fl_print_format("%[%QFailed change back to original path '%]", print.to, print.context, print.prefix, print.context);
fl_print_format("%[%Q%]", print.to, print.notable, path, print.notable);
fl_print_format("%[', status code =%] ", print.to, print.context, print.context);
- fl_print_format("%[%ui%]", print.to, print.notable, F_status_set_fine(status), print.notable);
+ fl_print_format("%[%ui%]", print.to, print.notable, setting->state.status, print.notable);
fl_print_format("%['.%]%r", print.to, print.context, print.context, f_string_eol_s);
f_file_stream_unlock(print.to);
* The output structure to print to.
* @param path
* The path that cannot be changed back to.
- * @param status
- * The status code representing the cause of the failure.
*
* @return
* F_none on success.
* @see fl_print_format()
*/
#ifndef _di_fake_make_print_warning_cannot_change_back_
- extern f_status_t fake_make_print_warning_cannot_change_back(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path, const f_status_t status);
+ extern f_status_t fake_make_print_warning_cannot_change_back(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path);
#endif // _di_fake_make_print_warning_cannot_change_back_
/**
if (F_status_is_error_not(setting->state.status)) {
if (print.verbosity < f_console_verbosity_normal_e) return F_output_not;
- if (setting->flag & fss_write_main_flag_file_to_e) return F_output_not;
+ if (setting->flag & fake_main_flag_file_to_e) return F_output_not;
}
if (setting->flag & fake_main_flag_print_first_e) {
if (F_status_is_error_not(setting->state.status)) {
if (print.verbosity < f_console_verbosity_normal_e) return F_output_not;
- if (setting->flag & fss_write_main_flag_file_to_e) return F_output_not;
+ if (setting->flag & fake_main_flag_file_to_e) return F_output_not;
}
fll_print_dynamic_raw(setting->line_last, print.to);
if (!setting) return F_status_set_error(F_output_not);
if (print.verbosity < f_console_verbosity_error_e) return F_output_not;
- fll_error_print(print, F_status_set_fine(data->setting->state.status), function, fll_error_file_flag_fallback_e);
+ fll_error_print(print, F_status_set_fine(setting->state.status), function, fll_error_file_flag_fallback_e);
return F_none;
}
#ifndef _di_fake_print_error_build_operation_file_partial_
void fake_print_error_build_operation_file_partial(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how) {
- if (!setting) return F_status_set_error(F_output_not);
+ if (!setting) return;
if (print.verbosity < f_console_verbosity_error_e || !source.used) return;
fl_print_format("%[while trying to %Q '%]", print.to, print.context, operation, print.context);
if (!setting) return F_status_set_error(F_output_not);
if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not;
- if (F_status_set_fine(data->setting->state.status) == F_false) {
+ if (F_status_set_fine(setting->state.status) == F_false) {
fake_print_context_wrapped_variable(setting, print, "The path ", path, " is outside the project root");
}
else {
* This does not alter setting.state.status.
* @param print
* Designates the how and where to print.
- * @param status
- * The error status code to report on.
* @param function
* The function call that returned the error.
* @param path_file
* @see fake_print_error_fss_message()
*/
#ifndef _di_fake_print_error_fss_
- extern f_status_t fake_print_error_fss(fake_setting_t * const setting, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback);
+ extern f_status_t fake_print_error_fss(fake_setting_t * const setting, const fl_print_t print, const f_string_t function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback);
#endif // _di_fake_print_error_fss_
/**
return;
}
- fake_data_t * const data = (fake_data_t * const) recurse->state.custom;
+ fake_data_t * const data = (fake_data_t *) recurse->state.custom;
if (data->main->message.verbosity < f_console_verbosity_verbose_e) {
recurse->state.status = F_output_not;
return;
}
- fake_data_t * const data = (fake_data_t * const) recurse->state.custom;
+ fake_data_t * const data = (fake_data_t *) recurse->state.custom;
if (data->main->message.verbosity < f_console_verbosity_verbose_e) {
recurse->state.status = F_output_not;
#ifndef _di_fake_print_verbose_create_directory_
void fake_print_verbose_create_directory(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path) {
- if (!setting) return F_status_set_error(F_output_not);
- if (print.verbosity < f_console_verbosity_verbose_e) return F_output_not;
+ if (!setting) return;
+ if (print.verbosity < f_console_verbosity_verbose_e) return;
fake_print_simple_variable(setting, print, "Created directory ", path);
-
- return F_none;
}
#endif // _di_fake_print_verbose_create_directory_
return;
}
- fake_data_t * const data = (fake_data_t * const) recurse->state.custom;
+ fake_data_t * const data = (fake_data_t *) recurse->state.custom;
if (data->main->message.verbosity < f_console_verbosity_verbose_e) {
recurse->state.status = F_output_not;
* @param path
* The name of the file.
*
- * @return
- * F_none on success.
- * F_output_not on success, but no printing is performed.
- *
- * F_output_not (with error bit) if setting is NULL.
- *
* @see fake_print_simple_variable()
*/
#ifndef _di_fake_print_verbose_create_directory_
- extern f_status_t fake_print_verbose_create_directory(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path);
+ extern void fake_print_verbose_create_directory(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path);
#endif // _di_fake_print_verbose_create_directory_
/**
#endif
#ifndef _di_fake_skeleton_operate_
- f_status_t fake_skeleton_operate(fake_data_t * const data) {
+ void fake_skeleton_operate(fake_data_t * const data) {
- f_status_t status = F_none;
+ if (!data || !data->main || !data->setting) return;
if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
fake_print_generating_skeleton(data->setting, data->main->message);
for (uint8_t i = 0; i < 24; ++i) {
- status = fake_skeleton_operate_directory_create(data, path[i]);
+ fake_skeleton_operate_directory_create(data, path[i]);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error(data->setting, data->main->error, macro_fake_f(fake_skeleton_operate_directory_create));
- return status;
+ return;
}
} // for
}
}
- if (F_status_is_error_not(status)) {
- status = fake_skeleton_operate_file_create(data, data->file_data_build_defines, F_false, fake_make_skeleton_content_defines_s);
- }
+ 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->setting->state.status)) return;
- if (F_status_is_error_not(status)) {
- status = fake_skeleton_operate_file_create(data, data->file_data_build_dependencies, F_false, fake_make_skeleton_content_dependencies_s);
- }
+ 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->setting->state.status)) return;
- if (F_status_is_error_not(status)) {
- status = fake_skeleton_operate_file_create(data, data->file_data_build_process_post, F_true, fake_make_skeleton_content_process_post_s);
- }
+ 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->setting->state.status)) return;
- if (F_status_is_error_not(status)) {
- status = fake_skeleton_operate_file_create(data, data->file_data_build_process_pre, F_true, fake_make_skeleton_content_process_pre_s);
- }
+ 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->setting->state.status)) return;
- if (F_status_is_error_not(status)) {
- status = fake_skeleton_operate_file_create(data, data->file_data_build_settings, F_false, fake_make_skeleton_content_settings_s);
- }
-
- if (F_status_is_error_not(status)) {
- status = fake_skeleton_operate_file_create(data, data->file_documents_readme, F_false, f_string_empty_s);
- }
+ 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->setting->state.status)) return;
- if (F_status_is_error_not(status)) {
- status = fake_skeleton_operate_file_create(data, data->file_data_build_fakefile, F_false, fake_make_skeleton_content_fakefile_s);
- }
+ fake_skeleton_operate_file_create(data, data->file_documents_readme, F_false, f_string_empty_s);
+ if (F_status_is_error(data->setting->state.status)) return;
- if (F_status_is_error(status)) return status;
+ 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->setting->state.status)) return;
- return F_none;
+ data->setting->state.status = F_none;
}
#endif // _di_fake_skeleton_operate_
#ifndef _di_fake_skeleton_operate_directory_create_
- f_status_t fake_skeleton_operate_directory_create(fake_data_t * const data, const f_string_static_t path) {
+ void fake_skeleton_operate_directory_create(fake_data_t * const data, const f_string_static_t path) {
- if (!path.used) return F_none;
+ if (!data || !data->main || !data->setting) return;
+ if (!path.used) return;
- f_status_t status = f_directory_exists(path);
+ data->setting->state.status = f_directory_exists(path);
- if (status == F_true) {
+ if (data->setting->state.status == F_true) {
fake_print_verbose_directory_exists(data->setting, data->main->message, path);
- return F_none;
+ data->setting->state.status = F_none;
+
+ return;
}
- if (status == F_false) {
+ if (data->setting->state.status == F_false) {
fake_print_warning_path_exists_not_directory(data->setting, data->main->warning, path);
- return F_status_set_warning(F_failure);
+ data->setting->state.status = F_status_set_warning(F_failure);
+
+ return;
}
- if (status == F_file_found_not) {
- status = f_directory_create(path, F_file_mode_all_rwx_d);
+ if (data->setting->state.status == F_file_found_not) {
+ data->setting->state.status = f_directory_create(path, F_file_mode_all_rwx_d);
- if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_file_found_not) {
+ if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_set_fine(data->setting->state.status) == F_file_found_not) {
fake_print_error_directory_create_parent_missing(data->setting, data->main->error, path);
}
else {
fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_directory_create), path, f_file_operation_create_s, fll_error_file_type_directory_e);
}
- return status;
+ return;
}
fake_print_verbose_create_directory(data->setting, data->main->message, path);
}
- else if (F_status_is_error(status)) {
+ else if (F_status_is_error(data->setting->state.status)) {
fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_directory_exists), path, f_file_operation_create_s, fll_error_file_type_directory_e);
- return status;
+ return;
}
- return F_none;
+ data->setting->state.status = F_none;
}
#endif // _di_fake_skeleton_operate_directory_create_
#ifndef _di_fake_skeleton_operate_file_create_
- f_status_t fake_skeleton_operate_file_create(fake_data_t * const data, const f_string_static_t path, const bool executable, const f_string_static_t content) {
-
- f_status_t status = F_none;
+ void fake_skeleton_operate_file_create(fake_data_t * const data, const f_string_static_t path, const bool executable, const f_string_static_t content) {
- if (!path.used) return F_none;
+ if (!data || !data->main || !data->setting) return;
+ if (!path.used) return;
- status = f_file_is(path, F_file_type_regular_d, F_false);
+ data->setting->state.status = f_file_is(path, F_file_type_regular_d, F_false);
- if (status == F_true) {
+ if (data->setting->state.status == F_true) {
fake_print_verbose_file_exists(data->setting, data->main->message, path);
- return F_none;
+ data->setting->state.status = F_none;
+
+ return;
}
// symbolic links might also be fine.
- if (status == F_false) {
- status = f_file_is(path, F_file_type_link_d, F_false);
+ if (data->setting->state.status == F_false) {
+ data->setting->state.status = f_file_is(path, F_file_type_link_d, F_false);
- if (status == F_true) {
+ if (data->setting->state.status == F_true) {
fake_print_verbose_file_exists_as_link(data->setting, data->main->message, path);
- return F_none;
+ data->setting->state.status = F_none;
+
+ return;
}
}
- if (status == F_false) {
+ if (data->setting->state.status == F_false) {
fake_print_verbose_file_exists_not_regular_or_link(data->setting, data->main->message, path);
- return F_status_set_warning(F_none);
+ data->setting->state.status = F_status_set_warning(F_none);
+
+ return;
}
- if (F_status_set_fine(status) == F_file_found_not) {
+ if (F_status_set_fine(data->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;
}
- status = f_file_create(path, mode, F_true);
+ data->setting->state.status = f_file_create(path, mode, F_true);
- if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_file_found_not) {
+ if (F_status_is_error(data->setting->state.status)) {
+ if (F_status_set_fine(data->setting->state.status) == F_file_found_not) {
fake_print_error_file_create_parent_missing(data->setting, data->main->error, path);
}
else {
fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_create), path, f_file_operation_create_s, fll_error_file_type_file_e);
}
- return status;
+ return;
}
fake_print_verbose_create_file(data->setting, data->main->message, path);
file.flag = F_file_flag_append_wo_d;
file.size_write = content.used;
- status = f_file_open(path, 0, &file);
+ data->setting->state.status = f_file_open(path, 0, &file);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_open), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
- return status;
+ return;
}
- status = f_file_write(file, content, 0);
+ data->setting->state.status = f_file_write(file, content, 0);
- if (F_status_is_error(status)) {
+ if (F_status_is_error(data->setting->state.status)) {
fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_write), path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
f_file_stream_flush(file);
f_file_stream_close(&file);
- return status;
+ return;
}
fake_print_verbose_file_pre_populated(data->setting, data->main->message, path);
f_file_stream_close(&file);
}
}
- else if (F_status_is_error(status)) {
+ else if (F_status_is_error(data->setting->state.status)) {
fake_print_error_file(data->setting, data->main->error, macro_fake_f(f_file_is), path, f_file_operation_create_s, fll_error_file_type_file_e);
- return status;
+ return;
}
- return F_none;
+ data->setting->state.status = F_none;
}
#endif // _di_fake_skeleton_operate_file_create_
* @param data
* The program data.
*
- * @return
- * F_none on success.
+ * This alters data.setting.state.status:
+ * F_none on success.
*
- * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal.
+ * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal.
*
- * Status codes (with error bit) are returned on any problem.
+ * Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_skeleton_operate_
extern void fake_skeleton_operate(fake_data_t * const data);
*
* @param data
* The program data.
- * @param path
- * The file path for the directory to create.
*
- * @return
- * F_none on success.
+ * This alters data.setting.state.status:
+ * F_none on success.
*
- * Status codes (with warning bit) are returned on certain problems that can be ignored.
- * Status codes (with error bit) are returned on any problem.
+ * Status codes (with warning bit) are returned on certain problems that can be ignored.
+ * Status codes (with error bit) are returned on any problem.
+ * @param path
+ * The file path for the directory to create.
*/
#ifndef _di_fake_skeleton_operate_directory_create_
extern void fake_skeleton_operate_directory_create(fake_data_t * const data, const f_string_static_t path);
*
* @param data
* The program data.
+ *
+ * This alters data.setting.state.status:
+ * F_none on success.
+ *
+ * Status codes (with warning bit) are returned on certain problems that can be ignored.
+ * Status codes (with error bit) are returned on any problem.
* @param path
* The file path for the directory to create.
* @param executable
* Set to FALSE to not make the file executable.
* @param content
* When creating a new file, write the content specified by this string to that file.
- *
- * @return
- * F_none on success.
- *
- * Status codes (with warning bit) are returned on certain problems that can be ignored.
- * Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_skeleton_operate_file_create_
extern void fake_skeleton_operate_file_create(fake_data_t * const data, const f_string_static_t path, const bool executable, const f_string_static_t content);