22 if (required_size > *current_size)
25 *current_size, required_size);
26 *current_size = required_size;
31 int *current_size,
int *i)
42 required_size = *i + split_count;
45 while (j < split_count)
70 current_size = arg_count;
71 while (i < current_size)
81 free(command_node->
args[i]);
87 command_node->
args[current_size] = NULL;
114 while (*start !=
'\0')
119 if (expanded_var != NULL)
122 tmp_ad, expanded_var);
129 return (processed_arg);
void ft_free_2d_arr(char **arr)
char ** ft_realloc_array(char **array, int old_size, int new_size)
char * ft_substr(char const *s, unsigned int start, size_t len)
char * ft_remove_quotes(char *str, char quote_type)
char * ft_strjoin_free(char *s1, char *s2)
size_t ft_strlen(const char *s)
char * ft_strdup(const char *s)
int ft_len_2d_arr(char **array)
void handle_split_allocation(t_ast *command_node, int *current_size, int required_size)
void handle_local_vars(t_ms_data *data, char *arg)
void split_loc_vars(t_ast *command_node, char *processed_arg, int *current_size, int *i)
char * append_expanded_var(char *processed_arg, char *tmp_ad, char *expanded_var)
void post_process_command_args(t_ast *command_node, int arg_count, t_ms_data *data)
char * process_argument(char *arg, t_ms_data *data)
char ** ft_split_preserve_quotes(char *str, char delimiter)
char * append_literal(char **start, char *processed_arg)
char * expand_variable(char **start, t_ms_data *data)
char * tmp_adj(char *arg)
int is_in_single_quotes(char *arg)