From 1a04f73b49f81f0ce1d55121567595c1c58e44e8 Mon Sep 17 00:00:00 2001 From: starnakin Date: Thu, 9 Feb 2023 18:47:05 +0100 Subject: [PATCH] start of excution implementation --- a.out | Bin 0 -> 15632 bytes d | 24 ++++ execution.c | 39 +++++ file.c | 6 +- file.o | Bin 6416 -> 6416 bytes ft_split_quoted.o | Bin 5616 -> 5616 bytes heredoc.o | Bin 4856 -> 4856 bytes infile.o | Bin 5944 -> 5952 bytes libftx/extra/Makefile | 2 +- libftx/extra/extra.a | Bin 48656 -> 52264 bytes libftx/extra/extra.h | 6 +- libftx/extra/ft_strndup.c | 2 +- libftx/extra/ft_strndup.o | Bin 3512 -> 3528 bytes libftx/extra/ft_swap.c | 28 ++++ libftx/extra/ft_swap.o | Bin 0 -> 3488 bytes libftx/extra/ft_tabrealloc-5f29f43f.o.tmp | 0 libftx/libft/Makefile | 14 +- libftx/libft/ft_lstadd_back.o | Bin 0 -> 3376 bytes libftx/libft/ft_lstadd_front.o | Bin 0 -> 3120 bytes libftx/libft/ft_lstclear.o | Bin 0 -> 3376 bytes libftx/libft/ft_lstdelone.o | Bin 0 -> 3304 bytes libftx/libft/ft_lstiter.o | Bin 0 -> 3160 bytes libftx/libft/ft_lstlast.o | Bin 0 -> 3096 bytes libftx/libft/ft_lstmap.o | Bin 0 -> 3952 bytes libftx/libft/ft_lstnew.o | Bin 0 -> 3240 bytes libftx/libft/ft_lstsize.o | Bin 0 -> 3160 bytes libftx/libft/ft_split.c | 2 +- libftx/libft/ft_split.o | Bin 5704 -> 5712 bytes libftx/libft/libft.a | Bin 118460 -> 149036 bytes libftx/libft/libft.h | 2 +- libftx/libftx.a | Bin 5280 -> 6070 bytes libftx/libftx.h | 5 +- main.c | 165 +++++++++++++++++++--- main.o | Bin 5520 -> 10760 bytes minishell | Bin 55896 -> 65368 bytes minishell.h | 2 +- outfile.o | Bin 5920 -> 5928 bytes syntatics.c | 29 +++- syntatics.o | Bin 4904 -> 5376 bytes t | 24 ++++ utils/ft_getstr.c | 4 +- utils/ft_getstr.o | Bin 4152 -> 4160 bytes utils/ft_strnchr.c | 2 +- utils/ft_strnchr.o | Bin 3688 -> 3704 bytes utils/ft_strncpy.c | 2 +- utils/ft_strncpy.o | Bin 3504 -> 3520 bytes utils/ft_strreplace.c | 5 +- utils/ft_strreplace.o | Bin 4600 -> 4600 bytes 48 files changed, 312 insertions(+), 51 deletions(-) create mode 100755 a.out create mode 100644 execution.c create mode 100644 libftx/extra/ft_swap.c create mode 100644 libftx/extra/ft_swap.o delete mode 100644 libftx/extra/ft_tabrealloc-5f29f43f.o.tmp create mode 100644 libftx/libft/ft_lstadd_back.o create mode 100644 libftx/libft/ft_lstadd_front.o create mode 100644 libftx/libft/ft_lstclear.o create mode 100644 libftx/libft/ft_lstdelone.o create mode 100644 libftx/libft/ft_lstiter.o create mode 100644 libftx/libft/ft_lstlast.o create mode 100644 libftx/libft/ft_lstmap.o create mode 100644 libftx/libft/ft_lstnew.o create mode 100644 libftx/libft/ft_lstsize.o diff --git a/a.out b/a.out new file mode 100755 index 0000000000000000000000000000000000000000..9e84bec84559ddfd4cf30effcf4ce3fc1af8db9a GIT binary patch literal 15632 zcmeHOU2Ggz6~4Q+lTA|pB#K)%fo9Ys$N_o%6UQU;#yXU*-+yExGG2#sKkUfaq6;g%bENix!MLLPYf2Oq#Y@HH?Ce1N|zn zigY(#q;WEGz1^RJ&LE21+xRM}j7~p{%~FG9u+&kE6V%@{A^V|Agm|k zcw$U&Yo~a+F$8reA-NaA?UyA#H};S{BldxE;%y`P-}Ltc`2`f&jBw)tix!OB-;>~n zarv;qr+J9_+w43vQT!PxtfFx;KHApWI2mo2j3+YLhHQIVLtASwoeZ|fA>g>0V8c1p zcWgxXXG9)3_V)>2k?toQOr)UgZrCvF=zspr*Yp=J<`P4rzu9gS-hA#`&-Z1~29E>V zL>m<3aAUzb-kAF^SPw?KN*EfzDJ6L9qm=yvoA7wuma@M9yaJnB_5)GM{zc#ww=w9C z!1izn9@{9@j?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_quoted.o +heredoc.c +heredoc.o +infile.c +infile.o +libftx +main.c +main.o +Makefile +minishell +minishell.h +outfile.c +outfile.o +syntatics.c +syntatics.o +t +utils diff --git a/execution.c b/execution.c new file mode 100644 index 0000000..5ed3840 --- /dev/null +++ b/execution.c @@ -0,0 +1,39 @@ +#include "libftx/libftx.h" +#include "minishell.h" +#include + +int main(int ac, char **av, char **env) +{ + +} + +char *ft_get_executable_path(t_data *data, char *executable) +{ + if (ft_strcmp(executable, "env")) + return (ft_strjoin("/usr/bin/bo", const char *s2)) +} + +int ft_excutor(t_cmd *cmd, ) +{ + char cmd[13] = "/usr/bin/ls"; + char *args[3] = {NULL, "cat", NULL}; + int pid; + int fd_in; + int fd_out; + + if (ac != 3) + return (1); + fd_out = open(av[2], O_WRONLY | O_CREAT | O_TRUNC); + fd_in = open(av[1], O_RDONLY); + pid = fork(); + if (pid == -1) + return (1); + if (pid == 0) + { + dup2(fd_out, 1); + dup2(fd_in, 0); + execve(cmd, args, env); + } + else + waitpid(pid); +} diff --git a/file.c b/file.c index da9b9c8..d03757d 100644 --- a/file.c +++ b/file.c @@ -1,6 +1,6 @@ #include "minishell.h" -int ft_file_is_readable(char *path) +int ft_file_is_readable(const char *path) { int readable; int fd; @@ -21,7 +21,7 @@ int ft_file_is_readable(char *path) return (1); } -int ft_file_is_writeable(char *path) +int ft_file_is_writeable(const char *path) { int writeable; int fd; @@ -42,7 +42,7 @@ int ft_file_is_writeable(char *path) return (1); } -char *ft_get_file_path(char *infile) +char *ft_get_file_path(const char *infile) { size_t i; size_t n; diff --git a/file.o b/file.o index 5561861055daf4fd3466db4609ed42981c43ea3a..f7d44cfd63edbe443ef5dcd88ca7845ef9b46038 100644 GIT binary patch delta 156 zcmV;N0Av4H`GhMi8Ns?gKA>V}x4B2@&SF2sSJVCJffg$-o7Y(`9c*3Q8kJ z2+cTW5s(EAB3%`b7N&_2%$W@OoO)n(0&^aN0hFBqF-L;c5y_n83@~%vz|4_QgPOw) z;z>DzIXTQ}DGbtVj!=^X!Frfcj9LUY3TzCsDzY)GNXD?ijbQ))&?zhm00029oCH)5 K0Wq`j6dwc?pFCgy delta 156 zcmV;N0Av4H`ELh{33n?gKA>1Icd$GB_c^92dccMZtu@dN~=mKyte5?MOjs z#0a4o=PUxUz(J%d2U5T^F@iahL7!6(%uZm=V=#cSGa%+jusR}{vz!5D&KsCH5(-dr zxIsKAM=&RcIW2`jn#~bvk|0%7R5ZC|! delta 38 tcmeyM{Xu)fBxZrIRQAq!K-BKNG33zGw>Ks)V&2U%Pso~Ub0SN>AOKUK5Q+c* diff --git a/heredoc.o b/heredoc.o index 9d6ea8fdf3f1bd78ccca78e41c58c8dc367049e1..1b9deb402b11ba84820fb60a26fdb8415311b725 100644 GIT binary patch delta 23 fcmeyN`a^ZYBu2)0lP5DKvn4fv+gYBBqn}16KsI?k5tH zRRr?^kdsLT9e?W=4j_UMg`+fdM5z(E04|Y;X_0V2i*tbBk_Il23vhyj$1Qw=oPvg3 z1A-v2#mxM(zh=JOdnp9Mh;t!?l=6KmbxAtaHF7Qf93^v=na!Tutdt90Cy^pl-mp$)xXRGv%`^_ zGG*XWOHw#s&Ny`Xnz;J(q9>N==8I|HGL>V37yLDJ?7DLA3TGBpDf{6coeVOQ00000 z009610JB^M^a}yllTi}K0WFgm6E^|)lTj1D0YH-x6h{FYlUWou0dSL%6h8rAlhG7E z0YH-x6+Z#mlTj5v0rr!T6+Z#^lhGAF0VtCZ7C!-~lTj8w0ictS7C!+{lhGDG0q~O% F7bleuy>S2l delta 452 zcmV;#0XzP{F1Rj`C;_;!DTf0V1u3`-60Jsv3V}sGqlxmfgE*XwFj14p1053=Y&s0M zLutl2m5iW(1p;4Du$Ghh16K%N|0cx%0001!RRr?^jFU+P9e-=b#ymt2qHsDoqSO&w z0GCL_v`Dz1#W_H5K?@hiJ;Li2z5%D8VaE`OAhE^F{IkDizTF3{6w0X!rIgnCb1Rdi zMfHussz1l*!sKqVr#CAjA?PJq#b$lE5AWCpchBI8u;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_k>p5FlgHmOyc-a|lkNm6%xuF^Ph?8Y;?s6cw&)EY$)ahWKBR0~B zCsiqHSJP%#QhaArP-E2^Db7rgkNvuLJ^ChE;cgP}l;YyX?;i};Ggep>E{@myH<@kE Igp{}T9~D4_3IG5A diff --git a/libftx/extra/extra.h b/libftx/extra/extra.h index c5180fa..f745d3f 100644 --- a/libftx/extra/extra.h +++ b/libftx/extra/extra.h @@ -28,9 +28,13 @@ char *ft_strfjoin(char *s1, char *s2); char *ft_strmerger(size_t arg_len, ...); int ft_is_in(char *str, char c); char **ft_tabrealloc(char **tab, size_t current_size, size_t new_size); -char *ft_strndup(char *src, size_t n); +char *ft_strndup(const char *src, size_t n); ssize_t ft_strchri(char *str, char c); int ft_contain_only_str(char *str, char *to_find); int ft_contain_only(char *str, char c); int ft_strcmp(char *s1, char *s2); +void ft_swap(void *a, void *b); +void ft_swap_int(int *a, int *b); +void ft_swap_char(char *a, char *b); + #endif diff --git a/libftx/extra/ft_strndup.c b/libftx/extra/ft_strndup.c index c0fc2aa..c289878 100644 --- a/libftx/extra/ft_strndup.c +++ b/libftx/extra/ft_strndup.c @@ -12,7 +12,7 @@ #include "extra.h" -char *ft_strndup(char *src, size_t n) +char *ft_strndup(const char *src, size_t n) { char *out; size_t i; diff --git a/libftx/extra/ft_strndup.o b/libftx/extra/ft_strndup.o index dae7c885a9ec021f30428932a23145e3651ba792..585b50b6b27508e88a44f88fdfaf1096dbf2b258 100644 GIT binary patch delta 253 zcmdlXeL{MI24lxYO@BsFH3m;%1_n+sAjPa|#cj>az`#&5xsB1%IupoZVVao1#=u_; zWU?|%OyFb?On@*WxEO>$q6}=QK!Tlxjgc)6$lw6+IIAarV0=FL22;Mkxec$YKgm}r zRjJ%rn{eAGesef;B`f31$rm~584D%{a=J5COrFVU&e_8V)CU9&lW%gGGj>cChy+e9}24lrWO@Br{F$PazW>qV0Yi=}Om#f2xA@aQlKOkN1&3rv2< ZW6$(~d9o6(9b?DjL|%Kwh{+3i)d6q#K*Ovrtz>MCt$Ec9{jvZRwk0`E)3sLWV1uIVZ1{g|Efz?CX%ZzOngIR+o7Cf zpJO=WC;ROLoFW`Q|3->cKU_(z1&wB<9;P0B+&kr+hEglveBEF5ijXPSYeA;j@*AOl zsS;+M3)V6-k7a6=u+l6C)oP|%DU@34nP9!u@Fh=lzF77fU8fSZz=r}9LBZsnz)o$5 z+&sPW*zOeR7*mZmUIAl$)R-Dfy6@w~rjqm_p)U%a86JJle0Iq3k$^76W(h~3(1i#twjQB61|s zr@A|cg^bf|k*GU?dK^E*UqVeHxOCW$Saf%?BH?%ex|g2nkPx0!R_D(&+l13;NL|r{ zM`wL7!Y5qnj%v8nmHCl6^URyn_zUdIObNfhcuM2bd6As#D77!@XO;a2HN3&ToS)Qh zF)rsW_!Y+G9B9O%w@dabxa7;e1YhDhDb`dYS|_XFQfEoS#lM$v>Qj0n$kTA~bBs$r z>|(-lP`JF3_X~waum)ZWU)G){)GO9&wE!PauMt#zW;a`ne7#g^2Cb$PKuFALB@FV) zkEHm^%lmJ0^r7x4TnS5c@WOg4@LqU%;Su~HC|&}uT3xH@qk*PDFI> zLl}!&|0iDGWu&x!5 z{srDaBX0jGo}cLchmb4zvj49U(|e-Y7kMbDzo_WkFEJRmemQ1+npJ&$`rV?M`uR^% zQIsb-s{2>g7yT(ltP6MQsNU|9(2(~-F#7&UB(LKE{Dy{p_7uCw>!&z@RNVdf8v?9F AR{#J2 literal 0 HcmV?d00001 diff --git a/libftx/extra/ft_tabrealloc-5f29f43f.o.tmp b/libftx/extra/ft_tabrealloc-5f29f43f.o.tmp deleted file mode 100644 index e69de29..0000000 diff --git a/libftx/libft/Makefile b/libftx/libft/Makefile index 9a2c3b1..0102a19 100644 --- a/libftx/libft/Makefile +++ b/libftx/libft/Makefile @@ -45,9 +45,8 @@ SRCS = ft_isalpha.c \ ft_putchar_fd.c \ ft_putstr_fd.c \ ft_putendl_fd.c \ - ft_putnbr_fd.c - -BSRCS = ft_lstnew.c \ + ft_putnbr_fd.c \ + ft_lstnew.c \ ft_lstadd_front.c \ ft_lstsize.c \ ft_lstlast.c \ @@ -59,8 +58,6 @@ BSRCS = ft_lstnew.c \ OBJS = $(SRCS:.c=.o) -BOBJS = $(BSRCS:.c=.o) - NAME = libft.a CFLAGS = -Wall -Werror -Wextra -g @@ -73,15 +70,12 @@ all: $(NAME) $(NAME): $(OBJS) ar -rc $(NAME) $(OBJS) -bonus: $(OBJS) $(BOBJS) - ar -rc $(NAME) $(OBJS) $(BOBJS) - clean: - rm -f $(OBJS) $(BOBJS) + rm -f $(OBJS) fclean: clean rm -f $(NAME) re: fclean all -.PHONY: all bonus clean fclean re +.PHONY: all clean fclean re diff --git a/libftx/libft/ft_lstadd_back.o b/libftx/libft/ft_lstadd_back.o new file mode 100644 index 0000000000000000000000000000000000000000..3dd90bcb45e43abee05fb8df4aaa1eec5202782f GIT binary patch literal 3376 zcmb_fO>7%g5T5mV*MCXuBu&zgh*||h53o*4P(mA(R5a}-Ehr#bwfxBVXC0f^>&o7y zhANN{sAL79RuwlcAP)2f2gHFB0-+vz;D$JGKuV<^(gRW|kiyLF8+-HWOC?6yH#6VN zyqWhmPClGFdn%wPz@)%&=xB@rY==7XtSipK5PF_7TYs4w_mXC7b;oR7-ZnQ@cOd?8 z3|&y%hWIBMig%|--<;bqH>bBK+HB2jp?wSO3D@-Uwrg&M@Ah=`Ewg2Y&5d7@Z~v_H zE2-3=rl#s6iIK5X|JZ=u7y$^x(OWeX(r5RpsiU!Dv8P9090dq!5D>upAb>WxN7ds% zXlNLj7X=U=RMb=~MpFPpdO=Oi50WxXi&@1_10{?MSKZUuqX3i$Lkg&_sGL_J9t_-Q z1|j|`!YE#fK>R$4THr=03jHL4PNV)N4xu~_VdYpjlu)K3+7qZLFF-`UO2W}F=wycp z{Aep5h4PiGy_8(B>Wy;EP9A>Vm@uZG=wvDlCtE0Fa@qW{k%x4tR<+Uy)$QzZ*-oFd zR??G4($%tEZj`J_C0!}!icZsGQaIpLkgwT}WjkP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Gu*J;$?i2`oG4@Q2M0)Y0JwF5Ilz%^1v6 z#r3}=MI+PqYqTZR|C#HzIF`C`UiHkLWTPT=kPqs5$zs-&mmoz{B0Oy1c`Tzg` literal 0 HcmV?d00001 diff --git a/libftx/libft/ft_lstclear.o b/libftx/libft/ft_lstclear.o new file mode 100644 index 0000000000000000000000000000000000000000..563dd896384e972d34ccccfe2c4dd5aa594186b6 GIT binary patch literal 3376 zcmbtWUuaup6hHUge79-RHfd|y)eaYQaX#qH9Fx_y%v9}`)hSchSkW2N^rneRZc37t z_-C`Dn=Dj|1AX;DeDKW&eUJ(MVfv~*_%;Mz1|3X@h)__h=j48;`T7w-@j$+F&hPyF zzI)G?`^L=4W2RvMlL1GetuYGF>}t!&mY9Sg^gNwv+)Az8iKQABwo;AdW@_!i7DO(G z(FMgOM6L)FZ$C~8g{9VKwo+^3=#pS<9l>NU)tK3A8P~^C>&wke-}z}DYXooK*xuew zt$huDdVVyhKvK4G%Q+S(7>t!j3D)EKu`Pd zOsEouWLhoJIAcL1U|y>SAo482C@ytFWEDkWUd!9ie+EUcX|)moHK?YG1;j8tu?4q?$3^|N&dzVSV?$)R%eRB^>T_V!qsCZISMVKtQTHNFKcd!o zPxnRNG@t0TO%FW)t|LwrP9Zl8BGj);4F{rcDYr<$KlZ`}Oy zw~53LJy*%YxOC~xd&4(R{rK|STQ6K(_z0F*xB7KvxO0z$O7e(P#i4iRb@lILhWE|~)s{e`C3K749gjv#uSih7Brx^AdQgC(G`xM+({5g*Ds1r&P zK*Tub<=z?h=es=zjMGIzw8v*VdCp0lXM_DS5|3&A1*z}Xa8K$FX!x?!>Bb@A{IC1! z&NAY2(u4V98o;rV47&jIW7Cr@*jWI*yJfk-?D zREOR#ewP@h+Imk2!6&pJZTM_w)qU$|(J^wKmf+hvk-nh&(*8R2AC#BEOERANCrIy~ z=1|W`A>T=m=YTLG-Iwl>PWAJ$ezO(j-!t?`_4<=Cr(WkTS!h+pGvoTq>AQwy_91?e z9u|`RymeptI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X69bCV`RYWINmz8!v&xC*PpQE7o^^_i<|NyP%HgWw%%Z+^G(<7-9a7*j2Pz)* zts+iypH+5d*9b&g(?f z*MAamDiy8sm8$=iif6{XGB2ojwlhDWhPT`IVjtoc@Yk*XJL(bSKB<3t-FfyIr}vP0 ziS|FO>JOt$C+?g16*RJ}`xRBZj*%Soy&Yl;QTMU}jzki0{|w(kq1*m{>$3j@`f@z) z{}aTbJyGtDRsGLM(J1Qs5!$-d=YedfSUP{2)oA^3#3*O<{3q3;Fo8CmxIXju(P&OL kYsjwYe*AtgM)ip}F4O>iKp}eeWV@m2uPaB2>vn(s0-*2~!~g&Q literal 0 HcmV?d00001 diff --git a/libftx/libft/ft_lstlast.o b/libftx/libft/ft_lstlast.o new file mode 100644 index 0000000000000000000000000000000000000000..6262d1d35e17184d74d425a13f7663730fda7887 GIT binary patch literal 3096 zcmb_eU1%It6h3z*GrLKe?510jlmr`pwpOsSwJ43P+AU`7CWca!O4Q0a*_}Pi(4IzLTi;RCERo@L(X4buS*k}bak3Q}ka*jYfs`z2# zyJ6&1p|IL&dWA4@+ktz&5ftXU^}=I^3(ZE*2v+7s*JZIsk3h>6xx%-L0o(uL?ODP7g`Eg(pU{?-wlZKN|n#^pEFWdiU(*+E>#90E6A(8DR|#UA1g`$ujK~%eZX~qM2K;j3u;ItWkTx zN}*@ZTSG6STCjxuoMB@T|7~|2Wq z!&}lnpyBJ%=XFshs9%3Z#tBn#UI*2~V~M(-UMP$^i3^9NW<2g7#7=7XQ_^>(*6RVM z<}F`XskqC_ZEqc%h%S=u-2_gx)ojuYY$7`e-+ zUvHBBpX4^qqn>-7c2>6N&kRUS`>P6dAYpn(7bS`NOuE45n|&Iq&q=WlB_WiWmCkKr zK*xw{OYj^Ilv?LD5vTqx$~dbf0#ROz-vBw(>OH`HN9R?alZLEG@DXwp(YX&}tY7{w zW&WS!Sjw;7E1drX;xs4shor*|ndl+|QgeRRF5+yf)N$Fo{l1sVJBv=g`mf8&j_aiQ z=@#eSXM6@R%CFbIU*;djm?~T=>&qBqTjf0|$Ez6GI`@kNThr-93CwB}aQzH_iblWn z-|Dk|`qRnddHo+Frq@JscVzxg$WcV+-oRMD{NKp@9XXcvpL$i#Pk;7kPJREU<)u)< um@1r~^?MjJ7q{u>;!Tyu_XlH?pM=LH9>5Q1=zCAGRhfTN5@}q&^Yb^42oA#l literal 0 HcmV?d00001 diff --git a/libftx/libft/ft_lstmap.o b/libftx/libft/ft_lstmap.o new file mode 100644 index 0000000000000000000000000000000000000000..adcdfdcde5de6a8482b1767be77fb1b75b2376ee GIT binary patch literal 3952 zcmbtWTWl0%6h5=F|8#HdZo8I3AyBj{B*-ih47Wy?NMX8wHY7D|qFJ`v*>>$->h4e~ zNx4`-HU)(T4En5z`e2N2YGUw`Pz(=!@S%w@>5HKxJk*#F5=`njGylIk{j+^gPr7r? z`ObCDf0>@|J$}TaC?H6I7on~R6ku1NE+=d;0qy8HU{wDwW*#O+j9G7NI~t5??_;An zy=YWVFBsKv;n}&z{8=wC;;2DO4Y(ZXwy1m zP8@(Qs;IGGkdgrSn?a5BMM>F*YM@=|i*CcTL1qVr+7;5^OZ+iVe8_NBL-jr2fjHj} z9@Q3=*Hj3Pqnp=r;}p)2i-Ud$-*nLa0E9n9k$G-R1fi82P&7i&Mj~hv_-LAw*DX1rph%f<9~t{6XTPR94_ju&#pTxHD6=i~X@aMqe~ zSUnOlrJ`jPEhw5(7F1ICT*U%ROAK>E7DmiGluIR4)2N5AcLw&*owsP%7@3}O?4X=I z3CdJN*%)f_UB`v#Mtl>u*$Z{3C34yGaQbNv(1hk>d6N_JbC}e?)i?($@2$kfkC-=@!`#NzxDt6=FrvG&y9Sy$&0(J z9v)VhFW`H`BHAG9$TEDY+9-?OW$jv$btYM~hxrFt(;y3K$C$>={=2LR%|3*hk>g)8 ziXOCfYGZ5@>RU0mhea^kJFF#%-p5!Q!kDK6J-k{{yTSawuol9SEP&<+ioPT!QO_Wt z1_x10GDSP4sYAXwbz72wI+XR`u2=r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`5LftQ%tN58??n36!!A!N{R~lv4^D!1=SetOH^gsLdbMSWC!ua^B@-c#AtU% z`~z&TU5L|16z=7dy?yT*PxaWwY4ia26miNhgP-Al*khm=l8JKC+8ybC z4PU)Fk}&_g^<3}$)80?C#UPfKZ+MRwj$ylBh18)sb30&(;W8Oq2TJO>E$6Je;YscXHK|!>!`zt80WZLJL7jnZp}Vt zobEf(NW_|P&PbhmpZyCGPig)osqfYBs?_&scp!CN7oCIJEh%XyOvUe(IMu^*3A$Iq z9jPDG@B>mmq2Z58o!6(=lW1KFaOT|E3-kHH>}=g#0H^MH1t*{f$SKyUReFvhEOKiE z^?a>VYPdmzXClO+SMl9^sE1)>vMNdOKpx zQTJUyi;j`=of5pzoEZtaFa4BLsoBWf9IwgxXCy-P(>tKoPyMdPq$yV<_y8#i>Aw5X z)-FFkI@je~%1`f>o_`!Miplp3#gM*{i53}s8<{v_vN}QiL^#{wU-&r|d#YonDzl^Z+y8Da-j%WdR{~7)Q zg?8)TXtVxa^yT@y{?8H9Yogd6$^4&@qLA);4Q=i6$K{1ylyhnS=`8j9Q;1PaegDVg zqjC&wDsg`1SI}sl+M>UzORC?J%+G$5pNREH1Gs^LzV~EXlKJCu0x|kmqSyZq#7-Uq literal 0 HcmV?d00001 diff --git a/libftx/libft/ft_lstsize.o b/libftx/libft/ft_lstsize.o new file mode 100644 index 0000000000000000000000000000000000000000..a66c4969ffd7c553b978e429434884a9cf0f428a GIT binary patch literal 3160 zcmb_d&2Jl35TCc}wH-T&ou(u$soJQmDF?a^RUrL<;tEWhsHzI6RS`t4zVn@ zZ$9?zd(XG?=U+9102Tpfq2n3v2o9KOgMu>|kW>J250OnPJP!G)L2;W0|3`JyCxYz(`@L zX$$gm`^?Pgy0DCo1tN|L->JW|0tTES48<_prnqcEY8L&7vC*<1bpcJw*a#9Z zL?}cfRwVWY8u7RAr%#;ei>Jj@B6PPBT4^!X zAB%sA8|(n$^pLcd_}pOn1LNg^Xn+L7Ht?Ya7f}l#{v8}3MLQE8G!7YPw#7s{WgQIt zV-Gj)mG0L+%>Mk*%Hi*m4~Ze}-1%#B)?jqjip?T2Z6)SVyaMT}W|z;72~jq?w5fhLC1OIK;&n{i@f}C8Oc+wU(4_CSN12n44{wzO#?@)L0^#^w zb|-rRZ4$zjs|OCX(GaJ%H1 zW`0rf#x;If`bRZT1hhepjm8G zD!vo=oP-dYHP>^BZC^<#Ei52G0bH-r0NZN>jy-+h(s8^Q%S&L_YAf|3aea4DIjdcn zR9^y4wODDE>W)IiV{K#epfr#AdY$zDBtKyt^_+0omORqGF(5UquPSt63Da+YoFwtN zlrE&%keYJ!niRS&)O6M+OK*xw1l_1x7R6Z>v-3K`)NL?imG z=YADp*L3<-37pgl@cayaiAJyY|D(tI41JI4|@7enmrHdy2JW N|Gy=X@_Ox`{{WA95TO77 literal 0 HcmV?d00001 diff --git a/libftx/libft/ft_split.c b/libftx/libft/ft_split.c index 9924e7d..acd870d 100644 --- a/libftx/libft/ft_split.c +++ b/libftx/libft/ft_split.c @@ -68,7 +68,7 @@ static char **ft_segsplitter(char **tab, size_t len, const char *s, char c) let_index++; tab[tab_index] = ft_substr(s, start, let_index - start); if (tab[tab_index] == NULL) - return (ft_cancel(tab, tab_index)); + return (ft_cancel((void **)tab, tab_index)); tab_index++; } return (tab); diff --git a/libftx/libft/ft_split.o b/libftx/libft/ft_split.o index 198869a88b8fc988e5c695096bb1707077f3500d..3b9bb56d7d8aa251467adff1e579039db6f7ccfd 100644 GIT binary patch delta 541 zcmZ9Gze@sP7{{OIetValrxr;=T305Bg!TgrIw69DB&TRADX6Ag0yoE&hT@rO2#%J< zK!`S{pebr>y#4?wh^B^~(<`av^M0TAeLm0gK4hP=r_&g5Gt!y~Hxx+nQ!|j0 zeL2~e$Gh89@uX{npzyOz|Bd?w6#Op!!*&=7!I-TtYSdGAZ5K9&;_;DP> z3?HK3tjP+7ihjVHrmC8_%vsO1UgUK|pegk^GIZ5Be{A2!FF)GvJ72|iOVtvBJf`f) zc56~!R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(%d-@`^bb`Z Bou>c* diff --git a/libftx/libft/libft.h b/libftx/libft/libft.h index 3c98b38..11cc2c4 100644 --- a/libftx/libft/libft.h +++ b/libftx/libft/libft.h @@ -15,7 +15,7 @@ # include # include -void *ft_cancel(char **tab, size_t len); +void *ft_cancel(void **tab, size_t len); int ft_atoi(const char *nptr); void ft_bzero(void *s, size_t n); void *ft_calloc(size_t nmemb, size_t size); diff --git a/libftx/libftx.a b/libftx/libftx.a index 47967217c2f5391b2c1e337a28fab3dc8c07bb3f..b5d3abdb3f47e4cbfd2edf817b4f0875a1ab1437 100644 GIT binary patch delta 1378 zcmZvbPiP!f9LImVGufTp&1Pn2k_sL)6qL*sn)lwkdGjX4f*yMCP^72_4^6kp#zxm| zn_XInV9bMnOynN`C%^}w{XJ1o0?&cBz*X=!(X;?v z@Wqhd@E$UAkZ9&4xD0L)9q_?%a0%QXdaMYJg7p#Gox+=ijZUxMZC|97{vxc_^77)! z+SzV@_}yDwZx78*t2gpyQKwr=uMbz2+nuxBQP@(a-C7$itoGX@^NrTI%=v1&k0QM@ zL%Xxu-TtTedtnw!y^Dj8?7g^jW{@QRSnc-BFZTPkj>N2aveYymO}JLV7;J5;Sm@kY zFS(YC6zl~{C~0O(hs=AWx*anujaLo>&c*0X&9eorMXWNvc~J7KI1#W@OQp)(b(-cv zdCJyYvMj(?Opk4hxMs#JH_e}A&x(ZHbW$soS-qxNaa{9B<&fEO8kUNLdBJa*+m34~ zE|6ARoXLFaZe?mBmT_K8+nOOX>twfrPLTahCAA`@H_^zks%xc~22J^Dyp2Re>0sBj zs%NEKnIEgkgl0@gSfPn)9%Rs&9mGrm zl;@^}{Qn=BsmIVfGv~d~T$yz3l%bceCbca%jPss!5W?dKbKP@7({*dPL!;n+$%J6T z1uphf5pk9;E6>&51ugR(VUVh^(RjpT%zV#LB_72LYNLF>#;50zhO~naiKCSJrI&Fg zBkE>SY`<84+qP2Ny*rhrk9Yo@s?Nu1K}L`aQkrLc&r0$WKT?D+-_}C20~g1+WbG^V zsC{e`EJ?D3&>RjLMWlE(fapVv+3a62cF1?^bI60VqE%V*mgE delta 963 zcmZwEOK8+k6b9haWM0X(*a}^^ zDB5yFM7n4}#6>BUN)hV9g`nUA6&Ef<1YL-TC7-rxVQDzP7he>!ul+D2ajKLlFPL%WD1kAyEB4s@c!8E)iQafQU zOuz%8dC-K-+R}#AbUi;nw$2wbW!VuP;z+h5XC+rk+m7W}Q(BFGXY%~ZP_tIk z_Jo(D&X!aj%a$d}=EG{8m$RDWI(#ly=Whr-Kh7Gi@Y?D*p@?`YTj%3BO+x7}S|88l z%CaSr9be~qt}z2dt;+pz)>wr=@EQMo@~mTWIsyHLqv+t3d}KB<_zlrN{l zC~Tc|KCc+|KbJ#W;>}IoQqZL!?u1$KL#zG%k>^IqR@V#q>P}merA|_xu~b?$g`6C^P-Wo4NJBg)x}U7NlBjIo1I&wRtHPf9w}&b zY+tp)vsIHXRIw&>R?9rB8u(-J=y!E(yb95LUgd!;@}e6<+Q#lGA*s Y6mx#ibfXYGjZf-yS0u+v!eiZqKd8UcYXATM diff --git a/libftx/libftx.h b/libftx/libftx.h index 1ce04b2..5735aa1 100644 --- a/libftx/libftx.h +++ b/libftx/libftx.h @@ -32,7 +32,10 @@ char *ft_strfjoin(char *s1, char *s2); char *ft_strmerger(size_t arg_len, ...); int ft_strcmp(char *s1, char *s2); ssize_t ft_strchri(char *str, char c); -char *ft_strndup(char *src, size_t n); +char *ft_strndup(const char *src, size_t n); +void ft_swap(void *a, void *b); +void ft_swap_int(int *a, int *b); +void ft_swap_char(char *a, char *b); void *ft_cancel(void **tab, size_t len); int ft_atoi(const char *nptr); diff --git a/main.c b/main.c index 0d630fb..da0df79 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,5 @@ #include "libftx/libftx.h" #include "minishell.h" -#include void ft_lstdel(void *ptr) { @@ -12,7 +11,7 @@ void ft_lstdel(void *ptr) if (content->executable != NULL) free(content->executable); if (content->args != NULL) - free(content->args); + ft_freer_tab_ultimate(1, content->args); free(content); free(element); } @@ -23,29 +22,38 @@ int ft_cmds_init(t_list **cmds, size_t len) t_list *current; size_t i; - current = malloc(sizeof(t_list)); - if (current == NULL) - return (1); + *cmds = malloc(sizeof(t_list)); + current = *cmds; i = 0; while (i < len) { - content = malloc(sizeof(t_cmd *)); + content = malloc(sizeof(t_cmd)); if (content == NULL) + { ft_lstclear(cmds, ft_lstdel); + return (1); + } content->args = NULL; content->executable = NULL; content->fd_in = -1; content->fd_out = -1; - current->next = malloc(sizeof(t_list *)); + current->content = content; + if (!((i + 1) < len)) + { + current->next = NULL; + return (0); + } + current->next = malloc(sizeof(t_list)); if (current->next == NULL) ft_lstclear(cmds, ft_lstdel); current = current->next; + i++; } + return (0); } int ft_cmds_prep(t_list **cmds, const char *line, int infile, int outfile) { - size_t i; size_t len; t_cmd *cmd; t_list *current; @@ -53,9 +61,11 @@ int ft_cmds_prep(t_list **cmds, const char *line, int infile, int outfile) len = ft_seglen_quoted(line, '|'); if (len == 0) return (0); - cmds = malloc(sizeof(t_list *)); if (ft_cmds_init(cmds, ft_seglen_quoted(line, '|'))) + { + free(cmds); return (1); + } cmd = (t_cmd *)(*cmds)->content; cmd->fd_in = infile; current = *cmds; @@ -66,33 +76,152 @@ int ft_cmds_prep(t_list **cmds, const char *line, int infile, int outfile) return (0); } -int ft_cmds_fill(t_list **cmds, const char *line) +void ft_strshift(char *str, int shift) { - //TODO - //remplir les executables; - // les args; + size_t i; + + if (shift > 0) + return ; + i = 0; + while (str[i - shift] != '\0') + { + str[i] = str[i - shift]; + i++; + } + str[i + shift] = '\0'; } -t_list **ft_parse_cmd(char *line) +void ft_quote_remover(char *str) +{ + size_t i; + ssize_t start; + ssize_t stop; + + start = -1; + i = 0; + while (str[i] != '\0') + { + if ((str[i] == '\"' || str[i] == '\'')) + { + if (start == -1) + start = i; + else if (str[i] == str[start]) + { + stop = i; + break ; + } + } + i++; + } + if (start != -1) + { + ft_strshift(str, -1); + str[stop] = '\0'; + } +} + +int ft_cmd_filler(t_list *element, char **args) +{ + t_cmd *content; + size_t i; + + if (args == NULL) + return (1); + content = (t_cmd *)element->content; + i = 0; + while (args[i] != NULL) + { + ft_quote_remover(args[i]); + i++; + } + content->args = args; + //TODO check if executable exist + //TODO change it by env value + //TODO add switch to bultin + content->executable = ft_strjoin("/usr/bin/", args[0]); + if (content->executable == NULL) + return (1); + return (0); +} + +int ft_cmds_fill(t_list **cmds, const char *line) +{ + char **tab; + char **args; + t_list *current; + size_t i; + + (void) cmds; + tab = ft_split_quoted(line, '|'); + if (tab == NULL) + return (1); + i = 0; + current = *cmds; + while (tab[i] != NULL) + { + args = ft_split_quoted(tab[i], ' '); + if (ft_cmd_filler(current, args) == 1) + { + ft_lstclear(cmds, ft_lstdel); + ft_freer_tab_ultimate(1, args); + return (1); + } + current = current->next; + i++; + } + return (0); +} + +t_list **ft_parse_cmds(char *line) { int infile; int outfile; t_list **cmds; - cmds = NULL; + cmds = malloc(sizeof(t_list *)); outfile = ft_outfile(line); infile = ft_infile(line); if (ft_syntatic_verif(line) == 1) return (NULL); - ft_cmds_prep(cmds, line, infile, outfile); + if (ft_cmds_prep(cmds, line, infile, outfile) == 1) + return (NULL); + if (ft_cmds_fill(cmds, line) == 1) + return (NULL); ft_printf("%s\n", line); - return (NULL); + return (cmds); +} + +int ft_cmds_excutor(t_list **cmds) +{ + t_cmd *content; + t_list *current; + size_t i; + + i = 0; + current = *cmds; + while (current != NULL) + { + content = current->content; + ft_printf("--- COMMAND %d\n", i); + ft_printf("excutable: %s\n", content->executable); + ft_printf("args:\n%S", content->args); + current = current->next; + i++; + } + return (0); } int main(int ac, char **av) { + t_list **cmds; + if (ac == 1) return (1); - ft_parse_cmd(av[1]); + cmds = ft_parse_cmds(av[1]); + if (cmds == NULL) + return (1); + if (ft_cmds_excutor(cmds) == 1) + return (1); + ft_lstclear(cmds); return (1); } diff --git a/main.o b/main.o index 7a6a47d09539306f783b24e1fe08631a4626e7a2..babf8b86e3281d422b54ad5e1b898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#@?HLOuR{}|e$vc6h z#^j&E_M8E%kZ@F)>?mT+7%{n0#GbKY@=hR`F!?8t{4?27)SgL#WAZ{lvB?ueH5er( o?-aFX^qBk;NKTk+DQ3@jU~(mpjF`Mr%%1ax0K~Y{lN*KP0skf%-~a#s delta 689 zcmV;i0#5y?E}$-uC;_0cDLDgwU63(P0znXkXZCh)4?I9Eu(BY55~MVCRL~Gx3qm9k z0*RrbAvAQ>gqGhRKZJ_L-d|zM&fD8Nb&8#tx9@$oIZ{N1I3ZU!?&)8}Q8AYweBC{{ z#)*}!tj%J%a+@KDzIh-kSXleUu@_;vO6;}}(``YtAMU8gq-LDDrI)kIyV{{OT5LIQFTPU#=D0ghw5jY4{y$_ zWgONK*}a(Al%4@nyLY;Qt)2c(k2$12L%Q7z=>EIXgB~_ux&U%n+pI-BoNnV1>7Px=qcEcNktJz zc=6uM)3e`VIo`18a*wr`6CZG~ap;_dz(v zf0p<;@ijrskup}#*cbArP?6-gnjmY6M_dUd@e=0?4#hO3C$xaZvBbX8?c7e-siAW) zBWf?W0{k{^lF15;IhOv0xLA9!7n^BA9+_6>BitLo3Kp`mEr?zS@6hMQH2?nvQXn&P z00029bOy`|0nn2{62}1`lL-?y0oap46F&iHlYtXI0T`3P6F&hUlK~Vz2}lJ100000 z03nk}6gL4-lYtaJ0dSMS6h8r2lK~Y!0rZnW6+ZzGlYtdK0T7eH6+Zz$lK~b#0f>`9 X7C!;FlYtgL0Z@~{7C!;dlK~ee)H5s) diff --git a/syntatics.c b/syntatics.c index 475e244..ab9cc7d 100644 --- a/syntatics.c +++ b/syntatics.c @@ -1,7 +1,7 @@ #include "libftx/libftx.h" #include "minishell.h" -static int ft_quote_verif(char *str) +static int ft_quote_verif(const char *str) { if (ft_is_in_quote(str, ft_strlen(str))) { @@ -12,7 +12,7 @@ static int ft_quote_verif(char *str) return (0); } -static int ft_multipipe(char *str) +static int ft_multipipe(const char *str) { size_t i; size_t y; @@ -21,21 +21,36 @@ static int ft_multipipe(char *str) while (str[i] != '\0') { y = 0; - while (str[i + y] == '|' && ft_is_in_quote(str, i)) + while (str[i + y] == '|' && !ft_is_in_quote(str, i)) { - y++; - if (y > 1) + if (y > 0) { ft_eprintf("minishell: Multiple pipes is not supported\n"); return (1); } + y++; } i++; } return (0); } -int ft_syntatic_verif(char *str) +static int ft_pipe_is_alone(const char *str) { - return (ft_quote_verif(str) || ft_multipipe(str)); + size_t i; + + i = ft_strlen(str) - 1; + while (str[i] != '|' && i > 0) + { + if (str[i] != ' ') + return (0); + i--; + } + ft_eprintf("minishell: Pipe must be followed by a command or redirection\n"); + return (1); +} + +int ft_syntatic_verif(const char *str) +{ + return (ft_quote_verif(str) || ft_multipipe(str) || ft_pipe_is_alone(str)); } diff --git a/syntatics.o b/syntatics.o index e7a1364ebb8923d291825b39295f2c9c2af1f0ab..cf454fdd8ec54249cf38c6cece11c6f81d3ede86 100644 GIT binary patch delta 2294 zcmZWp3s{p?7~a{&w%`35yU4~A>=y$OP%fb(9=T`(ey9vc%L~f5OxWWtAR|ekaY>RW zVI46G=)p^AnMGP&E5XYnC~tVX>_Uy!Ra7$T`;eV&do78Y2jOdYk_Y%rMD z>9VQJm#GXY%WO1en6fGJT57E>TfbJ9Wzm~Wlb9eVDiTL{M!W2yhD#^fT3XJww6(Ih zH>rhNfhcITrn&X((od>ZfLZb4=Jksd7dxz9%BY$;5G2@6@xsE&>O%I%`p3`PLkO+m<21O|SDqL;RBjB_6>9#h zR&H6{a8h*3qaZ&~TJd4n_f1tQQhRsL^uXY5xRz$-~rCIZMqmaH}Ib_K_@&&y0YFo%K8V9p9;L^D*&> z5Hjx5H4C3lWBba&Gxr1xe;--6ozk9<86JLo7R9YEEG{n5^KE;ZL71Bvyr7Nx+_DuG z)u&!)*|oDi>j_$uF!1~76v>h?>7~r@-QI3yjV?TJ`LB2H+5Y)*$5)@7IDfFJ=m@wq z<&VCRqeXSyEjMe=w)xaXY?uV>y>t7~pinG~Mzm3>3xjl+4__41-o>%^6({=6!)s*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j;V@OvJn!T3|v5(4Ty`N{NBkQ*~KL% zp~-%N@;6OZ&?&_KY(o2Lj0#lP3a6gUJ`cY(YMI#`?*D qKyvovi9m9}c43%qm5*#^L4JS^?nzQ}X|ubh|T$7d_Ww}!0$scwHyCxRva^y9NOE128!qO$H{EgJjtGAg0-W$5Fy<7j?X2Y#1mv8*q ze}B{ZZ*v*=wjI2$|AXPD3g2x824K)_&SolQWo(-KkX>A|6XHGwE+EYY#J*5|-(*1! zamkfvvOA#sBa|zQ`eN_zO+VBPgE(8c8sdk3+?kH!tMa&cx_2IgFk6z(p0Rv#B%eLg zWR}SXxx^-K;L~87G5ID?_{3yMetX6XlOus7!{nJjl4J5setXUroDi!|PgdlX2LJ*u BzbF6z diff --git a/utils/ft_strnchr.c b/utils/ft_strnchr.c index 6654db9..d385f48 100644 --- a/utils/ft_strnchr.c +++ b/utils/ft_strnchr.c @@ -1,6 +1,6 @@ #include "utils.h" -ssize_t ft_strnchr(char *str, char c) +ssize_t ft_strnchr(const char *str, char c) { size_t i; diff --git a/utils/ft_strnchr.o b/utils/ft_strnchr.o index 4acfc36f7a932cffc51d19621d9e3735185fab2e..20694361da13be73beff66f38ae3513597f936df 100644 GIT binary patch delta 448 zcmaDM^FwBW2BXD9&3uv13=qHwr7PxCpP#tKp}uiKVs>li<|iECN^2Tkq&=I{aWu52 z_+G;qO+C$|0EUe-)Z7fzjWZg3XGt8Ic=EuBQ!Ck@r5F?xeQDUjz;O1gpf1onn3-J| zc9`}aF(3QgO#&#PML^mSJJr`Knj{NmD|?On*IRG-K$!h6Hl z=(PVN_8SdvuUx*fna!0!&$Ra(clr5s%iJsT8H+!N?bx><=I27yd5g+@;+ALMP2F0?B~M2Z3b9WJVr)MuEwWKyvluMj&~7@!qbjzBVEawCv5n0%1e So{58XG83O2W5HxcK6L=;vWr0g delta 421 zcmew%^Fn5V2BXGA&3utp3=qHwr7PxCADg(wp`LNc4U1iZpAtBy$vpIGkrjA*X3pdd z7Ttw>#f6@N%^}(zua9s%OJSRuXJFi-Jh^e=)L{NICleAF7)0~B2R(3r`dr6pC>XM$qAk_{MRgw%093~)Bp_YKm+`Nq5R2{53-3%E<}?Jg7TM5{>UcIxN)*0hxld%b_-_4nUf>A%o!ynPvkO~Y|6sV zsR<3M#>q1|Jw|&;m=bkKPhpTw2Z<_4MxZ382?H|+OgEDRs`m|`!LWG;;{q1R zMktR9NV5TPB$VGfxsXjgy+L|{24lfQ&HVcN3=qHwr7Py_K6~K6fl~)gFfNgp;n$X|vg}7; z4qX$QWsfAMCZ0W`&G;!o@<5XSSCWFVa0I6^cS}-AGe^_Z4TV>fI~~t7X(T_pa5%~K zvCOh5kA&DxdQIR~b2AVXS2bSYV8Q59$-`Eau#DYZjgMJbTfJrS!2=8orNw+NCu=dv z#|tv5@(FV@%S+1(G77N^h%+#-h%qqpS#eu)TXK5}Gcd5KFmQ9*aWiu;FtG6hnIJKC zJw|&;m?CvaPhpT=2Z<_41_llj24)VJZYGJ%n;EyVNH#(J%LSy_fH)G$@0{GoCN9~B zCVK+PpSgJ>+j}O)sgoCSnlpW1nS6`Wj#CvHbd8f0xy%_?OpfHTXWTJ)CXl=_`6iHj zFWCI=z#tD-ndF&YvOr8lOCrrM{W6$)1 ad9oC*9pi<`k-YYtE7&2{ADjG;LmmK4`fm#W diff --git a/utils/ft_strreplace.c b/utils/ft_strreplace.c index 8a2a2ba..cfe92bf 100644 --- a/utils/ft_strreplace.c +++ b/utils/ft_strreplace.c @@ -1,11 +1,12 @@ #include "utils.h" -char *ft_strreplace(char *str, char *fill, size_t start, size_t stop) +char *ft_strreplace(char *str, const char *fill, size_t start, size_t stop) { char *out; size_t sum; - out = malloc((ft_strlen(str) + ft_strlen(fill) - (stop - start) + 1 * sizeof(char))); + out = malloc((ft_strlen(str) + ft_strlen(fill) - (stop - start) + 1 + * sizeof(char))); if (out == NULL) return (NULL); ft_strncpy(out, str, start); diff --git a/utils/ft_strreplace.o b/utils/ft_strreplace.o index 3dbc0902aa2da096c761278fad2152c08758d378..ea3e08c9f88518dfaddb1085131b18079f36939b 100644 GIT binary patch delta 274 zcmeyN{6l%eS;l$+#=Y~!hlMi03@kFa&IYc8p-S);ngOmWKxvn!jQPM>D5p~xYGZG-6a zXGRV(XH5*78W|bRxk~M1U|?VbVi33vp}_pfK1^ps)*=ajm=$xPPfpfhcC$9t4%gJa zT+>$)#;E3-7`82TjaGK#%(9K23|4Y(E_$0ZRWC7BH!)N%@#&V-)GujC%)8hax?b|D t1I^gHmiaZS