diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/libft_algo.h | 4 | ||||
| -rw-r--r-- | include/libft_str.h | 10 | ||||
| -rw-r--r-- | include/libft_vec.h | 7 |
3 files changed, 17 insertions, 4 deletions
diff --git a/include/libft_algo.h b/include/libft_algo.h index 04191e6..e726d1f 100644 --- a/include/libft_algo.h +++ b/include/libft_algo.h @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/19 07:22:57 by cacharle #+# #+# */ -/* Updated: 2020/04/03 07:05:04 by charles ### ########.fr */ +/* Updated: 2020/04/04 15:46:10 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,7 @@ # include <stdlib.h> # include "libft_mem.h" # include "libft_def.h" +# include "libft_str.h" typedef struct { @@ -39,6 +40,7 @@ typedef struct s_ft_search_const bool ft_is_set(void *base, size_t nel, size_t width, t_ftcompar_func compar); int ft_compar_int(const void *a, const void *b); +int ft_compar_str(const void *s1_p, const void *s2_p); void ft_qsort(void *base, size_t nel, size_t width, t_ftcompar_func compar); int ft_mergesort(void *base, size_t nel, size_t width, diff --git a/include/libft_str.h b/include/libft_str.h index 1b0703f..2b105bf 100644 --- a/include/libft_str.h +++ b/include/libft_str.h @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/31 10:39:22 by cacharle #+# #+# */ -/* Updated: 2020/04/02 23:45:42 by charles ### ########.fr */ +/* Updated: 2020/04/04 14:41:46 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,7 @@ # include <stddef.h> # include <stdbool.h> # include "libft_ctype.h" +# include "libft_util.h" typedef enum { @@ -82,6 +83,13 @@ char *ft_strtoupper(char *s); bool ft_fnmatch(const char *pattern, const char *string); /* +** NULL terminated string array +*/ + +char *ft_strsjoin(char **strs, char *delim); +char *ft_strsjoinf(char **strs, char *delim); + +/* ** bloat ? */ diff --git a/include/libft_vec.h b/include/libft_vec.h index c4e3e22..8424bd5 100644 --- a/include/libft_vec.h +++ b/include/libft_vec.h @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/01 18:57:16 by charles #+# #+# */ -/* Updated: 2020/04/02 11:00:57 by charles ### ########.fr */ +/* Updated: 2020/04/04 15:55:29 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -19,8 +19,9 @@ */ # include <stdlib.h> -# include <stddef.h> +# include "libft_def.h" # include "libft_mem.h" +# include "libft_algo.h" /* ** \brief Vector struct @@ -40,9 +41,11 @@ t_ftvec *ft_vecnew(size_t capacity); void ft_vecdestroy(t_ftvec *vec, void (*del)(void *elem)); t_ftvec *ft_vecgrow(t_ftvec *vec); t_ftvec *ft_vecpush(t_ftvec *vec, void *pushed); +t_ftvec *ft_vecpush_safe(t_ftvec *vec, void *pushed); void ft_vecpop(t_ftvec *vec, void (*del)(void *elem)); void ft_veciter(t_ftvec *vec, void (*f)(void *elem)); void ft_vecremove(t_ftvec *vec, size_t i, void (*del)(void *elem)); t_ftvec *ft_vecinsert(t_ftvec *vec, size_t i, void *elem); +void ft_vecsort(t_ftvec *vec, t_ftcompar_func cmp); #endif |
