diff --git a/Makefile b/Makefile index c97bdba..2456888 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ UTILS_SRC = utils/ft_is_in_quote.c utils/ft_strncpy.c utils/ft_strreplace.c utils/ft_strnchr.c utils/ft_split_quoted.c utils/ft_strshift.c utils/ft_quote_remover.c utils/ft_str_is_empty.c utils/ft_atoi_check.c -SRCS = ${UTILS_SRC} main.c file.c infile.c outfile.c heredoc.c syntatics.c cmd.c cmds.c env.c env2.c env3.c execution.c spacer.c env_fill.c builtins/echo.c builtins/pwd.c builtins/export.c builtins/env.c builtins/cd.c builtins/exit.c builtins/unset.c +SRCS = ${UTILS_SRC} main.c file.c infile.c outfile.c heredoc.c syntatics.c cmd.c cmds.c env.c env2.c env3.c execution.c spacer.c env_fill.c builtins/echo.c builtins/pwd.c builtins/export.c builtins/env.c builtins/cd.c builtins/exit.c OBJS = ${SRCS:.c=.o} diff --git a/env3.c b/env3.c index d7f2ec0..9f6f56b 100644 --- a/env3.c +++ b/env3.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/02/17 17:25:09 by erey-bet #+# #+# */ -/* Updated: 2023/02/23 15:46:46 by erey-bet ### ########.fr */ +/* Updated: 2023/02/28 12:46:33 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -86,13 +86,13 @@ int delete_by_key(char *key, t_list **head) int possible_key(char *key) { - int i; + int i; i = -1; - if (ft_isdigit(key[i + 1]) || key[i + 1] == '@') + if (ft_isdigit(key[i + 1])) return (0); while (key[++i]) - if (!ft_isalnum(key[i]) && key[i] != '_' && key[i] != '#' && key[i] != '@') + if (!ft_isalnum(key[i]) && key[i] != '_') return (0); return (1); } diff --git a/execution.c b/execution.c index 0c06ad0..0a9c275 100644 --- a/execution.c +++ b/execution.c @@ -6,7 +6,7 @@ /* By: cchauvet