main->program.output.to.stream = F_type_output_d;
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
+ f_console_parameters_t * const parameters = &main->program.parameters;
+
{
const uint16_t step_original = main->setting.state.step_small;
fake_data_t data = fake_data_t_initialize;
main->setting.state.step_small = 4;
- f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, (void *) &data);
+ f_console_parameter_process(arguments, parameters, &main->setting.state, (void *) &data);
main->setting.state.step_small = step_original;
}
return;
}
- if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
+ if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
main->setting.flag |= fake_main_flag_help_d;
return;
}
- if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
+ if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
main->setting.flag |= fake_main_flag_version_d;
return;
}
- if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
+ if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
main->setting.flag |= fake_main_flag_copyright_d;
return;
for (; i < 3; ++i) {
- if (main->program.parameters.array[enables[i]].result & f_console_result_found_e) {
- if (main->program.parameters.array[disables[i]].result & f_console_result_found_e) {
- if (main->program.parameters.array[enables[i]].location < main->program.parameters.array[disables[i]].location) {
+ if (parameters->array[enables[i]].result & f_console_result_found_e) {
+ if (parameters->array[disables[i]].result & f_console_result_found_e) {
+ if (parameters->array[enables[i]].location < parameters->array[disables[i]].location) {
main->setting.flag &= ~flags[i];
}
else {
main->setting.flag |= flags[i];
}
}
- else if (main->program.parameters.array[disables[i]].result & f_console_result_found_e) {
+ else if (parameters->array[disables[i]].result & f_console_result_found_e) {
main->setting.flag &= ~flags[i];
}
} // for
}
{
- const f_number_unsigned_t parameters[] = {
+ const f_number_unsigned_t params[] = {
fake_parameter_build_e,
fake_parameter_data_e,
fake_parameter_documents_e,
for (i = 0; i < 10; ++i) {
- if ((main->program.parameters.array[parameters[i]].result & f_console_result_found_e) && !(main->program.parameters.array[parameters[i]].result & f_console_result_value_e)) {
+ if ((parameters->array[params[i]].result & f_console_result_found_e) && !(parameters->array[params[i]].result & f_console_result_value_e)) {
main->setting.state.status = F_status_set_error(F_parameter);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
return;
}
- if (main->program.parameters.array[parameters[i]].result & f_console_result_value_e) {
- index = main->program.parameters.array[parameters[i]].values.array[main->program.parameters.array[parameters[i]].values.used - 1];
+ if (parameters->array[params[i]].result & f_console_result_value_e) {
+ index = parameters->array[params[i]].values.array[parameters->array[params[i]].values.used - 1];
- if (main->program.parameters.arguments.array[index].used) {
- if (parameters[i] == fake_parameter_process_e) {
- for (j = 0; j < main->program.parameters.arguments.array[index].used; ++j) {
+ if (parameters->arguments.array[index].used) {
+ if (params[i] == fake_parameter_process_e) {
+ for (j = 0; j < parameters->arguments.array[index].used; ++j) {
- main->setting.state.status = f_utf_is_word_dash_plus(main->program.parameters.arguments.array[index].string + j, main->program.parameters.arguments.array[index].used - j, F_false);
+ main->setting.state.status = f_utf_is_word_dash_plus(parameters->arguments.array[index].string + j, parameters->arguments.array[index].used - j, F_false);
// @todo fix this to print an error about the actual invalid character so that it can be investigated.
if (main->setting.state.status == F_false) {
main->setting.state.status = F_status_set_error(F_parameter);
- fake_print_error_parameter_not_word(&main->program.error, f_console_symbol_long_normal_s, names[i], main->program.parameters.arguments.array[index]);
+ fake_print_error_parameter_not_word(&main->program.error, f_console_symbol_long_normal_s, names[i], parameters->arguments.array[index]);
return;
}
}
if (cleanups[i]) {
- main->setting.state.status = f_path_directory_cleanup(main->program.parameters.arguments.array[index], variable[i]);
+ main->setting.state.status = f_path_directory_cleanup(parameters->arguments.array[index], variable[i]);
if (F_status_is_error(main->setting.state.status)) {
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
}
}
- variable[i]->string = main->program.parameters.arguments.array[index].string;
- variable[i]->used = main->program.parameters.arguments.array[index].used;
+ variable[i]->string = parameters->arguments.array[index].string;
+ variable[i]->used = parameters->arguments.array[index].used;
variable[i]->size = 0;
}
if (!variable[i]->used) {
main->setting.state.status = F_status_set_error(F_parameter);
- fake_print_error_parameter_not_empty(&main->program.error, f_console_symbol_long_normal_s, names[i], main->program.parameters.arguments.array[index]);
+ fake_print_error_parameter_not_empty(&main->program.error, f_console_symbol_long_normal_s, names[i], parameters->arguments.array[index]);
return;
}
}
{
- const f_number_unsigned_t parameters[] = {
+ const f_number_unsigned_t params[] = {
fake_parameter_define_e,
fake_parameter_mode_e,
};
for (i = 0; i < 2; ++i) {
- if ((main->program.parameters.array[parameters[i]].result & f_console_result_found_e) && !(main->program.parameters.array[parameters[i]].result & f_console_result_value_e)) {
+ if ((parameters->array[params[i]].result & f_console_result_found_e) && !(parameters->array[params[i]].result & f_console_result_value_e)) {
main->setting.state.status = F_status_set_error(F_parameter);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
return;
}
- if (main->program.parameters.array[parameters[i]].result & f_console_result_value_e) {
- main->setting.state.status = fll_program_parameter_additional_rip(main->program.parameters.arguments.array, main->program.parameters.array[parameters[i]].values, variable[i]);
+ if (parameters->array[params[i]].result & f_console_result_value_e) {
+ main->setting.state.status = fll_program_parameter_additional_rip(parameters->arguments.array, parameters->array[params[i]].values, variable[i]);
if (F_status_is_error(main->setting.state.status)) {
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
return;
}
- if (parameters[i] == fake_parameter_mode_e) {
- for (j = 0; j < main->program.parameters.arguments.array[i].used; ++j) {
+ if (params[i] == fake_parameter_mode_e) {
+ for (j = 0; j < parameters->arguments.array[i].used; ++j) {
- width_max = main->program.parameters.arguments.array[i].used - j;
+ width_max = parameters->arguments.array[i].used - j;
- main->setting.state.status = f_utf_is_word_dash_plus(main->program.parameters.arguments.array[i].string + j, width_max, F_false);
+ main->setting.state.status = f_utf_is_word_dash_plus(parameters->arguments.array[i].string + j, width_max, F_false);
if (F_status_is_error(main->setting.state.status)) {
if (main->setting.state.status == F_false) {
main->setting.state.status = F_status_set_error(F_parameter);
- fake_print_error_parameter_not_word(&main->program.error, f_console_symbol_long_normal_s, names[i], main->program.parameters.arguments.array[i]);
+ fake_print_error_parameter_not_word(&main->program.error, f_console_symbol_long_normal_s, names[i], parameters->arguments.array[i]);
return;
}