aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-10-07 21:06:30 +0200
committerCharles <sircharlesaze@gmail.com>2019-10-07 21:06:30 +0200
commitc73c541621f0567c511bbcac4a0bf40e116c53d7 (patch)
tree3065c0f8f593e5c768cc0f29dc659d137a983dd4
parent8adeef1b50a3a819cf6525af94f1fbce62465a7e (diff)
downloadlibft-c73c541621f0567c511bbcac4a0bf40e116c53d7.tar.gz
libft-c73c541621f0567c511bbcac4a0bf40e116c53d7.tar.bz2
libft-c73c541621f0567c511bbcac4a0bf40e116c53d7.zip
WIP bonus list
-rw-r--r--Makefile2
-rw-r--r--ft_lstadd.c6
-rw-r--r--ft_lstdel.c6
-rw-r--r--ft_lstdelone.c6
-rw-r--r--ft_lstiter.c6
-rw-r--r--ft_lstmap.c6
-rw-r--r--ft_lstnew.c14
-rw-r--r--libft.en.pdfbin0 -> 1455686 bytes
8 files changed, 45 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f4f9f13..7051af4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CC = gcc
-CCFLAGS = -Wall -Wextra -Werror
+CCFLAGS = -Wall -Wextra -Werror -fPIC
NAME = libft.a
SRC = ft_atoi.c ft_bzero.c ft_isalnum.c ft_isalpha.c ft_isascii.c ft_isdigit.c ft_isprint.c \
diff --git a/ft_lstadd.c b/ft_lstadd.c
new file mode 100644
index 0000000..549b670
--- /dev/null
+++ b/ft_lstadd.c
@@ -0,0 +1,6 @@
+#include "libft.h"
+
+void ft_lstadd(t_list **alst, t_list *new)
+{
+
+}
diff --git a/ft_lstdel.c b/ft_lstdel.c
new file mode 100644
index 0000000..881a7b2
--- /dev/null
+++ b/ft_lstdel.c
@@ -0,0 +1,6 @@
+#include "libft.h"
+
+void ft_lstdel(t_list **alst, void (*del)(void *, size_t))
+{
+
+}
diff --git a/ft_lstdelone.c b/ft_lstdelone.c
new file mode 100644
index 0000000..bf5f61e
--- /dev/null
+++ b/ft_lstdelone.c
@@ -0,0 +1,6 @@
+#include "libft.h"
+
+void ft_lstdelone(t_list **alst, void (*del)(void *, size_t))
+{
+
+}
diff --git a/ft_lstiter.c b/ft_lstiter.c
new file mode 100644
index 0000000..ef19bf8
--- /dev/null
+++ b/ft_lstiter.c
@@ -0,0 +1,6 @@
+#include "libft.h"
+
+void ft_lstiter(t_list *lst, void (*f)(t_list *elem))
+{
+
+}
diff --git a/ft_lstmap.c b/ft_lstmap.c
new file mode 100644
index 0000000..7c1a89b
--- /dev/null
+++ b/ft_lstmap.c
@@ -0,0 +1,6 @@
+#include "libft.h"
+
+t_list * ft_lstmap(t_list *lst, t_list *(*f)(t_list *elem))
+{
+
+}
diff --git a/ft_lstnew.c b/ft_lstnew.c
new file mode 100644
index 0000000..d4f53bc
--- /dev/null
+++ b/ft_lstnew.c
@@ -0,0 +1,14 @@
+#include <stdlib.h>
+#include "libft.h"
+
+t_list * ft_lstnew(void const *content, size_t content_size)
+{
+ t_list *elem;
+
+ if ((elem = (t_list*)malloc(sizeof(t_list))) == NULL)
+ return (NULL);
+ elem->content = (void*)content;
+ elem->content_size = content_size;
+ elem->next = NULL;
+ return (elem);
+}
diff --git a/libft.en.pdf b/libft.en.pdf
new file mode 100644
index 0000000..e5bee09
--- /dev/null
+++ b/libft.en.pdf
Binary files differ