2022-11-23 15:44:27 -05:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* ::: :::::::: */
|
|
|
|
/* pushswap.h :+: :+: :+: */
|
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
/* Created: 2022/11/08 18:19:44 by cchauvet #+# #+# */
|
2022-12-11 09:49:45 -05:00
|
|
|
/* Updated: 2022/12/11 15:08:16 by cchauvet ### ########.fr */
|
2022-11-23 15:44:27 -05:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#ifndef PUSHSWAP_H
|
|
|
|
# define PUSHSWAP_H
|
|
|
|
# include <unistd.h>
|
|
|
|
# include <stdlib.h>
|
|
|
|
# include <limits.h>
|
2022-12-09 13:13:15 -05:00
|
|
|
//# include <stdio.h>
|
2022-12-01 11:15:17 -05:00
|
|
|
# define STOP_VALUE 4294967295
|
2022-11-23 15:44:27 -05:00
|
|
|
|
|
|
|
int ft_isnum(char *str);
|
2022-12-06 11:35:45 -05:00
|
|
|
size_t ft_strlen(const char *s);
|
2022-11-23 15:44:27 -05:00
|
|
|
int ft_atoi(char *str);
|
|
|
|
void ft_putstr(char *str);
|
2022-12-11 09:49:45 -05:00
|
|
|
size_t ft_seglen(const char *s, char c);
|
2022-11-30 14:11:35 -05:00
|
|
|
char **ft_split(const char *s, char c);
|
2022-12-11 09:49:45 -05:00
|
|
|
void ft_cancel(char **str, size_t len);
|
2022-11-23 15:44:27 -05:00
|
|
|
|
2022-12-06 11:35:45 -05:00
|
|
|
void ft_sort(long int *tab, int size);
|
2022-11-23 15:44:27 -05:00
|
|
|
|
2022-12-06 11:35:45 -05:00
|
|
|
int ft_get_max_index(long int *tab, int size);
|
|
|
|
|
|
|
|
int ft_get_max(unsigned int *tab);
|
|
|
|
int ft_tablen(unsigned int *tab);
|
|
|
|
int ft_is_sorted(unsigned int *in);
|
|
|
|
unsigned int ft_bitlen(unsigned int nb);
|
2022-11-23 15:44:27 -05:00
|
|
|
|
2022-12-01 11:15:17 -05:00
|
|
|
void ft_radix_sort(unsigned int *tab_a, unsigned int *tab_b);
|
2022-12-09 09:22:02 -05:00
|
|
|
void ft_bozo_sort(unsigned int *tab_a, unsigned int *tab_b);
|
2022-12-01 11:15:17 -05:00
|
|
|
void ft_swap(unsigned int *a, unsigned int *b);
|
|
|
|
void ft_pa(unsigned int *tab_a, unsigned int *tab_b);
|
|
|
|
void ft_pb(unsigned int *tab_a, unsigned int *tab_b);
|
|
|
|
void ft_ra(unsigned int *tab_a);
|
|
|
|
void ft_rb(unsigned int *tab_b);
|
2022-12-09 13:13:15 -05:00
|
|
|
void ft_rra(unsigned int *tab_a);
|
|
|
|
void ft_rrb(unsigned int *tab_b);
|
|
|
|
void ft_sa(unsigned int *tab_a);
|
2022-11-29 08:06:22 -05:00
|
|
|
|
2022-12-06 11:35:45 -05:00
|
|
|
typedef unsigned int * t_tab;
|
2022-11-23 15:44:27 -05:00
|
|
|
#endif
|