-m
This commit is contained in:
@ -45,9 +45,8 @@ SRCS = ft_isalpha.c \
|
||||
ft_putchar_fd.c \
|
||||
ft_putstr_fd.c \
|
||||
ft_putendl_fd.c \
|
||||
ft_putnbr_fd.c
|
||||
|
||||
BSRCS = ft_lstnew.c \
|
||||
ft_putnbr_fd.c \
|
||||
ft_lstnew.c \
|
||||
ft_lstadd_front.c \
|
||||
ft_lstsize.c \
|
||||
ft_lstlast.c \
|
||||
@ -59,8 +58,6 @@ BSRCS = ft_lstnew.c \
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
BOBJS = $(BSRCS:.c=.o)
|
||||
|
||||
NAME = libft.a
|
||||
|
||||
CFLAGS = -Wall -Werror -Wextra -g
|
||||
@ -73,15 +70,12 @@ all: $(NAME)
|
||||
$(NAME): $(OBJS)
|
||||
ar -rc $(NAME) $(OBJS)
|
||||
|
||||
bonus: $(OBJS) $(BOBJS)
|
||||
ar -rc $(NAME) $(OBJS) $(BOBJS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(BOBJS)
|
||||
rm -f $(OBJS)
|
||||
|
||||
fclean: clean
|
||||
rm -f $(NAME)
|
||||
|
||||
re: fclean all
|
||||
|
||||
.PHONY: all bonus clean fclean re
|
||||
.PHONY: all clean fclean re
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void *ft_cancel(char **tab, size_t len)
|
||||
void *ft_cancel(void **tab, size_t len)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@ -68,7 +68,7 @@ static char **ft_segsplitter(char **tab, size_t len, const char *s, char c)
|
||||
let_index++;
|
||||
tab[tab_index] = ft_substr(s, start, let_index - start);
|
||||
if (tab[tab_index] == NULL)
|
||||
return (ft_cancel(tab, tab_index));
|
||||
return (ft_cancel((void **)tab, tab_index));
|
||||
tab_index++;
|
||||
}
|
||||
return (tab);
|
||||
|
@ -15,7 +15,7 @@
|
||||
# include <stdlib.h>
|
||||
# include <unistd.h>
|
||||
|
||||
void *ft_cancel(char **tab, size_t len);
|
||||
void *ft_cancel(void **tab, size_t len);
|
||||
int ft_atoi(const char *nptr);
|
||||
void ft_bzero(void *s, size_t n);
|
||||
void *ft_calloc(size_t nmemb, size_t size);
|
||||
|
Reference in New Issue
Block a user