nearly TGIF \o/
norming some functions + added objs dir
This commit is contained in:
parent
d72a91f9e9
commit
e6970465e9
15
Makefile
15
Makefile
@ -6,7 +6,7 @@
|
||||
# By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2018/04/07 12:47:06 by tmaze #+# #+# #
|
||||
# Updated: 2019/02/27 12:46:59 by tmaze ### ########.fr #
|
||||
# Updated: 2019/02/28 14:33:03 by tmaze ### ########.fr #
|
||||
# #
|
||||
#******************************************************************************#
|
||||
|
||||
@ -21,17 +21,22 @@ SRCS = ft_memset.c ft_bzero.c ft_memcpy.c ft_memccpy.c ft_memmove.c ft_memchr.c
|
||||
ft_lstnew.c ft_lstdelone.c ft_lstdel.c ft_lstadd.c ft_lstiter.c ft_lstmap.c \
|
||||
ft_isupper.c ft_islower.c ft_str_is_alpha.c ft_str_is_lowercase.c ft_str_is_numeric.c ft_str_is_printable.c ft_str_is_uppercase.c ft_strcapitalize.c ft_strlcpy.c ft_strlowcase.c ft_strupcase.c ft_lstsize.c ft_lstgetat.c ft_lstgetlast.c ft_sort_params.c ft_print_words_tables.c ft_lstaddend.c ft_strndup.c ft_abs.c ft_strnchr.c ft_strrnchr.c get_next_line.c ft_del_words_tables.c ft_putstrn.c ft_nbrlen.c ft_putstrpad.c ft_putnbrpad.c ft_lstsort.c ft_lstaddsort.c ft_round.c ft_realpath.c ft_iswhitespace.c ft_issign.c ft_hasdigit.c ft_strsplitwhitespace.c ft_atois.c
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
OBJDIR = objs
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
OBJP = $(addprefix $(OBJDIR)/, $(SRCS:.c=.o))
|
||||
INCLS = -I.
|
||||
|
||||
.PHONY = all clean fclean re
|
||||
|
||||
all: $(NAME)
|
||||
|
||||
$(NAME): $(OBJS)
|
||||
ar rcs $(NAME) $(OBJS)
|
||||
$(NAME): $(OBJP)
|
||||
ar rcs $(NAME) $(OBJP)
|
||||
|
||||
%.o: %.c libft.h
|
||||
$(OBJDIR):
|
||||
mkdir $@
|
||||
|
||||
$(OBJDIR)/%.o: %.c $(OBJDIR) libft.h
|
||||
$(CC) $(CCFLAGS) $(CCSTD) $(INCLS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/02/27 11:58:44 by tmaze #+# #+# */
|
||||
/* Updated: 2019/02/27 17:15:04 by tmaze ### ########.fr */
|
||||
/* Updated: 2019/02/28 16:12:07 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -30,7 +30,7 @@ int ft_atois(const char *str, int *nb)
|
||||
*nb = 0;
|
||||
mult = 1;
|
||||
while (num >= 0 && ft_isdigit(str[num]) &&
|
||||
(ft_abs(max - *nb) >= 2000000000))
|
||||
(ft_abs(max - *nb) >= 2000000000))
|
||||
{
|
||||
*nb += (str[num--] - '0') * mult;
|
||||
mult *= 10;
|
||||
|
@ -6,13 +6,13 @@
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/02/25 16:16:40 by tmaze #+# #+# */
|
||||
/* Updated: 2019/02/25 16:17:31 by tmaze ### ########.fr */
|
||||
/* Updated: 2019/02/28 16:18:26 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
int ft_hasdigit(char *s)
|
||||
int ft_hasdigit(char *s)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/02/25 16:25:18 by tmaze #+# #+# */
|
||||
/* Updated: 2019/02/25 16:26:00 by tmaze ### ########.fr */
|
||||
/* Updated: 2019/02/28 16:22:02 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -60,7 +60,7 @@ static char **get_table_ws(char const *s, char **tab)
|
||||
return (tab);
|
||||
}
|
||||
|
||||
char **ft_strsplitwhitespace(char *s)
|
||||
char **ft_strsplitwhitespace(char *s)
|
||||
{
|
||||
int nb_words;
|
||||
char **tab;
|
||||
|
Loading…
x
Reference in New Issue
Block a user