diff --git a/>> b/>> new file mode 100644 index 0000000..e69de29 diff --git a/>>> b/>>> new file mode 100644 index 0000000..e69de29 diff --git a/file.c b/file.c index 7d3f287..e567526 100644 --- a/file.c +++ b/file.c @@ -45,15 +45,23 @@ int ft_file_is_writeable(char *path) char *ft_get_file_path(char *infile) { size_t i; + size_t n; + n = 0; + while (infile[-n] == infile[0]) + n++; i = 1; while (infile[i] == ' ') i++; if (infile[i] == '\0') { ft_eprintf("minishell: syntax error near "); - ft_eprintf("unexpected token `newline'\n"); + if ((infile[0] == '<' && n < 3) || (infile[0] == '>' && n < 4)) + ft_eprintf("unexpected token `newline`\n"); + else + ft_eprintf("unexpected token `%c`\n", infile[i]); return (NULL); } return (ft_getstr(infile, i + 1)); + //j'aime jackie et michel } diff --git a/file.o b/file.o new file mode 100644 index 0000000..4a8dab1 Binary files /dev/null and b/file.o differ diff --git a/infile.c b/infile.c index a5cf9a7..76d3230 100644 --- a/infile.c +++ b/infile.c @@ -32,7 +32,7 @@ static int ft_get_infile(char *line) static int ft_remove_infile(char *line) { size_t i; - int separator; + int separator; i = 0; while (line[i] != '\0') @@ -51,7 +51,7 @@ static int ft_remove_infile(char *line) separator = '\"'; while (line[i] != separator && line[i] != '\0') line[i++] = ' '; - if (line[i] != '\0' + if (line[i] != '\0' && (separator == '\'' || separator == '\"')) line[i++] = ' '; } diff --git a/infile.o b/infile.o new file mode 100644 index 0000000..cc20d3e Binary files /dev/null and b/infile.o differ diff --git a/libftx/extra/extra.a b/libftx/extra/extra.a new file mode 100644 index 0000000..74485b5 Binary files /dev/null and b/libftx/extra/extra.a differ diff --git a/libftx/extra/ft_contain_only.o b/libftx/extra/ft_contain_only.o new file mode 100644 index 0000000..4b885eb Binary files /dev/null and b/libftx/extra/ft_contain_only.o differ diff --git a/libftx/extra/ft_freer.o b/libftx/extra/ft_freer.o new file mode 100644 index 0000000..cf50d16 Binary files /dev/null and b/libftx/extra/ft_freer.o differ diff --git a/libftx/extra/ft_is_in.o b/libftx/extra/ft_is_in.o new file mode 100644 index 0000000..9ac5767 Binary files /dev/null and b/libftx/extra/ft_is_in.o differ diff --git a/libftx/extra/ft_random_generator.o b/libftx/extra/ft_random_generator.o new file mode 100644 index 0000000..a64dbb0 Binary files /dev/null and b/libftx/extra/ft_random_generator.o differ diff --git a/libftx/extra/ft_strchri.o b/libftx/extra/ft_strchri.o new file mode 100644 index 0000000..230ddca Binary files /dev/null and b/libftx/extra/ft_strchri.o differ diff --git a/libftx/extra/ft_strcmp.o b/libftx/extra/ft_strcmp.o new file mode 100644 index 0000000..0ed8391 Binary files /dev/null and b/libftx/extra/ft_strcmp.o differ diff --git a/libftx/extra/ft_strfjoin.o b/libftx/extra/ft_strfjoin.o new file mode 100644 index 0000000..1a4743d Binary files /dev/null and b/libftx/extra/ft_strfjoin.o differ diff --git a/libftx/extra/ft_strgen.o b/libftx/extra/ft_strgen.o new file mode 100644 index 0000000..261ec45 Binary files /dev/null and b/libftx/extra/ft_strgen.o differ diff --git a/libftx/extra/ft_strmerger.o b/libftx/extra/ft_strmerger.o new file mode 100644 index 0000000..3526a30 Binary files /dev/null and b/libftx/extra/ft_strmerger.o differ diff --git a/libftx/extra/ft_strndup.o b/libftx/extra/ft_strndup.o new file mode 100644 index 0000000..14ec377 Binary files /dev/null and b/libftx/extra/ft_strndup.o differ diff --git a/libftx/extra/ft_tabrealloc.o b/libftx/extra/ft_tabrealloc.o new file mode 100644 index 0000000..973478b Binary files /dev/null and b/libftx/extra/ft_tabrealloc.o differ diff --git a/libftx/extra/ft_ultoa_base.o b/libftx/extra/ft_ultoa_base.o new file mode 100644 index 0000000..155c917 Binary files /dev/null and b/libftx/extra/ft_ultoa_base.o differ diff --git a/libftx/gnl/get_next_line.a b/libftx/gnl/get_next_line.a new file mode 100644 index 0000000..7d3ebe9 Binary files /dev/null and b/libftx/gnl/get_next_line.a differ diff --git a/libftx/gnl/get_next_line.o b/libftx/gnl/get_next_line.o new file mode 100644 index 0000000..46741e0 Binary files /dev/null and b/libftx/gnl/get_next_line.o differ diff --git a/libftx/libft/ft_atoi.o b/libftx/libft/ft_atoi.o new file mode 100644 index 0000000..749693b Binary files /dev/null and b/libftx/libft/ft_atoi.o differ diff --git a/libftx/libft/ft_bzero.o b/libftx/libft/ft_bzero.o new file mode 100644 index 0000000..77fec06 Binary files /dev/null and b/libftx/libft/ft_bzero.o differ diff --git a/libftx/libft/ft_calloc.o b/libftx/libft/ft_calloc.o new file mode 100644 index 0000000..a17b032 Binary files /dev/null and b/libftx/libft/ft_calloc.o differ diff --git a/libftx/libft/ft_isalnum.o b/libftx/libft/ft_isalnum.o new file mode 100644 index 0000000..717e49b Binary files /dev/null and b/libftx/libft/ft_isalnum.o differ diff --git a/libftx/libft/ft_isalpha.o b/libftx/libft/ft_isalpha.o new file mode 100644 index 0000000..fbdbbb4 Binary files /dev/null and b/libftx/libft/ft_isalpha.o differ diff --git a/libftx/libft/ft_isascii.o b/libftx/libft/ft_isascii.o new file mode 100644 index 0000000..67137be Binary files /dev/null and b/libftx/libft/ft_isascii.o differ diff --git a/libftx/libft/ft_isdigit.o b/libftx/libft/ft_isdigit.o new file mode 100644 index 0000000..6a91375 Binary files /dev/null and b/libftx/libft/ft_isdigit.o differ diff --git a/libftx/libft/ft_isprint.o b/libftx/libft/ft_isprint.o new file mode 100644 index 0000000..bde8775 Binary files /dev/null and b/libftx/libft/ft_isprint.o differ diff --git a/libftx/libft/ft_itoa.o b/libftx/libft/ft_itoa.o new file mode 100644 index 0000000..c75cfcb Binary files /dev/null and b/libftx/libft/ft_itoa.o differ diff --git a/libftx/libft/ft_memchr.o b/libftx/libft/ft_memchr.o new file mode 100644 index 0000000..f1c3326 Binary files /dev/null and b/libftx/libft/ft_memchr.o differ diff --git a/libftx/libft/ft_memcmp.o b/libftx/libft/ft_memcmp.o new file mode 100644 index 0000000..6b0da03 Binary files /dev/null and b/libftx/libft/ft_memcmp.o differ diff --git a/libftx/libft/ft_memcpy.o b/libftx/libft/ft_memcpy.o new file mode 100644 index 0000000..98e41b8 Binary files /dev/null and b/libftx/libft/ft_memcpy.o differ diff --git a/libftx/libft/ft_memmove.o b/libftx/libft/ft_memmove.o new file mode 100644 index 0000000..71f160b Binary files /dev/null and b/libftx/libft/ft_memmove.o differ diff --git a/libftx/libft/ft_memset.o b/libftx/libft/ft_memset.o new file mode 100644 index 0000000..2737808 Binary files /dev/null and b/libftx/libft/ft_memset.o differ diff --git a/libftx/libft/ft_putchar_fd.o b/libftx/libft/ft_putchar_fd.o new file mode 100644 index 0000000..58df18e Binary files /dev/null and b/libftx/libft/ft_putchar_fd.o differ diff --git a/libftx/libft/ft_putendl_fd.o b/libftx/libft/ft_putendl_fd.o new file mode 100644 index 0000000..50cfa1e Binary files /dev/null and b/libftx/libft/ft_putendl_fd.o differ diff --git a/libftx/libft/ft_putnbr_fd.o b/libftx/libft/ft_putnbr_fd.o new file mode 100644 index 0000000..17d4db5 Binary files /dev/null and b/libftx/libft/ft_putnbr_fd.o differ diff --git a/libftx/libft/ft_putstr_fd.o b/libftx/libft/ft_putstr_fd.o new file mode 100644 index 0000000..f795861 Binary files /dev/null and b/libftx/libft/ft_putstr_fd.o differ diff --git a/libftx/libft/ft_split.o b/libftx/libft/ft_split.o new file mode 100644 index 0000000..41a6b9f Binary files /dev/null and b/libftx/libft/ft_split.o differ diff --git a/libftx/libft/ft_strchr.o b/libftx/libft/ft_strchr.o new file mode 100644 index 0000000..dcad448 Binary files /dev/null and b/libftx/libft/ft_strchr.o differ diff --git a/libftx/libft/ft_strdup.o b/libftx/libft/ft_strdup.o new file mode 100644 index 0000000..82b9840 Binary files /dev/null and b/libftx/libft/ft_strdup.o differ diff --git a/libftx/libft/ft_striteri.o b/libftx/libft/ft_striteri.o new file mode 100644 index 0000000..8ecd945 Binary files /dev/null and b/libftx/libft/ft_striteri.o differ diff --git a/libftx/libft/ft_strjoin.o b/libftx/libft/ft_strjoin.o new file mode 100644 index 0000000..ec8e4ff Binary files /dev/null and b/libftx/libft/ft_strjoin.o differ diff --git a/libftx/libft/ft_strlcat.o b/libftx/libft/ft_strlcat.o new file mode 100644 index 0000000..01a3aa5 Binary files /dev/null and b/libftx/libft/ft_strlcat.o differ diff --git a/libftx/libft/ft_strlcpy.o b/libftx/libft/ft_strlcpy.o new file mode 100644 index 0000000..f3e39eb Binary files /dev/null and b/libftx/libft/ft_strlcpy.o differ diff --git a/libftx/libft/ft_strlen.o b/libftx/libft/ft_strlen.o new file mode 100644 index 0000000..3c92240 Binary files /dev/null and b/libftx/libft/ft_strlen.o differ diff --git a/libftx/libft/ft_strmapi.o b/libftx/libft/ft_strmapi.o new file mode 100644 index 0000000..c36b41b Binary files /dev/null and b/libftx/libft/ft_strmapi.o differ diff --git a/libftx/libft/ft_strncmp.o b/libftx/libft/ft_strncmp.o new file mode 100644 index 0000000..5af8cfb Binary files /dev/null and b/libftx/libft/ft_strncmp.o differ diff --git a/libftx/libft/ft_strnstr.o b/libftx/libft/ft_strnstr.o new file mode 100644 index 0000000..80ab0e1 Binary files /dev/null and b/libftx/libft/ft_strnstr.o differ diff --git a/libftx/libft/ft_strrchr.o b/libftx/libft/ft_strrchr.o new file mode 100644 index 0000000..4b6be03 Binary files /dev/null and b/libftx/libft/ft_strrchr.o differ diff --git a/libftx/libft/ft_strtrim.o b/libftx/libft/ft_strtrim.o new file mode 100644 index 0000000..b08e9b2 Binary files /dev/null and b/libftx/libft/ft_strtrim.o differ diff --git a/libftx/libft/ft_substr.o b/libftx/libft/ft_substr.o new file mode 100644 index 0000000..982ffda Binary files /dev/null and b/libftx/libft/ft_substr.o differ diff --git a/libftx/libft/ft_tolower.o b/libftx/libft/ft_tolower.o new file mode 100644 index 0000000..a1107d9 Binary files /dev/null and b/libftx/libft/ft_tolower.o differ diff --git a/libftx/libft/ft_toupper.o b/libftx/libft/ft_toupper.o new file mode 100644 index 0000000..a7c9dbf Binary files /dev/null and b/libftx/libft/ft_toupper.o differ diff --git a/libftx/libft/libft.a b/libftx/libft/libft.a new file mode 100644 index 0000000..6734924 Binary files /dev/null and b/libftx/libft/libft.a differ diff --git a/libftx/libftx.a b/libftx/libftx.a new file mode 100644 index 0000000..2346697 Binary files /dev/null and b/libftx/libftx.a differ diff --git a/libftx/printf/ft_dprintX.o b/libftx/printf/ft_dprintX.o new file mode 100644 index 0000000..f17c096 Binary files /dev/null and b/libftx/printf/ft_dprintX.o differ diff --git a/libftx/printf/ft_dprintarg.o b/libftx/printf/ft_dprintarg.o new file mode 100644 index 0000000..e145da1 Binary files /dev/null and b/libftx/printf/ft_dprintarg.o differ diff --git a/libftx/printf/ft_dprintflag.o b/libftx/printf/ft_dprintflag.o new file mode 100644 index 0000000..920afb5 Binary files /dev/null and b/libftx/printf/ft_dprintflag.o differ diff --git a/libftx/printf/ft_dprintl_base.o b/libftx/printf/ft_dprintl_base.o new file mode 100644 index 0000000..0f75c8d Binary files /dev/null and b/libftx/printf/ft_dprintl_base.o differ diff --git a/libftx/printf/ft_dprintptr.o b/libftx/printf/ft_dprintptr.o new file mode 100644 index 0000000..385cfa9 Binary files /dev/null and b/libftx/printf/ft_dprintptr.o differ diff --git a/libftx/printf/ft_dprintstrtab.o b/libftx/printf/ft_dprintstrtab.o new file mode 100644 index 0000000..575ae67 Binary files /dev/null and b/libftx/printf/ft_dprintstrtab.o differ diff --git a/libftx/printf/ft_dprintul.o b/libftx/printf/ft_dprintul.o new file mode 100644 index 0000000..85d8866 Binary files /dev/null and b/libftx/printf/ft_dprintul.o differ diff --git a/libftx/printf/ft_dprintul_base.o b/libftx/printf/ft_dprintul_base.o new file mode 100644 index 0000000..ca970dc Binary files /dev/null and b/libftx/printf/ft_dprintul_base.o differ diff --git a/libftx/printf/ft_dprintx.o b/libftx/printf/ft_dprintx.o new file mode 100644 index 0000000..6bcdbb9 Binary files /dev/null and b/libftx/printf/ft_dprintx.o differ diff --git a/libftx/printf/ft_eprintf.o b/libftx/printf/ft_eprintf.o new file mode 100644 index 0000000..2b649ef Binary files /dev/null and b/libftx/printf/ft_eprintf.o differ diff --git a/libftx/printf/ft_isarg.o b/libftx/printf/ft_isarg.o new file mode 100644 index 0000000..28e9b52 Binary files /dev/null and b/libftx/printf/ft_isarg.o differ diff --git a/libftx/printf/ft_isdigit.o b/libftx/printf/ft_isdigit.o new file mode 100644 index 0000000..e6094e7 Binary files /dev/null and b/libftx/printf/ft_isdigit.o differ diff --git a/libftx/printf/ft_printf.a b/libftx/printf/ft_printf.a new file mode 100644 index 0000000..1b8bba7 Binary files /dev/null and b/libftx/printf/ft_printf.a differ diff --git a/libftx/printf/ft_printf.o b/libftx/printf/ft_printf.o new file mode 100644 index 0000000..0a01be8 Binary files /dev/null and b/libftx/printf/ft_printf.o differ diff --git a/libftx/printf/ft_putchar_fd.o b/libftx/printf/ft_putchar_fd.o new file mode 100644 index 0000000..5554463 Binary files /dev/null and b/libftx/printf/ft_putchar_fd.o differ diff --git a/libftx/printf/ft_putstr_fd.o b/libftx/printf/ft_putstr_fd.o new file mode 100644 index 0000000..7324dbe Binary files /dev/null and b/libftx/printf/ft_putstr_fd.o differ diff --git a/libftx/printf/ft_skipflag.o b/libftx/printf/ft_skipflag.o new file mode 100644 index 0000000..6af9017 Binary files /dev/null and b/libftx/printf/ft_skipflag.o differ diff --git a/libftx/printf/ft_strlen.o b/libftx/printf/ft_strlen.o new file mode 100644 index 0000000..f576670 Binary files /dev/null and b/libftx/printf/ft_strlen.o differ diff --git a/libftx/printf/ft_vdprintf.o b/libftx/printf/ft_vdprintf.o new file mode 100644 index 0000000..b75be4f Binary files /dev/null and b/libftx/printf/ft_vdprintf.o differ diff --git a/main.o b/main.o new file mode 100644 index 0000000..57adb25 Binary files /dev/null and b/main.o differ diff --git a/minishell b/minishell new file mode 100755 index 0000000..849fbf6 Binary files /dev/null and b/minishell differ diff --git a/outfile.o b/outfile.o new file mode 100644 index 0000000..13f900d Binary files /dev/null and b/outfile.o differ diff --git a/utils/ft_getstr.o b/utils/ft_getstr.o new file mode 100644 index 0000000..fa8b630 Binary files /dev/null and b/utils/ft_getstr.o differ diff --git a/utils/ft_is_in_quote.o b/utils/ft_is_in_quote.o new file mode 100644 index 0000000..1177bf1 Binary files /dev/null and b/utils/ft_is_in_quote.o differ diff --git a/utils/ft_strnchr.o b/utils/ft_strnchr.o new file mode 100644 index 0000000..c1cc6b1 Binary files /dev/null and b/utils/ft_strnchr.o differ diff --git a/utils/ft_strncpy.o b/utils/ft_strncpy.o new file mode 100644 index 0000000..f84950c Binary files /dev/null and b/utils/ft_strncpy.o differ diff --git a/utils/ft_strreplace.o b/utils/ft_strreplace.o new file mode 100644 index 0000000..afdaa9c Binary files /dev/null and b/utils/ft_strreplace.o differ