merging to push test bits

This commit is contained in:
Hugo LAMY
2019-04-18 10:55:16 +02:00
6 changed files with 10 additions and 21 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -6,32 +6,30 @@
# By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# 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)

4
main.c
View File

@@ -6,7 +6,7 @@
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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");

View File

@@ -6,7 +6,7 @@
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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);

View File

@@ -6,7 +6,7 @@
/* By: vmanzoni <vmanzoni@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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));
}