diff --git a/include/minishell.h b/include/minishell.h index 95f6f64..ce3e4a0 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -101,7 +101,7 @@ void free_arrays(char **arr); int ft_pwd(char **argv); int ft_echo(char **argv); int ft_cd(char **argv); -int ft_export(char **argv, int index); +int ft_export(char **argv); int ft_setenv(char *name, char *value, int overwrite); char *ft_setenv_str(char *name, char *value, char *str); diff --git a/lib/libft.a b/lib/libft.a new file mode 100644 index 0000000..757099e Binary files /dev/null and b/lib/libft.a differ diff --git a/lib/srcs/ft_atoi.o b/lib/srcs/ft_atoi.o new file mode 100644 index 0000000..9464f18 Binary files /dev/null and b/lib/srcs/ft_atoi.o differ diff --git a/lib/srcs/ft_bzero.o b/lib/srcs/ft_bzero.o new file mode 100644 index 0000000..cc2e81a Binary files /dev/null and b/lib/srcs/ft_bzero.o differ diff --git a/lib/srcs/ft_c_counter.o b/lib/srcs/ft_c_counter.o new file mode 100644 index 0000000..3e961a2 Binary files /dev/null and b/lib/srcs/ft_c_counter.o differ diff --git a/lib/srcs/ft_calloc.o b/lib/srcs/ft_calloc.o new file mode 100644 index 0000000..1677aca Binary files /dev/null and b/lib/srcs/ft_calloc.o differ diff --git a/lib/srcs/ft_d_counter.o b/lib/srcs/ft_d_counter.o new file mode 100644 index 0000000..d200a1a Binary files /dev/null and b/lib/srcs/ft_d_counter.o differ diff --git a/lib/srcs/ft_is_n_o_a.o b/lib/srcs/ft_is_n_o_a.o new file mode 100644 index 0000000..e5bb94e Binary files /dev/null and b/lib/srcs/ft_is_n_o_a.o differ diff --git a/lib/srcs/ft_isalpha.o b/lib/srcs/ft_isalpha.o new file mode 100644 index 0000000..0637e6d Binary files /dev/null and b/lib/srcs/ft_isalpha.o differ diff --git a/lib/srcs/ft_isascii.o b/lib/srcs/ft_isascii.o new file mode 100644 index 0000000..8126977 Binary files /dev/null and b/lib/srcs/ft_isascii.o differ diff --git a/lib/srcs/ft_isdigit.o b/lib/srcs/ft_isdigit.o new file mode 100644 index 0000000..cb5ab37 Binary files /dev/null and b/lib/srcs/ft_isdigit.o differ diff --git a/lib/srcs/ft_isprint.o b/lib/srcs/ft_isprint.o new file mode 100644 index 0000000..8a6f154 Binary files /dev/null and b/lib/srcs/ft_isprint.o differ diff --git a/lib/srcs/ft_isspace.o b/lib/srcs/ft_isspace.o new file mode 100644 index 0000000..c28567a Binary files /dev/null and b/lib/srcs/ft_isspace.o differ diff --git a/lib/srcs/ft_isupper.o b/lib/srcs/ft_isupper.o new file mode 100644 index 0000000..2167581 Binary files /dev/null and b/lib/srcs/ft_isupper.o differ diff --git a/lib/srcs/ft_memccpy.o b/lib/srcs/ft_memccpy.o new file mode 100644 index 0000000..4920b83 Binary files /dev/null and b/lib/srcs/ft_memccpy.o differ diff --git a/lib/srcs/ft_memchr.o b/lib/srcs/ft_memchr.o new file mode 100644 index 0000000..c177f6f Binary files /dev/null and b/lib/srcs/ft_memchr.o differ diff --git a/lib/srcs/ft_memcmp.o b/lib/srcs/ft_memcmp.o new file mode 100644 index 0000000..c4859fe Binary files /dev/null and b/lib/srcs/ft_memcmp.o differ diff --git a/lib/srcs/ft_memcpy.o b/lib/srcs/ft_memcpy.o new file mode 100644 index 0000000..6942f5d Binary files /dev/null and b/lib/srcs/ft_memcpy.o differ diff --git a/lib/srcs/ft_memmove.o b/lib/srcs/ft_memmove.o new file mode 100644 index 0000000..6020382 Binary files /dev/null and b/lib/srcs/ft_memmove.o differ diff --git a/lib/srcs/ft_memset.o b/lib/srcs/ft_memset.o new file mode 100644 index 0000000..68da9e7 Binary files /dev/null and b/lib/srcs/ft_memset.o differ diff --git a/lib/srcs/ft_putchar.o b/lib/srcs/ft_putchar.o new file mode 100644 index 0000000..87ae51f Binary files /dev/null and b/lib/srcs/ft_putchar.o differ diff --git a/lib/srcs/ft_putstr.o b/lib/srcs/ft_putstr.o new file mode 100644 index 0000000..c484432 Binary files /dev/null and b/lib/srcs/ft_putstr.o differ diff --git a/lib/srcs/ft_realloc.o b/lib/srcs/ft_realloc.o new file mode 100644 index 0000000..f376b27 Binary files /dev/null and b/lib/srcs/ft_realloc.o differ diff --git a/lib/srcs/ft_str_offset.o b/lib/srcs/ft_str_offset.o new file mode 100644 index 0000000..f8ab9b0 Binary files /dev/null and b/lib/srcs/ft_str_offset.o differ diff --git a/lib/srcs/ft_stradd.o b/lib/srcs/ft_stradd.o new file mode 100644 index 0000000..b5fc58c Binary files /dev/null and b/lib/srcs/ft_stradd.o differ diff --git a/lib/srcs/ft_strchr.o b/lib/srcs/ft_strchr.o new file mode 100644 index 0000000..b699132 Binary files /dev/null and b/lib/srcs/ft_strchr.o differ diff --git a/lib/srcs/ft_strclr.o b/lib/srcs/ft_strclr.o new file mode 100644 index 0000000..dc1baca Binary files /dev/null and b/lib/srcs/ft_strclr.o differ diff --git a/lib/srcs/ft_strcpy.o b/lib/srcs/ft_strcpy.o new file mode 100644 index 0000000..0b69585 Binary files /dev/null and b/lib/srcs/ft_strcpy.o differ diff --git a/lib/srcs/ft_strdup.o b/lib/srcs/ft_strdup.o new file mode 100644 index 0000000..1ad894d Binary files /dev/null and b/lib/srcs/ft_strdup.o differ diff --git a/lib/srcs/ft_strexact.o b/lib/srcs/ft_strexact.o new file mode 100644 index 0000000..d9d3ae4 Binary files /dev/null and b/lib/srcs/ft_strexact.o differ diff --git a/lib/srcs/ft_strexist.o b/lib/srcs/ft_strexist.o new file mode 100644 index 0000000..2a73f58 Binary files /dev/null and b/lib/srcs/ft_strexist.o differ diff --git a/lib/srcs/ft_strfree.o b/lib/srcs/ft_strfree.o new file mode 100644 index 0000000..877430e Binary files /dev/null and b/lib/srcs/ft_strfree.o differ diff --git a/lib/srcs/ft_strjoin.o b/lib/srcs/ft_strjoin.o new file mode 100644 index 0000000..ba24010 Binary files /dev/null and b/lib/srcs/ft_strjoin.o differ diff --git a/lib/srcs/ft_strlen.o b/lib/srcs/ft_strlen.o new file mode 100644 index 0000000..fb76a9f Binary files /dev/null and b/lib/srcs/ft_strlen.o differ diff --git a/lib/srcs/ft_strncmp.o b/lib/srcs/ft_strncmp.o new file mode 100644 index 0000000..01ed844 Binary files /dev/null and b/lib/srcs/ft_strncmp.o differ diff --git a/lib/srcs/ft_strnew.o b/lib/srcs/ft_strnew.o new file mode 100644 index 0000000..5f1a5c5 Binary files /dev/null and b/lib/srcs/ft_strnew.o differ diff --git a/lib/srcs/ft_strnstr.o b/lib/srcs/ft_strnstr.o new file mode 100644 index 0000000..e22af25 Binary files /dev/null and b/lib/srcs/ft_strnstr.o differ diff --git a/lib/srcs/ft_strsplit.o b/lib/srcs/ft_strsplit.o new file mode 100644 index 0000000..3266029 Binary files /dev/null and b/lib/srcs/ft_strsplit.o differ diff --git a/lib/srcs/ft_substr.o b/lib/srcs/ft_substr.o new file mode 100644 index 0000000..e5e31a6 Binary files /dev/null and b/lib/srcs/ft_substr.o differ diff --git a/lib/srcs/ft_tolower.o b/lib/srcs/ft_tolower.o new file mode 100644 index 0000000..c257328 Binary files /dev/null and b/lib/srcs/ft_tolower.o differ diff --git a/lib/srcs/ft_toupper.o b/lib/srcs/ft_toupper.o new file mode 100644 index 0000000..a8f2eed Binary files /dev/null and b/lib/srcs/ft_toupper.o differ diff --git a/lib/srcs/ft_validnl.o b/lib/srcs/ft_validnl.o new file mode 100644 index 0000000..e5d78be Binary files /dev/null and b/lib/srcs/ft_validnl.o differ diff --git a/lib/srcs/ft_wrdcnt.o b/lib/srcs/ft_wrdcnt.o new file mode 100644 index 0000000..e27ccdf Binary files /dev/null and b/lib/srcs/ft_wrdcnt.o differ diff --git a/lib/srcs/gnl.o b/lib/srcs/gnl.o new file mode 100644 index 0000000..3aa7ce5 Binary files /dev/null and b/lib/srcs/gnl.o differ diff --git a/minishell b/minishell new file mode 100644 index 0000000..d1cc668 Binary files /dev/null and b/minishell differ diff --git a/srcs/.DS_Store b/srcs/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/srcs/.DS_Store differ diff --git a/srcs/built_ins.c b/srcs/built_ins.c index b4fb068..65f3571 100644 --- a/srcs/built_ins.c +++ b/srcs/built_ins.c @@ -94,11 +94,11 @@ void ft_export_loop(char **argv) ft_matrix_free(name_value); } -int ft_export(char **argv, int index) +int ft_export(char **argv) { if (*argv && ft_strlen(*argv) == 0) return (0); - argv = argv + index; + argv++; if (*argv) { while (*argv != NULL) diff --git a/srcs/built_ins.o b/srcs/built_ins.o new file mode 100644 index 0000000..924735f Binary files /dev/null and b/srcs/built_ins.o differ diff --git a/srcs/built_ins_background.o b/srcs/built_ins_background.o new file mode 100644 index 0000000..f01d1ce Binary files /dev/null and b/srcs/built_ins_background.o differ diff --git a/srcs/built_ins_background2.o b/srcs/built_ins_background2.o new file mode 100644 index 0000000..7c4db25 Binary files /dev/null and b/srcs/built_ins_background2.o differ diff --git a/srcs/built_ins_checkers_n_runners.c b/srcs/built_ins_checkers_n_runners.c index 6e4d6fa..c633356 100644 --- a/srcs/built_ins_checkers_n_runners.c +++ b/srcs/built_ins_checkers_n_runners.c @@ -14,8 +14,6 @@ int check_if_builtin(t_cmd *cmd) { - if (ft_strchr(cmd->args[0], '=')) - return (1); if (ft_strexact("cd", cmd->args[0])) return (1); if (ft_strexact("export", cmd->args[0])) @@ -37,8 +35,6 @@ int run_builtin(t_cmd *cmd) { int ret; - if (ft_strchr(cmd->args[0], '=')) - ret = ft_export(cmd->args, 0); if (ft_strexact("pwd", cmd->args[0])) ret = ft_pwd(cmd->args); if (ft_strexact("echo", cmd->args[0])) @@ -48,7 +44,7 @@ int run_builtin(t_cmd *cmd) if (ft_strexact("cd", cmd->args[0])) ret = ft_cd(cmd->args); if (ft_strexact("export", cmd->args[0])) - ret = ft_export(cmd->args, 0); + ret = ft_export(cmd->args); if (ft_strexact("unset", cmd->args[0]) && cmd->args[1]) ret = ft_unset(cmd->args); if (ft_strexact("exit", cmd->args[0])) @@ -61,8 +57,6 @@ int check_if_builtin_not_pipe(t_cmd *cmd) { if (!cmd->next) { - if (ft_strchr(cmd->args[0], '=')) - return (1); if (ft_strexact("cd", cmd->args[0])) return (1); if (ft_strexact("export", cmd->args[0])) @@ -90,12 +84,10 @@ int run_builtin_not_piped(t_cmd *cmd) { int ret; - if (ft_strchr(cmd->args[0], '=')) - ret = ft_export(cmd->args, 0); if (ft_strexact("cd", cmd->args[0])) ret = ft_cd(cmd->args); if (ft_strexact("export", cmd->args[0])) - ret = ft_export(cmd->args, 1); + ret = ft_export(cmd->args); if (ft_strexact("unset", cmd->args[0]) && cmd->args[1]) ret = ft_unset(cmd->args); if (ft_strexact("exit", cmd->args[0])) diff --git a/srcs/built_ins_checkers_n_runners.o b/srcs/built_ins_checkers_n_runners.o new file mode 100644 index 0000000..485f39f Binary files /dev/null and b/srcs/built_ins_checkers_n_runners.o differ diff --git a/srcs/builtins.c b/srcs/builtins.c deleted file mode 100755 index aafea40..0000000 --- a/srcs/builtins.c +++ /dev/null @@ -1,113 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* built_ins.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:19:25 by hgoncalv #+# #+# */ -/* Updated: 2022/12/22 15:34:22 by hgoncalv ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#include "../include/minishell.h" - -int ft_cd(char **argv) -{ - char *folder; - int to_free; - char pwd[256]; - int ret; - - if (argv[1] && argv[2]) - { - printf("cd: too many arguments\n"); - return (1); - } - if (getcwd(pwd, sizeof(pwd)) == NULL) - perror("getcwd() error"); - to_free = set_cd_folder_return_if_free_folder_or_not(argv, &folder); - ret = chdir(folder); - if (ret != 0) - perror("minishell"); - ft_setenv("OLDPWD", pwd, 1); - if (getcwd(pwd, sizeof(pwd)) == NULL) - perror("getcwd() error"); - ft_setenv("PWD", pwd, 1); - if (to_free) - free(folder); - return (ret * (-1)); -} - -int ft_echo(char **argv) -{ - int i; - int flag; - - flag = 0; - i = 1; - while (argv[i] != NULL && ft_strexact(argv[i], "-n")) - i++; - if (ft_strexact(argv[i - 1], "-n")) - flag = 1; - while (argv[i] != NULL) - { - ft_putstr_fd(argv[i], 1); - i++; - if (argv[i] != NULL) - ft_putchar_fd(' ', 1); - } - if (!flag) - ft_putchar_fd('\n', 1); - return (0); -} - -int ft_pwd(char **argv) -{ - char cwd[256]; - - (void)argv; - if (getcwd(cwd, sizeof(cwd)) == NULL) - perror("getcwd() error"); - else - printf("%s\n", cwd); - return (0); -} - -void ft_export_loop(char **argv) -{ - char **name_value; - char *tmpstr; - - name_value = ft_strsplit(*argv, '='); - if (name_value[1]) - { - tmpstr = ft_concat_multi(name_value + 1, "="); - ft_setenv(name_value[0], tmpstr, 1); - free(tmpstr); - } - else - { - if (name_value[0] && (*argv)[ft_strlen(name_value[0])] == '=') - ft_setenv(name_value[0], NULL, 1); - } - ft_matrix_free(name_value); -} - -int ft_export(char **argv, int index) -{ - if (*argv && ft_strlen(*argv) == 0) - return (0); - argv = argv + index; - if (*argv) - { - while (*argv != NULL) - { - ft_export_loop(argv); - argv++; - } - } - else - ft_export_no_args(); - return (1); -} diff --git a/srcs/builtins_background.c b/srcs/builtins_background.c deleted file mode 100755 index 5e81f13..0000000 --- a/srcs/builtins_background.c +++ /dev/null @@ -1,104 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* built_ins_background.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: hgoncalv envp, 0); - while (vars.matrix[vars.l] != NULL) - { - while (vars.matrix[vars.k + 1] != NULL) - { - vars.i = ft_strlen(vars.matrix[vars.k]); - vars.j = ft_strlen(vars.matrix[vars.k + 1]); - if (vars.i > vars.j) - vars.i = vars.j; - if (ft_strncmp(vars.matrix[vars.k], vars.matrix[vars.k + 1], - vars.i) > 0) - ft_swap2str(&(vars.matrix[vars.k]), &(vars.matrix[vars.k + 1])); - vars.k++; - } - vars.k = 0; - vars.l++; - } - ft_print_matrix_add_str2line_start(vars.matrix, "declare -x", " "); - ft_matrix_free(vars.matrix); -} - -void unset_loop(char *argv) -{ - int i; - char **envp; - - envp = NULL; - i = -1; - while (_shell()->envp[++i] != NULL && *argv && ft_strncmp(_shell()->envp[i], - argv, ft_strlen(argv))) - ; - if (_shell()->envp[i] != NULL) - { - envp = ft_matrix_remove_col_by_index(_shell()->envp, i); - _shell()->envp = envp; - } -} - -int ft_unset(char **argv) -{ - argv++; - if (*argv) - { - while (*argv) - { - unset_loop(*argv); - argv++; - } - } - return (0); -} diff --git a/srcs/builtins_background2.c b/srcs/builtins_background2.c deleted file mode 100755 index 9356df2..0000000 --- a/srcs/builtins_background2.c +++ /dev/null @@ -1,57 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* built_ins_background2.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: hgoncalv exit_code = ft_atoi(argv[1]); - _shell()->exit = 1; - return (ft_atoi(argv[1])); - } - else - { - _shell()->exit_code = 0; - _shell()->exit = 1; - return (0); - } -} - -int ft_setenv(char *name, char *value, int overwrite) -{ - int i; - char *str; - char **envp; - - i = -1; - str = NULL; - str = ft_setenv_str(name, value, str); - if (str == NULL) - return (0); - while (_shell()->envp[++i] != NULL && name && ft_strncmp(_shell()->envp[i], - name, ft_strlen(name))) - ; - if (_shell()->envp[i] != NULL && overwrite == 1) - { - free(_shell()->envp[i]); - _shell()->envp[i] = ft_strdup(str); - } - else if (_shell()->envp[i] == NULL) - { - envp = ft_matrix_push(_shell()->envp, ft_strdup(str)); - _shell()->envp = envp; - } - free(str); - return (1); -} diff --git a/srcs/builtins_checkers.c b/srcs/builtins_checkers.c deleted file mode 100755 index f6aaee8..0000000 --- a/srcs/builtins_checkers.c +++ /dev/null @@ -1,63 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* builtins_checkers.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: hgoncalv args[0], '=')) - return (1); - if (ft_strexact("cd", cmd->args[0])) - return (1); - if (ft_strexact("export", cmd->args[0])) - return (1); - if (ft_strexact("unset", cmd->args[0])) - return (1); - if (ft_strexact("exit", cmd->args[0])) - return (1); - if (ft_strexact("pwd", cmd->args[0])) - return (1); - if (ft_strexact("echo", cmd->args[0])) - return (1); - if (ft_strexact("env", cmd->args[0])) - return (1); - return (0); -} - -int check_if_builtin_not_pipe(t_cmd *cmd) -{ - if (!cmd->next) - { - if (ft_strchr(cmd->args[0], '=')) - return (1); - if (ft_strexact("cd", cmd->args[0])) - return (1); - if (ft_strexact("export", cmd->args[0])) - return (1); - if (ft_strexact("unset", cmd->args[0])) - return (1); - if (ft_strexact("exit", cmd->args[0])) - return (1); - } - return (0); -} - -int check_if_builtin_2pipe(t_cmd *cmd) -{ - if (ft_strexact("pwd", cmd->args[0])) - return (1); - if (ft_strexact("echo", cmd->args[0])) - return (1); - if (ft_strexact("env", cmd->args[0])) - return (1); - return (0); -} diff --git a/srcs/builtins_runners.c b/srcs/builtins_runners.c deleted file mode 100755 index d3a45eb..0000000 --- a/srcs/builtins_runners.c +++ /dev/null @@ -1,68 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* builtins_runners.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: hgoncalv args[0], '=')) - ret = ft_export(cmd->args, 0); - if (ft_strexact("pwd", cmd->args[0])) - ret = ft_pwd(cmd->args); - if (ft_strexact("echo", cmd->args[0])) - ret = ft_echo(cmd->args); - if (ft_strexact("env", cmd->args[0])) - ret = ft_env(cmd->args); - if (ft_strexact("cd", cmd->args[0])) - ret = ft_cd(cmd->args); - if (ft_strexact("export", cmd->args[0])) - ret = ft_export(cmd->args, 0); - if (ft_strexact("unset", cmd->args[0]) && cmd->args[1]) - ret = ft_unset(cmd->args); - if (ft_strexact("exit", cmd->args[0])) - ret = ft_exit(cmd->args); - _shell()->exit_code = ret; - return (ret); -} - -int run_builtin_not_piped(t_cmd *cmd) -{ - int ret; - - if (ft_strchr(cmd->args[0], '=')) - ret = ft_export(cmd->args, 0); - if (ft_strexact("cd", cmd->args[0])) - ret = ft_cd(cmd->args); - if (ft_strexact("export", cmd->args[0])) - ret = ft_export(cmd->args, 1); - if (ft_strexact("unset", cmd->args[0]) && cmd->args[1]) - ret = ft_unset(cmd->args); - if (ft_strexact("exit", cmd->args[0])) - ret = ft_exit(cmd->args); - return (ret); -} - -int run_builtin_2pipe(t_cmd *cmd) -{ - int ret; - - if (ft_strexact("pwd", cmd->args[0])) - ret = ft_pwd(cmd->args); - if (ft_strexact("echo", cmd->args[0])) - ret = ft_echo(cmd->args); - if (ft_strexact("env", cmd->args[0])) - ret = ft_env(cmd->args); - _shell()->exit_code = ret; - return (ret); -} diff --git a/srcs/cmd_build.c b/srcs/cmd_build.c index 7db6694..d9d5e20 100755 --- a/srcs/cmd_build.c +++ b/srcs/cmd_build.c @@ -3,55 +3,83 @@ /* ::: :::::::: */ /* cmd_build.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/22 15:19:27 by vrubio #+# #+# */ -/* Updated: 2022/12/29 20:19:52 by hgoncalv ### ########.fr */ +/* Updated: 2022/12/27 16:21:58 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ #include "../include/minishell.h" -// -1 =break -// 1 = continue -// 0= do nothing -int init_tcmd_while(char ***matrix, int *i, t_cmd **cmd) +void create_n_clean_file(t_file *file) { - if (!is_redir(***matrix) && !ft_strexact(**matrix, "|")) - { - if (ft_strexact("cat", **matrix)) - (*cmd)->flag = 1; - (*cmd)->args[(*i)++] = ft_strdup((**matrix)); - } - else if (ft_strexact(**matrix, "|")) + file->fd = open(file->filename, O_WRONLY | O_CREAT | O_TRUNC, 0644); + close(file->fd); + free_files(file); +} + +void create_file(char *str, t_cmd *cmd) +{ + t_file *file; + + file = malloc(sizeof(t_file)); + file->filename = ft_strdup(str); + file->type = cmd->type; + file->heredoc = NULL; + file->next = NULL; + if (cmd->file) + create_n_clean_file(cmd->file); + cmd->file = file; +} + +void create_infile(char *str, t_cmd *cmd) +{ + t_file *file; + t_file *ptr; + + file = malloc(sizeof(t_file)); + file->filename = ft_strdup(str); + file->heredoc = NULL; + file->next = NULL; + file->type = cmd->type; + if (cmd->file_in) { - *(matrix) = *matrix + 1; - return (-1); + ptr = cmd->file_in; + while (ptr->next) + ptr = ptr->next; + ptr->next = file; } else - { - set_redir(*cmd, &matrix); - if (**matrix && !ft_strexact(**matrix, "|")) - return (1); - } - if (**matrix && !ft_strexact(**matrix, "|")) - *(matrix) = *matrix + 1; - return (0); + cmd->file_in = file; } t_cmd *init_tcmd(char ***matrix, int i) { t_cmd *cmd; - int loop_ret; cmd = ft_inicialize_cmd(*matrix); while (**matrix != NULL) { - loop_ret = init_tcmd_while(matrix, &i, &cmd); - if (loop_ret == -1) - break ; - else if (loop_ret == 1) - continue ; + if (!is_redir(***matrix) && !ft_strexact(**matrix, "|")) + { + if (ft_strexact("cat", **matrix)) + cmd->flag = 1; + cmd->args[i++] = ft_strdup((**matrix)); + } + else if (ft_strexact(**matrix, "|")) + { + *(matrix) = *matrix + 1; + break; + } + else + { + set_redir(cmd, &matrix); + if (**matrix && !ft_strexact(**matrix, "|")) + continue ; + } + if (**matrix && ! ft_strexact(**matrix, "|")) + *(matrix) = *matrix + 1; } cmd->args[i] = NULL; return (cmd); diff --git a/srcs/cmd_build.o b/srcs/cmd_build.o new file mode 100644 index 0000000..60521b2 Binary files /dev/null and b/srcs/cmd_build.o differ diff --git a/srcs/cmd_build2.c b/srcs/cmd_build2.c index 03a8e5e..4c73d8f 100755 --- a/srcs/cmd_build2.c +++ b/srcs/cmd_build2.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* cmd_build2.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/22 15:19:28 by vrubio #+# #+# */ -/* Updated: 2022/12/29 20:05:04 by hgoncalv ### ########.fr */ +/* Updated: 2022/12/25 14:34:02 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ @@ -48,4 +48,4 @@ void set_redir(t_cmd *cmd, char ****str) return ; if (***str && is_redir(****str)) set_redir(cmd, str); -} +} \ No newline at end of file diff --git a/srcs/cmd_build2.o b/srcs/cmd_build2.o new file mode 100644 index 0000000..365e9b8 Binary files /dev/null and b/srcs/cmd_build2.o differ diff --git a/srcs/concat.c b/srcs/concat.c index 8f99439..ba05603 100755 --- a/srcs/concat.c +++ b/srcs/concat.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* concat.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: vrubio < vrubio@student.42lisboa.com > +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:19:31 by hgoncalv #+# #+# */ -/* Updated: 2022/12/22 15:19:32 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:19:31 by vrubio #+# #+# */ +/* Updated: 2022/12/22 15:19:32 by vrubio ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/concat.o b/srcs/concat.o new file mode 100644 index 0000000..4e22eaf Binary files /dev/null and b/srcs/concat.o differ diff --git a/srcs/create_files.c b/srcs/create_files.c deleted file mode 100755 index 38b730a..0000000 --- a/srcs/create_files.c +++ /dev/null @@ -1,55 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* create_files.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: hgoncalv fd = open(file->filename, O_WRONLY | O_CREAT | O_TRUNC, 0644); - close(file->fd); - free_files(file); -} - -void create_file(char *str, t_cmd *cmd) -{ - t_file *file; - - file = malloc(sizeof(t_file)); - file->filename = ft_strdup(str); - file->type = cmd->type; - file->heredoc = NULL; - file->next = NULL; - if (cmd->file) - create_n_clean_file(cmd->file); - cmd->file = file; -} - -void create_infile(char *str, t_cmd *cmd) -{ - t_file *file; - t_file *ptr; - - file = malloc(sizeof(t_file)); - file->filename = ft_strdup(str); - file->heredoc = NULL; - file->next = NULL; - file->type = cmd->type; - if (cmd->file_in) - { - ptr = cmd->file_in; - while (ptr->next) - ptr = ptr->next; - ptr->next = file; - } - else - cmd->file_in = file; -} diff --git a/srcs/error.c b/srcs/error.c index 0d0a159..0b2fd97 100755 --- a/srcs/error.c +++ b/srcs/error.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* error.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: vrubio < vrubio@student.42lisboa.com > +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:19:33 by hgoncalv #+# #+# */ -/* Updated: 2022/12/22 15:19:34 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:19:33 by vrubio #+# #+# */ +/* Updated: 2022/12/22 15:19:34 by vrubio ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/error.o b/srcs/error.o new file mode 100644 index 0000000..7c711a3 Binary files /dev/null and b/srcs/error.o differ diff --git a/srcs/exec.o b/srcs/exec.o new file mode 100644 index 0000000..f851f75 Binary files /dev/null and b/srcs/exec.o differ diff --git a/srcs/free.c b/srcs/free.c index d1e0f28..99eacf6 100755 --- a/srcs/free.c +++ b/srcs/free.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* free.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: codespace +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:19:36 by hgoncalv #+# #+# */ -/* Updated: 2022/12/27 16:17:31 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:19:36 by vrubio #+# #+# */ +/* Updated: 2022/12/27 16:17:31 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/free.o b/srcs/free.o new file mode 100644 index 0000000..29839b4 Binary files /dev/null and b/srcs/free.o differ diff --git a/srcs/heredoc.c b/srcs/heredoc.c index c0fc161..5c037f4 100755 --- a/srcs/heredoc.c +++ b/srcs/heredoc.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* heredoc.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/22 15:19:37 by vrubio #+# #+# */ -/* Updated: 2022/12/29 20:05:28 by hgoncalv ### ########.fr */ +/* Updated: 2022/12/27 16:20:45 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ @@ -45,7 +45,7 @@ void init_heredoc(void) { t_cmd *cmd; t_file *ptr; - + cmd = _shell()->head; while (cmd != NULL) { diff --git a/srcs/heredoc.o b/srcs/heredoc.o new file mode 100644 index 0000000..51850d4 Binary files /dev/null and b/srcs/heredoc.o differ diff --git a/srcs/hg_loop.c b/srcs/hg_loop.c index 7945c42..067e20d 100755 --- a/srcs/hg_loop.c +++ b/srcs/hg_loop.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* hg_loop.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: codespace +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:17:04 by hgoncalv #+# #+# */ -/* Updated: 2022/12/27 16:00:28 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:17:04 by vrubio #+# #+# */ +/* Updated: 2022/12/27 16:00:28 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ @@ -176,30 +176,22 @@ void pipe_commands_dup_n_close_pipes(t_cmd *curr, int *pipes, int run_if_first_level_builtins_set_path(t_cmd **curr, char **path, int *num_commands, int *i) { - i[3] = 0; if (*path) free(*path); if (check_if_builtin_not_pipe((*curr))) _shell()->exit_code = run_builtin((*curr)); *path = ft_get_exec_path((*curr)->args); - if (*path && access(*path, X_OK) != 0) - { - printf("bash: %s: Permission denied\n", ((*curr)->args)[0]); - _shell()->exit_code = 126; - i[3] = 1; - } if (!check_if_builtin((*curr)) && !*path) { printf("bash: %s: command not found\n", ((*curr)->args)[0]); _shell()->exit_code = 127; - i[3] = 1; } - if (i[3] == 1) + if (check_if_builtin_not_pipe((*curr)) || (!check_if_builtin((*curr)) + && !*path)) { *curr = (*curr)->next; *i = *i + 1; *num_commands = *num_commands - 1; - i[3] = 0; return (1); } return (0); @@ -226,10 +218,9 @@ void pipe_commands_child_n_error(pid_t pid, t_cmd *curr, int *pipes, // i[0] = i // i[1] = j // i[2] = num_commands -// i[3] = just free index void pipe_commands(t_cmd *cmd) { - int i[4]; + int i[3]; int *pipes; pid_t pid; t_cmd *curr; diff --git a/srcs/hg_loop.o b/srcs/hg_loop.o new file mode 100644 index 0000000..5ba4939 Binary files /dev/null and b/srcs/hg_loop.o differ diff --git a/srcs/initializers.c b/srcs/initializers.c index 182a417..b27eefd 100755 --- a/srcs/initializers.c +++ b/srcs/initializers.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* initializers.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: codespace +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:19:38 by hgoncalv #+# #+# */ -/* Updated: 2022/12/26 12:05:00 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:19:38 by vrubio #+# #+# */ +/* Updated: 2022/12/26 12:05:00 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/initializers.o b/srcs/initializers.o new file mode 100644 index 0000000..536d905 Binary files /dev/null and b/srcs/initializers.o differ diff --git a/srcs/loop.c b/srcs/loop.c index 31d4a12..dced238 100755 --- a/srcs/loop.c +++ b/srcs/loop.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* loop.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: codespace +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:17:04 by hgoncalv #+# #+# */ -/* Updated: 2022/12/26 11:50:06 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:17:04 by vrubio #+# #+# */ +/* Updated: 2022/12/26 11:50:06 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/loop.o b/srcs/loop.o new file mode 100644 index 0000000..9cf3eee Binary files /dev/null and b/srcs/loop.o differ diff --git a/srcs/loop_new.o b/srcs/loop_new.o new file mode 100644 index 0000000..0c34237 Binary files /dev/null and b/srcs/loop_new.o differ diff --git a/srcs/loop_utils.c b/srcs/loop_utils.c index 0928dca..069dfee 100755 --- a/srcs/loop_utils.c +++ b/srcs/loop_utils.c @@ -3,15 +3,17 @@ /* ::: :::::::: */ /* loop_utils.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:19:40 by hgoncalv #+# #+# */ -/* Updated: 2022/12/29 20:03:08 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:19:40 by vrubio #+# #+# */ +/* Updated: 2022/12/25 14:39:45 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ #include "../include/minishell.h" + + int does_next_read_stdi(t_cmd *cmd) { if (ft_strexact("w", (cmd->next)->args[0]) || ft_strexact("ls", diff --git a/srcs/loop_utils.o b/srcs/loop_utils.o new file mode 100644 index 0000000..07ffd8c Binary files /dev/null and b/srcs/loop_utils.o differ diff --git a/srcs/main.c b/srcs/main.c index a5fa44e..8061b12 100755 --- a/srcs/main.c +++ b/srcs/main.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* main.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/22 15:19:50 by vrubio #+# #+# */ -/* Updated: 2022/12/29 20:02:58 by hgoncalv ### ########.fr */ +/* Updated: 2022/12/27 15:59:38 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,7 +23,7 @@ void ft_handler(int signum) if (pid == -1) { write(1, "\n", 1); - rl_replace_line("", 0); + // rl_replace_line("", 0); rl_on_new_line(); rl_redisplay(); } @@ -92,7 +92,14 @@ void minishell(void) line = ft_var_expansion(line); matrix = line_to_matrix(line); if (add_cmds(matrix) && init_remove_qt()) + { + print_tcmd(_shell()->head); + // if (!((_shell()->head)->next) + // && check_if_builtin(_shell()->head)) + // run_only_builtins(_shell()->head); + // else pipe_commands(_shell()->head); + } else free_arrays(matrix); minishell_clean(&line); diff --git a/srcs/main.o b/srcs/main.o new file mode 100644 index 0000000..a81be03 Binary files /dev/null and b/srcs/main.o differ diff --git a/srcs/matrix_fts.c b/srcs/matrix_fts.c index af8966a..bfc5a92 100755 --- a/srcs/matrix_fts.c +++ b/srcs/matrix_fts.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* matrix_fts.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: vrubio < vrubio@student.42lisboa.com > +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:19:53 by hgoncalv #+# #+# */ -/* Updated: 2022/12/22 15:19:54 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:19:53 by vrubio #+# #+# */ +/* Updated: 2022/12/22 15:19:54 by vrubio ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/matrix_fts.o b/srcs/matrix_fts.o new file mode 100644 index 0000000..81b4e60 Binary files /dev/null and b/srcs/matrix_fts.o differ diff --git a/srcs/matrix_utils.c b/srcs/matrix_utils.c index 3c19a1f..f3f6113 100755 --- a/srcs/matrix_utils.c +++ b/srcs/matrix_utils.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* matrix_utils.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: vrubio < vrubio@student.42lisboa.com > +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:19:56 by hgoncalv #+# #+# */ -/* Updated: 2022/12/22 15:19:57 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:19:56 by vrubio #+# #+# */ +/* Updated: 2022/12/22 15:19:57 by vrubio ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/matrix_utils.o b/srcs/matrix_utils.o new file mode 100644 index 0000000..8605ff4 Binary files /dev/null and b/srcs/matrix_utils.o differ diff --git a/srcs/parse.o b/srcs/parse.o new file mode 100644 index 0000000..73a0863 Binary files /dev/null and b/srcs/parse.o differ diff --git a/srcs/parse2.o b/srcs/parse2.o new file mode 100644 index 0000000..d490b70 Binary files /dev/null and b/srcs/parse2.o differ diff --git a/srcs/parse_clean.o b/srcs/parse_clean.o new file mode 100644 index 0000000..15bb391 Binary files /dev/null and b/srcs/parse_clean.o differ diff --git a/srcs/parse_env.c b/srcs/parse_env.c index 7bbb768..d6e0825 100755 --- a/srcs/parse_env.c +++ b/srcs/parse_env.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* parse_env.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: codespace +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:19:58 by hgoncalv #+# #+# */ -/* Updated: 2022/12/27 15:55:16 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:19:58 by vrubio #+# #+# */ +/* Updated: 2022/12/27 15:55:16 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/parse_env.o b/srcs/parse_env.o new file mode 100644 index 0000000..b171e84 Binary files /dev/null and b/srcs/parse_env.o differ diff --git a/srcs/path.c b/srcs/path.c index 06d4960..9dc09d8 100755 --- a/srcs/path.c +++ b/srcs/path.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* path.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: vrubio < vrubio@student.42lisboa.com > +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:20:03 by hgoncalv #+# #+# */ -/* Updated: 2022/12/22 15:20:04 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:20:03 by vrubio #+# #+# */ +/* Updated: 2022/12/22 15:20:04 by vrubio ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/path.o b/srcs/path.o new file mode 100644 index 0000000..5e61719 Binary files /dev/null and b/srcs/path.o differ diff --git a/srcs/prompt.o b/srcs/prompt.o new file mode 100644 index 0000000..912303b Binary files /dev/null and b/srcs/prompt.o differ diff --git a/srcs/shell.o b/srcs/shell.o new file mode 100644 index 0000000..32391d2 Binary files /dev/null and b/srcs/shell.o differ diff --git a/srcs/utils2.c b/srcs/utils2.c index 59741dc..6d40b67 100755 --- a/srcs/utils2.c +++ b/srcs/utils2.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* utils2.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: vrubio < vrubio@student.42lisboa.com > +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:20:12 by hgoncalv #+# #+# */ -/* Updated: 2022/12/22 15:20:13 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:20:12 by vrubio #+# #+# */ +/* Updated: 2022/12/22 15:20:13 by vrubio ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/utils2.o b/srcs/utils2.o new file mode 100644 index 0000000..9b08fcb Binary files /dev/null and b/srcs/utils2.o differ diff --git a/srcs/utils_array.c b/srcs/utils_array.c index c7356fd..2b3563f 100755 --- a/srcs/utils_array.c +++ b/srcs/utils_array.c @@ -1,12 +1,13 @@ + /* ************************************************************************** */ /* */ /* ::: :::::::: */ /* utils_array.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/22 15:20:07 by vrubio #+# #+# */ -/* Updated: 2022/12/29 20:01:54 by hgoncalv ### ########.fr */ +/* Updated: 2022/12/23 19:12:37 by codespace ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,12 +30,12 @@ void print_tcmd(t_cmd *cmd) if (cmd->file) { file = cmd->file; - printf("FILE_OUT: %s (%d)\n", file->filename, file->type); + printf("FILE_OUT: %s (%d)\n", file->filename, file->type); } if (cmd->file_in) { file = cmd->file_in; - printf("FILE_IN: %s (%d)\n", file->filename, file->type); + printf("FILE_IN: %s (%d)\n", file->filename, file->type); } printf("__________\n"); if (cmd->next) diff --git a/srcs/utils_array.o b/srcs/utils_array.o new file mode 100644 index 0000000..a0e3a2b Binary files /dev/null and b/srcs/utils_array.o differ diff --git a/srcs/utils_fd.c b/srcs/utils_fd.c index 5b7e991..308ee2a 100755 --- a/srcs/utils_fd.c +++ b/srcs/utils_fd.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* utils_fd.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: vrubio < vrubio@student.42lisboa.com > +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:20:09 by hgoncalv #+# #+# */ -/* Updated: 2022/12/22 15:20:10 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:20:09 by vrubio #+# #+# */ +/* Updated: 2022/12/22 15:20:10 by vrubio ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/utils_fd.o b/srcs/utils_fd.o new file mode 100644 index 0000000..63a978a Binary files /dev/null and b/srcs/utils_fd.o differ diff --git a/srcs/utils_parsing.o b/srcs/utils_parsing.o new file mode 100644 index 0000000..1984c82 Binary files /dev/null and b/srcs/utils_parsing.o differ diff --git a/srcs/validation.o b/srcs/validation.o new file mode 100644 index 0000000..d4f7485 Binary files /dev/null and b/srcs/validation.o differ diff --git a/srcs/var_expansion.c b/srcs/var_expansion.c index 9d29289..1c7c7e5 100755 --- a/srcs/var_expansion.c +++ b/srcs/var_expansion.c @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* var_expansion.c :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: hgoncalv +#+ +:+ +#+ */ +/* By: vrubio < vrubio@student.42lisboa.com > +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2022/12/22 15:20:19 by hgoncalv #+# #+# */ -/* Updated: 2022/12/22 15:31:44 by hgoncalv ### ########.fr */ +/* Created: 2022/12/22 15:20:19 by vrubio #+# #+# */ +/* Updated: 2022/12/22 15:31:44 by vrubio ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/var_expansion.o b/srcs/var_expansion.o new file mode 100644 index 0000000..5865ba2 Binary files /dev/null and b/srcs/var_expansion.o differ