From 301d2ba5fb863edf44cfff46375242b084234dee Mon Sep 17 00:00:00 2001 From: Hugo LAMY Date: Tue, 16 Apr 2019 15:35:16 +0200 Subject: [PATCH 1/4] prepare pour merge --- .add_to_list.c.swo | Bin 16384 -> 0 bytes .parse_input.c.swp | Bin 12288 -> 0 bytes Makefile | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 .add_to_list.c.swo delete mode 100644 .parse_input.c.swp diff --git a/.add_to_list.c.swo b/.add_to_list.c.swo deleted file mode 100644 index 9f660c7cc2a11df580fae01ff28b461884fd6d9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI2ON<;x8OO^euLhh1d_g&&+8yDYo!Qx)myI&^E|G&Q5d}^xlC?XmYI|ySYPY9* z=&spEoQH%kPaz~w!~t=N;KBh!3?j(6CO85mLIjBekq{hm1#y7`;{R23_w{qq*E}F8AZ((>`wvuJogEtdI0Tv{FC2)mK5F^or>9wsf==s6;RO$D43hoB~dP zyH?;7Yc(5n%3hkE}yu+b2`k z57PaKnf?3HrQQ@FzI*7Pt;x0UB(BOW+gW0%(B`fq#08{R;dXTmvtI zpMX8E3Oe8+a6h;Y{O%#fehc0JH^48!kHGiAx4>7xdGIiJ0Q~Dg#(oN}g6Dt+3*a9Q zF!opQF8Cf80ttMu4Yt5Xz+3k-_8ag`@C+D$r@(3OD0t&O#$E@nf$xGB!PmjpfDfJk zkAc5q0_Jt_BKRu!GPnx92rhyX;5ypy74R%L0*Bxd_#|k7CZKjc0VbQL`n)_>*258B z>OMn?T|1ql|hG3MoIJUV%vU12KJo>%yUqwEhv%qx}T3u6(> zC7$QNIr_u{Rw^s3QsH_aL#{OUQC7m~TM+XJ2-lH0pzFLRwBS+S{7!T{_VqZH$V~Y~ z*yF>fr}|1JCV>i-RwCe|2tLV}3^mNcgryt$kBekF8V?Sb2e2gOND$kRbPd@twf7hZ=o@^WZ27HI|IAq8+OQEMuW@- z6;3U}zcx}akAkRzw0S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;ny3Ki1I7Z?5#Pbcie{$jQ;GPUYAS?|gg_v~URrUWyu&3dcn kVOLwD2tq~7B_yHsNlbqhFPS=GuF)*;T3f{#QVP?512Vn!fdBvi diff --git a/.parse_input.c.swp b/.parse_input.c.swp deleted file mode 100644 index 811fc0bd5791b464a157103f3d635146eafbe829..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2&u`pB6vw9sCsos-OZ0`0EZru7RJyRq!MD2D}H} z1_Q7LX265sX7KCngnSDwgG=CD@D_Lz2#|nv@B(-aIN)J$FSrH#ZV>VtxCX9*AHY}O zbMQWR2ZZ1m@DTX(HbQ;^SHNfBGWY~6fjQuUL*N1M2ekScd;vZJ9|EP{KFq%kSu3Cw z&yK~t6px|*ee!P@V3dC-G7LI~nWuqcBoD&j0f zS4v0W%I?rt0m8KB^N2BG*k-PX!7WQJx(HSsAjAUc!UCOIj;0W-;deT15x3C_X4|%7NE6=;M zhD8PawsMibmlpnHD7IZD>)Gc|oIc|%M@5cCQ>xaIGmj-;1 zDxd2gla1zb)hxp#tF-nZuWAevT1F?6r7~=q+Y2C1m{Ju9L$#yWpU$E{@HnEP=L@RR zi!#RPT~u?_p*XionIH62;pWxBBN&7{>a&ijUV@q>RUQRlhLW!22Y(yA3c&!j;$B@8 z@xtLAUZumuK?k1_9gnt}&b-}pZRb(y%zCXk&vEF=Ce4pGk4;>yR`GcZLRVytxd zr25zycQ{KO*K^^}l@2%7{ODpF@sZ1_B|XyOHta7Q4m)2U0WrV;GUr)PP&VbREM hrNiC%*kR>)rAxHrh4KI7aEE{Om^<97Izdgt;ooqXO_Bfr diff --git a/Makefile b/Makefile index a11ddf9..75a2745 100644 --- a/Makefile +++ b/Makefile @@ -6,14 +6,14 @@ # By: vmanzoni +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2019/03/01 13:24:35 by vmanzoni #+# #+# # -# Updated: 2019/04/16 14:05:39 by hulamy ### ########.fr # +# Updated: 2019/04/16 15:35:04 by hulamy ### ########.fr # # # # **************************************************************************** # NAME = fillit -OBJ_DIR = ./ -HEADER = ./ +OBJ_DIR = objs./ +HEADER = includes./ SRCS = *.c OBJS = $(SRCS:.c=.o) From 67ec57fd3d3c2de76235badc743596637c14f4f2 Mon Sep 17 00:00:00 2001 From: Manzovince Date: Tue, 16 Apr 2019 16:26:17 +0200 Subject: [PATCH 2/4] parse_input little edit (printf() deleted) --- parse_input.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/parse_input.c b/parse_input.c index 122a202..089af3d 100644 --- a/parse_input.c +++ b/parse_input.c @@ -6,7 +6,7 @@ /* By: vmanzoni +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/04/15 14:48:14 by vmanzoni #+# #+# */ -/* Updated: 2019/04/16 15:28:11 by hulamy ### ########.fr */ +/* Updated: 2019/04/16 16:19:55 by vmanzoni ### ########.fr */ /* */ /* ************************************************************************** */ @@ -34,7 +34,6 @@ char **create_square(char *tetri) square[i][k] = *(tetri++); while (*tetri == '\n') tetri++; - // printf("%s\n", square[i]); i++; } return (square); @@ -55,7 +54,6 @@ void parse_input(char *input) while (j < 19) tetri[j++] = input[i++]; tetri[19] = '\0'; - //printf("PRINT:\n%s\n", tetri); if (check_tetri_errors(tetri)) print_error("Error: Tetrimino not valid."); test = create_square(tetri); From 7dfe29b2248063c7552970b0590980d48173540b Mon Sep 17 00:00:00 2001 From: Manzovince Date: Tue, 16 Apr 2019 16:39:37 +0200 Subject: [PATCH 3/4] Makefile cleaned (comments deleted + all aligned) --- Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 75a2745..ccb26ed 100644 --- a/Makefile +++ b/Makefile @@ -6,32 +6,30 @@ # By: vmanzoni +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2019/03/01 13:24:35 by vmanzoni #+# #+# # -# Updated: 2019/04/16 15:35:04 by hulamy ### ########.fr # +# Updated: 2019/04/16 16:39:00 by vmanzoni ### ########.fr # # # # **************************************************************************** # NAME = fillit OBJ_DIR = objs./ -HEADER = includes./ +HEADER = fillit.h SRCS = *.c OBJS = $(SRCS:.c=.o) -LIB = fillit.h +LIB = libft/ -CC = gcc +CC = gcc CFLAGS = -Wall -Werror -Wextra -RM = rm -rf +RM = rm -rf all: $(NAME) $(NAME): make -C libft/ $(CC) $(CFLAGS) -I$(HEADER) -c $(SRCS) - $(CC) -o $(NAME) $(OBJS) -L libft/ -lft - #$(CC) $(CFLAGS) -I$(HEADER) -c $(addprefix $(SRC_DIR), $(SRCS)) - #$(CC) $(OBJS) -o $(NAME) + $(CC) -o $(NAME) $(OBJS) -L $(LIB) -lft mkdir $(OBJ_DIR) mv $(OBJS) $(OBJ_DIR) From de86161fcd3114004419b80a1a999a75a88e91ff Mon Sep 17 00:00:00 2001 From: Manzovince Date: Tue, 16 Apr 2019 16:42:19 +0200 Subject: [PATCH 4/4] Comments Updated (no change in the code) --- main.c | 4 +--- print_fillit.c | 7 +------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index c87f7f1..d7dfc4b 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: vmanzoni +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/02/12 13:20:48 by vmanzoni #+# #+# */ -/* Updated: 2019/04/15 20:54:24 by vmanzoni ### ########.fr */ +/* Updated: 2019/04/16 16:41:28 by vmanzoni ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,12 +24,10 @@ int main(int argc, char **argv) print_error("Error: Invalid file.\n"); parse_input(input); /* - Transform input to tetriminos Backtracking for smallest square Transform tetriminos with letters Print result */ - //print_test(input); } else print_error("Usage: Please submit a file.\n"); diff --git a/print_fillit.c b/print_fillit.c index adc26c4..cf906a5 100644 --- a/print_fillit.c +++ b/print_fillit.c @@ -6,7 +6,7 @@ /* By: vmanzoni +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/01 13:35:48 by vmanzoni #+# #+# */ -/* Updated: 2019/04/15 00:11:22 by hulamy ### ########.fr */ +/* Updated: 2019/04/16 16:41:46 by vmanzoni ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,8 +18,3 @@ void ft_print_fillit() } */ - -void print_test(char *test) -{ - write(1, test, strlen(test)); -}