aboutsummaryrefslogtreecommitdiff
path: root/include/libft_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libft_def.h')
-rw-r--r--include/libft_def.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/libft_def.h b/include/libft_def.h
new file mode 100644
index 0000000..fa8d550
--- /dev/null
+++ b/include/libft_def.h
@@ -0,0 +1,57 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* libft_def.h :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/01/31 10:36:56 by cacharle #+# #+# */
+/* Updated: 2020/05/09 12:31:09 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+/*
+** \file libft_def.h
+** \brief Type and constant definition
+*/
+
+#ifndef LIBFT_DEF_H
+# define LIBFT_DEF_H
+
+# include <stddef.h>
+# include <stdint.h>
+# include <stdbool.h>
+
+# define TRUE 1
+# define FALSE 0
+
+typedef unsigned char t_ftbyte;
+typedef int t_ftbool;
+typedef unsigned int t_ftsize;
+
+typedef char t_ftchar;
+typedef unsigned char t_ftuchar;
+typedef int t_ftint;
+typedef unsigned int t_ftuint;
+typedef long int t_ftlong;
+typedef unsigned long int t_ftulong;
+
+/*
+** \brief Standard delete function
+** \param x Resource to delete
+*/
+
+typedef void (*t_ftdel_func)(void *x);
+
+/*
+** \brief Standard comparison function
+** \param x1 Resource 1
+** \param x2 Resource 2
+** \return negative number if x1 < x2,
+** 0 if x1 == x2,
+** positive number if x1 > x2
+*/
+
+typedef int (*t_ftcompar_func)(const void *x1, const void *x2);
+
+#endif