From b8017175e86064e039e08790176600433ac316eb Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Fri, 3 Feb 2023 16:02:52 +0100 Subject: [PATCH] heredoc support --- .file.c.swp | Bin 0 -> 12288 bytes >> | 0 >>> | 0 Makefile | 4 ++-- d | 1 + file.c | 15 ++++++------ file.o | Bin 5056 -> 5136 bytes heredoc.c | 25 ++++++++++++++++++++ heredoc.o | Bin 0 -> 3256 bytes infile.c | 40 +++++++++++++++++++++----------- infile.o | Bin 4768 -> 5080 bytes libftx/libftx.a | Bin 5278 -> 5280 bytes libftx/libftx.h | 4 ++-- libftx/printf/ft_dprintarg.c | 4 ++-- libftx/printf/ft_dprintarg.o | Bin 4752 -> 4760 bytes libftx/printf/ft_dprintptr.c | 6 ++--- libftx/printf/ft_dprintptr.o | Bin 2920 -> 2928 bytes libftx/printf/ft_dprintstrtab.c | 4 ++-- libftx/printf/ft_dprintstrtab.o | Bin 2856 -> 2856 bytes libftx/printf/ft_printf.a | Bin 55878 -> 55904 bytes libftx/printf/ft_printf.h | 4 ++-- libftx/printf/ft_putstr_fd.c | 4 ++-- libftx/printf/ft_putstr_fd.o | Bin 2688 -> 2696 bytes minishell | Bin 45440 -> 47056 bytes minishell.h | 4 ++++ outfile.c | 3 ++- outfile.o | Bin 5072 -> 5088 bytes 27 files changed, 81 insertions(+), 37 deletions(-) create mode 100644 .file.c.swp delete mode 100644 >> delete mode 100644 >>> create mode 100755 d create mode 100644 heredoc.c create mode 100644 heredoc.o diff --git a/.file.c.swp b/.file.c.swp new file mode 100644 index 0000000000000000000000000000000000000000..8d730390a2a25bcdbffa1f14795605ccf82a3124 GIT binary patch literal 12288 zcmeI2&rcIU6vqeSWmVMZ$&=5b&A5`erNkbz^Vs{3Gr?6$xdhH&3p5i?xE?PPo6n> znmQ9HforP}Z+9)){p+u7>KWT6Y&)ANUX+0u`rVZ}-k#`a%jk)GF()Tw!u4v;zEWAR zwWF&NwL`d<4X}aLFi;HKcxSz6Z%ZZ3at)DPw0+y~YOKs_umLu} z2G{@_U;}J`4X^<=utp37g*tH+wXQ4Id!&4?TX8RcNj*Q(!093hKe@dLdqc1#lnCgX>@b907+xJ7@&EK?C@< zNr<~ z18m@bHE>y2o(zhfrl=dFCuHCUUQ}uG25So`YNk{y)+H=VtIq2i?(H>wmW2pe@RSbR zXr!p+bV1sIbSTJQkebeEIh9jdo*UDVaJtO-^3PFwY!iUoVGW~-;*=T>#e@6dw~2I9b~3SdS2cmEi)d419v%Bn*J|5~&sGtM&4KRU=X|H5)#p8TSnCG(XcJSL9v@UZ8-nOX<_ jTib)jjP0N8R%)#ww=%TcZG+NwuINaLRG;NUHX^> b/>> deleted file mode 100644 index e69de29..0000000 diff --git a/>>> b/>>> deleted file mode 100644 index e69de29..0000000 diff --git a/Makefile b/Makefile index 70ce727..1834a75 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_getstr.c -SRCS = main.c file.c infile.c outfile.c ${UTILS_SRC} +SRCS = ${UTILS_SRC} main.c file.c infile.c outfile.c heredoc.c OBJS = ${SRCS:.c=.o} @@ -18,7 +18,7 @@ all: ${NAME} ${NAME}: ${OBJS} make -C libftx all - ${CC} ${OBJS} -o ${NAME} ${LIBS} + ${CC} ${OBJS} -o ${NAME} ${LIBS} -lreadline clean: make -C libftx clean diff --git a/d b/d new file mode 100755 index 0000000..9daeafb --- /dev/null +++ b/d @@ -0,0 +1 @@ +test diff --git a/file.c b/file.c index e567526..da9b9c8 100644 --- a/file.c +++ b/file.c @@ -47,21 +47,20 @@ char *ft_get_file_path(char *infile) size_t i; size_t n; - n = 0; - while (infile[-n] == infile[0]) + n = 1; + while (infile[-n] == infile[-1]) n++; - i = 1; + i = 0; while (infile[i] == ' ') i++; - if (infile[i] == '\0') + if (infile[i] == '\0' || infile[i] == '>' || infile[i] == '<') { ft_eprintf("minishell: syntax error near "); - if ((infile[0] == '<' && n < 3) || (infile[0] == '>' && n < 4)) - ft_eprintf("unexpected token `newline`\n"); + if ((infile[0] == '<' && n > 3) || (infile[0] == '>' && n > 2)) + ft_eprintf("unexpected token `%c`\n", infile[i - 1]); else - ft_eprintf("unexpected token `%c`\n", infile[i]); + ft_eprintf("unexpected token `newline`\n"); return (NULL); } return (ft_getstr(infile, i + 1)); - //j'aime jackie et michel } diff --git a/file.o b/file.o index 4a8dab1c6f4616d11222f8a659d8eec69f2583cc..8c378aca10be4ec713c53957f045dcbe88f85939 100644 GIT binary patch delta 565 zcmX@0K0#xG2IGZ|n(d5?jFUGqiYs{jw>-h$D#*aV;L+{+z@zy9qerLfgO?Zo|NrlC z-1P;+)lXwJ^J3NaVzr#Sja^ezi!Ghikj;zL*o#%minGF z0`^P{ER&@K?U*=tCPx7&8P>_O1nn3gvm37 g>^T>(LG0Z-`Js?GshYMw%ZYVzc%%o7>AC#$ne zVbtEdhb5bFvIbj + +int ft_heredoc(char *stop) +{ + int fds[2]; + char *line; + + pipe(fds); + line = readline("> "); + while (line != NULL) + { + if (ft_strcmp(line, stop) == 0) + { + free(line); + break ; + } + ft_putstr_fd(line, fds[1]); + add_history(line); + free(line); + line = readline("> "); + } + close(fds[1]); + return (fds[0]); +} diff --git a/heredoc.o b/heredoc.o new file mode 100644 index 0000000000000000000000000000000000000000..1f428b100b40a0ff2e2d3b6fef6d9d63aa3ffcdd GIT binary patch literal 3256 zcmbuBO=u)V6o6lMPxnkR$>dLxU86D!{#;B?5~C|?hzUA6iOUkAkt8ThXQn4TIDby} zjER~x7&Am9q9kAk3(1%*{S1Qf>ix~r11X67J1=z8_OdawSv z>UF=7zW9`?D8NO5IXJaA1=xJ**%)#z)=Dpq9N7R=2Ht@hA zG!N28nf=`(7yuWi)!Ypu zn(5n_{hP@bzne>fGNjy>7}2%F;MjO#NEtQ&)BzkpGqGjZm_MT>F2o;;KX7(&q4WlUDaPrVo-af+)1UlS_&9Bt9hMPw9&L&k{r-PWPMhO9WAf z_u#|1MG%EJ&ut@}8rmCuP; z|MXj7VxwWVw@9hd*9+clgbyCv4i;_fxn0QvH zeVz&wo`*uKJ=cw6gLq%K-!X&X7e9=nbHFp}8RqySY8ro<*<2APk=MrO&o$*NUJn9T z@e|YZ6CjH0yNHc4BmWl|{7?+;;QJ)9PV46zy3G2aZv^eJy#5sHa}u>Ef3Uc#BE&kM zE7$ikCdcowOULgU?}o>5y(;v{eMo;PURt4n$8q#2R*+R?_pcaulshub*U#}sSn0HX z%k2E}b3*$^-w7Vi`Mb#EIU#~0HvSDV1d)BOU|Xm0-45f^S(C@dKR3`Ww&?$I51$j+ eWARL#{3FQY|9}zl-ccvl*ui&M04eHA9{(TlN@=SA literal 0 HcmV?d00001 diff --git a/infile.c b/infile.c index 76d3230..279fa17 100644 --- a/infile.c +++ b/infile.c @@ -3,30 +3,43 @@ static int ft_get_infile(char *line) { size_t i; + int fd; char *path; - path = NULL; + fd = 0; i = 0; while (line[i] != '\0') { if (line[i] == '<' && ft_is_in_quote(line, i) == 0) { - if (path != NULL) - free(path); - path = ft_get_file_path(line + i); - if (path == NULL || ft_file_is_readable(path) == 0) + i++; + if (fd != 0) + close(fd); + if (line[i] == '<') { - free(path); - return (-1); + i++; + path = ft_get_file_path(line + i); + if (path == NULL) + return (-1); + fd = ft_heredoc(path); } + else + { + path = ft_get_file_path(line + i); + if (path == NULL) + return (-1); + if (ft_file_is_readable(path) == 0) + { + free(path); + return (-1); + } + fd = open(path, O_RDONLY); + } + free(path); } i++; } - if (path == NULL) - return (-2); - i = open(path, O_RDONLY); - free(path); - return (i); + return (fd); } static int ft_remove_infile(char *line) @@ -39,7 +52,8 @@ static int ft_remove_infile(char *line) { if (line[i] == '<' && ft_is_in_quote(line, i) == 0) { - line[i++] = ' '; + while (line[i] == '<') + line[i++] = ' '; while (line[i] == ' ') i++; separator = ft_is_in_quote(line, i); diff --git a/infile.o b/infile.o index cc20d3e9280d1b113cdb9d6847aec8348199cd49..4d01b27bfb9d05b7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;H@yAICCz_?t2%Hkc68 Ic)fq;e@T@>2mk;8 diff --git a/libftx/libftx.a b/libftx/libftx.a index 23466973865a07778bfc5212f08f95d9af3ebe96..4958b954bfd46533d6b0778df793f728b51a8bf7 100644 GIT binary patch delta 604 zcmZwDKS*0q6bA4wSB=Swd4G}!Ld0ee^hvQv-p$KPDC*!~!NH+Jhhj5ia0uw&;83)K zgM))|9UMw<=-?nC#KA#ITRJ#6C^!f@Sa5J~sI)_e4*lK>4H10sgLBS(=bX!}+dK9~ zdBw|Sg0G?hcm;G-X@{c$L1;Um)qxA|22@kQ%0HqZXPM;@v{ys^e=kdtcX-X<5Pz28?!VYMNOo=v%hZ>LF=2zFF7eA2EP& A761SM delta 586 zcmZwEEleCi6bJDCE^r(Nw|jd_Di8z^z#d7vH#{HBi?^BeX#mKqgOvv_i)~ zy-DxsQ`tP~e=xWO8s5?*?a>vGZKmP>SZD4Wuq+y&Wjdlqz)on6zS9kmE6@b((r>_N zq9IzN(`ORMXI|-JyhI1|0Jw@~=^On48rx~S^wF3$OTVfP>kO&4vR!T{{yyTnKqX<| zs}?(JF!-i+j0y5Rcqbw#ll1hF>Ko-6!{ybOx5{%R#=AoWhRQ{P#6qo^0`E~lbS zNZHM7K~LF^8ToqAPK>aexVCduB38OJCDR-wkf9K|$9>sE-9mA$#0(`1IvZ8|@AIGM lW^-S#yXQs~_mRryI8Lpn2OY;$N{=}_BGzXauXOBOnokCdY03Zq diff --git a/libftx/libftx.h b/libftx/libftx.h index 3f74279..7c02636 100644 --- a/libftx/libftx.h +++ b/libftx/libftx.h @@ -6,7 +6,7 @@ /* By: cchauvet +)bDYkT0xyh*<%^YtS7#LU>KK`G4kwauM3uh1G zt)I-r*Eab92OA^z=BELOj+GIh2{fy0%FACT*UYRT? hXwP_lav+dAJb5CJ+&B3mkX$fXP{^K9cygeSJpitYJOBUy delta 237 zcmbQCIze@U24lcRO>+)b3AS`rnaQaf%^a^77#LU>KK`G4kwauM3un*d04|ovQ#eH! z=TA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h8 zhi}=^=ZZV{lK3J8-ID_Xf`++C&4%DT|EZul(U{;B$e)i|K)4rogl8f7qG|{nJv&wO jl%h6@N^b}!O4=d{fn~O&+bFzcs|p1kO*XsB-qo)Gt13uG diff --git a/libftx/printf/ft_printf.h b/libftx/printf/ft_printf.h index a85455f..8f011a0 100644 --- a/libftx/printf/ft_printf.h +++ b/libftx/printf/ft_printf.h @@ -6,7 +6,7 @@ /* By: cchauvet u*sZk z<&y*0*cew%Ze){ZJTZA8+kD2IlO5UX8J#8{WVdIuoy^D)4|GT(hdHMj6U0=#$%*Xp zjDC|F*~OVcm?k^2iA~y={*yVm>{-?W#emvHCMR%d008nG BIt>5- diff --git a/minishell b/minishell index 849fbf6399ba127c5123c2251bfe9d69bead195d..aa5b96f0a0b248a63198b379c55d1a0479670c59 100755 GIT binary patch delta 13654 zcmcIrdw5jUwcq>9IWv<9Ff(~D2?;RaB?QQWw-)gP2@H`(ywx#8Y=XRkMi?Nmpx{IU zY5+B`m8yUOK8k`0rVl|cL~XCu`iQpm;-eT4>jcvh>!WD3xxcl~KFJBaysJ%43>^t`WELkf`JtNv$M;r&S#0OOtjgY^NBZ%^k%4 zg%+l?FikwDU6gj>w$1&^uQg?O$^m&-IqrkBgq zlxeX{=TmB=z>cse(o%Veq+UhoHeEMYEncvwdfD>Dd8=3CO=1-lOK(`Qykd3Df>kvY z70fPV3l=S^s9LtVX2q(tta{nC3yFIIi!F;S7CyZw0_9}4^=im%h%t`82`E!uWVQX4 zB@yRZ(CF!?FlA1z^@?43h$o4k>p$j(7;S`ltB#T!5s_nrhL%=Z{2tJJl5Qns4tjFa z<;LHWwgnnTcMg4aE@M@srme0M&(J3cC*ii3#PT^VkY;3McI!1)f)+LQEFX?9X z4>Z|P$$#r#Vj?M+!((D(Fe~*d3WM6zDvZ1&+ zvUzVOBXJm72W2E7w#JB(G?2K$KZUy`Ol6_upv9bSX zEw{J$S^tsR_r01<_CL(^Q|JYeH?+Ul9PAT*8D0VJxx_^-0&34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LpE{?#`DaO@H8y3!pe{^R*P271$ zZ{glFT%5gW8Gem9xGCG^Ve~Ug2tTdkTiL-=(DnCQQyoL7pAwuJC6Vi#@67R$G6Eb9oEn5mvmCb}A4TCkwm zLqu(YbcNY-;6#u(d6e`*(Yxcz_ovVQcU^F31?aOq3PbOgZVb`1tQo&ZP^15 zA#ct%@T3)2bmv=jqW?~6{n6&;nnaYZsR`1}gseH=H52`F>5++hw}p5wYDMfRUEIH| z4<9ONBV{{Qwv(yNyBq@}OSMHN8IUhJ2+ol*OJuu>S`oWDm)|Y%$7TDxY+sk{TeAIF zw%^Lu5G(Ep@etbl@nqk5V~VESiUMi;j~3{FXAry<)-rp$UVLcA8x0V*<&X zuISEp9z;J6bjs7ur|A+=_CP4_N^pZ(h*kY;66cE<4}{8=E1S+=GRdY;bov)t`dlqr z#_ppCqfekL11y)-{>HplQNPfQ5whF!@%GyeU(-n2PqGpK&ZKY`uMU9A^ZKHfKh2dW* zj+D7K6_8Vkv}wk9{)@%h>zi`MO(Zy zxOA*3MVF4XG`!-Acxjrwfd|CNPmD^lxBpx*=ZR54d(*f7ufIdIJrTu4q3p@hG<$Vc ziaAe?O0yGPEp|RR2A7D#Pmb}mR#|?IXN&TuM*1F|Wub`-u@LC4MHV_cU+jKrWU%*o z3;h~%BR?WIIV1v4=Vp89O$I)vV+Wy60lt@tbDloMXKt4S_L?CUK0Q)P+aVr)`lNpX D7q()3 diff --git a/minishell.h b/minishell.h index 19129ad..4e0055c 100644 --- a/minishell.h +++ b/minishell.h @@ -5,12 +5,16 @@ # include # include # include +#include +#include +#include int ft_file_is_readable(char *path); int ft_file_is_writeable(char *path); char *ft_get_file_path(char *infile); int ft_infile(char *line); int ft_outfile(char *line); +int ft_heredoc(char *stop); typedef struct cmd { diff --git a/outfile.c b/outfile.c index 8939ef3..2779606 100644 --- a/outfile.c +++ b/outfile.c @@ -13,7 +13,8 @@ static int ft_get_outfile(char *line) { if (line[i] == '>' && ft_is_in_quote(line, i) == 0) { - if (line[i + 1] == '>') + i++; + if (line[i] == '>') { i++; append = 1; diff --git a/outfile.o b/outfile.o index 13f900ddeabbaeb4e981c761fb13011d6ed35450..43c902234e72dad562d3a95d600dfdfcf2f74be5 100644 GIT binary patch delta 564 zcmYjNL1+_E5dE{+|93Y_x|;-=_LN>E3DRnzke<3N5)uNX9;9AGkWw+UffiKspe@8G z+JjlZVsK#yqS4_9`pa4WX>~i5>x7FzgL zo3pui!1d2OCdyndbGwYcv|D2B6E`C%oY5DA?r=5Q#$9b1TY6Rhvh|RwBGSRMk=EK< z4X#pNFz(~Ak&OovX=sOBq0{raMiFQ;(`IUXLOzE~B{#|c{tImu@0lqm%O2Q6m#`Dy zX~5*MPt1|mH}?U0-n*D4!~2m}0B4x9i}Z_4I}bKCZ3lj1m#~VtxC3KYA$)^P!kgHQ sJIZr`r`9OWC$g}Om4pKu*i1OaV7TXF>?iW@5pzigPOw6FfX!s)KObn8j{pDw delta 565 zcmY*VK}Zx~6#n1LynkmK*O}cd7YQnm*bTKh1hx>4OUlZS(IIq^NX-v6ZXu{{`gcP5;-f_0v^$+$ z&4EY01zpX7#`wh(@Xz=qZwx2FEU_mtt=4npdPJ(Tv@g#?nd-6tUnw8D3h(H3s5hd^ z`xuc9>JFaF(a+FrS@?v8+D2JD0|)d{U+wODfSOddL=Fv^L(4(K!MKCxo?%BGQx0}G z*y*SnPZm*Aw`eq+r$ZBIGn|SBEASRym;6Hs2;VIDM>%fHo6r{!88?PHjGmxW`}FdkAF)L?}0T+$8Ff8BI^=W;>o{n COpnC?