diff --git a/.add_to_list.c.swp b/.add_to_list.c.swp deleted file mode 100644 index d2f047a..0000000 Binary files a/.add_to_list.c.swp and /dev/null differ diff --git a/.fillit.h.swp b/.fillit.h.swp deleted file mode 100644 index ed2f8e4..0000000 Binary files a/.fillit.h.swp and /dev/null differ diff --git a/a.out b/a.out index d80bc10..a55f7c0 100755 Binary files a/a.out and b/a.out differ diff --git a/a.out.dSYM/Contents/Info.plist b/a.out.dSYM/Contents/Info.plist new file mode 100644 index 0000000..3679a65 --- /dev/null +++ b/a.out.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.a.out + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/a.out.dSYM/Contents/Resources/DWARF/a.out b/a.out.dSYM/Contents/Resources/DWARF/a.out new file mode 100644 index 0000000..d7eab35 Binary files /dev/null and b/a.out.dSYM/Contents/Resources/DWARF/a.out differ diff --git a/add_to_list.c b/add_to_list.c index ed777f7..a67fe6b 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/15 16:06:37 by hulamy ### ########.fr */ +/* Updated: 2019/04/15 16:14:46 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ @@ -87,7 +87,7 @@ int fill_list(char **square, t_fillist *list) return (1); } -int push_to_end(t_fillist **list) +int add_to_list(char **square, t_fillist **list) { t_fillist *tmp; @@ -98,25 +98,18 @@ int push_to_end(t_fillist **list) else tmp->next = *list; *list = tmp; - return (1); -} - -int add_to_list(char **square, t_fillist **list) -{ - if (!(push_to_end(list))) - return (0); fill_list(square, *list); return (1); } int main(int ac, char **av) { - static t_fillist *list = NULL; + static t_fillist *list = NULL; // avant d'appeller add_to_list il faut declarer un pointeur static vers la structure int i; if (ac > 4) { - add_to_list(++av, &list); + add_to_list(++av, &list); // l'appel de la fonction se fait avec un carre valide de 4*4 et l'adresse du pointeur vers la liste if (ac == 9) add_to_list(av += 4, &list); while (list && (i = -1))