The Featureless Make program now uses a more centralized cache.
This requires some delicate handling in certain areas and testing is needed to assure that there are no regressions.
Continue some work regarding the recursive directory functions.
* - last: Operate on directory last (after recursion).
* - top: Operate on top-most directory, or for the callback parameter, designate that this is the top path.
*
- * For the action callback parameter.
+ * For the actiona and handle callback parameter:
* - block: File is a block.
* - character: File is a character.
* - directory: File is a directory.
* - fifo: File is a file-in/file-out.
* - link: File is a link.
+ * - path: The "name" represents a path rather than a file name (generally used for error handling or when not processing a recursed file).
* - regular: File is a regular file.
* - socket: File is a socket.
* - unknown: File is an unknown type.
f_directory_recurse_do_flag_directory_e = 0x40,
f_directory_recurse_do_flag_fifo_e = 0x80,
f_directory_recurse_do_flag_link_e = 0x100,
- f_directory_recurse_do_flag_regular_e = 0x200,
- f_directory_recurse_do_flag_socket_e = 0x400,
- f_directory_recurse_do_flag_unknown_e = 0x800,
+ f_directory_recurse_do_flag_path_e = 0x200,
+ f_directory_recurse_do_flag_regular_e = 0x400,
+ f_directory_recurse_do_flag_socket_e = 0x800,
+ f_directory_recurse_do_flag_unknown_e = 0x1000,
}; // enum
#endif // _di_f_directory_recurse_do_flag_e_
* The callback must take care to properly modify the structure or they could cause security, integrity, or functionality problems.
* The action callback may set any of the following on the state.status to have the following effects:
* - Any status (with error bit set): Immediately return as error.
- * - F_break: Break out of the current loop.
- * - F_continue: Skip to the next iteration in the current loop.
- * - F_done: immedately return as success but do nothing else in this recursion.
+ * - F_break: Break out of the current loop.
+ * - F_continue: Skip to the next iteration in the current loop.
+ * - F_done: Immedately return as success but do nothing else in this recursion.
+ * The action parameters are:
+ * - recurse: Must be of type f_directory_recurse_do_t and represents this data.
+ * - name: The name of the file or directory the action is being performed on (does not have the directory path).
+ * - flag: A flag representing the particular action being performed.
+ *
+ * The state.handle() and state.interrupt() callbacks internal parameter must be of type f_directory_recurse_do_t.
+ * The state.handle() is called only when handle is NULL.
*
* max_depth: The maximum recursion depth to use.
* depth: A number representing the depth recursed thus far (generally assigned internally).
* flag: A set of flags used exclusively by the directory recurse process (not to be confused with state.flag).
- * state: A pointer to the state information.
+ * state: A pointer to the state information, where state.interrupt() and state.handle() are called appopriately.
* listing: A directory listing structure used internally to help reduce repeated memory allocation overhead.
* path: A pointer to the current path string, used for error handling and printing (generally assigned internally).
* path_top: A pointer to the top path string, used for error handling and printing (generally assigned internally).
* action: A callback used for performing some action (this is required to do anything).
+ * handle: A callback used for performing error handling during recursion directly relating to a file.
*
* The macro_f_directory_recurse_do_t_initialize_1() all arguments.
* The macro_f_directory_recurse_do_t_initialize_2() all arguments except for internally managed source, destination, mode, and depth.
typedef struct {
f_number_unsigned_t max_depth;
f_array_length_t depth;
- uint8_t flag;
+ uint16_t flag;
f_state_t state;
f_directory_listing_t listing;
const f_string_static_t *path;
const f_string_static_t *path_top;
- void (*action)(void * const recurse, const uint16_t flag);
+ void (*action)(void * const recurse, const f_string_static_t name, const uint16_t flag);
+ void (*handle)(void * const recurse, const f_string_static_t name, const uint16_t flag);
} f_directory_recurse_do_t;
#define f_directory_recurse_do_t_initialize { \
0, \
0, \
0, \
+ 0, \
}
- #define macro_f_directory_recurse_do_t_initialize_1(max_depth, depth, flag, state, listing, path, path_top, action) { \
+ #define macro_f_directory_recurse_do_t_initialize_1(max_depth, depth, flag, state, listing, path, path_top, action, handle) { \
max_depth, \
depth, \
flag, \
path, \
path_top, \
action, \
+ handle, \
}
- #define macro_f_directory_recurse_do_t_initialize_2(max_depth, depth, flag, state, action) { \
+ #define macro_f_directory_recurse_do_t_initialize_2(max_depth, depth, flag, state, action, handle) { \
max_depth, \
depth,\
flag, \
0, \
0, \
action, \
+ handle, \
}
#endif // _di_f_directory_recurse_do_t_
if (!recurse->action) {
recurse->state.status = F_status_set_error(F_parameter);
+
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, path, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_path_e);
+ }
+ else if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
+ }
+
return;
}
#endif // _di_level_1_parameter_checking_
if (!recurse->path_top->used) {
recurse->state.status = F_data_not;
- if (recurse->state.handle) {
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, path, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_path_e);
+ }
+ else if (recurse->state.handle) {
recurse->state.handle(&recurse->state, (void *) recurse);
}
}
if (F_status_is_error(recurse->state.status)) {
- if (recurse->state.handle) {
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, path, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_path_e);
+ }
+ else if (recurse->state.handle) {
recurse->state.handle(&recurse->state, (void *) recurse);
}
}
if ((recurse->flag & f_directory_recurse_do_flag_top_e) && (recurse->flag & f_directory_recurse_do_flag_first_e)) {
- recurse->action((void *) recurse, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_first_e);
+ recurse->action((void *) recurse, path, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_first_e | f_directory_recurse_do_flag_path_e);
}
if (F_status_is_error_not(recurse->state.status)) {
if (F_status_is_error_not(recurse->state.status)) {
if ((recurse->flag & f_directory_recurse_do_flag_top_e) && (recurse->flag & f_directory_recurse_do_flag_last_e)) {
- recurse->action((void *) recurse, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_last_e);
+ recurse->action((void *) recurse, path, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_last_e | f_directory_recurse_do_flag_path_e);
}
}
if (F_status_is_error(recurse->state.status)) {
- if (recurse->state.handle) {
- recurse->state.handle(&recurse->state, (void *) &recurse);
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, path, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_path_e);
+ }
+ else if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
}
}
else {
* F_none on success.
* F_data_not if source.used or destination.used is 0.
*
- * F_directory_not (with error bit) if the source directory does not exist.
+ * F_directory_not (with error bit) if the directory does not exist.
* F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
*
* Errors (with error bit) from: f_directory_create().
recurse->state.status = private_fl_directory_list(*recurse->path, 0, 0, recurse->flag & f_directory_recurse_do_flag_dereference_e, &recurse->listing);
if (F_status_is_error(recurse->state.status)) {
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, *recurse->path, f_directory_recurse_do_flag_path_e);
+ }
+ else if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
+ }
// Only the directory is to be freed because all others are preserved between recursions.
f_string_dynamics_resize(0, &recurse->listing.directory);
f_directory_recurse_do_flag_unknown_e,
};
- //
-
f_array_length_t j = 0;
for (uint8_t i = 0; i < 7; ++i) {
recurse->state.status = F_none;
- recurse->action((void *) recurse, flags[i]);
- if (F_status_is_error(recurse->state.status)) break;
+ recurse->action((void *) recurse, list[i]->array[j], flags[i]);
+
+ if (F_status_is_error(recurse->state.status)) {
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, list[i]->array[j], flags[i]);
+ }
+ else if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
+ }
+
+ break;
+ }
+
if (recurse->state.status == F_break) break;
if (recurse->state.status == F_done) break;
} // for
// Use an upper limit when retaining memory between recursion calls.
if (list[i]->size > F_directory_max_list_d) {
recurse->state.status = f_string_dynamics_resize(F_directory_max_list_d, list[i]);
- if (F_status_is_error(recurse->state.status)) break;
+
+ if (F_status_is_error(recurse->state.status)) {
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, list[i]->array[j], flags[i]);
+ }
+ else if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
+ }
+
+ break;
+ }
}
for (j = 0; j < list[i]->used; ++j) {
if (list[i]->array[j].size > F_directory_max_string_d) {
recurse->state.status = f_string_dynamic_resize(F_directory_max_string_d, &list[i]->array[j]);
- if (F_status_is_error(recurse->state.status)) break;
+
+ if (F_status_is_error(recurse->state.status)) {
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, list[i]->array[j], flags[i]);
+ }
+ else if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
+ }
+
+ break;
+ }
}
} // for
} // for
path_sub.string = path_full_sub;
recurse->state.status = f_directory_exists(path_sub);
- if (F_status_is_error(recurse->state.status)) break;
if (recurse->state.status == F_false) {
- recurse->state.status = F_status_set_error(F_directory);
+ recurse->state.status = F_status_set_error(F_directory_not);
+ }
+
+ if (F_status_is_error(recurse->state.status)) {
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, recurse->listing.directory.array[i], f_directory_recurse_do_flag_directory_e);
+ }
+ else if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
+ }
break;
}
if (recurse->flag & f_directory_recurse_do_flag_first_e) {
- recurse->action((void *) recurse, f_directory_recurse_do_flag_first_e);
+ recurse->action((void *) recurse, recurse->listing.directory.array[i], f_directory_recurse_do_flag_first_e);
}
if (recurse->depth < recurse->max_depth) {
// Errors in the recursed function are handled outside the recursed function here.
else if (F_status_is_error(recurse->state.status)) {
- if (recurse->state.handle) {
- recurse->state.handle(&recurse->state, (void *) &recurse);
+ if (recurse->handle) {
+ recurse->handle((void *) recurse, recurse->listing.directory.array[i], f_directory_recurse_do_flag_directory_e);
+ }
+ else if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
}
recurse->state.status = F_failure;
recurse->state.status = F_none;
if (recurse->flag & f_directory_recurse_do_flag_last_e) {
- recurse->action((void *) recurse, f_directory_recurse_do_flag_last_e);
+ recurse->action((void *) recurse, recurse->listing.directory.array[i], f_directory_recurse_do_flag_last_e);
}
recurse->state.status = F_none;
#endif
#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) {
+ 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) {
- if (!data || !data->main || !data_build || !arguments) return;
+ if (!data || !data->main || !data_build) return;
if (F_status_is_error(data->main->setting.state.status)) return;
{
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) return;
} // for
}
memcpy(buffer_string, fake_build_parameter_library_include_s.string, sizeof(f_char_t) * fake_build_parameter_library_include_s.used);
memcpy(buffer_string + fake_build_parameter_library_include_s.used, data->path_work_includes.string, sizeof(f_char_t) * data->path_work_includes.used);
- data->main->setting.state.status = fll_execute_arguments_add(buffer, arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(buffer, &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) return;
}
memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_path_s.used);
memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, data->path_work_libraries_shared.string, sizeof(f_char_t) * data->path_work_libraries_shared.used);
- data->main->setting.state.status = fll_execute_arguments_add(buffer, arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(buffer, &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) return;
}
memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_path_s.used);
memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, data->path_work_libraries_static.string, sizeof(f_char_t) * data->path_work_libraries_static.used);
- data->main->setting.state.status = fll_execute_arguments_add(buffer, arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(buffer, &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) return;
}
}
if (!strings[s]->array[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(strings[s]->array[i], arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(strings[s]->array[i], &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) return;
} // for
} // for
f_directory_recurse_copy_t recurse = f_directory_recurse_copy_t_initialize;
recurse.verbose = &fake_print_verbose_recursive_copy;
+ recurse.state.custom = (void *) data;
+
//recurse.failures = &failures; // @fixme this now needs to be handled by a callback in recurse (recurse.state.handle)., maybe make this a callback on f_directory_recurse_copy_t?
recurse.mode = mode;
if (F_status_is_error(data->main->setting.state.status) || f_file_exists(file_stage, F_true) == F_true) return 0;
if (!process_script.used) return 0;
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ fake_string_dynamics_reset(&data->main->cache_arguments);
- data->main->setting.state.status = fll_execute_arguments_add(fake_other_operation_build_s, &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(fake_other_operation_build_s, &data->main->cache_arguments);
// Ensure console color mode is passed to the scripts so that they can also react to color mode.
if (F_status_is_error_not(data->main->setting.state.status) && data->main->program.context.mode != f_color_mode_none_e) {
- f_string_static_t argument = f_string_static_t_initialize;
- argument.used = f_console_symbol_short_inverse_s.used + f_console_standard_short_dark_s.used;
-
- f_char_t argument_string[argument.used + 1];
- argument.string = argument_string;
- argument_string[argument.used] = 0;
+ fake_string_dynamic_reset(&data->main->cache_argument);
- memcpy(argument_string, f_console_symbol_short_inverse_s.string, sizeof(f_char_t) * f_console_symbol_short_inverse_s.used);
+ data->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data->main->cache_argument);
- if (data->main->program.context.mode == f_color_mode_dark_e) {
- memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_dark_s.string, sizeof(f_char_t) * f_console_standard_short_dark_s.used);
- }
- else if (data->main->program.context.mode == f_color_mode_light_e) {
- memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_light_s.string, sizeof(f_char_t) * f_console_standard_short_light_s.used);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ if (data->main->program.context.mode == f_color_mode_dark_e) {
+ data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_dark_s, &data->main->cache_argument);
+ }
+ else if (data->main->program.context.mode == f_color_mode_light_e) {
+ data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_light_s, &data->main->cache_argument);
+ }
+ else if (data->main->program.context.mode == f_color_mode_not_e) {
+ data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_no_color_s, &data->main->cache_argument);
+ }
}
- else if (data->main->program.context.mode == f_color_mode_not_e) {
- memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_no_color_s.string, sizeof(f_char_t) * f_console_standard_short_no_color_s.used);
+
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append));
+
+ return 0;
}
- data->main->setting.state.status = fll_execute_arguments_add(argument, &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
}
// Ensure verbosity level is passed to the scripts so that they can also react to requested verbosity.
if (F_status_is_error_not(data->main->setting.state.status) && data->main->program.error.verbosity != f_console_verbosity_normal_e) {
- f_string_static_t argument = f_string_static_t_initialize;
- argument.used = f_console_symbol_short_inverse_s.used + f_console_standard_short_quiet_s.used;
-
- f_char_t argument_string[argument.used + 1];
- argument.string = argument_string;
- argument_string[argument.used] = 0;
+ fake_string_dynamic_reset(&data->main->cache_argument);
- memcpy(argument_string, f_console_symbol_short_inverse_s.string, sizeof(f_char_t) * f_console_symbol_short_inverse_s.used);
+ data->main->setting.state.status = f_string_dynamic_append(f_console_symbol_short_inverse_s, &data->main->cache_argument);
- if (data->main->program.context.mode == f_console_verbosity_quiet_e) {
- memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_quiet_s.string, sizeof(f_char_t) * f_console_standard_short_quiet_s.used);
- }
- else if (data->main->program.context.mode == f_console_verbosity_error_e) {
- memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_error_s.string, sizeof(f_char_t) * f_console_standard_short_error_s.used);
- }
- else if (data->main->program.context.mode == f_console_verbosity_verbose_e) {
- memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_verbose_s.string, sizeof(f_char_t) * f_console_standard_short_verbose_s.used);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ if (data->main->program.context.mode == f_console_verbosity_quiet_e) {
+ data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_quiet_s, &data->main->cache_argument);
+ }
+ else if (data->main->program.context.mode == f_console_verbosity_error_e) {
+ data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_error_s, &data->main->cache_argument);
+ }
+ else if (data->main->program.context.mode == f_console_verbosity_verbose_e) {
+ data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_verbose_s, &data->main->cache_argument);
+ }
+ else if (data->main->program.context.mode == f_console_verbosity_debug_e) {
+ data->main->setting.state.status = f_string_dynamic_append(f_console_standard_short_debug_s, &data->main->cache_argument);
+ }
}
- else if (data->main->program.context.mode == f_console_verbosity_debug_e) {
- memcpy(argument_string + f_console_symbol_short_inverse_s.used, f_console_standard_short_debug_s.string, sizeof(f_char_t) * f_console_standard_short_debug_s.used);
+
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append));
+
+ return 0;
}
- data->main->setting.state.status = fll_execute_arguments_add(argument, &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
}
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_mash));
f_string_dynamic_resize(0, &defines);
- f_string_dynamics_resize(0, &arguments);
return 0;
}
data->main->setting.work,
};
- data->main->setting.state.status = fll_execute_arguments_add_parameter_set(prefixs, names, values, 9, &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add_parameter_set(prefixs, names, values, 9, &data->main->cache_arguments);
f_string_dynamic_resize(0, &defines);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add_parameter_set));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
}
- f_string_dynamic_t path = f_string_dynamic_t_initialize;
+ fake_string_dynamic_reset(&data->main->cache_argument);
if (process_script.string[0] != f_path_separator_s.string[0]) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_data_build, &path);
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_data_build, &data->main->cache_argument);
}
if (F_status_is_error_not(data->main->setting.state.status)) {
- data->main->setting.state.status = f_string_dynamic_append_nulless(process_script, &path);
+ data->main->setting.state.status = f_string_dynamic_append_nulless(process_script, &data->main->cache_argument);
}
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- f_string_dynamic_resize(0, &path);
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(FL_execute_parameter_option_path_d, 0, &data_build->environment, &signals, 0);
- data->main->setting.state.status = fll_execute_program(path, arguments, ¶meter, 0, (void *) &return_code);
-
- f_string_dynamics_resize(0, &arguments);
+ data->main->setting.state.status = fll_execute_program(data->main->cache_argument, data->main->cache_arguments, ¶meter, 0, (void *) &return_code);
if (!((++data->main->program.signal_check) % fake_signal_check_d) && fll_program_standard_signal_received(&data->main->program)) {
fll_program_print_signal_received(&data->main->program.warning, data->main->program.signal_received);
else if (data->main->setting.state.status != F_child) {
if (F_status_is_error(data->main->setting.state.status)) {
if (F_status_set_fine(data->main->setting.state.status) == F_failure) {
- fake_print_error_failure_script(&data->main->program.error, path);
+ fake_print_error_failure_script(&data->main->program.error, data->main->cache_argument);
}
else {
fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_program));
}
}
- f_string_dynamic_resize(0, &path);
-
return return_code;
}
#endif // _di_fake_build_execute_process_script_
#endif // _di_fake_build_get_file_name_without_extension_
#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) {
+ 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) {
- if (!data || !data->main || !data_build || !path || !generic || !specific || !arguments) return;
+ if (!data || !data->main || !data_build || !path || !generic || !specific) return;
f_array_length_t i = 0;
f_array_length_t j = 0;
memcpy(source_string, path->string, sizeof(f_char_t) * path->used);
memcpy(source_string + path->used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
- data->main->setting.state.status = fll_execute_arguments_add(source, arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(source, &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) return;
} // for
} // for
fake_build_program_script(data, &data_build, mode, stage.file_program_script);
if (data_build.setting.build_script) {
- f_string_static_t source = f_string_static_t_initialize;
-
- fake_build_path_source_length(data, &data_build, &data_build.setting.path_sources, &source);
-
- f_char_t source_string[source.used + fake_path_part_script_s.used + 1];
- source.string = source_string;
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &data->main->cache_argument);
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &source);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_path_part_script_s, &data->main->cache_argument);
- memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(f_char_t) * fake_path_part_script_s.used);
- source.used += fake_path_part_script_s.used;
- source.string[source.used] = 0;
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ }
+ }
- fake_build_copy(data, mode, fake_build_scripts_s, source, data->path_build_programs_script, data_build.setting.build_sources_script, stage.file_sources_script, 0);
+ fake_build_copy(data, mode, fake_build_scripts_s, data->main->cache_argument, data->path_build_programs_script, data_build.setting.build_sources_script, stage.file_sources_script, 0);
}
}
else {
if (data_build.setting.build_sources_headers.used) {
- f_string_static_t source = f_string_static_t_initialize;
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &data->main->cache_argument);
- fake_build_path_source_length(data, &data_build, &data_build.setting.path_sources, &source);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ fake_string_dynamic_reset(&data->main->cache_1);
- f_char_t source_string[source.used + 1];
- source.string = source_string;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_includes, &data->main->cache_1);
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &source);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data_build.setting.path_headers, &data->main->cache_1);
- f_string_static_t path_headers = f_string_static_t_initialize;
- path_headers.used = data->path_build_includes.used + data_build.setting.path_headers.used;
-
- f_char_t path_headers_string[path_headers.used + 1];
- path_headers.string = path_headers_string;
-
- memcpy(path_headers_string, data->path_build_includes.string, sizeof(f_char_t) * data->path_build_includes.used);
-
- if (data_build.setting.path_headers.used) {
- memcpy(path_headers_string + data->path_build_includes.used, data_build.setting.path_headers.string, sizeof(f_char_t) * data_build.setting.path_headers.used);
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ }
+ }
}
- path_headers_string[path_headers.used] = 0;
-
- fake_build_copy(data, mode, fake_build_header_files_s, source, path_headers, data_build.setting.build_sources_headers, stage.file_sources_headers, data_build.setting.preserve_path_headers ? source.used : 0);
+ fake_build_copy(data, mode, fake_build_header_files_s, data->main->cache_argument, data->main->cache_1, data_build.setting.build_sources_headers, stage.file_sources_headers, data_build.setting.preserve_path_headers ? data->main->cache_argument.used : 0);
if (data_build.setting.build_shared) {
- fake_build_copy(data, mode, fake_build_header_files_shared_s, source, path_headers, data_build.setting.build_sources_headers_shared, stage.file_sources_headers, data_build.setting.preserve_path_headers ? source.used : 0);
+ fake_build_copy(data, mode, fake_build_header_files_shared_s, data->main->cache_argument, data->main->cache_1, data_build.setting.build_sources_headers_shared, stage.file_sources_headers, data_build.setting.preserve_path_headers ? data->main->cache_argument.used : 0);
}
if (data_build.setting.build_static) {
- fake_build_copy(data, mode, fake_build_header_files_static_s, source, path_headers, data_build.setting.build_sources_headers_static, stage.file_sources_headers, data_build.setting.preserve_path_headers ? source.used : 0);
+ fake_build_copy(data, mode, fake_build_header_files_static_s, data->main->cache_argument, data->main->cache_1, data_build.setting.build_sources_headers_static, stage.file_sources_headers, data_build.setting.preserve_path_headers ? data->main->cache_argument.used : 0);
}
}
}
if (data_build.setting.build_script) {
- f_string_static_t source = f_string_static_t_initialize;
+ fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &data->main->cache_argument);
- fake_build_path_source_length(data, &data_build, &data_build.setting.path_sources, &source);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_path_part_script_s, &data->main->cache_argument);
- f_char_t source_string[source.used + fake_path_part_script_s.used + 1];
- source.string = source_string;
-
- fake_build_path_source_string(data, &data_build, &data_build.setting.path_sources, &source);
-
- memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(f_char_t) * fake_path_part_script_s.used);
- source.used += fake_path_part_script_s.used;
- source.string[source.used] = 0;
-
- fake_build_copy(data, mode, fake_build_scripts_s, source, data->path_build_programs_script, data_build.setting.build_sources_script, stage.file_sources_script, 0);
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ }
+ else {
+ fake_build_copy(data, mode, fake_build_scripts_s, data->main->cache_argument, data->path_build_programs_script, data_build.setting.build_sources_script, stage.file_sources_script, 0);
+ }
+ }
}
}
}
#endif // _di_fake_build_operate_
-#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->main || !data_build || !setting_path_source || !source) return;
-
- source->used = 0;
-
- if (setting_path_source->used) {
- source->used += setting_path_source->used;
- }
-
- if (data_build->setting.has_path_standard) {
- if (data_build->setting.build_language == fake_build_language_c_e) {
- source->used += fake_build_language_c_s.used;
- }
- else if (data_build->setting.build_language == fake_build_language_cpp_e) {
- source->used += fake_build_language_cpp_s.used;
- }
- else if (data_build->setting.build_language == fake_build_language_bash_e) {
- source->used += fake_build_language_bash_s.used;
- }
-
- source->used += f_path_separator_s.used;
- }
- }
-#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, f_string_static_t * const 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_dynamic_t * const source) {
if (!data || !data->main || !data_build || !setting_path_source || !source) return;
- source->used = 0;
+ fake_string_dynamic_reset(source);
- memcpy(source->string + source->used, setting_path_source->string, sizeof(f_char_t) * setting_path_source->used);
- source->used += setting_path_source->used;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(*setting_path_source, source);
- if (data_build->setting.has_path_standard) {
+ if (F_status_is_error_not(data->main->setting.state.status) && data_build->setting.has_path_standard) {
if (data_build->setting.build_language == fake_build_language_c_e) {
- memcpy(source->string + source->used, fake_build_language_c_s.string, sizeof(f_char_t) * fake_build_language_c_s.used);
- source->used += fake_build_language_c_s.used;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_c_s, source);
}
else if (data_build->setting.build_language == fake_build_language_cpp_e) {
- memcpy(source->string + source->used, fake_build_language_cpp_s.string, sizeof(f_char_t) * fake_build_language_cpp_s.used);
- source->used += fake_build_language_cpp_s.used;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_cpp_s, source);
}
else if (data_build->setting.build_language == fake_build_language_bash_e) {
- memcpy(source->string + source->used, fake_build_language_bash_s.string, sizeof(f_char_t) * fake_build_language_bash_s.used);
- source->used += fake_build_language_bash_s.used;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_language_bash_s, source);
}
+ }
- memcpy(source->string + source->used, f_path_separator_s.string, sizeof(f_char_t) * f_path_separator_s.used);
- source->used += f_path_separator_s.used;
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(f_path_separator_s, source);
}
- source->string[source->used] = 0;
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ }
}
#endif // _di_fake_build_path_source_string_
#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) {
+ 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) {
- if (!data || !data->main || !data_build || !generic || !specific || !arguments) return;
+ if (!data || !data->main || !data_build || !generic || !specific) return;
f_array_length_t i = 0;
f_array_length_t j = 0;
specific,
};
- f_string_static_t source = f_string_static_t_initialize;
-
for (; i < 2; ++i) {
for (j = 0; j < sources[i]->used; ++j) {
if (!sources[i]->array[j].used) continue;
- fake_build_path_source_length(data, data_build, &data_build->setting.path_sources, &source);
+ fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &data->main->cache_argument);
+ if (F_status_is_error(data->main->setting.state.status)) return;
- f_char_t source_string[source.used + sources[i]->array[j].used + 1];
- source.string = source_string;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &data->main->cache_argument);
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &source);
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
- source.used += sources[i]->array[j].used;
- source.string[source.used] = 0;
+ return;
+ }
- data->main->setting.state.status = fll_execute_arguments_add(source, arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) return;
} // for
} // for
#endif // _di_fake_build_sources_add_
#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) {
+ 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) {
- if (!data || !data->main || !data_build || !generic || !specific || !arguments) return;
+ if (!data || !data->main || !data_build || !generic || !specific) return;
if (!generic->used && !specific->used) {
data->main->setting.state.status = F_none;
return;
}
- f_string_static_t source = f_string_static_t_initialize;
-
- fake_build_path_source_length(data, data_build, &data_build->setting.path_sources_object, &source);
-
- if (specific->used) {
- source.used += specific->used;
- }
- else {
- source.used += generic->used;
- }
+ fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_object, &data->main->cache_argument);
+ if (F_status_is_error(data->main->setting.state.status)) return;
- f_char_t source_string[source.used + 1];
- source.string = source_string;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(specific->used ? *specific : *generic, &data->main->cache_argument);
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources_object, &source);
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- if (specific->used) {
- memcpy(source_string + source.used, specific->string, sizeof(f_char_t) * specific->used);
- source.used += specific->used;
- }
- else {
- memcpy(source_string + source.used, generic->string, sizeof(f_char_t) * generic->used);
- source.used += generic->used;
+ return;
}
- source_string[source.used] = 0;
-
- data->main->setting.state.status = fll_execute_arguments_add(source, arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) return;
data->main->setting.state.status = F_none;
* Set to FALSE to designate that this is adding for a static library/program.
* @param type
* A build type from the fake_build_type_* enumeration.
- * @param arguments
- * The arguments array to append to.
*
* @see fll_execute_arguments_add()
*/
#ifndef _di_fake_build_arguments_standard_add_
- extern 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);
+ extern 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);
#endif // _di_fake_build_arguments_standard_add_
/**
* The generic sources to add.
* @param specific
* The specific sources to add.
- * @param arguments
- * The execute arguments array being updated.
*
* @see fll_execute_arguments_add()
*/
#ifndef _di_fake_build_objects_add_
- extern 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);
+ extern 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);
#endif // _di_fake_build_objects_add_
/**
#endif // _di_fake_build_operate_
/**
- * Calculate the length of the sources path so that it can be used to manually construct a static string.
+ * Construct a static string array of the sources path.
*
* @param data
* The program data.
*
- * This does not alter data.main->setting.state.status.
- * @param data_build
- * The build data.
- * @param setting_path_source
- * The source path from the build settings file.
- * @param source
- * The static string.
- * The path_sources.string is not expected to be defined at this point.
- * The path_sources.used is updated.
- * The path_sources.size is ignored.
- */
-#ifndef _di_fake_build_path_source_length_
- extern 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);
-#endif // _di_fake_build_path_source_length_
-
-/**
- * Construct a static string array of the sources path.
+ * This alters data.main->setting.state.status:
+ * F_none on success.
*
- * @param data
- * The program data.
+ * F_interrupt (with error bit) on interrupt signal received.
*
- * This does not alter data.main->setting.state.status.
+ * Errors (with error bit) from: f_string_dynamic_append_nulless()
* @param data_build
* The build data.
* @param setting_path_source
* The source path from the build settings file.
* @param source
- * The static string.
- * The path_sources.string is expected to be defined and set to a size from path_sources.used + 1.
- * The path_sources.used is updated.
- * The path_sources.size is ignored.
+ * The source string to append the build path source to.
+ * This gets reset by fake_string_dynamics_reset().
+ *
+ * @see f_string_dynamic_append_nulless()
+ *
+ * @see fake_string_dynamics_reset()
*/
#ifndef _di_fake_build_path_source_string_
- extern 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);
+ extern void fake_build_path_source_string(fake_data_t * const data, fake_build_data_t * const data_build, f_string_static_t * const setting_path_source, f_string_dynamic_t * const source);
#endif // _di_fake_build_path_source_string_
/**
* The generic sources to add.
* @param specific
* The specific sources to add.
- * @param arguments
- * The execute arguments array being updated.
*
* @see fll_execute_arguments_add()
*/
#ifndef _di_fake_build_sources_add_
- extern 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);
+ extern 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);
#endif // _di_fake_build_sources_add_
/**
* The generic sources to add.
* @param specific
* The specific sources to add.
- * @param arguments
- * The execute arguments array being updated.
*
* @see fll_execute_arguments_add()
*/
#ifndef _di_fake_build_sources_object_add_
- extern 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);
+ extern 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);
#endif // _di_fake_build_sources_object_add_
/**
fake_build_print_compile_library_shared(&data->main->program.message);
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ fake_string_dynamics_reset(&data->main->cache_arguments);
- fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_shared, &arguments);
+ fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_shared);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_objects_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
- 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);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) break;
} // for
- fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_library_e, &arguments);
+ fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_library_e);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
}
{
- const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
-
- f_string_dynamics_resize(0, &arguments);
+ const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
if (F_status_is_error(data->main->setting.state.status)) return 0;
if (data->main->setting.state.status == F_child) return result;
fake_build_print_compile_library_static(&data->main->program.message);
- f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
- f_string_dynamic_t source_path = f_string_dynamic_t_initialize;
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ fake_string_dynamic_reset(&data->main->cache_1);
+ fake_string_dynamic_reset(&data->main->cache_2);
+ fake_string_dynamics_reset(&data->main->cache_arguments);
f_array_length_t i = 0;
if (!data_build->setting.build_indexer_arguments.array[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(data_build->setting.build_indexer_arguments.array[i], &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(data_build->setting.build_indexer_arguments.array[i], &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) break;
} // for
if (F_status_is_error_not(data->main->setting.state.status)) {
- f_string_static_t destination = f_string_static_t_initialize;
- destination.used = data->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used;
- destination.used += data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_libraries_static, &data->main->cache_2);
- f_char_t destination_string[destination.used + 1];
- destination.string = destination_string;
- destination_string[destination.used] = 0;
- destination.used = 0;
-
- memcpy(destination_string, data->path_build_libraries_static.string, sizeof(f_char_t) * data->path_build_libraries_static.used);
- destination.used += data->path_build_libraries_static.used;
-
- memcpy(destination_string + destination.used, fake_build_parameter_library_name_prefix_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_prefix_s.used);
- destination.used += fake_build_parameter_library_name_prefix_s.used;
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_prefix_s, &data->main->cache_2);
+ }
- memcpy(destination_string + destination.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
- destination.used += data_build->setting.build_name.used;
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_2);
+ }
- memcpy(destination_string + destination.used, fake_build_parameter_library_name_suffix_static_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_suffix_static_s.used);
- destination.used += fake_build_parameter_library_name_suffix_static_s.used;
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_name_suffix_static_s, &data->main->cache_2);
+ }
- data->main->setting.state.status = fll_execute_arguments_add(destination, &arguments);
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+ }
+ else {
+ data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_2, &data->main->cache_arguments);
+ }
}
if (F_status_is_error_not(data->main->setting.state.status)) {
- f_string_static_t source = f_string_static_t_initialize;
f_array_length_t j = 0;
const f_string_dynamics_t *sources[2] = {
for (j = 0; j < sources[i]->used; ++j) {
- source_path.used = 0;
+ fake_string_dynamic_reset(&data->main->cache_2);
- 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], &data->main->cache_1);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
break;
}
- data->main->setting.state.status = f_file_name_directory(sources[i]->array[j], &source_path);
+ data->main->setting.state.status = f_file_name_directory(sources[i]->array[j], &data->main->cache_2);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(f_file_name_directory));
break;
}
- if (source_path.used) {
- data->main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &source_path);
+ fake_string_dynamic_reset(&data->main->cache_argument);
+
+ if (data->main->cache_2.used) {
+ data->main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &data->main->cache_2);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_prepend));
break;
}
- data->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &source_path);
+ data->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data->main->cache_2);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
- source.used = source_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->cache_2, &data->main->cache_argument);
+
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->cache_1, &data->main->cache_argument);
+ }
+
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
+ }
}
else {
- source.used = data->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
- }
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects, &data->main->cache_argument);
- f_char_t source_string[source.used + 1];
- source.string = source_string;
- source_string[source.used] = 0;
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->cache_1, &data->main->cache_argument);
+ }
- if (source_path.used) {
- memcpy(source_string, source_path.string, sizeof(f_char_t) * source_path.used);
- memcpy(source_string + source_path.used, file_name.string, sizeof(f_char_t) * file_name.used);
- memcpy(source_string + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
+ }
}
- else {
- memcpy(source_string, data->path_build_objects.string, sizeof(f_char_t) * data->path_build_objects.used);
- memcpy(source_string + data->path_build_objects.used, file_name.string, sizeof(f_char_t) * file_name.used);
- memcpy(source_string + data->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+
+ break;
}
- data->main->setting.state.status = fll_execute_arguments_add(source, &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
int result = data->main->program.child;
if (F_status_is_error_not(data->main->setting.state.status)) {
- result = fake_execute(data, data_build->environment, data_build->setting.build_indexer, arguments);
+ result = fake_execute(data, data_build->environment, data_build->setting.build_indexer);
}
- f_string_dynamic_resize(0, &file_name);
- f_string_dynamic_resize(0, &source_path);
- f_string_dynamics_resize(0, &arguments);
-
if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
}
fake_build_print_compile_object_shared(&data->main->program.message);
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ fake_string_dynamic_reset(&data->main->cache_argument);
+ fake_string_dynamics_reset(&data->main->cache_arguments);
- 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);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_object_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
{
- f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
- parameter_file_name_path.used = data->path_build_objects_shared.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_shared, &data->main->cache_argument);
+
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_argument);
+ }
+
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
+ }
- f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1];
- parameter_file_name_path.string = parameter_file_name_path_string;
- parameter_file_name_path_string[parameter_file_name_path.used] = 0;
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- memcpy(parameter_file_name_path_string, data->path_build_objects_shared.string, sizeof(f_char_t) * data->path_build_objects_shared.used);
- memcpy(parameter_file_name_path_string + data->path_build_objects_shared.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
- memcpy(parameter_file_name_path_string + data->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+ return 0;
+ }
const f_string_static_t values[] = {
fake_build_parameter_object_compile_s,
fake_build_parameter_object_output_s,
- parameter_file_name_path,
+ data->main->cache_argument,
};
for (uint8_t i = 0; i < 3; ++i) {
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) break;
} // for
}
- fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e, &arguments);
+ fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_object_e);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_arguments_standard_add));
- macro_f_string_dynamics_t_delete_simple(arguments);
-
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
-
- macro_f_string_dynamics_t_delete_simple(arguments);
+ int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
fake_build_print_compile_object_static(&data->main->program.message);
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ fake_string_dynamic_reset(&data->main->cache_argument);
+ fake_string_dynamics_reset(&data->main->cache_arguments);
- 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);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_object_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
{
- f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
- parameter_file_name_path.used = data->path_build_objects_static.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects_static, &data->main->cache_argument);
+
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_argument);
+ }
+
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
+ }
- f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1];
- parameter_file_name_path.string = parameter_file_name_path_string;
- parameter_file_name_path_string[parameter_file_name_path.used] = 0;
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- memcpy(parameter_file_name_path_string, data->path_build_objects_static.string, sizeof(f_char_t) * data->path_build_objects_static.used);
- memcpy(parameter_file_name_path_string + data->path_build_objects_static.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
- memcpy(parameter_file_name_path_string + data->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+ return 0;
+ }
const f_string_static_t values[] = {
fake_build_parameter_object_compile_s,
fake_build_parameter_object_output_s,
- parameter_file_name_path,
+ data->main->cache_argument,
};
for (uint8_t i = 0; i < 3; ++i) {
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) break;
} // for
}
- fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e, &arguments);
+ fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_object_e);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_arguments_standard_add));
- macro_f_string_dynamics_t_delete_simple(arguments);
-
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
-
- macro_f_string_dynamics_t_delete_simple(arguments);
+ const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
fake_build_print_compile_object_static_library(&data->main->program.message);
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ fake_string_dynamics_reset(&data->main->cache_arguments);
- fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_static, &arguments);
+ fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_library, &data_build->setting.build_objects_library_static);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_objects_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
- f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
- f_string_dynamic_t destination_path = f_string_dynamic_t_initialize;
- f_string_static_t destination = f_string_static_t_initialize;
- f_string_static_t source = f_string_static_t_initialize;
-
int result = data->main->program.child;
const f_string_dynamics_t *sources[2] = {
f_array_length_t i = 0;
f_array_length_t j = 0;
+ uint8_t k = 0;
for (i = 0; i < 2; ++i) {
if (!sources[i]->array[j].used) continue;
- file_name.used = 0;
- destination_path.used = 0;
+ fake_string_dynamic_reset(&data->main->cache_1);
+ fake_string_dynamic_reset(&data->main->cache_2);
+ fake_string_dynamic_reset(&data->main->cache_argument);
- fake_build_path_source_length(data, data_build, &data_build->setting.path_sources, &source);
+ fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &data->main->cache_1);
+ if (F_status_is_error(data->main->setting.state.status)) break;
- f_char_t source_string[source.used + sources[i]->array[j].used + 1];
- source.string = source_string;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(sources[i]->array[j], &data->main->cache_1);
- fake_build_path_source_string(data, data_build, &data_build->setting.path_sources, &source);
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
- source.used += sources[i]->array[j].used;
- source.string[source.used] = 0;
+ return 0;
+ }
- 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], &data->main->cache_2);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_get_file_name_without_extension));
break;
}
- data->main->setting.state.status = f_file_name_directory(sources[i]->array[j], &destination_path);
+ data->main->setting.state.status = f_file_name_directory(sources[i]->array[j], &data->main->cache_argument);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(f_file_name_directory));
break;
}
- if (destination_path.used) {
- data->main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &destination_path);
+ if (data->main->cache_argument.used) {
+ data->main->setting.state.status = f_string_dynamic_prepend(data->path_build_objects, &data->main->cache_argument);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_prepend));
break;
}
- data->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &destination_path);
+ data->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data->main->cache_argument);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
break;
}
- data->main->setting.state.status = f_directory_exists(destination_path);
+ data->main->setting.state.status = f_directory_exists(data->main->cache_argument);
if (data->main->setting.state.status == F_false) {
- fake_build_print_error_exist_not_directory(&data->main->program.message, destination_path);
+ fake_build_print_error_exist_not_directory(&data->main->program.message, data->main->cache_argument);
data->main->setting.state.status = F_status_set_error(F_failure);
}
if (data->main->setting.state.status == F_file_found_not) {
- data->main->setting.state.status = f_directory_create(destination_path, mode.directory);
+ data->main->setting.state.status = f_directory_create(data->main->cache_argument, mode.directory);
if (F_status_is_error(data->main->setting.state.status)) {
if (F_status_set_fine(data->main->setting.state.status) == F_file_found_not) {
- fake_build_print_error_cannot_create_due_to_parent(&data->main->program.message, destination_path);
+ fake_build_print_error_cannot_create_due_to_parent(&data->main->program.message, data->main->cache_argument);
}
else {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_create), destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_create), data->main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
}
break;
}
- fake_build_print_verbose_create_directory(&data->main->program.message, destination_path);
+ fake_build_print_verbose_create_directory(&data->main->program.message, data->main->cache_argument);
}
if (F_status_is_error(data->main->setting.state.status)) {
- fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_exists), destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data->main->program.error, macro_fake_f(f_directory_exists), data->main->cache_argument, f_file_operation_create_s, fll_error_file_type_directory_e);
break;
}
+ }
- destination.used = destination_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
+ if (data->main->cache_argument.used) {
+ data->main->setting.state.status = F_none;
}
else {
- destination.used = data->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_objects, &data->main->cache_argument);
}
- f_char_t destination_string[destination.used + 1];
- destination.string = destination_string;
- destination_string[destination.used] = 0;
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->main->cache_2, &data->main->cache_argument);
+ }
- if (destination_path.used) {
- memcpy(destination_string, destination_path.string, sizeof(f_char_t) * destination_path.used);
- memcpy(destination_string + destination_path.used, file_name.string, sizeof(f_char_t) * file_name.used);
- memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_object_name_suffix_s, &data->main->cache_argument);
}
- else {
- memcpy(destination_string, data->path_build_objects.string, sizeof(f_char_t) * data->path_build_objects.used);
- memcpy(destination_string + data->path_build_objects.used, file_name.string, sizeof(f_char_t) * file_name.used);
- memcpy(destination_string + data->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
+
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+
+ return 0;
}
const f_string_static_t values[] = {
- source,
+ data->main->cache_1,
fake_build_parameter_object_compile_s,
fake_build_parameter_object_static_s,
fake_build_parameter_object_output_s,
- destination,
+ data->main->cache_argument,
};
- for (uint8_t k = 0; k < 5; ++k) {
+ for (k = 0; k < 5; ++k) {
if (!values[k].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[k], &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(values[k], &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) break;
} // for
- fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_library_e, &arguments);
+ fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_library_e);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
break;
}
- result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
-
- macro_f_string_dynamics_t_delete_simple(arguments);
+ result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
if (F_status_is_error(data->main->setting.state.status) || data->main->setting.state.status == F_child) break;
} // for
if (F_status_is_error(data->main->setting.state.status) || data->main->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(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
}
fake_build_print_compile_program_shared(&data->main->program.message);
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ fake_string_dynamics_reset(&data->main->cache_arguments);
- fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_shared, &arguments);
+ fake_build_objects_add(data, data_build, &data->path_build_objects_shared, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_shared);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_objects_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
- 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);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
if (F_status_is_error_not(data->main->setting.state.status)) {
- f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
- parameter_file_name_path.used = data->path_build_programs_shared.used + data_build->setting.build_name.used;
+ fake_string_dynamic_reset(&data->main->cache_argument);
- f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1];
- parameter_file_name_path.string = parameter_file_name_path_string;
- parameter_file_name_path_string[parameter_file_name_path.used] = 0;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_programs_shared, &data->main->cache_argument);
- memcpy(parameter_file_name_path_string, data->path_build_programs_shared.string, sizeof(f_char_t) * data->path_build_programs_shared.used);
- memcpy(parameter_file_name_path_string + data->path_build_programs_shared.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_argument);
+ }
+
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+
+ return 0;
+ }
const f_string_static_t values[] = {
fake_build_parameter_library_output_s,
- parameter_file_name_path,
+ data->main->cache_argument,
};
for (uint8_t i = 0; i < 2; ++i) {
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) break;
} // for
}
// If project-specific library sources exist, then the -lbuild_name needs to be added to the arguments.
if (F_status_is_error_not(data->main->setting.state.status) && data_build->setting.build_sources_library.used) {
- f_string_static_t link_project_library = f_string_static_t_initialize;
- link_project_library.used = fake_build_parameter_library_link_file_s.used + data_build->setting.build_name.used;
+ fake_string_dynamic_reset(&data->main->cache_argument);
- f_char_t link_project_library_string[link_project_library.used + 1];
- link_project_library.string = link_project_library_string;
- link_project_library_string[link_project_library.used] = 0;
+ data->main->setting.state.status = f_string_dynamic_append_nulless(fake_build_parameter_library_link_file_s, &data->main->cache_argument);
- memcpy(link_project_library_string, fake_build_parameter_library_link_file_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_file_s.used);
- memcpy(link_project_library_string + fake_build_parameter_library_link_file_s.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.build_name, &data->main->cache_argument);
+ }
+
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
- data->main->setting.state.status = fll_execute_arguments_add(link_project_library, &arguments);
+ return 0;
+ }
+
+ data->main->setting.state.status = fll_execute_arguments_add(data->main->cache_argument, &data->main->cache_arguments);
}
- fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_program_e, &arguments);
+ fake_build_arguments_standard_add(data, data_build, F_true, fake_build_type_program_e);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
- macro_f_string_dynamics_t_delete_simple(arguments);
-
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
-
- macro_f_string_dynamics_t_delete_simple(arguments);
+ const int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
fake_build_print_compile_program_static(&data->main->program.message);
- f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ fake_string_dynamics_reset(&data->main->cache_arguments);
- fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_static, &arguments);
+ fake_build_objects_add(data, data_build, &data->path_build_objects_static, &data_build->setting.build_objects_program, &data_build->setting.build_objects_program_static);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_objects_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
- 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);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fake_build_sources_add));
- f_string_dynamics_resize(0, &arguments);
-
return 0;
}
if (!values[i].used) continue;
- data->main->setting.state.status = fll_execute_arguments_add(values[i], &arguments);
+ data->main->setting.state.status = fll_execute_arguments_add(values[i], &data->main->cache_arguments);
if (F_status_is_error(data->main->setting.state.status)) break;
} // for
}
- fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_program_e, &arguments);
+ fake_build_arguments_standard_add(data, data_build, F_false, fake_build_type_program_e);
if (F_status_is_error(data->main->setting.state.status)) {
fake_print_error(&data->main->program.error, macro_fake_f(fll_execute_arguments_add));
- macro_f_string_dynamics_t_delete_simple(arguments);
-
return 0;
}
- int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler, arguments);
-
- macro_f_string_dynamics_t_delete_simple(arguments);
+ int result = fake_execute(data, data_build->environment, data_build->setting.build_compiler);
if (F_status_is_error_not(data->main->setting.state.status) && data->main->setting.state.status != F_child) {
fake_build_touch(data, file_stage);
if (F_status_is_error(data->main->setting.state.status) || data->main->setting.state.status == F_child) return;
if (f_file_exists(file_stage, F_true) == F_true) return;
- f_string_static_t path_headers = f_string_static_t_initialize;
- path_headers.used = data->path_build_includes.used + data_build->setting.path_headers.used;
-
- f_char_t path_headers_string[path_headers.used + 1];
- path_headers.string = path_headers_string;
+ fake_string_dynamic_reset(&data->main->cache_argument);
if (data_build->setting.path_headers.used) {
- memcpy(path_headers_string, data->path_build_includes.string, sizeof(f_char_t) * data->path_build_includes.used);
- memcpy(path_headers_string + data->path_build_includes.used, data_build->setting.path_headers.string, sizeof(f_char_t) * data_build->setting.path_headers.used);
- }
- else {
- path_headers.used = 0;
- }
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data->path_build_includes, &data->main->cache_argument);
+
+ if (F_status_is_error_not(data->main->setting.state.status)) {
+ data->main->setting.state.status = f_string_dynamic_append_nulless(data_build->setting.path_headers, &data->main->cache_argument);
+ }
- path_headers_string[path_headers.used] = 0;
+ if (F_status_is_error(data->main->setting.state.status)) {
+ fake_print_error(&data->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
+
+ return;
+ }
+ }
const f_string_static_t directorys[] = {
data->path_build,
data->path_build_programs_static,
data->path_build_settings,
data->path_build_stage,
- path_headers,
+ data->main->cache_argument,
};
fake_build_print_message_skeleton_build_base(&data->main->program.message);
}
}
- directorys[i].string[j] = 0; // @fixme this is an error because static strings might be in use.
+ directorys[i].string[j] = 0;
data->main->setting.state.status = f_directory_exists(directorys[i]);
}
#endif // _di_fake_setting_load_parameter_callback_
-#ifndef _di_fake_setting_unload_
- f_status_t fake_setting_unload(fake_main_t * const main) {
+#ifndef _di_fake_string_dynamic_reset_
+ void fake_string_dynamic_reset(f_string_dynamic_t * const dynamic) {
- if (!main) return F_status_set_error(F_parameter);
+ if (!dynamic) return;
- fake_setting_delete(&main->setting);
+ // Shrink an overly long string.
+ if (dynamic->size > fake_max_over_string_d) {
+ f_string_dynamic_resize(fake_allocation_large_d, dynamic);
+ }
+
+ dynamic->used = 0;
+ }
+#endif // _di_fake_string_dynamic_reset_
+
+#ifndef _di_fake_string_dynamics_reset_
+ void fake_string_dynamics_reset(f_string_dynamics_t * const dynamics) {
+
+ if (!dynamics) return;
+
+ // Shrink an overly long array.
+ if (dynamics->size > fake_max_over_array_d) {
+ f_string_dynamics_resize(fake_allocation_large_d, dynamics);
+ }
+
+ while (dynamics->used) {
+ fake_string_dynamic_reset(&dynamics->array[--dynamics->used]);
+ } // while
+ }
+#endif // _di_fake_string_dynamics_reset_
+
+#ifndef _di_fake_iki_data_reset_
+ void fake_iki_data_reset(f_iki_data_t * const iki_data) {
+
+ if (!iki_data) return;
+
+ // Shrink an overly long array.
+ if (iki_data->content.used > fake_max_over_array_d) {
+ f_string_ranges_resize(fake_allocation_large_d, &iki_data->content);
+ }
+
+ if (iki_data->delimits.used > fake_max_over_array_d) {
+ f_array_lengths_resize(fake_allocation_large_d, &iki_data->delimits);
+ }
+
+ if (iki_data->variable.used > fake_max_over_array_d) {
+ f_string_ranges_resize(fake_allocation_large_d, &iki_data->variable);
+ }
+
+ if (iki_data->vocabulary.used > fake_max_over_array_d) {
+ f_string_ranges_resize(fake_allocation_large_d, &iki_data->vocabulary);
+ }
+
+ while (iki_data->content.used) {
+
+ iki_data->content.array[--iki_data->content.used].start = 1;
+ iki_data->content.array[iki_data->content.used].stop = 0;
+ } // while
+
+ while (iki_data->delimits.used) {
+ iki_data->delimits.array[--iki_data->delimits.used] = 0;
+ } // while
+
+ while (iki_data->variable.used) {
+
+ iki_data->variable.array[--iki_data->variable.used].start = 1;
+ iki_data->variable.array[iki_data->variable.used].stop = 0;
+ } // while
+
+ while (iki_data->vocabulary.used) {
- return F_none;
+ iki_data->vocabulary.array[--iki_data->vocabulary.used].start = 1;
+ iki_data->vocabulary.array[iki_data->vocabulary.used].stop = 0;
+ } // while
}
-#endif // _di_fake_setting_unload_
+#endif // _di_fake_iki_data_reset_
#ifdef __cplusplus
} // extern "C"
#endif // _di_fake_setting_load_parameter_callback_
/**
- * Perform the standard program setting unload process.
+ * Reset the string, performing an over-size check and shrinking if necessary.
*
- * @param main
- * The main program and setting data.
- * All buffers are deallocated.
+ * This ignores errors when shrinking.
*
- * This does not alter main.setting.state.status.
+ * @param dynamic
+ * The string to shrink.
+ *
+ * @see f_string_dynamic_resize()
+ */
+#ifndef _di_fake_string_dynamic_reset_
+ extern void fake_string_dynamic_reset(f_string_dynamic_t * const dynamic);
+#endif // _di_fake_string_dynamic_reset_
+
+/**
+ * Reset the array of strings, performing an over-size check and shrinking if necessary.
*
- * @return
- * F_none on success.
+ * This ignores errors when shrinking.
+ *
+ * @param dynamic
+ * The string to shrink.
+ *
+ * @see f_string_dynamic_resize()
+ */
+#ifndef _di_fake_string_dynamics_reset_
+ extern void fake_string_dynamics_reset(f_string_dynamics_t * const dynamics);
+#endif // _di_fake_string_dynamics_reset_
+
+/**
+ * Reset the iki variable data, performing an over-size check and shrinking if necessary.
*
- * F_parameter (with error bit) if a parameter is invalid.
+ * This ignores errors when shrinking.
*
- * Errors (with error bit) from: fake_setting_delete().
+ * @param iki_data
+ * The iki data to shrink.
*
- * @see fake_setting_delete()
+ * @see f_array_lengths_resize()
+ * @see f_string_ranges_resize()
*/
-#ifndef _di_fake_setting_unload_
- extern f_status_t fake_setting_unload(fake_main_t * const main);
-#endif // _di_fake_setting_unload_
+#ifndef _di_fake_iki_data_reset_
+ extern void fake_iki_data_reset(f_iki_data_t * const iki_data);
+#endif // _di_fake_iki_data_reset_
#ifdef __cplusplus
} // extern "C"
* _di_fake_max_*_d:
* - initial_buffer: Max size to maintain the buffer (to avoid buffer bloat after an overly large allocation) (131072 = 128k).
* - operation: Maximum number of operations.
+ * - over_array: Max size when array is over this to shrink the array when done.
+ * - over_string: Max size when string is over this to shrink the string when done.
* - recursion_depth: Maximum recursion depth.
* - stack: Maximum stack call depth.
*/
#ifndef _di_fake_max_d_
#define fake_max_initial_buffer_d 131072
#define fake_max_operation_d 35
+ #define fake_max_over_array_d 4096
+ #define fake_max_over_string_d 65536
#define fake_max_recursion_depth_d 65535
#define fake_max_stack_d 8192
#endif // _di_fake_max_d_
}
#endif // _di_fake_data_delete_
+#ifndef _di_fake_main_data_delete_
+ void fake_main_delete(fake_main_t * const main) {
+
+ if (!main) return;
+
+ fll_program_data_delete(&main->program);
+ fake_setting_delete(&main->setting);
+
+ f_string_dynamic_resize(0, &main->buffer);
+ f_string_dynamic_resize(0, &main->cache_1);
+ f_string_dynamic_resize(0, &main->cache_2);
+ f_string_dynamic_resize(0, &main->cache_argument);
+ f_string_dynamics_resize(0, &main->cache_arguments);
+
+ f_iki_data_delete(&main->cache_iki);
+ }
+#endif // _di_fake_main_data_delete_
+
#ifndef _di_fake_make_data_delete_
void fake_make_data_delete(fake_make_data_t * const data_make) {
f_string_dynamics_resize(0, &data_make->path.stack);
f_fss_nameds_resize(0, &data_make->fakefile);
-
- f_string_dynamic_resize(0, &data_make->buffer);
- f_string_dynamic_resize(0, &data_make->cache_1);
- f_string_dynamic_resize(0, &data_make->cache_2);
- f_string_dynamic_resize(0, &data_make->cache_path);
-
- f_string_dynamics_resize(0, &data_make->cache_arguments);
-
- f_iki_data_delete(&data_make->cache_iki);
}
#endif // _di_fake_make_data_delete_
*
* program: The main program data.
* setting: The settings data.
+ *
+ * buffer: A string buffer cache often used for files and often held longe than other caches.
+ * cache_1: A string cache.
+ * cache_2: A string cache.
+ * cache_argument: A string cache for some argument.
+ * cache_argument: A string cache for some path.
+ * cache_arguments: An array of strings cache for arguments.
*/
#ifndef _di_fake_main_t_
typedef struct {
fll_program_data_t program;
fake_setting_t setting;
+
+ f_string_dynamic_t buffer;
+ f_string_dynamic_t cache_1;
+ f_string_dynamic_t cache_2;
+ f_string_dynamic_t cache_argument;
+ f_string_dynamics_t cache_arguments;
+ f_iki_data_t cache_iki;
} fake_main_t;
#define fake_main_t_initialize \
{ \
fll_program_data_t_initialize, \
fake_setting_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_iki_data_t_initialize, \
}
#endif // _di_fake_main_t_
f_fss_nameds_t fakefile;
- f_string_dynamic_t buffer;
- f_string_dynamic_t cache_1;
- f_string_dynamic_t cache_2;
- f_string_dynamic_t cache_path;
- f_string_dynamics_t cache_arguments;
- f_iki_data_t cache_iki;
-
f_array_length_t id_main;
fake_main_t *main;
fake_make_path_t_initialize, \
fl_print_t_initialize, \
f_fss_nameds_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamic_t_initialize, \
- f_string_dynamics_t_initialize, \
- f_iki_data_t_initialize, \
0, \
0, \
0, \
#endif // _di_fake_make_data_delete_
/**
+ * Deallocate main program data.
+ *
+ * @param setting_make
+ * The make setting data.
+ *
+ * This does not alter data_make.main.setting.state.status.
+ */
+#ifndef _di_fake_main_data_delete_
+ extern void fake_main_delete(fake_main_t * const main);
+#endif // _di_fake_main_data_delete_
+
+/**
* Deallocate make setting data.
*
* @param setting_make
#endif // _di_fake_main_
#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) {
+ int fake_execute(fake_data_t * const data, const f_string_maps_t environment, const f_string_static_t program) {
if (!data || !data->main) return 1;
if (F_status_is_error(data->main->setting.state.status)) return 1;
f_print_dynamic(program, data->main->program.message.to);
- for (f_array_length_t i = 0; i < arguments.used; ++i) {
+ for (f_array_length_t i = 0; i < data->main->cache_arguments.used; ++i) {
- if (!arguments.array[i].used) continue;
+ if (!data->main->cache_arguments.array[i].used) continue;
- fl_print_format(" %Q", data->main->program.message.to, arguments.array[i]);
+ fl_print_format(" %Q", data->main->program.message.to, data->main->cache_arguments.array[i]);
} // for
f_print_dynamic_raw(f_string_eol_s, data->main->program.message.to);
fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(0, 0, &environment, &signals, 0);
- data->main->setting.state.status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code);
+ data->main->setting.state.status = fll_execute_program(program, data->main->cache_arguments, ¶meter, 0, (void *) &return_code);
if (!((++data->main->program.signal_check) % fake_signal_check_d)) {
if (fll_program_standard_signal_received(&data->main->program)) {
* The environment variable data.
* @param program
* The program to be executed.
- * @param arguments
- * The arguments to be passed to the program.
*
* @return
* The return code result from execution.
* @see fll_program_standard_signal_received()
*/
#ifndef _di_fake_execute_
- extern 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);
+ extern int fake_execute(fake_data_t * const data, const f_string_maps_t environment, const f_string_static_t program);
#endif // _di_fake_execute_
/**
fake_main(&data);
- fake_setting_unload(&data);
-
- fll_program_data_delete(&data.program);
+ fake_main_delete(&data);
fll_program_standard_set_down(&data.program);
if (!data_make || !data_make->main) return;
- data_make->cache_path.used = 0;
+ fake_string_dynamic_reset(&data_make->main->cache_argument);
- data_make->main->setting.state.status = fl_path_canonical(path, &data_make->cache_path);
+ data_make->main->setting.state.status = fl_path_canonical(path, &data_make->main->cache_argument);
if (F_status_is_error(data_make->main->setting.state.status)) return;
- if (data_make->cache_path.used < data_make->path.stack.array[0].used) {
+ if (data_make->main->cache_argument.used < data_make->path.stack.array[0].used) {
data_make->main->setting.state.status = F_status_set_error(F_false);
return;
const f_string_range_t range = macro_f_string_range_t_initialize2(data_make->path.stack.array[0].used);
if (range.start <= range.stop) {
- data_make->main->setting.state.status = f_compare_dynamic_partial(data_make->path.stack.array[0], data_make->cache_path, range, range);
+ data_make->main->setting.state.status = f_compare_dynamic_partial(data_make->path.stack.array[0], data_make->main->cache_argument, range, range);
if (F_status_is_error(data_make->main->setting.state.status)) return;
if (data_make->main->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]) {
+ if (data_make->main->cache_argument.used == data_make->path.stack.array[0].used || data_make->main->cache_argument.string[data_make->path.stack.array[0].used] == f_path_separator_s.string[0]) {
data_make->main->setting.state.status = F_true;
return;
if (!data_make || !data_make->main) return;
- data_make->cache_path.used = 0;
+ fake_string_dynamic_reset(&data_make->main->cache_argument);
if (!path.used || path.used == data_make->path.stack.array[0].used) {
data_make->main->setting.state.status = F_none;
range.start = data_make->path.stack.array[0].used + 1;
range.stop = range.start + (path.used - range.start) - 1;
- data_make->main->setting.state.status = f_string_dynamic_partial_append(path, range, &data_make->cache_path);
+ data_make->main->setting.state.status = f_string_dynamic_partial_append(path, range, &data_make->main->cache_argument);
if (F_status_is_error(data_make->main->setting.state.status)) return;
- data_make->main->setting.state.status = f_string_dynamic_terminate(&data_make->cache_path);
+ data_make->main->setting.state.status = f_string_dynamic_terminate(&data_make->main->cache_argument);
if (F_status_is_error(data_make->main->setting.state.status)) return;
data_make->main->setting.state.status = F_none;
data_make->fakefile.used = 0;
if (process_pipe) {
- fake_pipe_buffer(data_make->data, &data_make->buffer);
+ fake_pipe_buffer(data_make->data, &data_make->main->buffer);
if (F_status_is_error(data_make->main->setting.state.status)) {
- data_make->buffer.used = 0;
+ fake_string_dynamic_reset(&data_make->main->buffer);
}
else {
- data_make->main->setting.state.status = f_string_dynamic_append_assure(f_string_eol_s, &data_make->buffer);
+ data_make->main->setting.state.status = f_string_dynamic_append_assure(f_string_eol_s, &data_make->main->buffer);
}
}
if (F_status_is_error_not(data_make->main->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);
+ fake_file_buffer(data_make->data, data_make->data->file_data_build_fakefile, process_pipe ? F_false : F_true, &data_make->main->buffer);
}
if (F_status_is_error(data_make->main->setting.state.status)) return;
- if (!data_make->buffer.used) {
+ if (!data_make->main->buffer.used) {
fake_make_print_warning_fakefile_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile);
return;
f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
{
- f_string_range_t range = macro_f_string_range_t_initialize2(data_make->buffer.used);
+ f_string_range_t range = macro_f_string_range_t_initialize2(data_make->main->buffer.used);
f_fss_comments_t comments = f_fss_comments_t_initialize;
- fll_fss_basic_list_read(data_make->buffer, &range, &list_objects, &list_contents, &delimits, 0, &comments, &data_make->main->setting.state);
+ fll_fss_basic_list_read(data_make->main->buffer, &range, &list_objects, &list_contents, &delimits, 0, &comments, &data_make->main->setting.state);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error_fss(&data_make->main->program.error, macro_fake_f(fll_fss_basic_list_read), data_make->data->file_data_build_fakefile, range, F_true);
}
else {
- f_fss_apply_delimit(delimits, &data_make->buffer, &data_make->main->setting.state);
+ f_fss_apply_delimit(delimits, &data_make->main->buffer, &data_make->main->setting.state);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_fss_apply_delimit));
data_make->main->program.signal_check = 0;
}
- if (f_compare_dynamic_partial_string(fake_make_item_settings_s.string, data_make->buffer, fake_make_item_settings_s.used, list_objects.array[i]) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(fake_make_item_settings_s.string, data_make->main->buffer, fake_make_item_settings_s.used, list_objects.array[i]) == F_equal_to) {
if (!missing_settings) {
fake_make_print_warning_setting_object_multiple(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, fake_make_item_settings_s);
delimits.used = 0;
content_range = list_contents.array[i].array[0];
- fll_fss_extended_read(data_make->buffer, &content_range, &settings.objects, &settings.contents, 0, 0, &delimits, 0, &data_make->main->setting.state);
+ fll_fss_extended_read(data_make->main->buffer, &content_range, &settings.objects, &settings.contents, 0, 0, &delimits, 0, &data_make->main->setting.state);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error_fss(&data_make->main->program.error, macro_fake_f(fll_fss_extended_read), data_make->data->file_data_build_fakefile, content_range, F_true);
break;
}
- f_fss_apply_delimit(delimits, &data_make->buffer, &data_make->main->setting.state);
+ f_fss_apply_delimit(delimits, &data_make->main->buffer, &data_make->main->setting.state);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_fss_apply_delimit));
continue;
}
- if (f_compare_dynamic_partial_string(fake_make_item_main_s.string, data_make->buffer, fake_make_item_main_s.used, list_objects.array[i]) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(fake_make_item_main_s.string, data_make->main->buffer, fake_make_item_main_s.used, list_objects.array[i]) == F_equal_to) {
if (!missing_main) {
fake_make_print_warning_setting_object_multiple(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, fake_make_item_main_s);
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_make->main->setting.state);
+ fll_fss_extended_read(data_make->main->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->main->setting.state);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error_fss(&data_make->main->program.error, macro_fake_f(fll_fss_extended_read), data_make->data->file_data_build_fakefile, content_range, F_true);
break;
}
- f_fss_apply_delimit(delimits, &data_make->buffer, &data_make->main->setting.state);
+ f_fss_apply_delimit(delimits, &data_make->main->buffer, &data_make->main->setting.state);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_fss_apply_delimit));
if (settings.objects.used) {
for (f_array_length_t i = 0; i < settings.objects.used; ++i) {
- if (f_compare_dynamic_partial_string(fake_make_setting_load_build_s.string, data_make->buffer, fake_make_setting_load_build_s.used, settings.objects.array[i]) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(fake_make_setting_load_build_s.string, data_make->main->buffer, fake_make_setting_load_build_s.used, settings.objects.array[i]) == F_equal_to) {
fake_make_load_fakefile_setting_build(data_make, &settings.objects.array[i], &settings.contents.array[i]);
}
- else if (f_compare_dynamic_partial_string(fake_make_setting_compiler_s.string, data_make->buffer, fake_make_setting_compiler_s.used, settings.objects.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_make_setting_compiler_s.string, data_make->main->buffer, fake_make_setting_compiler_s.used, settings.objects.array[i]) == F_equal_to) {
fake_make_load_fakefile_setting_compiler(data_make, &settings.objects.array[i], &settings.contents.array[i], &range_compiler);
}
- else if (f_compare_dynamic_partial_string(fake_make_setting_environment_s.string, data_make->buffer, fake_make_setting_environment_s.used, settings.objects.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_make_setting_environment_s.string, data_make->main->buffer, fake_make_setting_environment_s.used, settings.objects.array[i]) == F_equal_to) {
fake_make_load_fakefile_setting_environment(data_make, &settings.contents.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) break;
}
- else if (f_compare_dynamic_partial_string(fake_make_setting_fail_s.string, data_make->buffer, fake_make_setting_fail_s.used, settings.objects.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_make_setting_fail_s.string, data_make->main->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]);
}
- else if (f_compare_dynamic_partial_string(fake_make_setting_indexer_s.string, data_make->buffer, fake_make_setting_indexer_s.used, settings.objects.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_make_setting_indexer_s.string, data_make->main->buffer, fake_make_setting_indexer_s.used, settings.objects.array[i]) == F_equal_to) {
fake_make_load_fakefile_setting_indexer(data_make, &settings.objects.array[i], &settings.contents.array[i], &range_indexer);
}
- else if (f_compare_dynamic_partial_string(fake_make_setting_parameter_s.string, data_make->buffer, fake_make_setting_parameter_s.used, settings.objects.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_make_setting_parameter_s.string, data_make->main->buffer, fake_make_setting_parameter_s.used, settings.objects.array[i]) == F_equal_to) {
fake_make_load_fakefile_setting_parameter(data_make, &settings.objects.array[i], &settings.contents.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) break;
}
if (range_compiler) {
data_make->setting_build.build_compiler.used = 0;
- data_make->main->setting.state.status = f_string_dynamic_partial_append(data_make->buffer, *range_compiler, &data_make->setting_build.build_compiler);
+ data_make->main->setting.state.status = f_string_dynamic_partial_append(data_make->main->buffer, *range_compiler, &data_make->setting_build.build_compiler);
}
if (F_status_is_error_not(data_make->main->setting.state.status) && range_indexer) {
data_make->setting_build.build_indexer.used = 0;
- data_make->main->setting.state.status = f_string_dynamic_partial_append(data_make->buffer, *range_indexer, &data_make->setting_build.build_indexer);
+ data_make->main->setting.state.status = f_string_dynamic_partial_append(data_make->main->buffer, *range_indexer, &data_make->setting_build.build_indexer);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
if (!data_make || !data_make->data || !data_make->main || !object || !content) return;
if (content->used) {
- if (f_compare_dynamic_partial_string(fake_common_setting_bool_yes_s.string, data_make->buffer, fake_common_setting_bool_yes_s.used, content->array[0]) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(fake_common_setting_bool_yes_s.string, data_make->main->buffer, fake_common_setting_bool_yes_s.used, content->array[0]) == F_equal_to) {
data_make->setting_make.load_build = F_true;
}
- else if (f_compare_dynamic_partial_string(fake_common_setting_bool_no_s.string, data_make->buffer, fake_common_setting_bool_no_s.used, content->array[0]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_common_setting_bool_no_s.string, data_make->main->buffer, fake_common_setting_bool_no_s.used, content->array[0]) == F_equal_to) {
data_make->setting_make.load_build = F_false;
}
else {
- fake_make_print_warning_setting_content_invalid(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->buffer, *object, content->array[0], fake_make_item_settings_s);
+ fake_make_print_warning_setting_content_invalid(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->main->buffer, *object, content->array[0], fake_make_item_settings_s);
}
if (content->used > 1) {
}
}
else {
- fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_load_build_s);
+ fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->main->buffer, *object, fake_make_setting_load_build_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_build_
}
}
else {
- fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_compiler_s);
+ fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->main->buffer, *object, fake_make_setting_compiler_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_compiler_
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_make->data, F_false, data_make->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->main->buffer, settings->objects, settings->contents, &data_make->setting_build);
if (F_status_is_error_not(data_make->main->setting.state.status) && settings->objects.used) {
const f_string_static_t settings_name[] = {
&data_make->setting_make.parameter,
};
- data_make->main->setting.state.status = fll_fss_snatch_map_apart(data_make->buffer, settings->objects, settings->contents, settings_name, 2, settings_value, 0, 0);
+ data_make->main->setting.state.status = fll_fss_snatch_map_apart(data_make->main->buffer, settings->objects, settings->contents, settings_name, 2, settings_value, 0, 0);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(fll_fss_snatch_map_apart));
for (; i < content->used; ++i) {
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, content->array[i], &name_define);
+ data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, content->array[i], &name_define);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
if (!data_make || !data_make->data || !data_make->data || !data_make->main || !object || !content) return;
if (content->used) {
- if (f_compare_dynamic_partial_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) {
+ if (f_compare_dynamic_partial_string(fake_make_operation_argument_exit_s.string, data_make->main->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;
}
- else if (f_compare_dynamic_partial_string(fake_make_operation_argument_warn_s.string, data_make->buffer, fake_make_operation_argument_warn_s.used, content->array[content->used - 1]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_make_operation_argument_warn_s.string, data_make->main->buffer, fake_make_operation_argument_warn_s.used, content->array[content->used - 1]) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_warn_e;
}
- else if (f_compare_dynamic_partial_string(fake_make_operation_argument_ignore_s.string, data_make->buffer, fake_make_operation_argument_ignore_s.used, content->array[content->used - 1]) == F_equal_to) {
+ else if (f_compare_dynamic_partial_string(fake_make_operation_argument_ignore_s.string, data_make->main->buffer, fake_make_operation_argument_ignore_s.used, content->array[content->used - 1]) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_ignore_e;
}
else {
- fake_make_print_warning_setting_content_invalid(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->buffer, *object, content->array[content->used - 1], fake_make_item_settings_s);
+ fake_make_print_warning_setting_content_invalid(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->main->buffer, *object, content->array[content->used - 1], fake_make_item_settings_s);
}
if (content->used > 1) {
}
}
else {
- fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_fail_s);
+ fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->main->buffer, *object, fake_make_setting_fail_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_fail_
}
}
else {
- fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_indexer_s);
+ fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->main->buffer, *object, fake_make_setting_indexer_s);
}
}
#endif // _di_fake_make_load_fakefile_setting_indexer_
if (!data_make || !data_make->data || !data_make->data || !data_make->main || !object || !content) return;
if (content->used) {
- if (f_compare_dynamic_partial_string(fake_make_setting_return_s.string, data_make->buffer, fake_make_setting_return_s.used, content->array[0]) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(fake_make_setting_return_s.string, data_make->main->buffer, fake_make_setting_return_s.used, content->array[0]) == F_equal_to) {
if (content->used > 1) {
// Each "return" define replaces the previous "return" define.
for (f_array_length_t i = 1; i < content->used; ++i) {
- data_make->main->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->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, content->array[i], &data_make->setting_make.parameter.array[0].value.array[0]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
}
}
else {
- fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->buffer, *object, fake_make_setting_return_s);
+ fake_make_print_warning_setting_content_empty(&data_make->main->program.warning, data_make->data->file_data_build_fakefile, data_make->main->buffer, *object, fake_make_setting_return_s);
}
data_make->main->setting.state.status = F_none;
return;
}
- if (!data_make.buffer.used) {
+ if (!data_make.main->buffer.used) {
fake_make_data_delete(&data_make);
data->main->setting.state.status = F_data_not;
range.stop = data->main->program.parameters.arguments.array[index].used - 1;
for (j = 0; j < data_make.fakefile.used; ++j) {
- if (f_compare_dynamic_partial(data->main->program.parameters.arguments.array[index], data_make.buffer, range, data_make.fakefile.array[j].name) == F_equal_to) break;
+ if (f_compare_dynamic_partial(data->main->program.parameters.arguments.array[index], data_make.main->buffer, range, data_make.fakefile.array[j].name) == F_equal_to) break;
} // for
if (j == data_make.fakefile.used) {
for (j = 0; j < data_make.fakefile.used; ++j) {
- if (f_compare_dynamic_partial(data->main->program.parameters.arguments.array[index], data_make.buffer, range, data_make.fakefile.array[j].name) == F_equal_to) {
+ if (f_compare_dynamic_partial(data->main->program.parameters.arguments.array[index], data_make.main->buffer, range, data_make.fakefile.array[j].name) == F_equal_to) {
{
int result = fake_make_operate_section(&data_make, j, §ion_stack);
if (!content.used) return;
// Pre-allocate the known arguments size.
- data_make->main->setting.state.status = f_string_dynamics_increase_by(content.used, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase_by(content.used, &data_make->main->cache_arguments);
if (F_status_is_error(data_make->main->setting.state.status) || data_make->main->setting.state.status == F_string_too_large) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase_by));
const f_string_static_t vocabulary_define = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_define_s, 0, F_iki_vocabulary_0002_define_s_length);
const f_string_static_t vocabulary_parameter = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_parameter_s, 0, F_iki_vocabulary_0002_parameter_s_length);
- f_iki_data_t *iki_data = &data_make->cache_iki;
+ f_iki_data_t *iki_data = &data_make->main->cache_iki;
f_string_range_t range = f_string_range_t_initialize;
f_string_map_multis_t *parameter = &data_make->setting_make.parameter;
data_make->main->setting.state.handle = 0;
data_make->main->setting.state.data = 0;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
return;
}
- data_make->cache_arguments.array[data_make->cache_arguments.used].used = 0;
+ data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
for (; i < content.used; ++i) {
- iki_data->variable.used = 0;
- iki_data->vocabulary.used = 0;
- iki_data->content.used = 0;
- iki_data->delimits.used = 0;
+ fake_iki_data_reset(iki_data);
// Skip content that is unused, but quoted content, even if empty, should remain.
if (content.array[i].start > content.array[i].stop) {
if (quotes.array[i]) {
- ++data_make->cache_arguments.used;
+ ++data_make->main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->cache_arguments.array[data_make->cache_arguments.used].used = 0;
+ data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
}
continue;
range = content.array[i];
- fl_iki_read(&data_make->buffer, &range, iki_data, &data_make->main->setting.state);
+ fl_iki_read(&data_make->main->buffer, &range, iki_data, &data_make->main->setting.state);
if (F_status_is_error(data_make->main->setting.state.status)) {
if (F_status_set_fine(data_make->main->setting.state.status) != F_interrupt) {
// Apply the IKI delimits to the buffer.
for (j = 0; j < iki_data->delimits.used; ++j) {
- data_make->buffer.string[iki_data->delimits.array[j]] = f_iki_syntax_placeholder_s.string[0];
+ data_make->main->buffer.string[iki_data->delimits.array[j]] = f_iki_syntax_placeholder_s.string[0];
} // for
if (iki_data->variable.used) {
range.start = content.array[i].start;
range.stop = iki_data->variable.array[0].start - 1;
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, range, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
is = 0;
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_define.string, data_make->buffer, vocabulary_define.used, iki_data->vocabulary.array[j]);
+ data_make->main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_define.string, data_make->main->buffer, vocabulary_define.used, iki_data->vocabulary.array[j]);
if (data_make->main->setting.state.status == F_equal_to) {
is = 2;
iki_type |= 0x2;
}
else if (data_make->main->setting.state.status == F_equal_to_not) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_parameter.string, data_make->buffer, vocabulary_parameter.used, iki_data->vocabulary.array[j]);
+ data_make->main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_parameter.string, data_make->main->buffer, vocabulary_parameter.used, iki_data->vocabulary.array[j]);
if (data_make->main->setting.state.status == F_equal_to) {
is = 1;
iki_type |= 0x1;
}
else if (data_make->main->setting.state.status == F_equal_to_not) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_context.string, data_make->buffer, vocabulary_context.used, iki_data->vocabulary.array[j]);
+ data_make->main->setting.state.status = f_compare_dynamic_partial_string(vocabulary_context.string, data_make->main->buffer, vocabulary_context.used, iki_data->vocabulary.array[j]);
if (data_make->main->setting.state.status == F_equal_to) {
is = 3;
unmatched = F_true;
// Check against reserved parameter names and if matches use them instead.
- if (f_compare_dynamic_partial_string(fake_make_parameter_variable_return_s.string, data_make->buffer, fake_make_parameter_variable_return_s.used, iki_data->content.array[j]) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(fake_make_parameter_variable_return_s.string, data_make->main->buffer, fake_make_parameter_variable_return_s.used, iki_data->content.array[j]) == F_equal_to) {
if (data_make->setting_make.parameter.array[0].value.array[0].used) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->setting_make.parameter.array[0].value.array[0], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->setting_make.parameter.array[0].value.array[0], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
}
}
else {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
unmatched = F_false;
}
- else if (f_compare_dynamic_partial_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) {
+ else if (f_compare_dynamic_partial_string(fake_make_parameter_variable_top_s.string, data_make->main->buffer, fake_make_parameter_variable_top_s.used, iki_data->content.array[j]) == F_equal_to) {
if (data_make->path.stack.used) {
- data_make->main->setting.state.status = f_string_dynamic_increase_by(data_make->path.stack.array[0].used + f_path_separator_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_increase_by(data_make->path.stack.array[0].used + f_path_separator_s.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
- data_make->main->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->main->setting.state.status = f_string_dynamic_append(data_make->path.stack.array[0], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
}
// For safe path handling, always append the trailing slash.
- data_make->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
unmatched = F_false;
}
- else if (f_compare_dynamic_partial_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) {
+ else if (f_compare_dynamic_partial_string(fake_make_parameter_variable_current_s.string, data_make->main->buffer, fake_make_parameter_variable_current_s.used, iki_data->content.array[j]) == F_equal_to) {
if (data_make->path.stack.used) {
- data_make->main->setting.state.status = f_string_dynamic_increase_by(data_make->path.stack.array[data_make->path.stack.used - 1].used + f_path_separator_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_increase_by(data_make->path.stack.array[data_make->path.stack.used - 1].used + f_path_separator_s.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_increase_by));
break;
}
- data_make->main->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->main->setting.state.status = f_string_dynamic_append(data_make->path.stack.array[data_make->path.stack.used - 1], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
}
// For safe path handling, always append the trailing slash.
- data_make->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
else {
for (k = 0; k < 39; ++k) {
- if (f_compare_dynamic_partial_string(reserved_name[k].string, data_make->buffer, reserved_name[k].used, iki_data->content.array[j]) != F_equal_to) {
+ if (f_compare_dynamic_partial_string(reserved_name[k].string, data_make->main->buffer, reserved_name[k].used, iki_data->content.array[j]) != F_equal_to) {
continue;
}
} // for
} // for
- data_make->main->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->main->setting.state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_increase_by));
if (!reserved_value[k]->array[l].used) continue;
if (separate) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append(f_string_space_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
}
}
- data_make->main->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->main->setting.state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
// Unquoted use separate parameters rather then being separated by a space.
if (separate) {
- ++data_make->cache_arguments.used;
+ ++data_make->main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->cache_arguments.array[data_make->cache_arguments.used].used = 0;
+ data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
}
- data_make->main->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->main->setting.state.status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
for (k = 0; k < parameter->used; ++k) {
// Check against IKI variable list.
- if (f_compare_dynamic_partial_dynamic(parameter->array[k].name, data_make->buffer, iki_data->content.array[j]) != F_equal_to) {
+ if (f_compare_dynamic_partial_dynamic(parameter->array[k].name, data_make->main->buffer, iki_data->content.array[j]) != F_equal_to) {
continue;
}
} // for
} // for
- data_make->main->setting.state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_increase_by));
if (separate) {
if (quotes.array[i]) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_space_s, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append(f_string_space_s, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
// Unquoted use separate parameters rather then being separated by a space.
else {
- ++data_make->cache_arguments.used;
+ ++data_make->main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->cache_arguments.array[data_make->cache_arguments.used].used = 0;
+ data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
}
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append_nulless(parameter->array[k].value.array[l], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
range.start = iki_data->variable.array[j].stop + 1;
range.stop = iki_data->variable.array[j + 1].start - 1;
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, range, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
range.start = iki_data->variable.array[iki_data->variable.used - 1].stop + 1;
range.stop = content.array[i].stop;
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, range, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
}
if (!(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_make->main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->cache_arguments.array[data_make->cache_arguments.used].used = 0;
+ data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
}
}
else {
- data_make->main->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->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, content.array[i], &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_partial_append_nulless));
break;
}
- ++data_make->cache_arguments.used;
+ ++data_make->main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_increase));
break;
}
- data_make->cache_arguments.array[data_make->cache_arguments.used].used = 0;
+ data_make->main->cache_arguments.array[data_make->main->cache_arguments.used].used = 0;
}
} // for
}
bool unmatched = F_true;
uint8_t i = 0;
- data_make->cache_1.used = 0;
+ fake_string_dynamic_reset(&data_make->main->cache_1);
{
const f_string_static_t uint8_name[] = {
for (; i < 3; ++i) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(uint8_name[i].string, data_make->buffer, uint8_name[i].used, range_name);
+ data_make->main->setting.state.status = f_compare_dynamic_partial_string(uint8_name[i].string, data_make->main->buffer, uint8_name[i].used, range_name);
if (data_make->main->setting.state.status == F_equal_to) {
unmatched = F_false;
- data_make->main->setting.state.status = f_conversion_number_unsigned_to_string(uint8_value[i], f_conversion_data_base_10_c, &data_make->cache_1);
+ data_make->main->setting.state.status = f_conversion_number_unsigned_to_string(uint8_value[i], f_conversion_data_base_10_c, &data_make->main->cache_1);
break;
}
for (i = 0; i < 7; ++i) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(bool_name[i].string, data_make->buffer, bool_name[i].used, range_name);
+ data_make->main->setting.state.status = f_compare_dynamic_partial_string(bool_name[i].string, data_make->main->buffer, bool_name[i].used, range_name);
if (data_make->main->setting.state.status == F_equal_to) {
unmatched = F_false;
if (bool_value[i]) {
- data_make->main->setting.state.status = f_string_dynamic_append(fake_common_setting_bool_yes_s, &data_make->cache_1);
+ data_make->main->setting.state.status = f_string_dynamic_append(fake_common_setting_bool_yes_s, &data_make->main->cache_1);
}
else {
- data_make->main->setting.state.status = f_string_dynamic_append(fake_common_setting_bool_no_s, &data_make->cache_1);
+ data_make->main->setting.state.status = f_string_dynamic_append(fake_common_setting_bool_no_s, &data_make->main->cache_1);
}
break;
for (i = 0; i < 17; ++i) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(dynamic_name[i].string, data_make->buffer, dynamic_name[i].used, range_name);
+ data_make->main->setting.state.status = f_compare_dynamic_partial_string(dynamic_name[i].string, data_make->main->buffer, dynamic_name[i].used, range_name);
if (data_make->main->setting.state.status == F_equal_to) {
unmatched = F_false;
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(dynamic_value[i], &data_make->cache_1);
+ data_make->main->setting.state.status = f_string_dynamic_append_nulless(dynamic_value[i], &data_make->main->cache_1);
break;
}
for (i = 0; i < 36; ++i) {
- data_make->main->setting.state.status = f_compare_dynamic_partial_string(dynamics_name[i].string, data_make->buffer, dynamics_name[i].used, range_name);
+ data_make->main->setting.state.status = f_compare_dynamic_partial_string(dynamics_name[i].string, data_make->main->buffer, dynamics_name[i].used, range_name);
if (data_make->main->setting.state.status == F_equal_to) {
unmatched = F_false;
for (j = 0; j < dynamics_value[i].used; ++j) {
- data_make->main->setting.state.status = f_string_dynamic_mash(f_string_space_s, dynamics_value[i].array[j], &data_make->cache_1);
+ data_make->main->setting.state.status = f_string_dynamic_mash(f_string_space_s, dynamics_value[i].array[j], &data_make->main->cache_1);
if (F_status_is_error(data_make->main->setting.state.status)) break;
} // for
return;
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->cache_1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error_not(data_make->main->setting.state.status) && !quote) {
- ++data_make->cache_arguments.used;
+ ++data_make->main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
}
if (F_status_is_error(data_make->main->setting.state.status)) return;
- if (data_make->cache_1.used) {
+ if (data_make->main->cache_1.used) {
data_make->main->setting.state.status = F_true;
return;
for (f_array_length_t i = 0; i < 9; ++i) {
- if (f_compare_dynamic_partial_string(context_name[i].string, data_make->buffer, context_name[i].used, range_name) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(context_name[i].string, data_make->main->buffer, context_name[i].used, range_name) == F_equal_to) {
context = context_value[i].before;
break;
} // for
if (context) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(*context, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append_nulless(*context, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
if (F_status_is_error(data_make->main->setting.state.status)) return;
}
data_make->main->setting.state.status = F_none;
- data_make->cache_1.used = 0;
- data_make->cache_2.used = 0;
+ fake_string_dynamic_reset(&data_make->main->cache_1);
+ fake_string_dynamic_reset(&data_make->main->cache_2);
- data_make->main->setting.state.status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 2, &data_make->cache_1);
+ data_make->main->setting.state.status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 2, &data_make->main->cache_1);
if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->buffer, range_name, &data_make->cache_1);
+ data_make->main->setting.state.status = f_string_dynamic_partial_append_nulless(data_make->main->buffer, range_name, &data_make->main->cache_1);
}
if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_environment_get(data_make->cache_1, &data_make->cache_2);
+ data_make->main->setting.state.status = f_environment_get(data_make->main->cache_1, &data_make->main->cache_2);
}
if (F_status_is_error(data_make->main->setting.state.status)) return;
return;
}
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_increase_by(data_make->cache_2.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_increase_by(data_make->main->cache_2.used + 1, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
}
if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->cache_2, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_2, &data_make->main->cache_arguments.array[data_make->main->cache_arguments.used]);
}
if (F_status_is_error(data_make->main->setting.state.status)) return;
if (!quote) {
- ++data_make->cache_arguments.used;
+ ++data_make->main->cache_arguments.used;
- data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->cache_arguments);
+ data_make->main->setting.state.status = f_string_dynamics_increase(data_make->main->setting.state.step_small, &data_make->main->cache_arguments);
if (F_status_is_error(data_make->main->setting.state.status)) return;
}
- data_make->main->setting.state.status = data_make->cache_2.used ? F_true : F_data_not;
+ data_make->main->setting.state.status = data_make->main->cache_2.used ? F_true : F_data_not;
}
#endif // _di_fake_make_operate_expand_environment_
const f_fss_named_t *section = &data_make->fakefile.array[id_section];
- fake_make_print_message_processing_section(&data_make->main->program.message, data_make->buffer, *section);
+ fake_make_print_message_processing_section(&data_make->main->program.message, data_make->main->buffer, *section);
if (!section->objects.used) {
--section_stack->used;
for (i = 0; i < section->objects.used; ++i, data_make->main->setting.state.status = F_none) {
- for (j = 0; j < data_make->cache_arguments.size; ++j) {
- data_make->cache_arguments.array[j].used = 0;
+ for (j = 0; j < data_make->main->cache_arguments.size; ++j) {
+ data_make->main->cache_arguments.array[j].used = 0;
} // for
- data_make->cache_arguments.used = 0;
+ fake_string_dynamics_reset(&data_make->main->cache_arguments);
+
state_process.condition = 0;
state_process.condition_result = 0;
state_process.operation_previous = state_process.operation;
for (j = 0; j < fake_max_operation_d; ++j) {
- if (f_compare_dynamic_partial_string(operations_name[j].string, data_make->buffer, operations_name[j].used, section->objects.array[i]) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(operations_name[j].string, data_make->main->buffer, operations_name[j].used, section->objects.array[i]) == F_equal_to) {
state_process.operation = operations_type[j];
break;
} // for
if (!state_process.operation) {
- fake_print_error_operation_unknown(&data_make->error, data_make->buffer, section->name, section->objects.array[i]);
+ fake_print_error_operation_unknown(&data_make->error, data_make->main->buffer, section->name, section->objects.array[i]);
data_make->main->setting.state.status = F_status_set_error(F_valid_not);
}
else if (state_process.operation == fake_make_operation_type_operate_e) {
if (section_stack->used == fake_max_stack_d) {
- fake_print_error_operation_stack_max(&data_make->error, data_make->buffer, section->name, section->objects.array[i], fake_max_stack_d);
+ fake_print_error_operation_stack_max(&data_make->error, data_make->main->buffer, section->name, section->objects.array[i], fake_max_stack_d);
data_make->main->setting.state.status = F_status_set_error(F_recurse);
}
data_make->error.set = &data_make->main->program.context.set;
}
- fake_print_error_operation_failed(&data_make->error, data_make->buffer, section->name, section->objects.array[i]);
+ fake_print_error_operation_failed(&data_make->error, data_make->main->buffer, section->name, section->objects.array[i]);
// F_signal_abort is used by the break section operation.
if (F_status_set_fine(data_make->main->setting.state.status) == F_signal_abort) break;
if (i == section->objects.used && F_status_is_error_not(data_make->main->setting.state.status) && (state_process.operation == fake_make_operation_type_and_e || state_process.operation == fake_make_operation_type_else_e || state_process.operation == fake_make_operation_type_if_e || state_process.operation == fake_make_operation_type_or_e)) {
fake_make_print_error_operation_incomplete(&data_make->main->program.error, state_process.operation);
- fake_print_error_operation_failed(&data_make->error, data_make->buffer, section->name, section->objects.array[section->objects.used - 1]);
+ fake_print_error_operation_failed(&data_make->error, data_make->main->buffer, section->name, section->objects.array[section->objects.used - 1]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
* @param quote
* The quote associated with the content.
* @param range_name
- * The range representing the variable content name string within the data_make->buffer.
+ * The range representing the variable content name string within the data_make.main.buffer.
*
* @see f_string_dynamic_append_nulless()
* @see f_string_dynamic_mash()
* @param quote
* The quote associated with the content.
* @param range_name
- * The range representing the variable content name string within the data_make->buffer.
+ * The range representing the variable content name string within the data_make.main.buffer.
*
* @see f_string_dynamic_append_nulless()
*/
* @param quote
* The quote associated with the content.
* @param range_name
- * The range representing the variable content name string within the data_make->buffer.
+ * The range representing the variable content name string within the data_make.main.buffer.
*
* @see f_environment_get()
* @see f_string_dynamic_append_nulless()
if (!data_make || !data_make->main) return;
- if (!data_make->cache_arguments.used) {
+ if (!data_make->main->cache_arguments.used) {
data_make->main->setting.state.status = F_data_not;
return;
f_string_statics_t args = f_string_statics_t_initialize;
- if (data_make->cache_arguments.used > 1) {
- args.array = data_make->cache_arguments.array + 1;
- args.used = data_make->cache_arguments.used - 1;
+ if (data_make->main->cache_arguments.used > 1) {
+ args.array = data_make->main->cache_arguments.array + 1;
+ args.used = data_make->main->cache_arguments.used - 1;
args.size = 0;
}
- fake_make_operate_process_execute(data_make, data_make->cache_arguments.used ? data_make->cache_arguments.array[0] : f_string_empty_s, args, as_shell);
+ fake_make_operate_process_execute(data_make, data_make->main->cache_arguments.used ? data_make->main->cache_arguments.array[0] : f_string_empty_s, args, as_shell);
}
#endif // _di_fake_make_operate_process_run_
data_make->main->setting.state.status = F_none;
- if (!data_make->cache_arguments.used || f_compare_dynamic(fake_make_operation_argument_success_s, data_make->cache_arguments.array[0]) == F_equal_to) {
+ if (!data_make->main->cache_arguments.used || f_compare_dynamic(fake_make_operation_argument_success_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
data_make->main->setting.state.status = F_signal_abort;
}
- else if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
data_make->main->setting.state.status = F_status_set_error(F_signal_abort);
}
else {
return;
}
- fake_make_print_verbose_operate_break(&data_make->main->program.message, data_make->cache_arguments);
+ fake_make_print_verbose_operate_break(&data_make->main->program.message, data_make->main->cache_arguments);
}
#endif // _di_fake_make_operate_process_type_break_
if (!data_make || !data_make->main) return;
- fake_build_operate(data_make->data, data_make->cache_arguments.used ? &data_make->cache_arguments : 0, F_false);
+ fake_build_operate(data_make->data, data_make->main->cache_arguments.used ? &data_make->main->cache_arguments : 0, F_false);
if (F_status_set_fine(data_make->main->setting.state.status) == F_interrupt) return;
fake_make_operate_process_return(data_make, F_status_is_error(data_make->main->setting.state.status) ? 1 : 0);
#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 0;
+ if (!data_make || !data_make->main) return 0;
- const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_compiler, data_make->cache_arguments);
+ const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_compiler);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(fake_execute));
else if (state_process->condition == fake_make_operation_if_type_if_equal_e) {
state_process->condition_result = fake_condition_result_true_e;
- for (f_array_length_t i = 2; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 2; i < data_make->main->cache_arguments.used; ++i) {
- if (f_compare_dynamic(data_make->cache_arguments.array[1], data_make->cache_arguments.array[i]) == F_equal_to_not) {
+ if (f_compare_dynamic(data_make->main->cache_arguments.array[1], data_make->main->cache_arguments.array[i]) == F_equal_to_not) {
state_process->condition_result = fake_condition_result_false_e;
break;
f_array_length_t i = 1;
f_array_length_t j = 0;
- for (; i < data_make->cache_arguments.used; ++i) {
+ for (; i < data_make->main->cache_arguments.used; ++i) {
- for (j = i + 1; j < data_make->cache_arguments.used; ++j) {
+ for (j = i + 1; j < data_make->main->cache_arguments.used; ++j) {
- if (f_compare_dynamic(data_make->cache_arguments.array[i], data_make->cache_arguments.array[j]) == F_equal_to) {
+ if (f_compare_dynamic(data_make->main->cache_arguments.array[i], data_make->main->cache_arguments.array[j]) == F_equal_to) {
state_process->condition_result = fake_condition_result_false_e;
- i = data_make->cache_arguments.used;
+ i = data_make->main->cache_arguments.used;
break;
}
if (!data_make || !data_make->main) return;
- const f_array_length_t total = data_make->cache_arguments.used - 1;
+ const f_array_length_t total = data_make->main->cache_arguments.used - 1;
f_string_static_t destination = f_string_static_t_initialize;
f_directory_recurse_copy_t recurse = f_directory_recurse_copy_t_initialize;
bool existing = F_true;
f_array_length_t i = 0;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
++i;
recurse.flag |= f_file_stat_flag_reference_e;
}
// In this case, the destination could be a file, so confirm this.
- if (data_make->cache_arguments.used == 2 + i) {
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[1]);
+ if (data_make->main->cache_arguments.used == 2 + i) {
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_path_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_path_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
for (; i < total; ++i) {
- destination.used = data_make->cache_arguments.array[total].used + 1;
+ destination.used = data_make->main->cache_arguments.array[total].used + 1;
if (existing) {
- data_make->cache_path.used = 0;
+ fake_string_dynamic_reset(&data_make->main->cache_argument);
- data_make->main->setting.state.status = f_file_name_base(data_make->cache_arguments.array[i], &data_make->cache_path);
+ data_make->main->setting.state.status = f_file_name_base(data_make->main->cache_arguments.array[i], &data_make->main->cache_argument);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_name_base), data_make->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_name_base), data_make->main->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- destination.used += data_make->cache_path.used + 1;
+ destination.used += data_make->main->cache_argument.used + 1;
}
f_char_t destination_string[destination.used + 1];
destination_string[destination.used - 2] = 0;
}
- memcpy(destination_string, data_make->cache_arguments.array[total].string, sizeof(f_char_t) * data_make->cache_arguments.array[total].used);
+ memcpy(destination_string, data_make->main->cache_arguments.array[total].string, sizeof(f_char_t) * data_make->main->cache_arguments.array[total].used);
if (existing) {
- if (destination_string[data_make->cache_arguments.array[total].used - 1] == f_path_separator_s.string[0]) {
- memcpy(destination_string + data_make->cache_arguments.array[total].used, data_make->cache_path.string, sizeof(f_char_t) * data_make->cache_path.used);
+ if (destination_string[data_make->main->cache_arguments.array[total].used - 1] == f_path_separator_s.string[0]) {
+ memcpy(destination_string + data_make->main->cache_arguments.array[total].used, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_argument.used);
--destination.used;
}
else {
- memcpy(destination_string + data_make->cache_arguments.array[total].used + 1, data_make->cache_path.string, sizeof(f_char_t) * data_make->cache_arguments.array[i].used);
+ memcpy(destination_string + data_make->main->cache_arguments.array[total].used + 1, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_arguments.array[i].used);
- destination_string[data_make->cache_arguments.array[total].used] = f_path_separator_s.string[0];
+ destination_string[data_make->main->cache_arguments.array[total].used] = f_path_separator_s.string[0];
}
}
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[i]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[i]);
if (data_make->main->setting.state.status == F_true) {
if (clone) {
recurse.flag -= recurse.flag & f_directory_recurse_copy_flag_clone_e;
}
- fl_directory_copy(data_make->cache_arguments.array[i], destination, &recurse);
+ fl_directory_copy(data_make->main->cache_arguments.array[i], destination, &recurse);
if (F_status_is_error(recurse.state.status)) {
data_make->main->setting.state.status = recurse.state.status;
- fake_print_error_file(&data_make->main->program.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);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(fl_directory_copy), data_make->main->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
}
else if (data_make->main->setting.state.status == F_false) {
if (clone) {
- data_make->main->setting.state.status = f_file_clone(data_make->cache_arguments.array[i], destination, recurse.size_block, recurse.flag);
+ data_make->main->setting.state.status = f_file_clone(data_make->main->cache_arguments.array[i], destination, recurse.size_block, recurse.flag);
}
else {
- data_make->main->setting.state.status = f_file_copy(data_make->cache_arguments.array[i], destination, recurse.mode, recurse.size_block, recurse.flag);
+ data_make->main->setting.state.status = f_file_copy(data_make->main->cache_arguments.array[i], destination, recurse.mode, recurse.size_block, recurse.flag);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, clone ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), data_make->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, clone ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), data_make->main->cache_arguments.array[i], clone ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
break;
}
- fake_make_print_verbose_operate_copy(&data_make->main->program.message, clone, data_make->cache_arguments.array[i], destination);
+ fake_make_print_verbose_operate_copy(&data_make->main->program.message, clone, data_make->main->cache_arguments.array[i], destination);
}
else if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[i], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[i], f_file_operation_identify_s, fll_error_file_type_directory_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used > 1) {
- data_make->main->setting.state.status = f_environment_set(data_make->cache_arguments.array[0], data_make->cache_arguments.array[1], F_true);
+ if (data_make->main->cache_arguments.used > 1) {
+ data_make->main->setting.state.status = f_environment_set(data_make->main->cache_arguments.array[0], data_make->main->cache_arguments.array[1], F_true);
}
else {
- data_make->main->setting.state.status = f_environment_set(data_make->cache_arguments.array[0], f_string_empty_s, F_true);
+ data_make->main->setting.state.status = f_environment_set(data_make->main->cache_arguments.array[0], f_string_empty_s, F_true);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_environment_set));
}
else {
- fake_make_print_verbose_operate_define(&data_make->main->program.message, data_make->cache_arguments.array[0]);
+ fake_make_print_verbose_operate_define(&data_make->main->program.message, data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_none;
}
data_make->main->setting.state.status = F_none;
- for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used; ++i) {
memset(&file_stat, 0, sizeof(struct stat));
- data_make->main->setting.state.status = f_file_stat(data_make->cache_arguments.array[i], F_false, &file_stat);
+ data_make->main->setting.state.status = f_file_stat(data_make->main->cache_arguments.array[i], F_false, &file_stat);
if (F_status_is_error(data_make->main->setting.state.status)) {
if (F_status_set_fine(data_make->main->setting.state.status) == F_file_found_not) {
- fake_make_print_warning_file_not_found(&data_make->main->program.warning, data_make->cache_arguments.array[i]);
+ fake_make_print_warning_file_not_found(&data_make->main->program.warning, data_make->main->cache_arguments.array[i]);
data_make->main->setting.state.status = F_none;
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stat), data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stat), data_make->main->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
else if (macro_f_file_type_is_directory(file_stat.st_mode)) {
if (data_make->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
- data_make->main->setting.state.status = f_directory_remove_custom(data_make->cache_arguments.array[i], recursion_max, F_false, fake_clean_remove_recursively_verbosely);
+ data_make->main->setting.state.status = f_directory_remove_custom(data_make->main->cache_arguments.array[i], recursion_max, F_false, fake_clean_remove_recursively_verbosely);
}
else {
- data_make->main->setting.state.status = f_directory_remove(data_make->cache_arguments.array[i], recursion_max, F_false);
+ data_make->main->setting.state.status = f_directory_remove(data_make->main->cache_arguments.array[i], recursion_max, F_false);
}
if (F_status_set_fine(data_make->main->setting.state.status) == F_file_found_not) {
- fake_make_print_verbose_operate_file_not_found(&data_make->main->program.message, F_true, data_make->cache_arguments.array[i]);
+ fake_make_print_verbose_operate_file_not_found(&data_make->main->program.message, F_true, data_make->main->cache_arguments.array[i]);
data_make->main->setting.state.status = F_none;
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_remove), data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_remove), data_make->main->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_directory_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
}
else {
- data_make->main->setting.state.status = f_file_remove(data_make->cache_arguments.array[i]);
+ data_make->main->setting.state.status = f_file_remove(data_make->main->cache_arguments.array[i]);
if (F_status_set_fine(data_make->main->setting.state.status) == F_file_found_not) {
if (data_make->main->program.error.verbosity >= f_console_verbosity_verbose_e) {
- fake_make_print_verbose_operate_file_not_found(&data_make->main->program.message, F_false, data_make->cache_arguments.array[i]);
+ fake_make_print_verbose_operate_file_not_found(&data_make->main->program.message, F_false, data_make->main->cache_arguments.array[i]);
}
data_make->main->setting.state.status = F_none;
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_remove), data_make->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_remove), data_make->main->cache_arguments.array[i], f_file_operation_delete_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
}
- fake_make_print_verbose_operate_delete(&data_make->main->program.message, data_make->cache_arguments.array[i]);
+ fake_make_print_verbose_operate_delete(&data_make->main->program.message, data_make->main->cache_arguments.array[i]);
} // for
data_make->main->setting.state.status = F_none;
data_make->main->setting.state.status = F_none;
- if (!data_make->cache_arguments.used || f_compare_dynamic(fake_make_operation_argument_success_s, data_make->cache_arguments.array[0]) == F_equal_to) {
+ if (!data_make->main->cache_arguments.used || f_compare_dynamic(fake_make_operation_argument_success_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
data_make->main->setting.state.status = F_signal_quit;
}
- else if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
data_make->main->setting.state.status = F_status_set_error(F_signal_quit);
// Forcing exit forces fail mode.
return;
}
- fake_make_print_verbose_operate_exiting_as(&data_make->main->program.message, data_make->cache_arguments);
+ fake_make_print_verbose_operate_exiting_as(&data_make->main->program.message, data_make->main->cache_arguments);
}
#endif // _di_fake_make_operate_process_type_exit_
if (!data_make || !data_make->main) return;
- if (f_compare_dynamic(fake_make_operation_argument_exit_s, data_make->cache_arguments.array[0]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_exit_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_exit_e;
data_make->error.prefix = fl_print_error_s;
data_make->error.suffix = f_string_empty_s;
data_make->main->program.error.to.id = F_type_descriptor_error_d;
data_make->error.set = &data_make->main->program.context.set;
}
- else if (f_compare_dynamic(fake_make_operation_argument_warn_s, data_make->cache_arguments.array[0]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_warn_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_warn_e;
data_make->error.prefix = fl_print_warning_s;
data_make->error.suffix = f_string_empty_s;
data_make->main->setting.state.status = F_none;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- id = (gid_t) fake_make_get_id(data_make, F_false, data_make->cache_arguments.array[i++]);
+ id = (gid_t) fake_make_get_id(data_make, F_false, data_make->main->cache_arguments.array[i++]);
if (F_status_is_error(data_make->main->setting.state.status)) {
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
- for (; i < data_make->cache_arguments.used; ++i) {
+ for (; i < data_make->main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
continue;
}
if (all) {
- data_make->main->setting.state.status = fll_file_role_change_all(data_make->cache_arguments.array[i], -1, id, dereference, fake_max_recursion_depth_d);
+ data_make->main->setting.state.status = fll_file_role_change_all(data_make->main->cache_arguments.array[i], -1, id, dereference, fake_max_recursion_depth_d);
}
else {
- data_make->main->setting.state.status = f_file_role_change(data_make->cache_arguments.array[i], -1, id, dereference);
+ data_make->main->setting.state.status = f_file_role_change(data_make->main->cache_arguments.array[i], -1, id, dereference);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), data_make->main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_print_verbose_operate_set_role(&data_make->main->program.message, all ? 0x1 : 0x0, data_make->cache_arguments.array[i], (f_number_unsigned_t) id);
+ fake_make_print_verbose_operate_set_role(&data_make->main->program.message, all ? 0x1 : 0x0, data_make->main->cache_arguments.array[i], (f_number_unsigned_t) id);
} // for
data_make->main->setting.state.status = F_none;
// Multiple properties may pass and so if any of them fail, then they all fail.
if (if_not) {
- for (f_array_length_t i = 2; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 2; i < data_make->main->cache_arguments.used; ++i) {
- if (f_environment_exists(data_make->cache_arguments.array[i]) == F_true) {
+ if (f_environment_exists(data_make->main->cache_arguments.array[i]) == F_true) {
state_process->condition_result = fake_condition_result_false_e;
break;
} // for
}
else {
- for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i) {
- if (f_environment_exists(data_make->cache_arguments.array[i]) != F_true) {
+ if (f_environment_exists(data_make->main->cache_arguments.array[i]) != F_true) {
state_process->condition_result = fake_condition_result_false_e;
break;
data_make->main->setting.state.status = F_none;
- if (i == data_make->cache_arguments.used) {
+ if (i == data_make->main->cache_arguments.used) {
if (if_not) {
state_process->condition_result = fake_condition_result_true_e;
}
state_process->condition_result = fake_condition_result_true_e;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- for (; i < data_make->cache_arguments.used; ++i) {
+ for (; i < data_make->main->cache_arguments.used; ++i) {
- data_make->main->setting.state.status = f_file_exists(data_make->cache_arguments.array[i], dereference);
+ data_make->main->setting.state.status = f_file_exists(data_make->main->cache_arguments.array[i], dereference);
if (F_status_is_error(data_make->main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_exists), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_exists), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
data_make->main->setting.state.status = F_none;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- if (i == data_make->cache_arguments.used) {
+ if (i == data_make->main->cache_arguments.used) {
if (if_not) {
state_process->condition_result = fake_condition_result_true_e;
}
return;
}
- for (; i < data_make->cache_arguments.used; ++i) {
+ for (; i < data_make->main->cache_arguments.used; ++i) {
- if (f_compare_dynamic(fake_make_operation_argument_if_is_for_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_if_is_for_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
++i;
break;
}
- if (f_compare_dynamic(f_file_type_name_block_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(f_file_type_name_block_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x1;
}
- else if (f_compare_dynamic(f_file_type_name_character_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_character_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x2;
}
- else if (f_compare_dynamic(f_file_type_name_directory_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_directory_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x4;
}
- else if (f_compare_dynamic(f_file_type_name_fifo_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_fifo_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x8;
}
- else if (f_compare_dynamic(f_file_type_name_link_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_link_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x10;
}
- else if (f_compare_dynamic(f_file_type_name_regular_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_regular_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x20;
}
- else if (f_compare_dynamic(f_file_type_name_socket_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_socket_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type |= 0x40;
}
} // for
state_process->condition_result = fake_condition_result_true_e;
- for (; i < data_make->cache_arguments.used; ++i, mode_file = 0) {
+ for (; i < data_make->main->cache_arguments.used; ++i, mode_file = 0) {
- data_make->main->setting.state.status = f_file_mode_read(data_make->cache_arguments.array[i], dereference, &mode_file);
+ data_make->main->setting.state.status = f_file_mode_read(data_make->main->cache_arguments.array[i], dereference, &mode_file);
if (F_status_is_error(data_make->main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_read), data_make->cache_arguments.array[i], f_file_operation_get_type_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_read), data_make->main->cache_arguments.array[i], f_file_operation_get_type_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
state_process->condition_result = fake_condition_result_true_e;
range.start = 0;
- range.stop = data_make->cache_arguments.array[i].used - 1;
+ range.stop = data_make->main->cache_arguments.array[i].used - 1;
- if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
+ if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
range.start = 1;
}
- else if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
+ else if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
range.start = 1;
is_negative_left = F_true;
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number_left);
+ data_make->main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->main->cache_arguments.array[i], range, &number_left);
}
if (F_status_is_error_not(data_make->main->setting.state.status)) {
- for (i = 2; i < data_make->cache_arguments.used; ++i, data_make->main->setting.state.status = F_none, number_left = number_right, is_negative_left = is_negative_right) {
+ for (i = 2; i < data_make->main->cache_arguments.used; ++i, data_make->main->setting.state.status = F_none, number_left = number_right, is_negative_left = is_negative_right) {
- if (data_make->cache_arguments.array[i].used) {
+ if (data_make->main->cache_arguments.array[i].used) {
range.start = 0;
- range.stop = data_make->cache_arguments.array[i].used - 1;
+ range.stop = data_make->main->cache_arguments.array[i].used - 1;
is_negative_right = F_false;
- if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
+ if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
range.start = 1;
}
- else if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
+ else if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
range.start = 1;
is_negative_right = F_true;
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number_right);
+ data_make->main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->main->cache_arguments.array[i], range, &number_right);
}
}
else {
state_process->condition_result = fake_condition_result_error_e;
if ((i == 1 && number_left > F_number_t_size_unsigned_d) || (i > 1 && number_right > F_number_t_size_unsigned_d)) {
- fake_make_print_error_out_of_range_number(&data_make->main->program.error, data_make->cache_arguments.array[i], F_number_t_size_unsigned_d, F_number_t_size_unsigned_d);
+ fake_make_print_error_out_of_range_number(&data_make->main->program.error, data_make->main->cache_arguments.array[i], F_number_t_size_unsigned_d, F_number_t_size_unsigned_d);
}
else {
- fake_make_print_error_unsupported_number(&data_make->main->program.error, data_make->cache_arguments.array[i]);
+ fake_make_print_error_unsupported_number(&data_make->main->program.error, data_make->main->cache_arguments.array[i]);
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
data_make->main->setting.state.status = F_none;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- id = (uid_t) fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[i++]);
+ id = (uid_t) fake_make_get_id(data_make, F_true, data_make->main->cache_arguments.array[i++]);
if (F_status_is_error(data_make->main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
state_process->condition_result = fake_condition_result_true_e;
- for (uid_t id_file = 0; i < data_make->cache_arguments.used; ++i, id_file = 0) {
+ for (uid_t id_file = 0; i < data_make->main->cache_arguments.used; ++i, id_file = 0) {
- data_make->main->setting.state.status = f_file_group_read(data_make->cache_arguments.array[i], dereference, &id_file);
+ data_make->main->setting.state.status = f_file_group_read(data_make->main->cache_arguments.array[i], dereference, &id_file);
if (F_status_is_error(data_make->main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_group_read), data_make->cache_arguments.array[i], f_file_operation_get_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_group_read), data_make->main->cache_arguments.array[i], f_file_operation_get_group_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
mode_t mode_match = 0;
bool is = F_false;
- if (f_compare_dynamic(fake_make_operation_argument_is_s, data_make->cache_arguments.array[if_not ? 2 : 1]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_is_s, data_make->main->cache_arguments.array[if_not ? 2 : 1]) == F_equal_to) {
is = F_true;
}
{
uint8_t mode_replace = 0;
- fake_make_get_id_mode(data_make, data_make->cache_arguments.array[if_not ? 3 : 2], &mode_rule, &mode_replace);
+ fake_make_get_id_mode(data_make, data_make->main->cache_arguments.array[if_not ? 3 : 2], &mode_rule, &mode_replace);
if (F_status_is_error(data_make->main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
state_process->condition_result = fake_condition_result_true_e;
- for (f_array_length_t i = if_not ? 4 : 3; i < data_make->cache_arguments.used; ++i, mode_file = 0) {
+ for (f_array_length_t i = if_not ? 4 : 3; i < data_make->main->cache_arguments.used; ++i, mode_file = 0) {
- data_make->main->setting.state.status = f_file_mode_read(data_make->cache_arguments.array[i], F_true, &mode_file);
+ data_make->main->setting.state.status = f_file_mode_read(data_make->main->cache_arguments.array[i], F_true, &mode_file);
if (F_status_is_error(data_make->main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_read), data_make->cache_arguments.array[i], f_file_operation_get_mode_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_read), data_make->main->cache_arguments.array[i], f_file_operation_get_mode_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
data_make->main->setting.state.status = F_none;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- id = (uid_t) fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[i++]);
+ id = (uid_t) fake_make_get_id(data_make, F_true, data_make->main->cache_arguments.array[i++]);
if (F_status_is_error(data_make->main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
state_process->condition_result = fake_condition_result_true_e;
- for (uid_t id_file = 0; i < data_make->cache_arguments.used; ++i, id_file = 0) {
+ for (uid_t id_file = 0; i < data_make->main->cache_arguments.used; ++i, id_file = 0) {
- data_make->main->setting.state.status = f_file_owner_read(data_make->cache_arguments.array[i], dereference, &id_file);
+ data_make->main->setting.state.status = f_file_owner_read(data_make->main->cache_arguments.array[i], dereference, &id_file);
if (F_status_is_error(data_make->main->setting.state.status)) {
state_process->condition_result = fake_condition_result_error_e;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_owner_read), data_make->cache_arguments.array[i], f_file_operation_get_owner_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_owner_read), data_make->main->cache_arguments.array[i], f_file_operation_get_owner_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
state_process->condition_result = fake_condition_result_true_e;
// Multiple properties may pass and so if any of them fail, then they all fail.
- for (; i < data_make->cache_arguments.used && !result; ++i) {
+ for (; i < data_make->main->cache_arguments.used && !result; ++i) {
for (j = 0; j < 33; ++j) {
- if (f_compare_dynamic(reserved_name[j], data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(reserved_name[j], data_make->main->cache_arguments.array[i]) == F_equal_to) {
result = reserved_parameter[j] ? 2 : 1;
break;
if (!result) {
for (j = 0; j < data_make->setting_make.parameter.used; ++j) {
- if (f_compare_dynamic(data_make->cache_arguments.array[i], data_make->setting_make.parameter.array[j].name) == F_equal_to) {
+ if (f_compare_dynamic(data_make->main->cache_arguments.array[i], data_make->setting_make.parameter.array[j].name) == F_equal_to) {
result = 2;
break;
}
}
- if (result == 2 && i + 1 < data_make->cache_arguments.used) {
+ if (result == 2 && i + 1 < data_make->main->cache_arguments.used) {
result = 0;
}
} // for
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);
+ const int result = fake_execute(data_make->data, data_make->environment, data_make->setting_build.build_indexer);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(fake_execute));
// 0x1 = force, 0x2 = strict.
uint8_t flag = 0;
- if (data_make->cache_arguments.used > 2) {
- if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->cache_arguments.array[1]) != F_equal_to) {
+ if (data_make->main->cache_arguments.used > 2) {
+ if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->main->cache_arguments.array[1]) != F_equal_to) {
flag |= 0x1;
}
- else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->cache_arguments.array[1]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->main->cache_arguments.array[1]) == F_equal_to) {
flag |= 0x2;
}
- if (data_make->cache_arguments.used > 3) {
- if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->cache_arguments.array[2]) != F_equal_to) {
+ if (data_make->main->cache_arguments.used > 3) {
+ if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->main->cache_arguments.array[2]) != F_equal_to) {
flag |= 0x1;
}
- else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->cache_arguments.array[2]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->main->cache_arguments.array[2]) == F_equal_to) {
flag |= 0x2;
}
}
}
- if ((flag & 0x1) && f_file_exists(data_make->cache_arguments.array[data_make->cache_arguments.used - 1], F_false) == F_true) {
- if (f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]) == F_true) {
- data_make->main->setting.state.status = f_directory_remove(data_make->cache_arguments.array[data_make->cache_arguments.used - 1], F_directory_max_descriptors_d, F_false);
+ if ((flag & 0x1) && f_file_exists(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], F_false) == F_true) {
+ if (f_directory_is(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]) == F_true) {
+ data_make->main->setting.state.status = f_directory_remove(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], F_directory_max_descriptors_d, F_false);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_remove), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_remove), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_directory_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
}
else {
- data_make->main->setting.state.status = f_file_remove(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ data_make->main->setting.state.status = f_file_remove(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_remove), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_remove), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_delete_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
}
- data_make->main->setting.state.status = f_file_link(data_make->cache_arguments.array[0], data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ data_make->main->setting.state.status = f_file_link(data_make->main->cache_arguments.array[0], data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_link), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_link_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_link), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_link_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_print_verbose_operate_symbolic_link(&data_make->main->program.message, data_make->cache_arguments.array[data_make->cache_arguments.used - 1], data_make->cache_arguments.array[0]);
+ fake_make_print_verbose_operate_symbolic_link(&data_make->main->program.message, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_none;
}
f_file_mode_t mode_rule = 0;
uint8_t replace = 0;
- fake_make_get_id_mode(data_make, data_make->cache_arguments.array[0], &mode_rule, &replace);
+ fake_make_get_id_mode(data_make, data_make->main->cache_arguments.array[0], &mode_rule, &replace);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id_mode));
mode_t mode = 0;
mode_t mode_file = 0;
- for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i, mode = 0) {
+ for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i, mode = 0) {
- data_make->main->setting.state.status = f_file_mode_read(data_make->cache_arguments.array[i], F_true, &mode_file);
+ data_make->main->setting.state.status = f_file_mode_read(data_make->main->cache_arguments.array[i], F_true, &mode_file);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_read), data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_read), data_make->main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
data_make->main->setting.state.status = f_file_mode_determine(mode_file, mode_rule, replace, macro_f_file_type_is_directory(mode_file), &mode);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_determine), data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_mode_determine), data_make->main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
if (all) {
- data_make->main->setting.state.status = fll_file_mode_set_all(data_make->cache_arguments.array[i], F_true, mode, fake_max_recursion_depth_d);
+ data_make->main->setting.state.status = fll_file_mode_set_all(data_make->main->cache_arguments.array[i], F_true, mode, fake_max_recursion_depth_d);
}
else {
- data_make->main->setting.state.status = f_file_mode_set(data_make->cache_arguments.array[i], mode);
+ data_make->main->setting.state.status = f_file_mode_set(data_make->main->cache_arguments.array[i], mode);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, all ? macro_fake_f(fll_file_mode_set_all) : macro_fake_f(f_file_mode_set), data_make->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, all ? macro_fake_f(fll_file_mode_set_all) : macro_fake_f(f_file_mode_set), data_make->main->cache_arguments.array[i], f_file_operation_change_group_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_print_verbose_operate_set_mode(&data_make->main->program.message, data_make->cache_arguments.array[i], mode);
+ fake_make_print_verbose_operate_set_mode(&data_make->main->program.message, data_make->main->cache_arguments.array[i], mode);
} // for
data_make->main->setting.state.status = F_none;
if (!data_make || !data_make->main) return;
- const f_array_length_t total = data_make->cache_arguments.used -1;
+ const f_array_length_t total = data_make->main->cache_arguments.used -1;
f_directory_recurse_copy_t recurse = f_directory_recurse_copy_t_initialize;
f_string_static_t destination = f_string_static_t_initialize;
bool existing = F_true;
// In this case, the destination could be a file, so confirm this.
- if (data_make->cache_arguments.used == 2) {
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[1]);
+ if (data_make->main->cache_arguments.used == 2) {
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[1], f_file_operation_identify_s, fll_error_file_type_directory_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
for (f_array_length_t i = 0; i < total; ++i) {
- destination.used = data_make->cache_arguments.array[total].used;
+ destination.used = data_make->main->cache_arguments.array[total].used;
if (existing) {
- data_make->cache_path.used = 0;
+ fake_string_dynamic_reset(&data_make->main->cache_argument);
- data_make->main->setting.state.status = f_file_name_base(data_make->cache_arguments.array[i], &data_make->cache_path);
+ data_make->main->setting.state.status = f_file_name_base(data_make->main->cache_arguments.array[i], &data_make->main->cache_argument);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_name_base), data_make->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_name_base), data_make->main->cache_arguments.array[i], f_file_operation_process_s, fll_error_file_type_path_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- destination.used += data_make->cache_path.used + 1;
+ destination.used += data_make->main->cache_argument.used + 1;
}
f_char_t destination_string[destination.used + 1];
destination_string[destination.used - 1] = 0;
}
- memcpy(destination_string, data_make->cache_arguments.array[total].string, sizeof(f_char_t) * data_make->cache_arguments.array[total].used);
+ memcpy(destination_string, data_make->main->cache_arguments.array[total].string, sizeof(f_char_t) * data_make->main->cache_arguments.array[total].used);
if (existing) {
- if (destination_string[data_make->cache_arguments.array[total].used - 1] == f_path_separator_s.string[0]) {
- memcpy(destination_string + data_make->cache_arguments.array[total].used, data_make->cache_path.string, sizeof(f_char_t) * data_make->cache_path.used);
+ if (destination_string[data_make->main->cache_arguments.array[total].used - 1] == f_path_separator_s.string[0]) {
+ memcpy(destination_string + data_make->main->cache_arguments.array[total].used, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_argument.used);
--destination.used;
}
else {
- memcpy(destination_string + data_make->cache_arguments.array[total].used + 1, data_make->cache_path.string, sizeof(f_char_t) * data_make->cache_arguments.array[i].used);
+ memcpy(destination_string + data_make->main->cache_arguments.array[total].used + 1, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_arguments.array[i].used);
- destination_string[data_make->cache_arguments.array[total].used] = f_path_separator_s.string[0];
+ destination_string[data_make->main->cache_arguments.array[total].used] = f_path_separator_s.string[0];
}
}
- fll_file_move(data_make->cache_arguments.array[i], destination, &recurse);
+ fll_file_move(data_make->main->cache_arguments.array[i], destination, &recurse);
if (F_status_is_error(recurse.state.status)) {
data_make->main->setting.state.status = recurse.state.status;
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(fll_file_move), data_make->cache_arguments.array[i], f_file_operation_move_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(fll_file_move), data_make->main->cache_arguments.array[i], f_file_operation_move_s, fll_error_file_type_directory_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
#ifndef _di_fake_make_operate_process_type_operate_
int fake_make_operate_process_type_operate(fake_make_data_t * const data_make, f_array_lengths_t * const section_stack) {
- if (!data_make) return 0;
+ if (!data_make || !data_make->main) return 0;
f_array_length_t id_section = 0;
for (; id_section < data_make->fakefile.used; ++id_section) {
- if (f_compare_dynamic_partial_string(data_make->cache_arguments.array[0].string, data_make->buffer, data_make->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(data_make->main->cache_arguments.array[0].string, data_make->main->buffer, data_make->main->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
break;
}
} // for
bool dereference = F_true;
f_array_length_t i = 0;
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
++i;
dereference = F_false;
}
- id = (uid_t) fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[i++]);
+ id = (uid_t) fake_make_get_id(data_make, F_true, data_make->main->cache_arguments.array[i++]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(fake_make_get_id));
return;
}
- for (; i < data_make->cache_arguments.used; ++i) {
+ for (; i < data_make->main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
continue;
}
if (all) {
- data_make->main->setting.state.status = fll_file_role_change_all(data_make->cache_arguments.array[i], id, -1, dereference, fake_max_recursion_depth_d);
+ data_make->main->setting.state.status = fll_file_role_change_all(data_make->main->cache_arguments.array[i], id, -1, dereference, fake_max_recursion_depth_d);
}
else {
- data_make->main->setting.state.status = f_file_role_change(data_make->cache_arguments.array[i], id, -1, dereference);
+ data_make->main->setting.state.status = f_file_role_change(data_make->main->cache_arguments.array[i], id, -1, dereference);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), data_make->cache_arguments.array[i], f_file_operation_change_owner_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, all ? macro_fake_f(fll_file_role_change_all) : macro_fake_f(f_file_role_change), data_make->main->cache_arguments.array[i], f_file_operation_change_owner_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_print_verbose_operate_set_role(&data_make->main->program.message, all ? 0x3 : 0x2, data_make->cache_arguments.array[i], (f_number_unsigned_t) id);
+ fake_make_print_verbose_operate_set_role(&data_make->main->program.message, all ? 0x3 : 0x2, data_make->main->cache_arguments.array[i], (f_number_unsigned_t) id);
} // for
data_make->main->setting.state.status = F_none;
for (; i < data_make->setting_make.parameter.used; ++i) {
- if (f_compare_dynamic(data_make->cache_arguments.array[0], data_make->setting_make.parameter.array[i].name) == F_equal_to) {
+ if (f_compare_dynamic(data_make->main->cache_arguments.array[0], data_make->setting_make.parameter.array[i].name) == F_equal_to) {
found = F_true;
break;
return;
}
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->cache_arguments.array[0], &data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name);
+ data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_arguments.array[0], &data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
data_make->setting_make.parameter.array[i].value.used = 0;
- if (data_make->cache_arguments.used > 1) {
- data_make->main->setting.state.status = f_string_dynamics_resize(data_make->cache_arguments.used - 1, &data_make->setting_make.parameter.array[i].value);
+ if (data_make->main->cache_arguments.used > 1) {
+ data_make->main->setting.state.status = f_string_dynamics_resize(data_make->main->cache_arguments.used - 1, &data_make->setting_make.parameter.array[i].value);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamics_resize));
for (f_array_length_t j = 0; j < data_make->setting_make.parameter.array[i].value.size; ++j) {
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->cache_arguments.array[j + 1], &data_make->setting_make.parameter.array[i].value.array[j]);
+ data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_arguments.array[j + 1], &data_make->setting_make.parameter.array[i].value.array[j]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
return;
}
- fake_make_print_verbose_operate_set_path(&data_make->main->program.message, data_make->cache_path);
+ fake_make_print_verbose_operate_set_path(&data_make->main->program.message, data_make->main->cache_argument);
}
data_make->main->setting.state.status = F_none;
if (!data_make || !data_make->main) return;
- data_make->cache_1.used = 0;
+ fake_string_dynamic_reset(&data_make->main->cache_1);
{
f_array_length_t i = 0;
// Pre-allocate the cache to reduce allocations.
{
- f_array_length_t total = data_make->cache_arguments.used;
+ f_array_length_t total = data_make->main->cache_arguments.used;
- for (; i < data_make->cache_arguments.used; ++i) {
- total += data_make->cache_arguments.array[i].used;
+ for (; i < data_make->main->cache_arguments.used; ++i) {
+ total += data_make->main->cache_arguments.array[i].used;
} // for
- data_make->main->setting.state.status = f_string_dynamic_increase_by(total, &data_make->cache_1);
+ data_make->main->setting.state.status = f_string_dynamic_increase_by(total, &data_make->main->cache_1);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_file_stream_open));
}
}
- for (i = 0; i < data_make->cache_arguments.used; ++i) {
+ for (i = 0; i < data_make->main->cache_arguments.used; ++i) {
if (i) {
- data_make->main->setting.state.status = f_string_dynamic_append(f_string_space_s, &data_make->cache_1);
+ data_make->main->setting.state.status = f_string_dynamic_append(f_string_space_s, &data_make->main->cache_1);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
}
}
- fake_make_operate_process_buffer_escape(data_make, data_make->cache_arguments.array[i], &data_make->cache_1);
+ fake_make_operate_process_buffer_escape(data_make, data_make->main->cache_arguments.array[i], &data_make->main->cache_1);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_file_stream_open));
f_file_stream_lock(data_make->main->program.message.to);
- fll_print_dynamic_raw(data_make->cache_1, data_make->main->program.message.to);
+ fll_print_dynamic_raw(data_make->main->cache_1, data_make->main->program.message.to);
fll_print_dynamic_raw(f_string_eol_s, data_make->main->program.message.to);
f_file_stream_unlock(data_make->main->program.message.to);
if (!data_make || !data_make->main) return;
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[0]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[0]);
if (F_status_set_fine(data_make->main->setting.state.status) == F_false) {
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- data_make->main->setting.state.status = f_path_change(data_make->cache_arguments.array[0]);
+ data_make->main->setting.state.status = f_path_change(data_make->main->cache_arguments.array[0]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_path_change), data_make->cache_arguments.array[0]);
+ fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_path_change), data_make->main->cache_arguments.array[0]);
}
else {
data_make->main->setting.state.status = f_string_dynamics_increase_by(fake_allocation_small_d, &data_make->path.stack);
}
// Copy the entire real path, including the trailing NULL.
- ++data_make->cache_path.used;
+ ++data_make->main->cache_argument.used;
- data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->cache_path, &data_make->path.stack.array[data_make->path.stack.used]);
+ data_make->main->setting.state.status = f_string_dynamic_append_nulless(data_make->main->cache_argument, &data_make->path.stack.array[data_make->path.stack.used]);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_nulless));
fake_make_print_verbose_operate_set_path(&data_make->main->program.message, data_make->path.stack.array[data_make->path.stack.used]);
}
else {
- fake_make_print_verbose_operate_set_path(&data_make->main->program.message, data_make->cache_path);
+ fake_make_print_verbose_operate_set_path(&data_make->main->program.message, data_make->main->cache_argument);
}
}
data_make->main->setting.state.status = f_path_change_at(data_make->path.top.id);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_path_change), data_make->cache_arguments.array[0]);
+ fake_print_error_operation_path_stack_max(&data_make->error, macro_fake_f(f_path_change), data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
macro_f_mode_t_set_default_umask(mode, data_make->main->program.umask);
- for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i) {
- if (f_compare_dynamic(fake_make_operation_argument_file_s, data_make->cache_arguments.array[0]) == F_equal_to) {
- data_make->main->setting.state.status = f_file_touch(data_make->cache_arguments.array[i], mode.regular, F_false);
+ if (f_compare_dynamic(fake_make_operation_argument_file_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
+ data_make->main->setting.state.status = f_file_touch(data_make->main->cache_arguments.array[i], mode.regular, F_false);
if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_touch), data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_file_e);
+ if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[i], &data_make->main->cache_argument))) {
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_touch), data_make->main->cache_argument, f_file_operation_touch_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_touch), data_make->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_touch), data_make->main->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_file_e);
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
}
- else if (f_compare_dynamic(fake_make_operation_argument_directory_s, data_make->cache_arguments.array[0]) == F_equal_to) {
- data_make->main->setting.state.status = f_directory_touch(data_make->cache_arguments.array[i], mode.directory);
+ else if (f_compare_dynamic(fake_make_operation_argument_directory_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
+ data_make->main->setting.state.status = f_directory_touch(data_make->main->cache_arguments.array[i], mode.directory);
if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_touch), data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_directory_e);
+ if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[i], &data_make->main->cache_argument))) {
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_touch), data_make->main->cache_argument, f_file_operation_touch_s, fll_error_file_type_directory_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_touch), data_make->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_touch), data_make->main->cache_arguments.array[i], f_file_operation_touch_s, fll_error_file_type_directory_e);
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
}
- fake_make_print_verbose_operate_touch(&data_make->main->program.message, data_make->cache_arguments.array[i]);
+ fake_make_print_verbose_operate_touch(&data_make->main->program.message, data_make->main->cache_arguments.array[i]);
} // for
data_make->main->setting.state.status = F_none;
f_file_t file = f_file_t_initialize;
- data_make->main->setting.state.status = f_file_exists(data_make->cache_arguments.array[0], F_true);
+ data_make->main->setting.state.status = f_file_exists(data_make->main->cache_arguments.array[0], F_true);
- if (data_make->cache_arguments.used == 1 || data_make->main->setting.state.status == F_false) {
- data_make->main->setting.state.status = f_file_stream_open(data_make->cache_arguments.array[0], f_file_open_mode_truncate_s, &file);
+ if (data_make->main->cache_arguments.used == 1 || data_make->main->setting.state.status == F_false) {
+ data_make->main->setting.state.status = f_file_stream_open(data_make->main->cache_arguments.array[0], f_file_open_mode_truncate_s, &file);
if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e);
+ if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[0], &data_make->main->cache_argument))) {
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->main->cache_argument, f_file_operation_open_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->main->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
// Keep the stream open if there is a string to write to it.
- if (data_make->cache_arguments.used > 1) {
+ if (data_make->main->cache_arguments.used > 1) {
data_make->main->setting.state.status = F_false;
}
else {
}
}
- if (F_status_is_error_not(data_make->main->setting.state.status) && data_make->cache_arguments.used > 1) {
+ if (F_status_is_error_not(data_make->main->setting.state.status) && data_make->main->cache_arguments.used > 1) {
if (data_make->main->setting.state.status != F_false) {
- data_make->main->setting.state.status = f_file_stream_open(data_make->cache_arguments.array[0], f_file_open_mode_append_s, &file);
+ data_make->main->setting.state.status = f_file_stream_open(data_make->main->cache_arguments.array[0], f_file_open_mode_append_s, &file);
if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e);
+ if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[0], &data_make->main->cache_argument))) {
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->main->cache_argument, f_file_operation_open_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_open), data_make->main->cache_arguments.array[0], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
if (F_status_is_error_not(data_make->main->setting.state.status)) {
- for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i) {
- data_make->cache_1.used = 0;
+ fake_string_dynamic_reset(&data_make->main->cache_1);
- fake_make_operate_process_buffer_escape(data_make, data_make->cache_arguments.array[i], &data_make->cache_1);
+ fake_make_operate_process_buffer_escape(data_make, data_make->main->cache_arguments.array[i], &data_make->main->cache_1);
if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(fake_make_operate_process_buffer_escape), data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e);
+ if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[0], &data_make->main->cache_argument))) {
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(fake_make_operate_process_buffer_escape), data_make->main->cache_argument, f_file_operation_write_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(fake_make_operate_process_buffer_escape), data_make->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(fake_make_operate_process_buffer_escape), data_make->main->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
}
break;
}
- data_make->main->setting.state.status = f_file_stream_write(file, data_make->cache_1, 0);
+ data_make->main->setting.state.status = f_file_stream_write(file, data_make->main->cache_1, 0);
if (F_status_is_error(data_make->main->setting.state.status)) {
- if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_write), data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e);
+ if (F_status_is_error_not(fl_path_canonical(data_make->main->cache_arguments.array[0], &data_make->main->cache_argument))) {
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_write), data_make->main->cache_argument, f_file_operation_write_s, fll_error_file_type_file_e);
}
else {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_write), data_make->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_stream_write), data_make->main->cache_arguments.array[0], f_file_operation_write_s, fll_error_file_type_file_e);
}
break;
}
- if (i + 1 < data_make->cache_arguments.used) {
+ if (i + 1 < data_make->main->cache_arguments.used) {
data_make->main->setting.state.status = f_file_stream_write(file, f_string_ascii_space_s, 0);
if (F_status_is_error(data_make->main->setting.state.status)) {
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used > 1) {
+ if (data_make->main->cache_arguments.used > 1) {
fake_print_error_too_many_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->cache_arguments.used) {
- if (f_compare_dynamic(fake_make_operation_argument_success_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_break_s, data_make->cache_arguments.array[0]);
+ if (data_make->main->cache_arguments.used) {
+ if (f_compare_dynamic(fake_make_operation_argument_success_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
+ fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_break_s, data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used) {
- if (data_make->cache_arguments.array[0].used) {
+ if (data_make->main->cache_arguments.used) {
+ if (data_make->main->cache_arguments.array[0].used) {
f_string_static_t path_file = f_string_static_t_initialize;
- path_file.used = data_make->data->path_data_build.used + data_make->cache_arguments.array[0].used;
+ path_file.used = data_make->data->path_data_build.used + data_make->main->cache_arguments.array[0].used;
f_char_t path_file_string[path_file.used + 1];
path_file.string = path_file_string;
path_file_string[path_file.used] = 0;
memcpy(path_file_string, data_make->data->path_data_build.string, sizeof(f_char_t) * data_make->data->path_data_build.used);
- memcpy(path_file_string + data_make->data->path_data_build.used, data_make->cache_arguments.array[0].string, sizeof(f_char_t) * data_make->cache_arguments.array[0].used);
+ memcpy(path_file_string + data_make->data->path_data_build.used, data_make->main->cache_arguments.array[0].string, sizeof(f_char_t) * data_make->main->cache_arguments.array[0].used);
data_make->main->setting.state.status = f_file_is(path_file, F_file_type_regular_d, F_false);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used) {
+ if (data_make->main->cache_arguments.used) {
fake_print_error_too_many_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used > 1) {
+ if (data_make->main->cache_arguments.used > 1) {
f_status_t status = F_none;
- for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
} // for
- for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) {
+ for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used - 1; ++i) {
- if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ if (f_file_exists(data_make->main->cache_arguments.array[i], F_true) != F_true) {
+ fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
} // for
- if (data_make->cache_arguments.used > 2) {
+ if (data_make->main->cache_arguments.used > 2) {
// The last file must be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
if (data_make->main->setting.state.status == F_false || data_make->main->setting.state.status == F_file_found_not) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "last", data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ fake_make_print_error_content_not_directory(&data_make->main->program.error, "last", data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
status = F_status_set_error(F_failure);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_find_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_find_s, fll_error_file_type_directory_e);
status = F_status_set_error(F_failure);
}
else {
// When the first file is a directory, then the second, if it exists, must also be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[0]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[0]);
if (data_make->main->setting.state.status == F_true) {
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[1]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
if (data_make->main->setting.state.status == F_false) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "second", data_make->cache_arguments.array[1]);
+ fake_make_print_error_content_not_directory(&data_make->main->program.error, "second", data_make->main->cache_arguments.array[1]);
status = F_status_set_error(F_failure);
}
if (!data_make || !data_make->main) return;
- if (!data_make->cache_arguments.used) {
+ if (!data_make->main->cache_arguments.used) {
fake_print_error_requires_more_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
}
- if (data_make->cache_arguments.used) {
+ if (data_make->main->cache_arguments.used) {
const f_string_static_t if_type_strings[] = {
fake_make_operation_argument_if_define_s,
fake_make_operation_argument_if_equal_s,
if_and_or = fake_make_operation_if_s;
}
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[k]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[k]) == F_equal_to) {
++k;
dereference = F_false;
}
// Skip the "if not XXX" types as they are determined later on.
if (i > 12 && i < 21) continue;
- if (f_compare_dynamic(if_type_strings[i], data_make->cache_arguments.array[k]) == F_equal_to) {
+ if (f_compare_dynamic(if_type_strings[i], data_make->main->cache_arguments.array[k]) == F_equal_to) {
state_process->condition = if_type_codes[i];
break;
} // for
if (i == 23) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, if_and_or, data_make->cache_arguments.array[k]);
+ fake_make_print_error_unsupported_type(&data_make->main->program.error, if_and_or, data_make->main->cache_arguments.array[k]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
// Identify and convert to the appropriate if not condition.
if (state_process->condition == fake_make_operation_if_type_if_not_e) {
- if (data_make->cache_arguments.used < 1 + k) {
+ if (data_make->main->cache_arguments.used < 1 + k) {
fake_print_error_requires_more_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
for (; j < 7; ++j) {
- if (f_compare_dynamic(if_not_type_strings[j], data_make->cache_arguments.array[k]) == F_equal_to) {
+ if (f_compare_dynamic(if_not_type_strings[j], data_make->main->cache_arguments.array[k]) == F_equal_to) {
state_process->condition = if_not_type_codes[j];
break;
} // for
if (j == 7) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, if_and_or, data_make->cache_arguments.array[k]);
+ fake_make_print_error_unsupported_type(&data_make->main->program.error, if_and_or, data_make->main->cache_arguments.array[k]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
j = 7;
}
- if (j == 7 && data_make->cache_arguments.used >= if_type_minimum[i] || j < 7 && data_make->cache_arguments.used >= if_not_type_minimum[j]) {
+ if (j == 7 && data_make->main->cache_arguments.used >= if_type_minimum[i] || j < 7 && data_make->main->cache_arguments.used >= if_not_type_minimum[j]) {
if (state_process->condition == fake_make_operation_if_type_if_success_e || state_process->condition == fake_make_operation_if_type_if_failure_e) {
// The success and failure operations minimum is also the maximum.
- if (data_make->cache_arguments.used > if_type_minimum[i]) {
+ if (data_make->main->cache_arguments.used > if_type_minimum[i]) {
fake_print_error_too_many_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
if (state_process->condition == fake_make_operation_if_type_if_equal_e || state_process->condition == fake_make_operation_if_type_if_equal_not_e) {
- if (data_make->cache_arguments.used < 2 + k) {
+ if (data_make->main->cache_arguments.used < 2 + k) {
fake_print_error_requires_more_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_is_e || state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition > fake_make_operation_if_type_if_not_exist_e && state_process->condition < fake_make_operation_if_type_if_success_e) {
if (state_process->condition == fake_make_operation_if_type_if_mode_e || state_process->condition == fake_make_operation_if_type_if_not_mode_e) {
- if (f_compare_dynamic(fake_make_operation_argument_is_s, data_make->cache_arguments.array[k]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_has_s, data_make->cache_arguments.array[k]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_is_s, data_make->main->cache_arguments.array[k]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_has_s, data_make->main->cache_arguments.array[k]) == F_equal_to_not) {
if (j == 6) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_mode_s, data_make->cache_arguments.array[k]);
+ fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_mode_s, data_make->main->cache_arguments.array[k]);
}
else {
f_char_t message[4 + fake_make_operation_mode_s.used + 1];
f_string_static_t message_s = macro_f_string_static_t_initialize(message, 0, 4 + fake_make_operation_mode_s.used);
- fake_make_print_error_unsupported_type(&data_make->main->program.error, message_s, data_make->cache_arguments.array[k]);
+ fake_make_print_error_unsupported_type(&data_make->main->program.error, message_s, data_make->main->cache_arguments.array[k]);
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
f_file_mode_t mode_rule = 0;
uint8_t replace = 0;
- fake_make_get_id_mode(data_make, data_make->cache_arguments.array[++k], &mode_rule, &replace);
+ fake_make_get_id_mode(data_make, data_make->main->cache_arguments.array[++k], &mode_rule, &replace);
if (F_status_is_error(data_make->main->setting.state.status)) {
data_make->main->setting.state.status = F_status_set_error(F_failure);
i = ++k;
}
else if (state_process->condition == fake_make_operation_if_type_if_group_e || state_process->condition == fake_make_operation_if_type_if_not_group_e) {
- fake_make_get_id(data_make, F_false, data_make->cache_arguments.array[k++]);
+ fake_make_get_id(data_make, F_false, data_make->main->cache_arguments.array[k++]);
if (F_status_is_error(data_make->main->setting.state.status)) {
data_make->main->setting.state.status = F_status_set_error(F_failure);
// fifo = 0x8 (0000 1000) invalid = 0x80 (1000 0000)
uint8_t type_file = 0;
- for (i = k; i < data_make->cache_arguments.used; ++i) {
+ for (i = k; i < data_make->main->cache_arguments.used; ++i) {
- if (f_compare_dynamic(fake_make_operation_argument_if_is_for_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_if_is_for_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
++i;
break;
}
- if (f_compare_dynamic(f_file_type_name_block_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(f_file_type_name_block_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x1;
}
- else if (f_compare_dynamic(f_file_type_name_character_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_character_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x2;
}
- else if (f_compare_dynamic(f_file_type_name_directory_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_directory_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x4;
}
- else if (f_compare_dynamic(f_file_type_name_fifo_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_fifo_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x8;
}
- else if (f_compare_dynamic(f_file_type_name_link_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_link_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x10;
}
- else if (f_compare_dynamic(f_file_type_name_regular_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_regular_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x20;
}
- else if (f_compare_dynamic(f_file_type_name_socket_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ else if (f_compare_dynamic(f_file_type_name_socket_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
type_file |= 0x40;
}
else {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, f_file_type_name_file_s, data_make->cache_arguments.array[i]);
+ fake_make_print_error_unsupported_type(&data_make->main->program.error, f_file_type_name_file_s, data_make->main->cache_arguments.array[i]);
type_file |= 0x80;
}
}
}
else if (state_process->condition == fake_make_operation_if_type_if_owner_e || state_process->condition == fake_make_operation_if_type_if_not_owner_e) {
- fake_make_get_id(data_make, F_true, data_make->cache_arguments.array[k++]);
+ fake_make_get_id(data_make, F_true, data_make->main->cache_arguments.array[k++]);
if (F_status_is_error(data_make->main->setting.state.status)) {
data_make->main->setting.state.status = F_status_set_error(F_failure);
i = k;
}
- if (i < data_make->cache_arguments.used) {
+ if (i < data_make->main->cache_arguments.used) {
f_status_t status = F_none;
- for (; i < data_make->cache_arguments.used; ++i) {
+ for (; i < data_make->main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
else if (state_process->condition != fake_make_operation_if_type_if_exist_e && state_process->condition != fake_make_operation_if_type_if_is_e) {
// The existence tests do not need to happen here for *_if_exists and *_if_is as those two types will handle performing them during the process stage.
- data_make->main->setting.state.status = f_file_exists(data_make->cache_arguments.array[i], dereference);
+ data_make->main->setting.state.status = f_file_exists(data_make->main->cache_arguments.array[i], dereference);
if (data_make->main->setting.state.status == F_false) {
data_make->main->setting.state.status = F_status_set_error(F_file_found_not);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_exists), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_exists), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
}
if (state_process->condition == fake_make_operation_if_type_if_greater_e || state_process->condition == fake_make_operation_if_type_if_greater_equal_e || state_process->condition == fake_make_operation_if_type_if_less_e || state_process->condition == fake_make_operation_if_type_if_less_equal_e) {
- if (data_make->cache_arguments.used < 2 + k) {
+ if (data_make->main->cache_arguments.used < 2 + k) {
fake_print_error_requires_more_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
f_string_range_t range = f_string_range_t_initialize;
f_number_unsigned_t number = 0;
- for (i = k; i < data_make->cache_arguments.used; ++i, data_make->main->setting.state.status = F_none) {
+ for (i = k; i < data_make->main->cache_arguments.used; ++i, data_make->main->setting.state.status = F_none) {
- if (data_make->cache_arguments.array[i].used) {
+ if (data_make->main->cache_arguments.array[i].used) {
range.start = 0;
- range.stop = data_make->cache_arguments.array[i].used - 1;
+ range.stop = data_make->main->cache_arguments.array[i].used - 1;
- if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
+ if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_plus_s.string[0]) {
range.start = 1;
}
- else if (data_make->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
+ else if (data_make->main->cache_arguments.array[i].string[0] == f_string_ascii_minus_s.string[0]) {
range.start = 1;
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->cache_arguments.array[i], range, &number);
+ data_make->main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, data_make->main->cache_arguments.array[i], range, &number);
}
}
else {
status = F_status_set_error(F_failure);
if (number > F_number_t_size_unsigned_d) {
- fake_make_print_error_out_of_range_number(&data_make->main->program.error, data_make->cache_arguments.array[i], F_number_t_size_unsigned_d, F_number_t_size_unsigned_d);
+ fake_make_print_error_out_of_range_number(&data_make->main->program.error, data_make->main->cache_arguments.array[i], F_number_t_size_unsigned_d, F_number_t_size_unsigned_d);
}
else {
- fake_make_print_error_unsupported_number(&data_make->main->program.error, data_make->cache_arguments.array[i]);
+ fake_make_print_error_unsupported_number(&data_make->main->program.error, data_make->main->cache_arguments.array[i]);
}
}
} // for
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used > 1) {
+ if (data_make->main->cache_arguments.used > 1) {
f_status_t status = F_none;
f_array_length_t i = 0;
- for (; i < data_make->cache_arguments.used; ++i) {
+ for (; i < data_make->main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
} // for
- for (i = 0; i < data_make->cache_arguments.used - 1; ++i) {
+ for (i = 0; i < data_make->main->cache_arguments.used - 1; ++i) {
- if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ if (f_file_exists(data_make->main->cache_arguments.array[i], F_true) != F_true) {
+ fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
} // for
- if (data_make->cache_arguments.used > 2) {
+ if (data_make->main->cache_arguments.used > 2) {
// The last file must be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
if (data_make->main->setting.state.status == F_false || data_make->main->setting.state.status == F_file_found_not) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "last", data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ fake_make_print_error_content_not_directory(&data_make->main->program.error, "last", data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
status = F_status_set_error(F_failure);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
status = F_status_set_error(F_failure);
}
else {
// When the first file is a directory, then the second, if it exists, must also be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[0]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[0]);
if (data_make->main->setting.state.status == F_true) {
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[1]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
if (data_make->main->setting.state.status == F_false) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "second", data_make->cache_arguments.array[1]);
+ fake_make_print_error_content_not_directory(&data_make->main->program.error, "second", data_make->main->cache_arguments.array[1]);
status = F_status_set_error(F_failure);
}
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used) {
- fake_make_operate_validate_define_name(data_make->cache_arguments.array[0]);
+ if (data_make->main->cache_arguments.used) {
+ fake_make_operate_validate_define_name(data_make->main->cache_arguments.array[0]);
if (data_make->main->setting.state.status == F_true) {
data_make->main->setting.state.status = F_none;
fake_make_print_error_define_name_empty(&data_make->main->program.error);
}
else {
- fake_make_print_error_define_invalid_character(&data_make->main->program.error, data_make->cache_arguments.array[0]);
+ fake_make_print_error_define_invalid_character(&data_make->main->program.error, data_make->main->cache_arguments.array[0]);
}
}
else {
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used) {
+ if (data_make->main->cache_arguments.used) {
f_status_t status = F_none;
- for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
return;
}
- if (data_make->cache_arguments.used) {
+ if (data_make->main->cache_arguments.used) {
fake_print_error_too_many_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used > 1) {
+ if (data_make->main->cache_arguments.used > 1) {
fake_print_error_too_many_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->cache_arguments.used) {
- if (f_compare_dynamic(fake_make_operation_argument_success_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_exit_s, data_make->cache_arguments.array[0]);
+ if (data_make->main->cache_arguments.used) {
+ if (f_compare_dynamic(fake_make_operation_argument_success_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_failure_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
+ fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_exit_s, data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used) {
- if (f_compare_dynamic(fake_make_operation_argument_exit_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_warn_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_ignore_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_fail_s, data_make->cache_arguments.array[0]);
+ if (data_make->main->cache_arguments.used) {
+ if (f_compare_dynamic(fake_make_operation_argument_exit_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_warn_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_ignore_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
+ fake_make_print_error_unsupported_type(&data_make->main->program.error, fake_make_operation_fail_s, data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (!data_make->cache_arguments.used) {
+ if (!data_make->main->cache_arguments.used) {
fake_print_error_requires_more_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used > 4) {
+ if (data_make->main->cache_arguments.used > 4) {
fake_print_error_too_many_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->cache_arguments.used > 1) {
+ if (data_make->main->cache_arguments.used > 1) {
f_status_t status = F_none;
// 0x1 = force, 0x2 = strict.
uint8_t flag = 0;
- if (data_make->cache_arguments.used > 2) {
- if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->cache_arguments.array[0]) == F_equal_to) {
+ if (data_make->main->cache_arguments.used > 2) {
+ if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
flag |= 0x1;
}
- else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->cache_arguments.array[0]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->main->cache_arguments.array[0]) == F_equal_to) {
flag |= 0x2;
}
else {
- fake_print_error_operation_link_argument_unknown(&data_make->error, data_make->cache_arguments.array[0]);
+ fake_print_error_operation_link_argument_unknown(&data_make->error, data_make->main->cache_arguments.array[0]);
status = F_status_set_error(F_failure);
}
- if (data_make->cache_arguments.used > 3) {
- if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->cache_arguments.array[1]) == F_equal_to) {
+ if (data_make->main->cache_arguments.used > 3) {
+ if (f_compare_dynamic(fake_make_operation_argument_force_s, data_make->main->cache_arguments.array[1]) == F_equal_to) {
flag |= 0x1;
}
- else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->cache_arguments.array[1]) == F_equal_to) {
+ else if (f_compare_dynamic(fake_make_operation_argument_strict_s, data_make->main->cache_arguments.array[1]) == F_equal_to) {
flag |= 0x2;
}
else {
- fake_print_error_operation_link_argument_unknown(&data_make->error, data_make->cache_arguments.array[1]);
+ fake_print_error_operation_link_argument_unknown(&data_make->error, data_make->main->cache_arguments.array[1]);
status = F_status_set_error(F_failure);
}
}
}
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
status = F_status_set_error(F_failure);
}
else {
if (!(flag & 0x1)) {
- if (!data_make->cache_path.used || f_file_exists(data_make->cache_path, F_false) == F_true) {
- fake_print_error_operation_link_point_exists(&data_make->error, data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ if (!data_make->main->cache_argument.used || f_file_exists(data_make->main->cache_argument, F_false) == F_true) {
+ fake_print_error_operation_link_point_exists(&data_make->error, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
status = F_status_set_error(F_failure);
}
}
- if (f_path_is_absolute(data_make->cache_arguments.array[data_make->cache_arguments.used - 2]) == F_true) {
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[data_make->cache_arguments.used - 2]);
+ if (f_path_is_absolute(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2]) == F_true) {
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_arguments.array[data_make->cache_arguments.used - 2]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2]);
status = F_status_set_error(F_failure);
}
if ((flag & 0x2) && F_status_is_error_not(data_make->main->setting.state.status)) {
- if (f_file_exists(data_make->cache_arguments.array[data_make->cache_arguments.used - 2], F_false) != F_true) {
- fake_print_error_operation_link_target_exists_not(&data_make->error, data_make->cache_arguments.array[data_make->cache_arguments.used - 2]);
+ if (f_file_exists(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2], F_false) != F_true) {
+ fake_print_error_operation_link_target_exists_not(&data_make->error, data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2]);
status = F_status_set_error(F_failure);
}
}
// The target path is relative to the point path so construct the path for performing checks.
- else if (data_make->cache_arguments.array[data_make->cache_arguments.used - 2].used) {
+ else if (data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2].used) {
// The cache_path contains the full path to the point file, save this so that the cache_path can be re-used.
- f_char_t full_string[data_make->cache_path.used + 1];
- f_string_static_t full = macro_f_string_static_t_initialize(full_string, 0, data_make->cache_path.used);
+ f_char_t full_string[data_make->main->cache_argument.used + 1];
+ f_string_static_t full = macro_f_string_static_t_initialize(full_string, 0, data_make->main->cache_argument.used);
- memcpy(full_string, data_make->cache_path.string, sizeof(f_char_t) * data_make->cache_path.used);
- full_string[data_make->cache_path.used] = 0;
+ memcpy(full_string, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_argument.used);
+ full_string[data_make->main->cache_argument.used] = 0;
- data_make->cache_path.used = 0;
+ data_make->main->cache_argument.used = 0;
- data_make->main->setting.state.status = f_file_name_directory(full, &data_make->cache_path);
+ data_make->main->setting.state.status = f_file_name_directory(full, &data_make->main->cache_argument);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_name_directory), full, f_file_operation_analyze_s, fll_error_file_type_path_e);
}
if (F_status_is_error_not(data_make->main->setting.state.status)) {
- data_make->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->cache_path);
+ data_make->main->setting.state.status = f_string_dynamic_append_assure(f_path_separator_s, &data_make->main->cache_argument);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append_assure));
status = F_status_set_error(F_failure);
}
else {
- data_make->main->setting.state.status = f_string_dynamic_append(data_make->cache_arguments.array[data_make->cache_arguments.used - 2], &data_make->cache_path);
+ data_make->main->setting.state.status = f_string_dynamic_append(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 2], &data_make->main->cache_argument);
if (F_status_is_error(data_make->main->setting.state.status)) {
fake_print_error(&data_make->main->program.error, macro_fake_f(f_string_dynamic_append));
if (F_status_is_error_not(data_make->main->setting.state.status)) {
// The cache_path is used by fake_make_assure_inside_project(), so copy the contents into another buffer.
- f_char_t target_string[data_make->cache_path.used + 1];
- f_string_static_t target = macro_f_string_static_t_initialize(target_string, 0, data_make->cache_path.used);
+ f_char_t target_string[data_make->main->cache_argument.used + 1];
+ f_string_static_t target = macro_f_string_static_t_initialize(target_string, 0, data_make->main->cache_argument.used);
- memcpy(target_string, data_make->cache_path.string, sizeof(f_char_t) * data_make->cache_path.used);
- target_string[data_make->cache_path.used] = 0;
+ memcpy(target_string, data_make->main->cache_argument.string, sizeof(f_char_t) * data_make->main->cache_argument.used);
+ target_string[data_make->main->cache_argument.used] = 0;
fake_make_assure_inside_project(data_make, target);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used > 1) {
+ if (data_make->main->cache_arguments.used > 1) {
{
f_status_t status = F_none;
- for (f_array_length_t i = 0; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
} // for
if (F_status_is_error_not(status)) {
- for (f_array_length_t i = 0; i < data_make->cache_arguments.used - 1; ++i) {
+ for (f_array_length_t i = 0; i < data_make->main->cache_arguments.used - 1; ++i) {
- if (f_file_exists(data_make->cache_arguments.array[i], F_true) != F_true) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ if (f_file_exists(data_make->main->cache_arguments.array[i], F_true) != F_true) {
+ fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
if (F_status_is_error(data_make->main->setting.state.status)) return;
}
- if (data_make->cache_arguments.used > 2) {
+ if (data_make->main->cache_arguments.used > 2) {
// The last file must be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
if (data_make->main->setting.state.status == F_false || data_make->main->setting.state.status == F_file_found_not) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "last", data_make->cache_arguments.array[data_make->cache_arguments.used - 1]);
+ fake_make_print_error_content_not_directory(&data_make->main->program.error, "last", data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->cache_arguments.array[data_make->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_directory_is), data_make->main->cache_arguments.array[data_make->main->cache_arguments.used - 1], f_file_operation_identify_s, fll_error_file_type_directory_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
else {
// When the first file is a directory, then the second, if it exists, must also be a directory.
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[0]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[0]);
if (data_make->main->setting.state.status == F_true) {
- data_make->main->setting.state.status = f_directory_is(data_make->cache_arguments.array[1]);
+ data_make->main->setting.state.status = f_directory_is(data_make->main->cache_arguments.array[1]);
if (data_make->main->setting.state.status == F_false) {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, "second", data_make->cache_arguments.array[1]);
+ fake_make_print_error_content_not_directory(&data_make->main->program.error, "second", data_make->main->cache_arguments.array[1]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main || !section_stack) return;
- if (data_make->cache_arguments.used > 1) {
+ if (data_make->main->cache_arguments.used > 1) {
fake_print_error_too_many_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->cache_arguments.used == 1) {
+ if (data_make->main->cache_arguments.used == 1) {
f_array_length_t id_section = 0;
for (; id_section < data_make->fakefile.used; ++id_section) {
- if (f_compare_dynamic_partial_string(data_make->cache_arguments.array[0].string, data_make->buffer, data_make->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
+ if (f_compare_dynamic_partial_string(data_make->main->cache_arguments.array[0].string, data_make->main->buffer, data_make->main->cache_arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
break;
}
} // for
if (id_section == data_make->fakefile.used) {
- fake_make_print_error_operation_section_not_found(&data_make->main->program.error, data_make->cache_arguments.array[0]);
+ fake_make_print_error_operation_section_not_found(&data_make->main->program.error, data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
for (f_array_length_t i = 0; i < section_stack->used; ++i) {
if (section_stack->array[i] == id_section) {
- fake_make_print_error_operation_recursion(&data_make->main->program.error, data_make->buffer, data_make->fakefile.array[id_section].name);
+ fake_make_print_error_operation_recursion(&data_make->main->program.error, data_make->main->buffer, data_make->fakefile.array[id_section].name);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used) {
+ if (data_make->main->cache_arguments.used) {
const f_string_static_t reserved_name[] = {
fake_make_parameter_variable_build_s,
fake_make_parameter_variable_color_s,
for (f_array_length_t i = 0; i < 33; ++i) {
- if (f_compare_dynamic(reserved_name[i], data_make->cache_arguments.array[0]) == F_equal_to) {
+ if (f_compare_dynamic(reserved_name[i], data_make->main->cache_arguments.array[0]) == F_equal_to) {
fake_make_print_error_reserved_parameter_name(&data_make->main->program.error, reserved_name[i]);
status = F_status_set_error(F_failure);
if (!data_make || !data_make->main || !state_process) return;
- if (data_make->cache_arguments.used) {
+ if (data_make->main->cache_arguments.used) {
f_array_length_t i = 1;
if (state_process->operation == fake_make_operation_type_group_e || state_process->operation == fake_make_operation_type_groups_e || state_process->operation == fake_make_operation_type_owner_e || state_process->operation == fake_make_operation_type_owners_e) {
- if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->cache_arguments.array[i]) == F_equal_to) {
+ if (f_compare_dynamic(fake_make_operation_argument_no_dereference_s, data_make->main->cache_arguments.array[i]) == F_equal_to) {
i = 2;
}
}
- if (data_make->cache_arguments.used > i) {
+ if (data_make->main->cache_arguments.used > i) {
f_status_t status = F_none;
- for (; i < data_make->cache_arguments.used; ++i) {
+ for (; i < data_make->main->cache_arguments.used; ++i) {
- data_make->main->setting.state.status = f_file_is(data_make->cache_arguments.array[i], F_file_type_regular_d, F_false);
+ data_make->main->setting.state.status = f_file_is(data_make->main->cache_arguments.array[i], F_file_type_regular_d, F_false);
if (data_make->main->setting.state.status == F_file_found_not) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_file_e);
status = F_status_set_error(F_failure);
}
if (F_status_is_error(data_make->main->setting.state.status)) {
if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->main->program.error.to.stream) {
- fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[i], f_file_operation_find_s, fll_error_file_type_directory_e);
}
status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used) {
+ if (data_make->main->cache_arguments.used) {
fake_print_error_too_many_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (!data_make->cache_arguments.used) {
+ if (!data_make->main->cache_arguments.used) {
fake_print_error_requires_more_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used > 1) {
+ if (data_make->main->cache_arguments.used > 1) {
fake_print_error_too_many_arguments(&data_make->main->program.error);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- if (data_make->cache_arguments.used) {
- if (data_make->cache_arguments.array[0].used) {
- data_make->main->setting.state.status = f_file_is(data_make->cache_arguments.array[0], F_file_type_directory_d, F_false);
+ if (data_make->main->cache_arguments.used) {
+ if (data_make->main->cache_arguments.array[0].used) {
+ data_make->main->setting.state.status = f_file_is(data_make->main->cache_arguments.array[0], F_file_type_directory_d, F_false);
if (data_make->main->setting.state.status == F_file_found_not) {
- fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->cache_arguments.array[0], f_file_operation_find_s, fll_error_file_type_file_e);
+ fake_print_error_file_simple(&data_make->main->program.error, macro_fake_f(f_file_is), data_make->main->cache_arguments.array[0], f_file_operation_find_s, fll_error_file_type_file_e);
data_make->main->setting.state.status = F_status_set_error(F_failure);
data_make->main->setting.state.status = F_none;
}
else {
- fake_make_print_error_content_not_directory(&data_make->main->program.error, 0, data_make->cache_arguments.array[0]);
+ fake_make_print_error_content_not_directory(&data_make->main->program.error, 0, data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
if (!data_make || !data_make->main) return;
- if (data_make->cache_arguments.used > 1) {
- if (f_compare_dynamic(fake_make_operation_argument_file_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
- if (f_compare_dynamic(fake_make_operation_argument_directory_s, data_make->cache_arguments.array[0]) == F_equal_to_not) {
- fake_make_print_error_unsupported_type(&data_make->main->program.error, f_file_type_name_file_s, data_make->cache_arguments.array[0]);
+ if (data_make->main->cache_arguments.used > 1) {
+ if (f_compare_dynamic(fake_make_operation_argument_file_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
+ if (f_compare_dynamic(fake_make_operation_argument_directory_s, data_make->main->cache_arguments.array[0]) == F_equal_to_not) {
+ fake_make_print_error_unsupported_type(&data_make->main->program.error, f_file_type_name_file_s, data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}
f_status_t status = F_none;
- for (f_array_length_t i = 1; i < data_make->cache_arguments.used; ++i) {
+ for (f_array_length_t i = 1; i < data_make->main->cache_arguments.used; ++i) {
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[i]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[i]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[i]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[i]);
status = F_status_set_error(F_failure);
}
#ifndef _di_fake_make_operate_validate_type_write_
void fake_make_operate_validate_type_write(fake_make_data_t * const data_make) {
- if (data_make->cache_arguments.used) {
- if (!data_make->cache_arguments.array[0].used) {
+ if (!data_make || !data_make->main) return;
+
+ if (data_make->main->cache_arguments.used) {
+ if (!data_make->main->cache_arguments.array[0].used) {
fake_print_error_argument_empty(&data_make->error, 1);
data_make->main->setting.state.status = F_status_set_error(F_failure);
return;
}
- fake_make_assure_inside_project(data_make, data_make->cache_arguments.array[0]);
+ fake_make_assure_inside_project(data_make, data_make->main->cache_arguments.array[0]);
if (F_status_is_error(data_make->main->setting.state.status)) {
- fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->cache_path.used ? data_make->cache_path : data_make->cache_arguments.array[0]);
+ fake_print_error_operation_path_outside(&data_make->error, macro_fake_f(fake_make_assure_inside_project), data_make->main->cache_argument.used ? data_make->main->cache_argument : data_make->main->cache_arguments.array[0]);
data_make->main->setting.state.status = F_status_set_error(F_failure);
}