diff --git a/Makefile b/Makefile index 6a9955a..acf29e3 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: vmanzoni +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2019/03/01 13:24:35 by vmanzoni #+# #+# # -# Updated: 2019/04/23 15:16:05 by vmanzoni ### ########.fr # +# Updated: 2019/04/24 13:49:48 by hulamy ### ########.fr # # # # **************************************************************************** # diff --git a/add_to_list.c b/add_to_list.c index e2b6d80..add0b91 100644 --- a/add_to_list.c +++ b/add_to_list.c @@ -6,7 +6,7 @@ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/04/14 15:20:53 by hulamy #+# #+# */ -/* Updated: 2019/04/24 13:38:22 by hulamy ### ########.fr */ +/* Updated: 2019/04/24 13:45:53 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ @@ -33,7 +33,7 @@ ** then it fills it and its reverse into the list */ -int fill_list(char line[], t_fillist *list) +void fill_list(char line[], t_fillist *list) { unsigned short tmp; int i; @@ -57,7 +57,6 @@ int fill_list(char line[], t_fillist *list) list->tibirtet |= 1; tmp >>= 1; } - return (0); } /* diff --git a/fillit.h b/fillit.h index a290191..247b5c6 100644 --- a/fillit.h +++ b/fillit.h @@ -6,7 +6,7 @@ /* By: vmanzoni +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/03/01 13:34:46 by vmanzoni #+# #+# */ -/* Updated: 2019/04/24 13:02:34 by hulamy ### ########.fr */ +/* Updated: 2019/04/24 13:46:32 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ @@ -44,6 +44,5 @@ int check_file_errors(char *file); int check_tetri_errors(char *tetri); int check_tetri_errors_proxy(char *tetri); int add_to_list(char *square, t_fillist **list); -int fill_list(char *line, t_fillist *list); #endif diff --git a/parse_input.c b/parse_input.c index 6b4a268..c98c57b 100644 --- a/parse_input.c +++ b/parse_input.c @@ -6,23 +6,28 @@ /* By: vmanzoni +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/04/15 14:48:14 by vmanzoni #+# #+# */ -/* Updated: 2019/04/24 12:52:26 by hulamy ### ########.fr */ +/* Updated: 2019/04/24 13:48:21 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ #include "fillit.h" -void print_short(short octet) -{ - unsigned int i; +/* +** DELETE BEFORE EVAL +** Function that print a short in bites +*/ - i = 1 << 15; - while (i) - { - (octet & i) ? printf("1") : printf("0"); - i >>= 1; - } -} +//void print_short(short octet) +//{ +// unsigned int i; +// +// i = 1 << 15; +// while (i) +// { +// (octet & i) ? printf("1") : printf("0"); +// i >>= 1; +// } +//} /* ** Function that parse a file and put each tetrimino in a linked list @@ -36,7 +41,7 @@ void parse_input(char *input) int j; i = 0; - printf("%s", input); +// printf("%s", input); while (input[i]) { j = 0; @@ -46,20 +51,20 @@ void parse_input(char *input) if (check_tetri_errors(tetri)) print_error("Error: Tetrimino not valid."); add_to_list(tetri, &list); - printf("added to list !!\n"); +// printf("added to list !!\n"); while (input[i] && input[i] != '.' && input[i] != '#') i++; } /* DEBUG PART - Print each tetribit*/ - while (list != NULL) - { - printf("%i\n", list->tetribit); - print_short(list->tetribit); - printf("\n"); - print_short(list->tibirtet); - printf("\n"); - list = list->next; - } +// while (list != NULL) +// { +// printf("%i\n", list->tetribit); +// print_short(list->tetribit); +// printf("\n"); +// print_short(list->tibirtet); +// printf("\n"); +// list = list->next; +// } } /*