diff --git a/.Makefile.swp b/.Makefile.swp new file mode 100644 index 0000000..0cd9d81 Binary files /dev/null and b/.Makefile.swp differ diff --git a/.testresults.swp b/.testresults.swp new file mode 100644 index 0000000..d7db455 Binary files /dev/null and b/.testresults.swp differ diff --git a/Makefile b/Makefile index c4d58a6..12c5a9d 100644 --- a/Makefile +++ b/Makefile @@ -4,13 +4,14 @@ NAME = libft.a CC = gcc -VPATH = srcs/part1/ \ +VPATH = srcs/ \ + srcs/part1/ \ srcs/part2/ \ srcs/bonus/ \ srcs/add/ IDIR = . -_DEP = libft.h \ +_DEP = libft.h DEPS = $(_DEP:%.h=$(IDIR)/%.h) CFLAGS = -I$(IDIR) @@ -99,6 +100,7 @@ SRCB = ft_lstnew.c \ OBJB = $(SRCB:%.c=$(ODIR)/%.o) +ECHO = "\033[33mcompiling objetcs\033[0m" # - - - - - - - - - - - # # rules to execute # @@ -107,29 +109,31 @@ OBJB = $(SRCB:%.c=$(ODIR)/%.o) all: $(ODIR) $(NAME) -echo: - @echo "\033[33mcompiling objetcs\033[0m" - -echob: - @echo "\033[33mcompiling objetcs for bonus\033[0m" - $(ODIR): - @echo "\033[33mcreate $(ODIR)\033[0m" +# @echo "\033[33mcreate $(ODIR)\033[0m" + @echo "" mkdir -p $(ODIR) + ls + @echo "" + ls srcs/ + @echo "" -$(NAME): echo $(OBJS) $(DEPS) - @echo "\033[33mbuilding $(NAME)\033[0m" +$(NAME): $(OBJS) $(DEPS) +# @echo "\033[33mbuilding $(NAME)\033[0m" ar -rc $@ $(OBJS) @ranlib $@ -bonus: echob $(OBJB) - @echo "\033[33madding the bonus functions to $(NAME)\033[0m" +bonus: $(OBJB) +# @echo "\033[33madding the bonus functions to $(NAME)\033[0m" ar -rc $(NAME) $(OBJB) @ranlib $(NAME) $(ODIR)/%.o: %.c $(CC) $(CFLAGS) -c -o $@ $< +announce: + @echo $(ECHO) + clean: /bin/rm -rf $(ODIR) @@ -724,6 +728,11 @@ re: fclean all # creates the list of .o from the .c with addition of the # path directory "builds/main.o" # +# it could be : +# $(patsubst %.c,$(ODIR)/%.o,$(SRCS)) +# or : +# $(addprefix $(ODIR)/, $(SRCS:.c=.o)) +# # ----- # # $(NAME): $(OBJS) $(DEPS) diff --git a/builds/ft_any.o b/builds/ft_any.o deleted file mode 100644 index cce06cb..0000000 Binary files a/builds/ft_any.o and /dev/null differ diff --git a/builds/ft_arraymap.o b/builds/ft_arraymap.o deleted file mode 100644 index f9e4acc..0000000 Binary files a/builds/ft_arraymap.o and /dev/null differ diff --git a/builds/ft_atoi.o b/builds/ft_atoi.o deleted file mode 100644 index c26e19f..0000000 Binary files a/builds/ft_atoi.o and /dev/null differ diff --git a/builds/ft_atoibase.o b/builds/ft_atoibase.o deleted file mode 100644 index e35df50..0000000 Binary files a/builds/ft_atoibase.o and /dev/null differ diff --git a/builds/ft_bzero.o b/builds/ft_bzero.o deleted file mode 100644 index 4b3c30b..0000000 Binary files a/builds/ft_bzero.o and /dev/null differ diff --git a/builds/ft_calloc.o b/builds/ft_calloc.o deleted file mode 100644 index fbe429d..0000000 Binary files a/builds/ft_calloc.o and /dev/null differ diff --git a/builds/ft_convertbase.o b/builds/ft_convertbase.o deleted file mode 100644 index 61e5d56..0000000 Binary files a/builds/ft_convertbase.o and /dev/null differ diff --git a/builds/ft_foreach.o b/builds/ft_foreach.o deleted file mode 100644 index 2fc662c..0000000 Binary files a/builds/ft_foreach.o and /dev/null differ diff --git a/builds/ft_isalnum.o b/builds/ft_isalnum.o deleted file mode 100644 index 015b3b3..0000000 Binary files a/builds/ft_isalnum.o and /dev/null differ diff --git a/builds/ft_isalpha.o b/builds/ft_isalpha.o deleted file mode 100644 index d07172a..0000000 Binary files a/builds/ft_isalpha.o and /dev/null differ diff --git a/builds/ft_isascii.o b/builds/ft_isascii.o deleted file mode 100644 index ff18b21..0000000 Binary files a/builds/ft_isascii.o and /dev/null differ diff --git a/builds/ft_isdigit.o b/builds/ft_isdigit.o deleted file mode 100644 index d17bc22..0000000 Binary files a/builds/ft_isdigit.o and /dev/null differ diff --git a/builds/ft_isprint.o b/builds/ft_isprint.o deleted file mode 100644 index 9f1a66c..0000000 Binary files a/builds/ft_isprint.o and /dev/null differ diff --git a/builds/ft_issort.o b/builds/ft_issort.o deleted file mode 100644 index 7a83dba..0000000 Binary files a/builds/ft_issort.o and /dev/null differ diff --git a/builds/ft_itoa.o b/builds/ft_itoa.o deleted file mode 100644 index c5b1096..0000000 Binary files a/builds/ft_itoa.o and /dev/null differ diff --git a/builds/ft_lstadd_back.o b/builds/ft_lstadd_back.o deleted file mode 100644 index f02cdff..0000000 Binary files a/builds/ft_lstadd_back.o and /dev/null differ diff --git a/builds/ft_lstadd_front.o b/builds/ft_lstadd_front.o deleted file mode 100644 index 40f7f1e..0000000 Binary files a/builds/ft_lstadd_front.o and /dev/null differ diff --git a/builds/ft_lstclear.o b/builds/ft_lstclear.o deleted file mode 100644 index 76e23c1..0000000 Binary files a/builds/ft_lstclear.o and /dev/null differ diff --git a/builds/ft_lstdelone.o b/builds/ft_lstdelone.o deleted file mode 100644 index a1b3fdc..0000000 Binary files a/builds/ft_lstdelone.o and /dev/null differ diff --git a/builds/ft_lstiter.o b/builds/ft_lstiter.o deleted file mode 100644 index 04eb803..0000000 Binary files a/builds/ft_lstiter.o and /dev/null differ diff --git a/builds/ft_lstlast.o b/builds/ft_lstlast.o deleted file mode 100644 index b37fbb5..0000000 Binary files a/builds/ft_lstlast.o and /dev/null differ diff --git a/builds/ft_lstmap.o b/builds/ft_lstmap.o deleted file mode 100644 index c96eea9..0000000 Binary files a/builds/ft_lstmap.o and /dev/null differ diff --git a/builds/ft_lstnew.o b/builds/ft_lstnew.o deleted file mode 100644 index e828de6..0000000 Binary files a/builds/ft_lstnew.o and /dev/null differ diff --git a/builds/ft_lstsize.o b/builds/ft_lstsize.o deleted file mode 100644 index bc91468..0000000 Binary files a/builds/ft_lstsize.o and /dev/null differ diff --git a/builds/ft_memalloc.o b/builds/ft_memalloc.o deleted file mode 100644 index b32fe17..0000000 Binary files a/builds/ft_memalloc.o and /dev/null differ diff --git a/builds/ft_memccpy.o b/builds/ft_memccpy.o deleted file mode 100644 index 2a2ecfa..0000000 Binary files a/builds/ft_memccpy.o and /dev/null differ diff --git a/builds/ft_memchr.o b/builds/ft_memchr.o deleted file mode 100644 index ec95ddf..0000000 Binary files a/builds/ft_memchr.o and /dev/null differ diff --git a/builds/ft_memcmp.o b/builds/ft_memcmp.o deleted file mode 100644 index bb309e9..0000000 Binary files a/builds/ft_memcmp.o and /dev/null differ diff --git a/builds/ft_memcpy.o b/builds/ft_memcpy.o deleted file mode 100644 index e7dbbfd..0000000 Binary files a/builds/ft_memcpy.o and /dev/null differ diff --git a/builds/ft_memdel.o b/builds/ft_memdel.o deleted file mode 100644 index 32443ad..0000000 Binary files a/builds/ft_memdel.o and /dev/null differ diff --git a/builds/ft_memmove.o b/builds/ft_memmove.o deleted file mode 100644 index a3f516b..0000000 Binary files a/builds/ft_memmove.o and /dev/null differ diff --git a/builds/ft_memset.o b/builds/ft_memset.o deleted file mode 100644 index dc2776a..0000000 Binary files a/builds/ft_memset.o and /dev/null differ diff --git a/builds/ft_putchar.o b/builds/ft_putchar.o deleted file mode 100644 index 824021b..0000000 Binary files a/builds/ft_putchar.o and /dev/null differ diff --git a/builds/ft_putchar_fd.o b/builds/ft_putchar_fd.o deleted file mode 100644 index 11915f7..0000000 Binary files a/builds/ft_putchar_fd.o and /dev/null differ diff --git a/builds/ft_putendl.o b/builds/ft_putendl.o deleted file mode 100644 index 0b04594..0000000 Binary files a/builds/ft_putendl.o and /dev/null differ diff --git a/builds/ft_putendl_fd.o b/builds/ft_putendl_fd.o deleted file mode 100644 index 760260a..0000000 Binary files a/builds/ft_putendl_fd.o and /dev/null differ diff --git a/builds/ft_putnbr.o b/builds/ft_putnbr.o deleted file mode 100644 index ff7faf4..0000000 Binary files a/builds/ft_putnbr.o and /dev/null differ diff --git a/builds/ft_putnbr_fd.o b/builds/ft_putnbr_fd.o deleted file mode 100644 index 46a2cd7..0000000 Binary files a/builds/ft_putnbr_fd.o and /dev/null differ diff --git a/builds/ft_putnbrbase.o b/builds/ft_putnbrbase.o deleted file mode 100644 index 69fb613..0000000 Binary files a/builds/ft_putnbrbase.o and /dev/null differ diff --git a/builds/ft_putnbrendl.o b/builds/ft_putnbrendl.o deleted file mode 100644 index 8ece334..0000000 Binary files a/builds/ft_putnbrendl.o and /dev/null differ diff --git a/builds/ft_putnbrendl_fd.o b/builds/ft_putnbrendl_fd.o deleted file mode 100644 index 800357f..0000000 Binary files a/builds/ft_putnbrendl_fd.o and /dev/null differ diff --git a/builds/ft_putstr.o b/builds/ft_putstr.o deleted file mode 100644 index d8b8995..0000000 Binary files a/builds/ft_putstr.o and /dev/null differ diff --git a/builds/ft_putstr_fd.o b/builds/ft_putstr_fd.o deleted file mode 100644 index 9f3cfc6..0000000 Binary files a/builds/ft_putstr_fd.o and /dev/null differ diff --git a/builds/ft_split.o b/builds/ft_split.o deleted file mode 100644 index 4310474..0000000 Binary files a/builds/ft_split.o and /dev/null differ diff --git a/builds/ft_strcat.o b/builds/ft_strcat.o deleted file mode 100644 index 0ebe706..0000000 Binary files a/builds/ft_strcat.o and /dev/null differ diff --git a/builds/ft_strchr.o b/builds/ft_strchr.o deleted file mode 100644 index bac94b1..0000000 Binary files a/builds/ft_strchr.o and /dev/null differ diff --git a/builds/ft_strclr.o b/builds/ft_strclr.o deleted file mode 100644 index 328e998..0000000 Binary files a/builds/ft_strclr.o and /dev/null differ diff --git a/builds/ft_strcmp.o b/builds/ft_strcmp.o deleted file mode 100644 index b0e1b1c..0000000 Binary files a/builds/ft_strcmp.o and /dev/null differ diff --git a/builds/ft_strcpy.o b/builds/ft_strcpy.o deleted file mode 100644 index c134e33..0000000 Binary files a/builds/ft_strcpy.o and /dev/null differ diff --git a/builds/ft_strdel.o b/builds/ft_strdel.o deleted file mode 100644 index 338d2ac..0000000 Binary files a/builds/ft_strdel.o and /dev/null differ diff --git a/builds/ft_strdup.o b/builds/ft_strdup.o deleted file mode 100644 index 7ece743..0000000 Binary files a/builds/ft_strdup.o and /dev/null differ diff --git a/builds/ft_strequ.o b/builds/ft_strequ.o deleted file mode 100644 index 5b0cf3f..0000000 Binary files a/builds/ft_strequ.o and /dev/null differ diff --git a/builds/ft_striter.o b/builds/ft_striter.o deleted file mode 100644 index 0d61613..0000000 Binary files a/builds/ft_striter.o and /dev/null differ diff --git a/builds/ft_striteri.o b/builds/ft_striteri.o deleted file mode 100644 index 4d9a992..0000000 Binary files a/builds/ft_striteri.o and /dev/null differ diff --git a/builds/ft_strjoin.o b/builds/ft_strjoin.o deleted file mode 100644 index e6ab5e1..0000000 Binary files a/builds/ft_strjoin.o and /dev/null differ diff --git a/builds/ft_strjoinfree.o b/builds/ft_strjoinfree.o deleted file mode 100644 index 9df166b..0000000 Binary files a/builds/ft_strjoinfree.o and /dev/null differ diff --git a/builds/ft_strlcat.o b/builds/ft_strlcat.o deleted file mode 100644 index 0892cfa..0000000 Binary files a/builds/ft_strlcat.o and /dev/null differ diff --git a/builds/ft_strlcpy.o b/builds/ft_strlcpy.o deleted file mode 100644 index ebe1963..0000000 Binary files a/builds/ft_strlcpy.o and /dev/null differ diff --git a/builds/ft_strlen.o b/builds/ft_strlen.o deleted file mode 100644 index d29b8bc..0000000 Binary files a/builds/ft_strlen.o and /dev/null differ diff --git a/builds/ft_strmap.o b/builds/ft_strmap.o deleted file mode 100644 index 2cfdcb5..0000000 Binary files a/builds/ft_strmap.o and /dev/null differ diff --git a/builds/ft_strmapi.o b/builds/ft_strmapi.o deleted file mode 100644 index 9a3c744..0000000 Binary files a/builds/ft_strmapi.o and /dev/null differ diff --git a/builds/ft_strmultisplit.o b/builds/ft_strmultisplit.o deleted file mode 100644 index 9788fe4..0000000 Binary files a/builds/ft_strmultisplit.o and /dev/null differ diff --git a/builds/ft_strncat.o b/builds/ft_strncat.o deleted file mode 100644 index 5e48d00..0000000 Binary files a/builds/ft_strncat.o and /dev/null differ diff --git a/builds/ft_strncmp.o b/builds/ft_strncmp.o deleted file mode 100644 index 696b45f..0000000 Binary files a/builds/ft_strncmp.o and /dev/null differ diff --git a/builds/ft_strncpy.o b/builds/ft_strncpy.o deleted file mode 100644 index 05adfaa..0000000 Binary files a/builds/ft_strncpy.o and /dev/null differ diff --git a/builds/ft_strnequ.o b/builds/ft_strnequ.o deleted file mode 100644 index 1c3e4b1..0000000 Binary files a/builds/ft_strnequ.o and /dev/null differ diff --git a/builds/ft_strnew.o b/builds/ft_strnew.o deleted file mode 100644 index cfeef28..0000000 Binary files a/builds/ft_strnew.o and /dev/null differ diff --git a/builds/ft_strnstr.o b/builds/ft_strnstr.o deleted file mode 100644 index 30af5dd..0000000 Binary files a/builds/ft_strnstr.o and /dev/null differ diff --git a/builds/ft_strrchr.o b/builds/ft_strrchr.o deleted file mode 100644 index ffe58c9..0000000 Binary files a/builds/ft_strrchr.o and /dev/null differ diff --git a/builds/ft_strstr.o b/builds/ft_strstr.o deleted file mode 100644 index b018768..0000000 Binary files a/builds/ft_strstr.o and /dev/null differ diff --git a/builds/ft_strtrim.o b/builds/ft_strtrim.o deleted file mode 100644 index c95c666..0000000 Binary files a/builds/ft_strtrim.o and /dev/null differ diff --git a/builds/ft_substr.o b/builds/ft_substr.o deleted file mode 100644 index db0f886..0000000 Binary files a/builds/ft_substr.o and /dev/null differ diff --git a/builds/ft_tolower.o b/builds/ft_tolower.o deleted file mode 100644 index db4d757..0000000 Binary files a/builds/ft_tolower.o and /dev/null differ diff --git a/builds/ft_toupper.o b/builds/ft_toupper.o deleted file mode 100644 index f8150b5..0000000 Binary files a/builds/ft_toupper.o and /dev/null differ diff --git a/echo.txt b/echo.txt new file mode 100644 index 0000000..e69de29 diff --git a/libft.a b/libft.a deleted file mode 100644 index 1b5906c..0000000 Binary files a/libft.a and /dev/null differ diff --git a/libft.h b/libft.h index b2df1a6..c904365 100644 --- a/libft.h +++ b/libft.h @@ -6,7 +6,7 @@ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/25 14:45:53 by hulamy #+# #+# */ -/* Updated: 2019/11/25 17:11:09 by hulamy ### ########.fr */ +/* Updated: 2019/11/26 18:46:22 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part2/ft_split.c b/srcs/part2/ft_split.c index 0c7111c..b0bfe9b 100644 --- a/srcs/part2/ft_split.c +++ b/srcs/part2/ft_split.c @@ -6,7 +6,7 @@ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/25 14:00:13 by hulamy #+# #+# */ -/* Updated: 2019/11/25 15:54:07 by hulamy ### ########.fr */ +/* Updated: 2019/11/26 16:18:35 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/srcs/part2/ft_substr.c b/srcs/part2/ft_substr.c index 16ebb54..feb16ff 100644 --- a/srcs/part2/ft_substr.c +++ b/srcs/part2/ft_substr.c @@ -6,7 +6,7 @@ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/25 14:01:58 by hulamy #+# #+# */ -/* Updated: 2019/11/25 14:19:11 by hulamy ### ########.fr */ +/* Updated: 2019/11/26 16:18:25 by hulamy ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/testresults b/testresults new file mode 100644 index 0000000..c7633aa --- /dev/null +++ b/testresults @@ -0,0 +1,15 @@ +memcpy: + does not behave well with null as both params with size +memmove: + does not work well with null as both parameters and size +calloc: + does not work with 0 size +lstlast: + does not work with basic input +lstclear: + does not free the list + does not work with basic input +lstiter: + does not work with basic input +lstmap: + does not work with basic input