diff --git a/.add_to_list.c.swo b/.add_to_list.c.swo deleted file mode 100644 index 9f660c7..0000000 Binary files a/.add_to_list.c.swo and /dev/null differ diff --git a/.parse_input.c.swp b/.parse_input.c.swp deleted file mode 100644 index 811fc0b..0000000 Binary files a/.parse_input.c.swp and /dev/null differ diff --git a/Makefile b/Makefile index a11ddf9..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 14:05:39 by hulamy ### ########.fr # +# Updated: 2019/04/16 16:39:00 by vmanzoni ### ########.fr # # # # **************************************************************************** # NAME = fillit -OBJ_DIR = ./ -HEADER = ./ +OBJ_DIR = objs./ +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) 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/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); 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)); -}