diff --git a/a.out b/a.out new file mode 100755 index 0000000..275fd4e Binary files /dev/null and b/a.out differ diff --git a/ft_atoi.o b/ft_atoi.o new file mode 100644 index 0000000..8e50cad Binary files /dev/null and b/ft_atoi.o differ diff --git a/ft_bitlen.o b/ft_bitlen.o new file mode 100644 index 0000000..ce994e6 Binary files /dev/null and b/ft_bitlen.o differ diff --git a/ft_get_max.o b/ft_get_max.o new file mode 100644 index 0000000..d627b3a Binary files /dev/null and b/ft_get_max.o differ diff --git a/ft_is_sorted.o b/ft_is_sorted.o new file mode 100644 index 0000000..5401bc8 Binary files /dev/null and b/ft_is_sorted.o differ diff --git a/ft_isnum.o b/ft_isnum.o new file mode 100644 index 0000000..194eec2 Binary files /dev/null and b/ft_isnum.o differ diff --git a/ft_p.c b/ft_p.c index 5344fbf..21416b2 100644 --- a/ft_p.c +++ b/ft_p.c @@ -6,7 +6,7 @@ /* By: cchauvet 0) + { + tab_dst[i] = tab_dst[i - 1]; + i--; + } + tab_dst[0] = tab_src[0]; + i = 0; + while (tab_src[i] != STOP_VALUE) + { + tab_src[i] = tab_src[i + 1]; + i++; + } } void ft_pb(unsigned int *tab_a, unsigned int *tab_b) diff --git a/ft_p.o b/ft_p.o new file mode 100644 index 0000000..ecaa99b Binary files /dev/null and b/ft_p.o differ diff --git a/ft_putstr.o b/ft_putstr.o new file mode 100644 index 0000000..0412ac9 Binary files /dev/null and b/ft_putstr.o differ diff --git a/ft_r.c b/ft_r.c index 816167f..9d236fe 100644 --- a/ft_r.c +++ b/ft_r.c @@ -6,7 +6,7 @@ /* By: cchauvet > i) & 1) == 1) + if (((tab_a[0] >> i) & 1) == 0) ft_pb(tab_a, tab_b); else ft_ra(tab_a); y--; + j = 0; + printf("tab_a:\n"); + while (tab_a[j] != STOP_VALUE) + printf("%d\n", tab_a[j++]); + j = 0; + printf("tab_b:\n"); + while (tab_b[j] != STOP_VALUE) + printf("%d\n", tab_b[j++]); } while (tab_b[0] != STOP_VALUE) ft_pa(tab_a, tab_b); i++; + j = 0; + printf("\n\nROUND[%d]\ntab_a:\n", i); + while (tab_a[j] != STOP_VALUE) + printf("%d\n", tab_a[j++]); } } diff --git a/ft_radix.o b/ft_radix.o new file mode 100644 index 0000000..82fc07a Binary files /dev/null and b/ft_radix.o differ diff --git a/ft_sort.o b/ft_sort.o new file mode 100644 index 0000000..d38c9ff Binary files /dev/null and b/ft_sort.o differ diff --git a/ft_swap.o b/ft_swap.o new file mode 100644 index 0000000..22b1580 Binary files /dev/null and b/ft_swap.o differ diff --git a/ft_tablen.o b/ft_tablen.o new file mode 100644 index 0000000..ddd152e Binary files /dev/null and b/ft_tablen.o differ diff --git a/main.o b/main.o new file mode 100644 index 0000000..8fd0a8f Binary files /dev/null and b/main.o differ diff --git a/push_swap b/push_swap new file mode 100755 index 0000000..ff90aa7 Binary files /dev/null and b/push_swap differ diff --git a/pushswap.h b/pushswap.h index 8ad7308..76b3dbb 100644 --- a/pushswap.h +++ b/pushswap.h @@ -6,7 +6,7 @@ /* By: cchauvet # include # include +# include # define STOP_VALUE 4294967295 int ft_isnum(char *str); diff --git a/test.c b/test.c new file mode 100644 index 0000000..790e7d2 --- /dev/null +++ b/test.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* test.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet