-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30fc9b2
commit ca45b30
Showing
69 changed files
with
1,260 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,25 @@ | ||
SRC = ./ft_bzero.c ft_isalnum.c ft_isalpha.c \ | ||
ft_isdigit.c ft_isprint.c ft_memcpy.c \ | ||
ft_memset.c ft_strlen.c ft_isascii.c \ | ||
ft_memmove.c ft_strlcpy.c ft_strlcat.c \ | ||
ft_toupper.c ft_tolower.c ft_strchr.c \ | ||
ft_strrchr.c ft_memchr.c ft_memcmp.c \ | ||
ft_strncmp.c ft_strnstr.c ft_atoi.c \ | ||
ft_calloc.c ft_strdup.c ft_substr.c \ | ||
ft_strjoin.c ft_strtrim.c ft_split.c \ | ||
ft_itoa.c ft_strmapi.c ft_striteri.c \ | ||
ft_putchar_fd.c ft_putstr_fd.c ft_putendl_fd.c \ | ||
ft_putnbr_fd.c \ | ||
NAME = libft.a | ||
|
||
FLAGS = -Wall -Wextra -Werror | ||
|
||
BONUS_SRC = ft_lstnew.c ft_lstadd_front.c \ | ||
ft_lstsize.c ft_lstlast.c \ | ||
ft_lstadd_back.c ft_lstdelone.c \ | ||
ft_lstclear.c ft_lstiter.c \ | ||
ft_lstmap.c \ | ||
|
||
|
||
H_SRC = libft.h | ||
|
||
OBJS = ${SRC:.c=.o} | ||
|
||
BONUS_OBJS = ${BONUS_SRC:.c=.o} | ||
|
||
NAME = libft.a | ||
|
||
FLAGS = -Wall -Wextra -Werror | ||
|
||
RM = rm -f | ||
RM = rm -f | ||
|
||
.c.o: | ||
cc ${FLAGS} -c $< -o ${<:.c=.o} | ||
cc ${FLAGS} -c $< -o ${<:.c=.o} -I. | ||
|
||
$(NAME): ${OBJS} ${H_SRC} | ||
ar -rcs $@ $^ | ||
|
||
all: ${NAME} | ||
make -C ./printf | ||
mv ./printf/libftprintf.a ./$(NAME) | ||
|
||
bonus: ${BONUS_OBJS} ${H_SRC} | ||
ar -rsc ${NAME} $^ | ||
all: ${NAME} | ||
|
||
clean: | ||
${RM} ${OBJS} ${BONUS_OBJS} | ||
${RM} ${OBJS} | ||
make clean -C ./printf | ||
|
||
fclean: clean | ||
${RM} ${NAME} | ||
fclean: clean | ||
${RM} ${NAME} | ||
|
||
re: fclean all | ||
re: fclean all | ||
|
||
.PHONY: all clean fclean re bonus | ||
.PHONY: all clean fclean re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
SRC_1 = ft_bzero.c ft_isalnum.c ft_isalpha.c \ | ||
ft_isdigit.c ft_isprint.c ft_memcpy.c \ | ||
ft_memset.c ft_strlen.c ft_isascii.c \ | ||
ft_memmove.c ft_strlcpy.c ft_strlcat.c \ | ||
ft_toupper.c ft_tolower.c ft_strchr.c \ | ||
ft_strrchr.c ft_memchr.c ft_memcmp.c \ | ||
ft_strncmp.c ft_strnstr.c ft_atoi.c \ | ||
ft_calloc.c ft_strdup.c | ||
|
||
SRC_2 = ft_substr.c ft_putnbr_fd.c \ | ||
ft_strjoin.c ft_strtrim.c ft_split.c \ | ||
ft_itoa.c ft_strmapi.c ft_striteri.c \ | ||
ft_putchar_fd.c ft_putstr_fd.c ft_putendl_fd.c | ||
|
||
BONUS_SRC = ft_lstnew.c ft_lstadd_front.c \ | ||
ft_lstsize.c ft_lstlast.c \ | ||
ft_lstadd_back.c ft_lstdelone.c \ | ||
ft_lstclear.c ft_lstiter.c ft_lstmap.c | ||
|
||
|
||
|
||
H_SRC = libft.h | ||
|
||
OBJS = $(addprefix ./part_1/, ${SRC_1:.c=.o}) \ | ||
$(addprefix ./part_2/, ${SRC_2:.c=.o}) | ||
|
||
BONUS_OBJS = $(addprefix ./bonus/, ${BONUS_SRC:.c=.o}) | ||
|
||
NAME = libft.a | ||
|
||
FLAGS = -Wall -Wextra -Werror | ||
|
||
RM = rm -f | ||
|
||
.c.o: | ||
cc ${FLAGS} -c $< -o ${<:.c=.o} | ||
|
||
$(NAME): ${OBJS} ${H_SRC} | ||
ar -rcs $@ $^ | ||
|
||
all: ${NAME} | ||
|
||
bonus: ${BONUS_OBJS} ${H_SRC} | ||
ar -rsc ${NAME} $^ | ||
|
||
clean: | ||
${RM} ${OBJS} ${BONUS_OBJS} | ||
|
||
fclean: clean | ||
${RM} ${NAME} | ||
|
||
re: fclean all | ||
|
||
.PHONY: all clean fclean re bonus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/07 03:32:45 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/07 03:32:50 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:03:47 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
void ft_lstadd_back(t_list **lst, t_list *new) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/07 01:55:19 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/07 01:55:21 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:03:55 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
void ft_lstadd_front(t_list **lst, t_list *new) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/07 22:56:03 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/08 01:48:55 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:03:57 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
void ft_lstclear(t_list **lst, void (*del)(void*)) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/07 04:27:07 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/07 04:27:14 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:03:59 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
void ft_lstdelone(t_list *lst, void (*del)(void*)) | ||
{ | ||
|
@@ -19,3 +19,6 @@ void ft_lstdelone(t_list *lst, void (*del)(void*)) | |
del(lst->content); | ||
free(lst); | ||
} | ||
|
||
|
||
// 1 // 2 // // 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/08 02:53:29 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/08 02:53:35 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:01 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
void ft_lstiter(t_list *lst, void (*f)(void *)) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/07 02:56:19 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/07 02:58:06 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:03 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
t_list *ft_lstlast(t_list *lst) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/08 03:12:04 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/08 17:48:43 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:04 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *)) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/07 00:13:11 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/07 00:13:15 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:06 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
t_list *ft_lstnew(void *content) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/07 02:45:28 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/08 17:44:23 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:09 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
int ft_lstsize(t_list *lst) | ||
{ | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/01 18:10:33 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/01 19:52:52 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:17 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
int ft_atoi(const char *nptr) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/05/27 01:02:51 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/02 01:53:18 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:19 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
void ft_bzero(void *dest, size_t n) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/06/02 01:06:29 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/03 01:52:57 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:21 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
void *ft_calloc(size_t nmemb, size_t size) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/05/27 01:03:12 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/01 17:58:51 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:22 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
int ft_isalnum(int c) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/05/27 01:03:23 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/01 17:53:08 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:24 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
int ft_isalpha(int c) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/05/27 22:14:21 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/01 17:59:33 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:46 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "../libft.h" | ||
int ft_isascii(int c) | ||
{ | ||
return (c >= 0 && c <= 127); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/05/27 01:03:31 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/01 18:01:20 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:34 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
int ft_isdigit(int c) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ | |
/* By: ralves-b <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2022/05/27 01:03:39 by ralves-b #+# #+# */ | ||
/* Updated: 2022/06/01 18:08:22 by ralves-b ### ########.fr */ | ||
/* Updated: 2022/07/14 18:04:38 by ralves-b ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
#include "libft.h" | ||
#include "../libft.h" | ||
|
||
int ft_isprint(int c) | ||
{ | ||
|
Oops, something went wrong.