26 while (**start && (
ft_isalnum(**start) || **start ==
'_'))
28 var_name =
ft_substr(var_start, 0, *start - var_start);
31 len_before_var = var_start - str_start;
32 tmp =
ft_substr(str_start, 0, len_before_var);
37 return (expanded_str);
49 while (**start && **start !=
'\0')
53 expanded_str =
ev_loop(start, data, str_start, expanded_str);
60 if (str_start != *start)
62 result =
ft_substr(str_start, 0, *start - str_start);
66 return (expanded_str);
93 result = realloc(result, (*count + 1) *
sizeof(
char *));
114 if (*str == delimiter && !in_quotes)
int handle_add_set_shell_variable(t_env **shell_var, char *line)
char * ft_strndup(const char *s, size_t n)
char * ft_substr(char const *s, unsigned int start, size_t len)
char * ft_strchr(const char *s, int c)
char * ft_strjoin_free(char *s1, char *s2)
char * ft_strdup(const char *s)
char ** ft_split_preserve_quotes(char *str, char delimiter)
void handle_local_vars(t_ms_data *data, char *arg)
char * expand_variable(char **start, t_ms_data *data)
char * ev_loop(char **start, t_ms_data *data, char *str_start, char *expanded_str)
char ** ft_add_segment(char **result, char *start, size_t length, int *count)
int toggle_quotes(int in_quotes, char current_char)
char ** finalize_result_array(char **result, int count)
char ** initialize_result_array(int *count)
char * str_start_adj(char *arg)
char ** add_segment_on_delimiter(char **result, char **start, char *str, int *count)
char * expand_env_and_loc_var(char *arg, t_ms_data *data)