aboutsummaryrefslogtreecommitdiff
path: root/test_mini/libft/include/libft_algo.h
diff options
context:
space:
mode:
authornass1pro <nass1pro@gmail.com>2020-06-09 19:48:34 +0200
committernass1pro <nass1pro@gmail.com>2020-06-13 11:31:00 +0200
commit579a26f5593039ffbbd1a81e45ecf0ef8797cb5d (patch)
treec5b6761db98e27d15bab3fb45ba9e0a646cf06e0 /test_mini/libft/include/libft_algo.h
parent9fabc25a980550afc6337fd729632462f2680daa (diff)
downloadminishell-579a26f5593039ffbbd1a81e45ecf0ef8797cb5d.tar.gz
minishell-579a26f5593039ffbbd1a81e45ecf0ef8797cb5d.tar.bz2
minishell-579a26f5593039ffbbd1a81e45ecf0ef8797cb5d.zip
add lexer
add single quote
Diffstat (limited to 'test_mini/libft/include/libft_algo.h')
-rw-r--r--test_mini/libft/include/libft_algo.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/test_mini/libft/include/libft_algo.h b/test_mini/libft/include/libft_algo.h
new file mode 100644
index 0000000..7223e7b
--- /dev/null
+++ b/test_mini/libft/include/libft_algo.h
@@ -0,0 +1,59 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_algo.h :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/01/19 07:22:57 by cacharle #+# #+# */
+/* Updated: 2020/02/10 05:58:26 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef LIBFT_ALGO_H
+# define LIBFT_ALGO_H
+
+# include <stdlib.h>
+# include <stddef.h>
+# include "libft_mem.h"
+# include "libft_types.h"
+
+typedef int (*t_ftcompar_func)(const void*, const void*);
+
+typedef struct
+{
+ int lo;
+ int hi;
+} t_ftrange;
+
+struct s_merge_sorted_arrays
+{
+ void *base;
+ void *left;
+ void *right;
+};
+
+typedef struct s_ft_search_const
+{
+ const void *key;
+ t_ftcompar_func compar;
+} t_ftsearch_const;
+
+t_ftbool 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);
+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,
+ int (*compar)(const void *, const void *));
+int ft_heapsort(void *base, size_t nel, size_t width,
+ int (*compar)(const void *, const void *));
+void ft_reverse(void *base, size_t nel, size_t width);
+void *ft_bsearch(const void *base, size_t nel, size_t width,
+ t_ftsearch_const *consts);
+void *ft_lfind(const void *base, size_t *nelp, size_t width,
+ t_ftsearch_const *consts);
+void *ft_lsearch(const void *base, size_t *nelp, size_t width,
+ t_ftsearch_const *consts);
+
+#endif