From d8aaada7fc27845bcd6de4598bb6054f4bcfb173 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Tue, 10 Aug 2021 16:40:52 +0200 Subject: [PATCH] creation du main de testing et du test de abs --- testing/:bmain.c | 0 testing/Makefile | 154 +++++++++++++++ testing/includes/libftest.h | 100 ++++++++++ testing/libftest | Bin 0 -> 310296 bytes testing/main.c | 95 +++++++++ testing/main_itoa_split_join_mapi_trim_sub.c | 159 --------------- testing/srcs/test_abs.c | 24 +++ testing/srcs/test_any.c | 6 + testing/srcs/test_arraymap.c | 28 +++ testing/srcs/test_atoi.c | 39 ++++ testing/srcs/test_atoibase.c | 75 +++++++ testing/srcs/test_bzero.c | 27 +++ testing/srcs/test_calloc.c | 64 ++++++ testing/srcs/test_concat_free.c | 53 +++++ testing/srcs/test_convertbase.c | 196 ++++++++++++++++++ testing/srcs/test_convertbase_free.c | 198 +++++++++++++++++++ testing/srcs/test_foreach.c | 22 +++ testing/srcs/test_gnl.c | 135 +++++++++++++ testing/srcs/test_greater.c | 8 + testing/srcs/test_isalnum.c | 18 ++ testing/srcs/test_isalpha.c | 18 ++ testing/srcs/test_isascii.c | 18 ++ testing/srcs/test_isdigit.c | 18 ++ testing/srcs/test_isprint.c | 18 ++ testing/srcs/test_issort.c | 26 +++ testing/srcs/test_itoa.c | 91 +++++++++ testing/srcs/test_lstadd_back.c | 90 +++++++++ testing/srcs/test_lstadd_front.c | 94 +++++++++ testing/srcs/test_lstclear.c | 107 ++++++++++ testing/srcs/test_lstdelone.c | 97 +++++++++ testing/srcs/test_lstiter.c | 85 ++++++++ testing/srcs/test_lstlast.c | 100 ++++++++++ testing/srcs/test_lstmap.c | 145 ++++++++++++++ testing/srcs/test_lstnew.c | 59 ++++++ testing/srcs/test_lstsize.c | 86 ++++++++ testing/srcs/test_memalloc.c | 27 +++ testing/srcs/test_memccpy.c | 36 ++++ testing/srcs/test_memchr.c | 51 +++++ testing/srcs/test_memcmp.c | 32 +++ testing/srcs/test_memcpy.c | 46 +++++ testing/srcs/test_memdel.c | 26 +++ testing/srcs/test_memmove.c | 68 +++++++ testing/srcs/test_memset.c | 29 +++ testing/srcs/test_printf.c | 0 testing/srcs/test_putchar.c | 18 ++ testing/srcs/test_putchar_fd.c | 18 ++ testing/srcs/test_putendl.c | 19 ++ testing/srcs/test_putendl_fd.c | 23 +++ testing/srcs/test_putnbr.c | 18 ++ testing/srcs/test_putnbr_fd.c | 28 +++ testing/srcs/test_putnbrbase.c | 59 ++++++ testing/srcs/test_putnbrendl.c | 18 ++ testing/srcs/test_putnbrendl_fd.c | 29 +++ testing/srcs/test_putstr.c | 22 +++ testing/srcs/test_putstr_fd.c | 23 +++ testing/srcs/test_sign.c | 8 + testing/srcs/test_smaller.c | 8 + testing/srcs/test_split.c | 137 +++++++++++++ testing/srcs/test_sqrt.c | 15 ++ testing/srcs/test_strcat.c | 32 +++ testing/srcs/test_strchr.c | 33 ++++ testing/srcs/test_strchrset.c | 32 +++ testing/srcs/test_strclr.c | 23 +++ testing/srcs/test_strcmp.c | 28 +++ testing/srcs/test_strcpy.c | 28 +++ testing/srcs/test_strdel.c | 26 +++ testing/srcs/test_strdup.c | 32 +++ testing/srcs/test_strequ.c | 24 +++ testing/srcs/test_striter.c | 23 +++ testing/srcs/test_striteri.c | 26 +++ testing/srcs/test_strjoin.c | 79 ++++++++ testing/srcs/test_strjoinfree.c | 29 +++ testing/srcs/test_strlcat.c | 108 ++++++++++ testing/srcs/test_strlcpy.c | 70 +++++++ testing/srcs/test_strlen.c | 27 +++ testing/srcs/test_strmap.c | 32 +++ testing/srcs/test_strmapi.c | 75 +++++++ testing/srcs/test_strmultisplit.c | 83 ++++++++ testing/srcs/test_strncat.c | 32 +++ testing/srcs/test_strncmp.c | 32 +++ testing/srcs/test_strncpy.c | 30 +++ testing/srcs/test_strnequ.c | 25 +++ testing/srcs/test_strnew.c | 27 +++ testing/srcs/test_strnstr.c | 42 ++++ testing/srcs/test_strrchr.c | 32 +++ testing/srcs/test_strstr.c | 42 ++++ testing/srcs/test_strtrim.c | 101 ++++++++++ testing/srcs/test_substr.c | 104 ++++++++++ testing/srcs/test_tolower.c | 20 ++ testing/srcs/test_toupper.c | 7 + testing/srcs/test_utoa.c | 74 +++++++ 91 files changed, 4430 insertions(+), 159 deletions(-) create mode 100644 testing/:bmain.c create mode 100644 testing/Makefile create mode 100644 testing/includes/libftest.h create mode 100755 testing/libftest create mode 100644 testing/main.c delete mode 100644 testing/main_itoa_split_join_mapi_trim_sub.c create mode 100644 testing/srcs/test_abs.c create mode 100644 testing/srcs/test_any.c create mode 100644 testing/srcs/test_arraymap.c create mode 100644 testing/srcs/test_atoi.c create mode 100644 testing/srcs/test_atoibase.c create mode 100644 testing/srcs/test_bzero.c create mode 100644 testing/srcs/test_calloc.c create mode 100644 testing/srcs/test_concat_free.c create mode 100644 testing/srcs/test_convertbase.c create mode 100644 testing/srcs/test_convertbase_free.c create mode 100644 testing/srcs/test_foreach.c create mode 100644 testing/srcs/test_gnl.c create mode 100644 testing/srcs/test_greater.c create mode 100644 testing/srcs/test_isalnum.c create mode 100644 testing/srcs/test_isalpha.c create mode 100644 testing/srcs/test_isascii.c create mode 100644 testing/srcs/test_isdigit.c create mode 100644 testing/srcs/test_isprint.c create mode 100644 testing/srcs/test_issort.c create mode 100644 testing/srcs/test_itoa.c create mode 100644 testing/srcs/test_lstadd_back.c create mode 100644 testing/srcs/test_lstadd_front.c create mode 100644 testing/srcs/test_lstclear.c create mode 100644 testing/srcs/test_lstdelone.c create mode 100644 testing/srcs/test_lstiter.c create mode 100644 testing/srcs/test_lstlast.c create mode 100644 testing/srcs/test_lstmap.c create mode 100644 testing/srcs/test_lstnew.c create mode 100644 testing/srcs/test_lstsize.c create mode 100644 testing/srcs/test_memalloc.c create mode 100644 testing/srcs/test_memccpy.c create mode 100644 testing/srcs/test_memchr.c create mode 100644 testing/srcs/test_memcmp.c create mode 100644 testing/srcs/test_memcpy.c create mode 100644 testing/srcs/test_memdel.c create mode 100644 testing/srcs/test_memmove.c create mode 100644 testing/srcs/test_memset.c create mode 100644 testing/srcs/test_printf.c create mode 100644 testing/srcs/test_putchar.c create mode 100644 testing/srcs/test_putchar_fd.c create mode 100644 testing/srcs/test_putendl.c create mode 100644 testing/srcs/test_putendl_fd.c create mode 100644 testing/srcs/test_putnbr.c create mode 100644 testing/srcs/test_putnbr_fd.c create mode 100644 testing/srcs/test_putnbrbase.c create mode 100644 testing/srcs/test_putnbrendl.c create mode 100644 testing/srcs/test_putnbrendl_fd.c create mode 100644 testing/srcs/test_putstr.c create mode 100644 testing/srcs/test_putstr_fd.c create mode 100644 testing/srcs/test_sign.c create mode 100644 testing/srcs/test_smaller.c create mode 100644 testing/srcs/test_split.c create mode 100644 testing/srcs/test_sqrt.c create mode 100644 testing/srcs/test_strcat.c create mode 100644 testing/srcs/test_strchr.c create mode 100644 testing/srcs/test_strchrset.c create mode 100644 testing/srcs/test_strclr.c create mode 100644 testing/srcs/test_strcmp.c create mode 100644 testing/srcs/test_strcpy.c create mode 100644 testing/srcs/test_strdel.c create mode 100644 testing/srcs/test_strdup.c create mode 100644 testing/srcs/test_strequ.c create mode 100644 testing/srcs/test_striter.c create mode 100644 testing/srcs/test_striteri.c create mode 100644 testing/srcs/test_strjoin.c create mode 100644 testing/srcs/test_strjoinfree.c create mode 100644 testing/srcs/test_strlcat.c create mode 100644 testing/srcs/test_strlcpy.c create mode 100644 testing/srcs/test_strlen.c create mode 100644 testing/srcs/test_strmap.c create mode 100644 testing/srcs/test_strmapi.c create mode 100644 testing/srcs/test_strmultisplit.c create mode 100644 testing/srcs/test_strncat.c create mode 100644 testing/srcs/test_strncmp.c create mode 100644 testing/srcs/test_strncpy.c create mode 100644 testing/srcs/test_strnequ.c create mode 100644 testing/srcs/test_strnew.c create mode 100644 testing/srcs/test_strnstr.c create mode 100644 testing/srcs/test_strrchr.c create mode 100644 testing/srcs/test_strstr.c create mode 100644 testing/srcs/test_strtrim.c create mode 100644 testing/srcs/test_substr.c create mode 100644 testing/srcs/test_tolower.c create mode 100644 testing/srcs/test_toupper.c create mode 100644 testing/srcs/test_utoa.c diff --git a/testing/:bmain.c b/testing/:bmain.c new file mode 100644 index 0000000..e69de29 diff --git a/testing/Makefile b/testing/Makefile new file mode 100644 index 0000000..ca66b05 --- /dev/null +++ b/testing/Makefile @@ -0,0 +1,154 @@ +# - - - - - - - - - - - - - - # name = value \ +# variables names # value +# - - - - - - - - - - - - - - # ! name is case sensitive + +NAME = libftest + +CC = gcc + +VPATH = srcs + +DEPS = ../includes/libft.h \ + ./includes/libftest.h +IDIR = $(dir $(DEPS)) +# $(dir PATH/TO/FILE) expands to "PATH/TO/" -> the directory of a file + +LDIR = ../ +_LIBS = libft.a +LIBS = $(_LIBS:lib%.a=%) + +SRCS = main.c \ + test_memset.c \ + test_bzero.c \ + test_memcpy.c \ + test_memccpy.c \ + test_memmove.c \ + test_memchr.c \ + test_memcmp.c \ + test_strlen.c \ + test_isalpha.c \ + test_isdigit.c \ + test_isalnum.c \ + test_isascii.c \ + test_isprint.c \ + test_toupper.c \ + test_tolower.c \ + test_strchr.c \ + test_strrchr.c \ + test_strchrset.c \ + test_strncmp.c \ + test_strlcpy.c \ + test_strlcat.c \ + test_strnstr.c \ + test_atoi.c \ + test_calloc.c \ + test_strdup.c \ + test_substr.c \ + test_strjoin.c \ + test_strtrim.c \ + test_split.c \ + test_itoa.c \ + test_utoa.c \ + test_strmapi.c \ + test_putchar_fd.c \ + test_putstr_fd.c \ + test_putendl_fd.c \ + test_putnbr_fd.c \ + test_lstnew.c \ + test_lstadd_front.c \ + test_lstsize.c \ + test_lstlast.c \ + test_lstadd_back.c \ + test_lstdelone.c \ + test_lstclear.c \ + test_lstiter.c \ + test_lstmap.c \ + test_strcat.c \ + test_strcmp.c \ + test_strcpy.c \ + test_strncat.c \ + test_strncpy.c \ + test_strstr.c \ + test_strjoinfree.c \ + test_strclr.c \ + test_strdel.c \ + test_strequ.c \ + test_striter.c \ + test_striteri.c \ + test_strmap.c \ + test_strnequ.c \ + test_strnew.c \ + test_memalloc.c \ + test_memdel.c \ + test_putchar.c \ + test_putendl.c \ + test_putnbr.c \ + test_putnbrendl.c \ + test_putnbrendl_fd.c \ + test_putnbrbase.c \ + test_putstr.c \ + test_any.c \ + test_atoibase.c \ + test_convertbase.c \ + test_convertbase_free.c \ + test_foreach.c \ + test_issort.c \ + test_arraymap.c \ + test_strmultisplit.c \ + test_gnl.c \ + test_concat_free.c \ + test_printf.c \ + test_abs.c \ + test_greater.c \ + test_smaller.c \ + test_sign.c \ + test_sqrt.c + +ODIR = ./builds +OBJS = $(SRCS:%.c=$(ODIR)/%.o) + +CFLAGS = $(IDIR:%=-I%) +# flag -g generates debug informations, g3 is maximal version +CFLAGS += -g3 -Wall -Wextra -Werror +LFLAGS = -L$(LDIR) -l$(LIBS) + + +# - - - - - - - - - - - - - - # target: prerequisites | $@ : target +# rules to execute # recipe | $< : 1st prerequisite +# - - - - - - - - - - - - - - # recipe | $^ : all prerequisites + +all: $(NAME) + +$(NAME): $(ODIR) $(OBJS) $(DEPS) + make -C $(LDIR) + $(CC) $(CFLAGS) -o $@ $(OBJS) $(LFLAGS) + +$(ODIR): + mkdir -p $@ + +$(ODIR)/%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +debug: CFLAGS += -fsanitize=address +debug: clean $(NAME) + +leaks: $(NAME) + valgrind --leak-check=full --show-leak-kinds=all ./$(NAME) maps/42_color.fdf + +clean: + /bin/rm -f $(OBJS) $(OBJS_B) + +fclean: clean + /bin/rm -rf $(ODIR) + /bin/rm -f $(NAME) + /bin/rm -rf a.out a.out.dSYM + +libfclean: + make fclean -C $(LDIR) + +re: fclean all + +relib: libfclean re + +.PHONY: all clean fclean re gcc + diff --git a/testing/includes/libftest.h b/testing/includes/libftest.h new file mode 100644 index 0000000..5d92e6b --- /dev/null +++ b/testing/includes/libftest.h @@ -0,0 +1,100 @@ +#ifndef LIBFTEST_H +# define LIBFTEST_H +# include "libft.h" +# include + +# define RED write(1, "\033[91m", 5); +# define GREEN write(1, "\033[92m", 5); +# define COLOREND write(1, "\033[0m", 4); + +void test_memset(void); +void test_bzero(void); +void test_memcpy(void); +void test_memccpy(void); +void test_memmove(void); +void test_memchr(void); +void test_memcmp(void); +void test_strlen(void); +void test_isalpha(void); +void test_isdigit(void); +void test_isalnum(void); +void test_isascii(void); +void test_isprint(void); +void test_toupper(void); +void test_tolower(void); +void test_strchr(void); +void test_strrchr(void); +void test_strchrset(void); +void test_strncmp(void); +void test_strlcpy(void); +void test_strlcat(void); +void test_strnstr(void); +void test_atoi(void); +void test_calloc(void); +void test_strdup(void); +void test_substr(void); +void test_strjoin(void); +void test_strtrim(void); +void test_split(void); +void test_itoa(void); +void test_utoa(void); +void test_strmapi(void); +void test_putchar_fd(void); +void test_putstr_fd(void); +void test_putendl_fd(void); +void test_putnbr_fd(void); +void test_lstnew(void); +void test_lstadd_front(void); +void test_lstsize(void); +void test_lstlast(void); +void test_lstadd_back(void); +void test_lstdelone(void); +void test_lstclear(void); +void test_lstiter(void); +void test_lstmap(void); +void test_strcat(void); +void test_strcmp(void); +void test_strcpy(void); +void test_strncat(void); +void test_strncpy(void); +void test_strstr(void); +void test_strjoinfree(void); +void test_strclr(void); +void test_strdel(void); +void test_strequ(void); +void test_striter(void); +void test_striteri(void); +void test_strmap(void); +void test_strnequ(void); +void test_strnew(void); +void test_memalloc(void); +void test_memdel(void); +void test_putchar(void); +void test_putendl(void); +void test_putnbr(void); +void test_putnbrendl(void); +void test_putnbrendl_fd(void); +void test_putnbrbase(void); +void test_putstr(void); +void test_any(void); +void test_atoibase(void); +void test_convertbase(void); +void test_convertbase_free(void); +void test_foreach(void); +void test_issort(void); +void test_arraymap(void); +void test_strmultisplit(void); +void test_gnl(void); +void test_concat_free(void); +void test_printf(void); +void test_next_word(void); +void test_convert(void); +void test_flag_transform(void); +void test_flag_transform_bonus(void); +void test_abs(void); +void test_greater(void); +void test_smaller(void); +void test_sign(void); +void test_sqrt(void); + +#endif diff --git a/testing/libftest b/testing/libftest new file mode 100755 index 0000000000000000000000000000000000000000..8085142291bf0f0ee85b87a59a10dc9cd26057b4 GIT binary patch literal 310296 zcmeEP3w%_?)xUT1+B`RqC@3fqK?4{Pp7NCNh%SPP3K|84kOUG5NlbQmSY8@X))*D* zgVre4zNppuwkQfgEuf;JQlS-Vs#q6;HC5DnEj8c&oSC_M@69F+5Hygzzh5%<&N(x4 z&Y3f3&YYQhcX`(2^BuabsVhu7Pot+5ks>Ek0c9(c6RTNShAz{Ii4f8~KjMx4rpo&4=>)*&QYqomHRV%J9^Kbm!H-SS?h;X@ zs@$b0C%a4({2%`lCHykkUUPCOko2omva6*R70w8 z=|7P9ruqr@f{UkdOVr;=v_x|<{wR;&pZ{aZlTY6C@Oi~gU39^(uAY&rg5*y`UNHRFX7WiNgW;dsO#aQtPr;x4Is+NO>bVE`DRyK$r{b?? zkbDjOkV|48s?D5P?#aoWH#4_j-pn~Ug+*Ffeome?Kc}duBp1NkML9F)6c*U`P!Va{Cw?#$rHzopECJ{~_AUiBm6{nU`OdKew>l zlV3LVqVYu~#racnW*1R)bLW>7%j#wd)S!sqfV9AYzIVtwk)z{D2Sn**a$#XSX~UmFz$fvQR^pg;4P5I_=1mdf4$gKc1_P!1OT|F{!N6!TW+h5y=tM^UxOeF8$ z$D z;#3S_cUAl^FQ#PlKY-PE(omE+=;|?nv#!F!G1@Qf-?A;hX7ow=Gm-=n;H%lBb!U%h*ae~eq->VD^YPghjRC@WmIMzaOdvCy&w<|uY=lpxBj~8 zIc>G0BI|$-;P&BJ2bS!j64r)%({{Lh7uA4kf3U{t#xmz58y#(21S+QCR#a^Qp{dGg zJBID_c0v<=mKu?%@2pF9S7iB#0zZhZDSN^yeS=vO0mLP7OI!!Ijij8q0{pK>MGfVX z>bfzTU`>z))M>a?q#?U%N+Zb;n(N(F*H>aoMhH8=h>67QW$#lxp%ucu(2eEwD}+N6nf$x-P;jy6xpDCJtQBC89T|c`&gZ%@2Fo z^A10a%-ZfrwP0$l=c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^TYR|(h-Y_!a*kQ`QQ+^A!6D1i4_7=>10f;Ms8B$u!&r+i(W2A^+9Qyk@PU`c8Q7f|leRgc z!?}1c?85{UiiML(oiPCGAXwKNg=i91b)^n(w?HUrECqEz=x*b7t0e%La7-i>%_vfE z7)tQ9hWt<`TuJI+ASrclm)8n+Zh!?F+nPbr7iorDLW;u1G|FLLV`DtHj$`3aB*g`+G=`%eP+tC6sAQ}{SH1NM#OE8n-W8i z)3ZOF(q~F3%DN`eqf07SQb=URM1DN>%z3 - -char touppercase(unsigned int i, char c) -{ - if (i < 3 && c >= 'a' && c <= 'z') - c -= 32; - return (c); -} - -void print_ft_itoa(int i) -{ - printf("itoa : %d -> '%s'\n", i, ft_itoa(i)); -} - -void print_ft_split(char *str, char c) -{ - char **tab; - - printf("split : [%s] [%c] -> ", str, c); - tab = ft_split(str, c); - while (tab && *tab != NULL) - printf("[%s]", *(tab++)); - printf("\n"); -} - -void print_ft_strjoin(char *s1, char *s2) -{ - printf("join : '%s' + '%s' -> '%s'\n", s1, s2, ft_strjoin(s1, s2)); -} - -void print_ft_strmapi(char const *s, char (*f)(unsigned int, char)) -{ - printf("mapi : '%s' ", s); - if (f) - printf("'touppercase' -> "); - else - printf("(null) -> "); - printf("'%s'\n", ft_strmapi(s, f)); -} - -void print_ft_substr(char const *s, unsigned int start, size_t len) -{ - printf("substr : [%s](%u,%zu) -> ", s, start, len); - printf("'%s'\n", ft_substr(s, start, len)); -} - -void print_ft_strtrim(char const *s, char const *set) -{ - printf("strtrim: [%s] [%s] -> '%s'\n", s, set, ft_strtrim(s, set)); -} - -void print_ft_putnbr_fd(int n, int fd) -{ - write(1, "putnbr : [", 10); - ft_putnbr_fd(n, 1); - write(1, "] [", 3); - ft_putnbr_fd(fd, 1); - write(1, "] -> '", 6); - ft_putnbr_fd(n, fd); - write(1, "'\n", 2); -} - -int main() -{ - char touppercase(unsigned int, char); - - printf("ITOA :\n"); - - print_ft_itoa(1338); - print_ft_itoa(0); - print_ft_itoa(-1); - print_ft_itoa(1); - print_ft_itoa(-1218927987); - print_ft_itoa(128979827); - print_ft_itoa(2147483647); - print_ft_itoa(-2147483648); - print_ft_itoa('t'); - - printf("\nSPLIT :\n"); - - print_ft_split(" dfs zfe f ez f fez ", ' '); - print_ft_split(NULL, 0); - print_ft_split(NULL, ' '); - print_ft_split("", 0); - print_ft_split("vzevzev fze", 0); - print_ft_split(" ", 0); - print_ft_split("", ' '); - print_ft_split(" ", ' '); - print_ft_split("zlkefj ljef jl", '\0'); - print_ft_split("zd\nazd\nds", '\n'); - print_ft_split(" ", ' '); - - printf("\nJOIN :\n"); - - print_ft_strjoin("alpha", "bravo"); - print_ft_strjoin("", ""); - print_ft_strjoin(NULL, NULL); - print_ft_strjoin("", "fskjfhkj"); - print_ft_strjoin(NULL, ""); - print_ft_strjoin(NULL, "fsdf"); - print_ft_strjoin("", NULL); - print_ft_strjoin("sdffez", NULL); - print_ft_strjoin(" ", " "); - - printf("\nMAPI :\n"); - - print_ft_strmapi("truc", touppercase); - print_ft_strmapi("truc", NULL); - print_ft_strmapi(NULL, touppercase); - print_ft_strmapi(NULL, NULL); - print_ft_strmapi("", touppercase); - print_ft_strmapi(" ", touppercase); - print_ft_strmapi("mlekgmlzkge", touppercase); - print_ft_strmapi("\0", touppercase); - print_ft_strmapi("f f f f", touppercase); - - printf("\nSUB :\n"); - - print_ft_substr("zeff", 3, 4); - print_ft_substr(NULL, 1, 1); - print_ft_substr("srgz", 0, 0); - print_ft_substr("setzettzetzet", -1, -1); - print_ft_substr("ggzrg", -1, 3); - print_ft_substr("", 3, 2); - print_ft_substr("regrehehzhzh", 1, 23); - print_ft_substr("gzrgzgb zeez", 11, 0); - print_ft_substr("gzrgzgb zeez", 1123238713, 0); - print_ft_substr("gzrgzgb zeez", 1123238713, 2873981730); - print_ft_substr("gzrgzgb zeez", 1, 2873981730); - - printf("\nTRIM :\n"); - - print_ft_strtrim(" stmr trim ", "m "); - print_ft_strtrim(" ", " "); - print_ft_strtrim("", ""); - print_ft_strtrim(NULL, ""); - print_ft_strtrim("", NULL); - print_ft_strtrim(NULL, NULL); - print_ft_strtrim("efzfe fzef", ""); - print_ft_strtrim("efzfzelelijz", " "); - print_ft_strtrim(" e f zfzelelijz ", " "); - print_ft_strtrim("cccccccccccccccccccc", "c"); - - printf("\nPUTNBR :\n"); - - print_ft_putnbr_fd(52, 1); - print_ft_putnbr_fd(2147483647, 1); - print_ft_putnbr_fd(-2147483648, 1); - print_ft_putnbr_fd(0, 1); - print_ft_putnbr_fd(-1, 1); - print_ft_putnbr_fd(239847, 1); - print_ft_putnbr_fd(34625725, 1); - print_ft_putnbr_fd(-4564562, 1); - print_ft_putnbr_fd(456, 1); - print_ft_putnbr_fd(-624724536, 1); - return 0; -} diff --git a/testing/srcs/test_abs.c b/testing/srcs/test_abs.c new file mode 100644 index 0000000..d3c42fd --- /dev/null +++ b/testing/srcs/test_abs.c @@ -0,0 +1,24 @@ +#include "libftest.h" + +void compare(int i, int ans) +{ + if (ft_abs(i) != ans) + { + RED ft_printf("error: "); COLOREND + ft_printf("ft_abs(%i)", i); + RED ft_printf(" gives "); COLOREND + ft_printf("%i", ft_abs(i)); + RED ft_printf(" instead of "); COLOREND + ft_printf("%i\n", ans); + } +} + +void test_abs(void) +{ + compare(-1, 1); + compare(0, 0); + compare(-0, 0); + compare(-1000, 1000); + compare(-2147483648, 2147483648); + compare(2147483647, 2147483647); +} diff --git a/testing/srcs/test_any.c b/testing/srcs/test_any.c new file mode 100644 index 0000000..7bdbe9c --- /dev/null +++ b/testing/srcs/test_any.c @@ -0,0 +1,6 @@ +#include "libftest.h" + +//int test_any(char **tab, int (*f)(char*)) +void test_any(void) +{ +} diff --git a/testing/srcs/test_arraymap.c b/testing/srcs/test_arraymap.c new file mode 100644 index 0000000..267510a --- /dev/null +++ b/testing/srcs/test_arraymap.c @@ -0,0 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_arraymap.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/16 15:17:24 by hulamy #+# #+# */ +/* Updated: 2018/11/16 15:17:27 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int *ft_arraymap(int *tab, int length, int (*f)(int)) +{ + int i; + int *newtab; + + i = -1; + if (!tab) + return (NULL); + if (!(newtab = (int*)malloc(sizeof(*newtab) * (length + 1)))) + return (NULL); + while (++i < length) + newtab[i] = (*f)(tab[i]); + return (newtab); +} diff --git a/testing/srcs/test_atoi.c b/testing/srcs/test_atoi.c new file mode 100644 index 0000000..01660a9 --- /dev/null +++ b/testing/srcs/test_atoi.c @@ -0,0 +1,39 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_atoi.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:54:29 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:54:35 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_atoi(const char *str) +{ + long long nbr; + int i; + int n; + + i = 0; + n = 1; + nbr = 0; + while ((str[i] == ' ') || (str[i] > 8 && str[i] < 14)) + i++; + if (str[i] == '-') + n = -1; + if (str[i] == '+' || str[i] == '-') + i++; + while (str[i] >= '0' && str[i] <= '9') + { + if ((nbr >= 922337203685477580 + && ((str[i] > 8 && n < 0) || (str[i] > 7 && n > 0)))) + return ((n > 0) ? -1 : 0); + else + nbr = nbr * 10 + (str[i++] - '0'); + } + return (nbr * n); +} diff --git a/testing/srcs/test_atoibase.c b/testing/srcs/test_atoibase.c new file mode 100644 index 0000000..fdb92d1 --- /dev/null +++ b/testing/srcs/test_atoibase.c @@ -0,0 +1,75 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_atoibase.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/16 15:15:31 by hulamy #+# #+# */ +/* Updated: 2018/11/16 15:22:34 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +static int is_valid_base(char *base, int i, int j) +{ + while (base[i]) + { + j = i + 1; + while (base[j]) + { + if (base[i] == base[j]) + return (0); + j++; + } + if (base[i] == '-' || base[i] == '+') + return (0); + i++; + } + if (i >= 2) + return (1); + return (0); +} + +static int skip(int i, char *str, int *n) +{ + while ((str[i] == 32) || (str[i] > 8 && str[i] < 14)) + i++; + if (str[i] == '+' || str[i] == '-') + { + if (str[i] == '-') + *n = -1; + i++; + } + return (i); +} + +int ft_atoibase(char *str, char *base) +{ + int i; + int j; + int length; + int res; + int n; + + length = 0; + res = 0; + n = 1; + if (!is_valid_base(base, 0, 0)) + return (0); + while (base[length]) + length++; + i = skip(0, str, &n); + while (str[i] && str[i] > 32 && str[i] != '-' && str[i] != '+') + { + j = 0; + while (str[i] != base[j] && base[j]) + j++; + if (base[j] == '\0') + return (0); + res = (res * length) + j; + i++; + } + return (res * n); +} diff --git a/testing/srcs/test_bzero.c b/testing/srcs/test_bzero.c new file mode 100644 index 0000000..f66336a --- /dev/null +++ b/testing/srcs/test_bzero.c @@ -0,0 +1,27 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_bzero.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:54:43 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:54:44 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_bzero(void *s, size_t n) +{ + size_t i; + unsigned char *ptr; + + if (n) + { + ptr = (unsigned char *)s; + i = 0; + while (i < n) + ptr[i++] = '\0'; + } +} diff --git a/testing/srcs/test_calloc.c b/testing/srcs/test_calloc.c new file mode 100644 index 0000000..b84f0ee --- /dev/null +++ b/testing/srcs/test_calloc.c @@ -0,0 +1,64 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_calloc.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:54:53 by hulamy #+# #+# */ +/* Updated: 2019/12/01 16:04:12 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** allocate count * size byte of memory and +** return a pointer to the allocated memory +** +** exemple allocation for 5 integers with malloc then calloc : +** a = (int *)malloc(5 * sizeof(int)); //5*4bytes = 20 bytes +** free(a); +** a = (int *)calloc(5, sizeof(int)); +*/ + +/* +** #include +** +** void ft_bzero(void *s, size_t n) +** { +** size_t i; +** unsigned char *ptr; +** +** if (n) +** { +** ptr = (unsigned char *)s; +** i = 0; +** while (i < n) +** ptr[i++] = '\0'; +** } +** } +** +** void *ft_calloc(size_t count, size_t size); +** +** int main(void) +** { +** void *str; +** +** str = ft_calloc(0, 0); +** if (str == ((void *)0)) +** printf("failed\n"); +** free(str); +** return (0); +** } +*/ + +#include "libft.h" + +void *ft_calloc(size_t count, size_t size) +{ + void *tmp; + + if (!(tmp = malloc(count * size))) + return (NULL); + ft_bzero(tmp, count * size); + return (tmp); +} diff --git a/testing/srcs/test_concat_free.c b/testing/srcs/test_concat_free.c new file mode 100644 index 0000000..d31a4cd --- /dev/null +++ b/testing/srcs/test_concat_free.c @@ -0,0 +1,53 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_concat_free.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/27 18:04:09 by hulamy #+# #+# */ +/* Updated: 2020/02/27 18:06:44 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** create a new string size of str1 + str2 +** fill it with concated str1 and str2m as "str1str2" +** free the received strings str1 and str2 +** return the new string +*/ + +/* +** #include +** #include "libft.h" +** +** char *ft_concat_free(char *str1, char *str2); +** +** int main(int ac, char **av) +** { +** if (ac != 3) +** return (0); +** printf("%s\n", ft_concat_free(ft_strdup(av[1]), ft_strdup(av[2]))); +** return (0); +** } +*/ + +#include "libft.h" + +char *ft_concat_free(char *str1, char *str2) +{ + char *cat; + int i; + int j; + + cat = ft_memalloc(sizeof(char) * (ft_strlen(str1) + ft_strlen(str2) + 1)); + i = -1; + j = 0; + while (str1[++i]) + cat[i] = str1[i]; + while (str2[j]) + cat[i++] = str2[j++]; + free(str1); + free(str2); + return (cat); +} diff --git a/testing/srcs/test_convertbase.c b/testing/srcs/test_convertbase.c new file mode 100644 index 0000000..43f6ec4 --- /dev/null +++ b/testing/srcs/test_convertbase.c @@ -0,0 +1,196 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_convertbase.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/26 20:19:54 by hulamy #+# #+# */ +/* Updated: 2020/02/26 20:20:14 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** take a string that is a number in a certain base +** and convert it in another base +** it works with unsigned long int +** return the new string +*/ + +/* +** #include // for printf +** #include // for atoi +** +** char *ft_convertbase(char *nbr, char *base_from, char *base_to); +** +** int main(int ac, char **av) +** { +** if (ac != 4) +** { +** printf("usage:\nchar *nbr, char *base_from, char *base_to\n"); +** printf("try the max long unsigned int : 18446744073709551615\n"); +** } +** else +** printf("[%s]\n",ft_convertbase(av[1], av[2], av[3])); +** return (0); +** } +*/ + +#include "libft.h" + +/* +** check : +** -if the base has no characters that appear more than one time +** -if the signes '-' and '+' are not part of the set +** -if there are no invisible characters (inferior to 32 or equal to 127) +*/ + +int + is_valid_base(char *base) +{ + int i; + int j; + + i = 0; + while (base[i]) + { + j = i + 1; + while (base[j]) + if (base[i] == base[j++]) + return (0); + if (base[i] == '-' || base[i] == '+' || base[i] < 33 || base[i] == 127) + return (0); + i++; + } + if (i >= 2) + return (1); + return (0); +} + +/* +** check : +** -if base is valid +** -if nbr contain characters +** -if nbr is made of elements of base only +*/ + +int + is_valid_nbr(char *nbr, char *base) +{ + int i; + int j; + + i = 0; + if (!is_valid_base(base)) + return (0); + while (nbr[i]) + { + j = 0; + while (base[j] && nbr[i] != base[j]) + j++; + if (base[j] == '\0') + return (0); + i++; + } + if (i == 0) + return (0); + return (1); +} + +/* +** -transform a nbr written as a string into a decimal nbr +** -it's an unsigned nbr because the negativity is managed elsewhere +** -if the number is bigger than the max unsigned long int it's false +** as it's impossible to verify if a number is bigger than the biggest +** unsigned, we verify the difference before the multiplication +*/ + +unsigned long int + base_to_decimal(char *nbr, char *base, int *error) +{ + unsigned long int decimal; + int i; + int j; + int length; + + decimal = 0; + i = 0; + length = 0; + while (base[length]) + length++; + while (nbr[i]) + { + j = 0; + while (nbr[i] != base[j] && base[j]) + j++; + if ((18446744073709551615U - j) / length < decimal) + return (*error = 1); + decimal = (decimal * length) + j; + i++; + } + return (decimal); +} + +/* +** -it counts the size needed to be allocated +** -if the given nbr was a negative one it add the place for the '-' +** -then convert the nbr from decimal base to destination base +** into the string allocated +*/ + +char + *decimal_to_base(unsigned long int decimal, char *base, int malloc_size) +{ + int base_size; + int neg; + char *result; + unsigned long int nb; + + neg = malloc_size; + base_size = 0; + while (base[base_size]) + base_size++; + nb = decimal; + while (nb /= base_size) + malloc_size++; + result = (char *)malloc(sizeof(char) * (malloc_size + 2)); + result[malloc_size + 1] = '\0'; + if (neg) + result[0] = '-'; + while (malloc_size >= 0) + { + result[malloc_size--] = base[decimal % base_size]; + decimal /= base_size; + } + return (result); +} + +/* +** -main function to convert from one base to another +** -function base_to_decimal has an awfull int *error because it cannot +** return -1 in case of error, since it's an unsigned, and it cannot +** return 0 to check the error since it would be confusing with an actual +** return of 0 if the number to convert is 0 +*/ + +char + *ft_convertbase(char *nbr, char *base_from, char *base_to) +{ + int length; + unsigned long int decimal; + int error; + + error = 0; + length = 0; + if (nbr[0] == '-') + { + nbr++; + length = 1; + } + if (!is_valid_nbr(nbr, base_from) || !is_valid_base(base_to)) + return (NULL); + decimal = base_to_decimal(nbr, base_from, &error); + if (error == 1) + return (NULL); + return (decimal_to_base(decimal, base_to, length)); +} diff --git a/testing/srcs/test_convertbase_free.c b/testing/srcs/test_convertbase_free.c new file mode 100644 index 0000000..1f2bae7 --- /dev/null +++ b/testing/srcs/test_convertbase_free.c @@ -0,0 +1,198 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_convertbase_free.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/26 20:19:54 by hulamy #+# #+# */ +/* Updated: 2020/02/27 20:23:22 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** (just like ft_convert, but free the string it receive) +** take a string that is a number in a certain base +** and convert it in another base +** it works with unsigned long int +** return the new string +*/ + +/* +** #include // for printf +** #include // for atoi +** +** char *ft_convertbase_free(char *nbr, char *base_from, char *base_to); +** +** int main(int ac, char **av) +** { +** if (ac != 4) +** { +** printf("usage:\nchar *nbr, char *base_from, char *base_to\n"); +** printf("try the max long unsigned int : 18446744073709551615\n"); +** } +** else +** printf("[%s]\n",ft_convertbase_free(av[1], av[2], av[3])); +** return (0); +** } +*/ + +#include "libft.h" + +/* +** check : +** -if the base has no characters that appear more than one time +** -if the signes '-' and '+' are not part of the set +** -if there are no invisible characters (inferior to 32 or equal to 127) +*/ + +int + is_base_valid(char *base) +{ + int i; + int j; + + i = 0; + while (base[i]) + { + j = i + 1; + while (base[j]) + if (base[i] == base[j++]) + return (0); + if (base[i] == '-' || base[i] == '+' || base[i] < 33 || base[i] == 127) + return (0); + i++; + } + if (i >= 2) + return (1); + return (0); +} + +/* +** check : +** -if base is valid +** -if nbr contain characters +** -if nbr is made of elements of base only +*/ + +int + is_nbr_valid(char *nbr, char *base) +{ + int i; + int j; + + i = 0; + if (!is_base_valid(base)) + return (0); + while (nbr[i]) + { + j = 0; + while (base[j] && nbr[i] != base[j]) + j++; + if (base[j] == '\0') + return (0); + i++; + } + if (i == 0) + return (0); + return (1); +} + +/* +** -transform a nbr written as a string into a decimal nbr +** -it's an unsigned nbr because the negativity is managed elsewhere +** -if the number is bigger than the max unsigned long int it's false +** as it's impossible to verify if a number is bigger than the biggest +** unsigned, we verify the difference before the multiplication +*/ + +unsigned long int + base_2_decimal(char *nbr, char *base, int *error) +{ + unsigned long int decimal; + int i; + int j; + int length; + + decimal = 0; + i = 0; + length = 0; + while (base[length]) + length++; + while (nbr[i]) + { + j = 0; + while (nbr[i] != base[j] && base[j]) + j++; + if ((18446744073709551615U - j) / length < decimal) + return (*error = 1); + decimal = (decimal * length) + j; + i++; + } + return (decimal); +} + +/* +** -it counts the size needed to be allocated +** -if the given nbr was a negative one it add the place for the '-' +** -then convert the nbr from decimal base to destination base +** into the string allocated +*/ + +char + *decimal_2_base(unsigned long int decimal, char *base, int malloc_size) +{ + int base_size; + int neg; + char *result; + unsigned long int nb; + + neg = malloc_size; + base_size = 0; + while (base[base_size]) + base_size++; + nb = decimal; + while (nb /= base_size) + malloc_size++; + result = (char *)malloc(sizeof(char) * (malloc_size + 2)); + result[malloc_size + 1] = '\0'; + if (neg) + result[0] = '-'; + while (malloc_size >= 0) + { + result[malloc_size--] = base[decimal % base_size]; + decimal /= base_size; + } + return (result); +} + +/* +** -main function to convert from one base to another +** -function base_to_decimal has an awfull int *error because it cannot +** return -1 in case of error, since it's an unsigned, and it cannot +** return 0 to check the error since it would be confusing with an actual +** return of 0 if the number to convert is 0 +*/ + +char + *ft_convertbase_free(char *nbr, char *base_from, char *base_to) +{ + int length; + unsigned long int decimal; + int error; + + error = 0; + length = 0; + if (nbr[0] == '-') + { + nbr++; + length = 1; + } + if (!is_nbr_valid(nbr, base_from) || !is_base_valid(base_to)) + return (NULL); + decimal = base_2_decimal(nbr, base_from, &error); + if (error == 1) + return (NULL); + free(nbr); + return (decimal_2_base(decimal, base_to, length)); +} diff --git a/testing/srcs/test_foreach.c b/testing/srcs/test_foreach.c new file mode 100644 index 0000000..aaf7649 --- /dev/null +++ b/testing/srcs/test_foreach.c @@ -0,0 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_foreach.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/16 15:16:10 by hulamy #+# #+# */ +/* Updated: 2018/11/16 15:16:11 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_foreach(int *tab, int length, void (*f)(int)) +{ + int i; + + i = 0; + while (i < length && tab && tab[i]) + (*f)(tab[i++]); +} diff --git a/testing/srcs/test_gnl.c b/testing/srcs/test_gnl.c new file mode 100644 index 0000000..d13051b --- /dev/null +++ b/testing/srcs/test_gnl.c @@ -0,0 +1,135 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* get_next_line.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/12/31 17:05:53 by hulamy #+# #+# */ +/* Updated: 2020/02/25 18:48:55 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +/* +** #include //for open +** +** int main(int ac, char **av) +** { +** int *fd; +** int i = 0; +** int j = 0; +** int ret; +** char *line = NULL; +** +** fd = (int *)ft_calloc(ac, sizeof(int)); +** while (++i <= ac - 1) +** fd[i - 1] = open(av[i], O_RDONLY); +** i = 0; +** while (j < ac - 1) +** { +** if ((ret = ft_gnl(fd[i], &line)) > 0) +** { +** ft_printf(" [fd%i-%i] %s\n", fd[i], ret, line); +** free(line); +** j = 0; +** } +** else if (ret == -1) +** { +** ft_printf("[fd%i-%i] *ERROR*\n", fd[i], ret); +** free(line); +** j++; +** } +** else if (*line != '\0') +** ft_printf(" [fd%i-%i] %s\n", fd[i], ret, line); +** else +** { +** ft_printf("[fd%i-%i] %s *FINI*\n", fd[i], ret, line); +** free(line); +** j++; +** } +** i++; +** if (i >= ac - 1) +** i = 0; +** } +** free(fd); +** //while (1); +** return (0); +** } +*/ + +int free_lst(t_gnlist **lst, int ret) +{ + t_gnlist *tmp; + + tmp = *lst; + while (tmp->next != *lst) + tmp = tmp->next; + tmp->next = (*lst)->next; + free((*lst)->str); + if (*lst == (*lst)->next) + { + free(*lst); + *lst = NULL; + } + else + { + free(*lst); + *lst = tmp; + } + return (ret); +} + +int multi_fd(int fd, t_gnlist **lst) +{ + t_gnlist *tmp; + + tmp = *lst; + while (*lst && (*lst)->lfd != fd && (*lst)->next != tmp) + *lst = (*lst)->next; + if (!tmp || ((*lst)->next == tmp && (*lst)->lfd != fd)) + { + if (!(tmp = (t_gnlist*)malloc(sizeof(*tmp)))) + return (0); + tmp->lfd = fd; + if (!(tmp->str = ft_strdup(""))) + return (0); + if (*lst) + { + tmp->next = (*lst)->next; + (*lst)->next = tmp; + } + else + tmp->next = tmp; + *lst = tmp; + } + return (1); +} + +int ft_gnl(const int fd, char **line) +{ + char buf[BUFFER_SIZE + 1]; + int ret; + static t_gnlist *lst = NULL; + char *str; + + ret = 1; + if (!(multi_fd(fd, &lst)) || !line || BUFFER_SIZE < 1) + return (free_lst(&lst, -1)); + while (!(str = ft_strchr(lst->str, '\n')) && ret != 0) + { + if ((ret = read(fd, buf, BUFFER_SIZE)) < 0) + return (free_lst(&lst, -1)); + buf[ret] = '\0'; + if (!(lst->str = ft_strjoinfree(lst->str, ft_strdup(buf)))) + return (free_lst(&lst, -1)); + } + if (str != NULL) + str[0] = '\0'; + if (!(*line = ft_strdup(lst->str))) + return (free_lst(&lst, -1)); + if (str != NULL) + return (ft_memmove(lst->str, str + 1, ft_strlen(str + 1) + 1) != NULL); + return (free_lst(&lst, 0)); +} diff --git a/testing/srcs/test_greater.c b/testing/srcs/test_greater.c new file mode 100644 index 0000000..1c1d526 --- /dev/null +++ b/testing/srcs/test_greater.c @@ -0,0 +1,8 @@ +#include "libft.h" + +int ft_greater(int a, int b) +{ + if (a < b) + return (b); + return (a); +} diff --git a/testing/srcs/test_isalnum.c b/testing/srcs/test_isalnum.c new file mode 100644 index 0000000..dc1bb03 --- /dev/null +++ b/testing/srcs/test_isalnum.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isalnum.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:55:05 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:06 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_isalnum(int c) +{ + return (ft_isalpha(c) || ft_isdigit(c)); +} diff --git a/testing/srcs/test_isalpha.c b/testing/srcs/test_isalpha.c new file mode 100644 index 0000000..e0ec883 --- /dev/null +++ b/testing/srcs/test_isalpha.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isalpha.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:55:15 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:17 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_isalpha(int c) +{ + return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); +} diff --git a/testing/srcs/test_isascii.c b/testing/srcs/test_isascii.c new file mode 100644 index 0000000..f201880 --- /dev/null +++ b/testing/srcs/test_isascii.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isascii.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:55:24 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:25 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_isascii(int c) +{ + return (c >= 0 && c <= 127); +} diff --git a/testing/srcs/test_isdigit.c b/testing/srcs/test_isdigit.c new file mode 100644 index 0000000..69e0809 --- /dev/null +++ b/testing/srcs/test_isdigit.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isdigit.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:55:32 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:33 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_isdigit(int c) +{ + return (c >= '0' && c <= '9'); +} diff --git a/testing/srcs/test_isprint.c b/testing/srcs/test_isprint.c new file mode 100644 index 0000000..21395ab --- /dev/null +++ b/testing/srcs/test_isprint.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isprint.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:55:43 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:55:44 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_isprint(int c) +{ + return (c >= 32 && c < 127); +} diff --git a/testing/srcs/test_issort.c b/testing/srcs/test_issort.c new file mode 100644 index 0000000..842195b --- /dev/null +++ b/testing/srcs/test_issort.c @@ -0,0 +1,26 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_issort.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/16 15:18:14 by hulamy #+# #+# */ +/* Updated: 2018/11/16 15:18:15 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_issort(int *tab, int length, int (*f)(int, int)) +{ + int i; + + i = -1; + if (!tab) + return (0); + while (++i < length - 1) + if (f(tab[i], tab[i + 1]) > 0) + return (0); + return (1); +} diff --git a/testing/srcs/test_itoa.c b/testing/srcs/test_itoa.c new file mode 100644 index 0000000..9819d33 --- /dev/null +++ b/testing/srcs/test_itoa.c @@ -0,0 +1,91 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_itoa.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:59:01 by hulamy #+# #+# */ +/* Updated: 2020/02/19 15:44:04 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** take an integer and give a string +*/ + +/* +** #include // for printf +** #include // for atoi +** +** char *ft_itoa(long int n); +** +** int main(int ac, char **av) +** { +** if (ac == 0) +** return (0); +** else if (ac == 2) +** printf("%s\n",ft_itoa(atoi(av[1]))); +** else +** { +** long int i; +** i = 0; +** printf(" %li\n %s\n\n",i,ft_itoa(i)); +** i = 1234567; +** printf(" %li\n %s\n\n",i,ft_itoa(i)); +** i = -1234567; +** printf(" %li\n %s\n\n",i,ft_itoa(i)); +** i = 237683; +** printf(" %li\n %s\n\n",i,ft_itoa(i)); +** i = 2147483647; +** printf("| %li\n| %s\n\n",i,ft_itoa(i)); +** i = i ^ 0; // create the opposite of a signed '0', which +** // is 0 followed by 31 '1', the signed int max +** printf("* %li\n* %s\n\n",i,ft_itoa(i)); +** i = i ^ 0; +** i = 1 << 31; // change the most lefted bit from '0' (positive) +** // to '1' (negative), the signed int min +** printf("* %li\n* %s\n\n",i,ft_itoa(i)); +** i = 2147483646; +** printf(" %li\n %s\n\n",i,ft_itoa(i)); +** i = -2147483648; +** printf("| %li\n| %s\n\n",i,ft_itoa(i)); +** i = -2147483647; +** printf(" %li\n %s\n\n",i,ft_itoa(i)); +** i = 2147483648; +** printf(" %li\n %s\n\n",i,ft_itoa(i)); +** i = -2147483649; +** printf(" %li\n %s\n\n",i,ft_itoa(i)); +** i = 9223372036854775807; +** printf("| %li\n| %s\n\n",i,ft_itoa(i)); +** i = -9223372036854775807; +** printf("| %li\n| %s\n\n",i,ft_itoa(i)); +** } +** return 0; +** } +*/ + +#include "libft.h" + +char *ft_itoa(long int n) +{ + char *str; + int len; + long int cpy; + char rgt; + + cpy = (n < 0) ? (n / 10) * -10 : (n / 10) * 10; + len = (n < 0) ? 2 : 1; + rgt = (n < 0) ? (n % 10) * -1 + '0' : n % 10 + '0'; + while (n /= 10) + len++; + if (!(str = (char *)malloc(sizeof(char) * (len + 1)))) + return (NULL); + str[len] = '\0'; + str[--len] = rgt; + while (cpy /= 10) + str[--len] = cpy % 10 + '0'; + if (len) + str[0] = '-'; + return (str); +} diff --git a/testing/srcs/test_lstadd_back.c b/testing/srcs/test_lstadd_back.c new file mode 100644 index 0000000..315119b --- /dev/null +++ b/testing/srcs/test_lstadd_back.c @@ -0,0 +1,90 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstadd_back.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:11:53 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:36:12 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** add an element to the end of a list +** or first if list has no element so far +*/ + +/* +** #include +** +** typedef struct s_list +** { +** void *content; +** struct s_list *next; +** } t_list; +** +** t_list *ft_lstnew(void *content) +** { +** t_list *lst; +** +** if (!(lst = (t_list *)malloc(sizeof(*lst)))) +** return (NULL); +** if (!content) +** lst->content = NULL; +** else +** lst->content = content; +** lst->next = NULL; +** return (lst); +** } +** +** void ft_lstadd_back(t_list **alst, t_list *new); +** +** int main(void) +** { +** char tresor; +** char matos; +** char friends; +** t_list *toto; +** t_list *tmp; +** +** tresor = 'a'; +** matos = 'b'; +** friends = 'c'; +** toto = ft_lstnew(&tresor); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** tmp = ft_lstnew(&matos); +** ft_lstadd_back(&toto, tmp); +** printf("----------------------\n"); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** tmp = ft_lstnew(&friends); +** ft_lstadd_back(&toto, tmp); +** printf("----------------------\n"); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); +** printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); +** return (0); +** } +*/ + +#include "libft.h" + +void ft_lstadd_back(t_list **alst, t_list *new) +{ + t_list *tmp; + + if (alst) + { + tmp = *alst; + if (!tmp) + *alst = new; + else + { + while (tmp->next) + tmp = tmp->next; + tmp->next = new; + } + } +} diff --git a/testing/srcs/test_lstadd_front.c b/testing/srcs/test_lstadd_front.c new file mode 100644 index 0000000..3f90569 --- /dev/null +++ b/testing/srcs/test_lstadd_front.c @@ -0,0 +1,94 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstadd_front.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:12:02 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:36:54 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** add an element to the begining of a list +*/ + +/* +** #include +** +** typedef struct s_list +** { +** void *content; +** struct s_list *next; +** } t_list; +** +** void *ft_memcpy(void *dst, const void *src, size_t n) +** { +** size_t i; +** char *ptr; +** char *ptr2; +** +** ptr = (char *)dst; +** ptr2 = (char *)src; +** i = -1; +** while (++i < n) +** ptr[i] = ptr2[i]; +** return (dst); +** } +** +** t_list *ft_lstnew(void *content) +** { +** t_list *lst; +** +** if (!(lst = (t_list *)malloc(sizeof(*lst)))) +** return (NULL); +** if (!content) +** lst->content = NULL; +** else +** { +** if (!(lst->content = malloc(sizeof(content)))) +** return (NULL); +** ft_memcpy(lst->content, content, sizeof(content)); +** } +** lst->next = NULL; +** return (lst); +** } +** +** void ft_lstadd_front(t_list **alst, t_list *new); +** +** int main(void) +** { +** char tresor; +** char matos; +** char friends; +** t_list *toto; +** t_list *tmp; +** +** tresor = 'a'; +** matos = 'b'; +** friends = 'c'; +** toto = ft_lstnew(&tresor); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** tmp = ft_lstnew(&matos); +** ft_lstadd_front(&toto, tmp); +** printf("----------------------\n"); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** tmp = ft_lstnew(&friends); +** ft_lstadd_front(&toto, tmp); +** printf("----------------------\n"); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->dqta:%c\n",*(char*)(toto->next->next->content)); +** return (0); +** } +*/ + +#include "libft.h" + +void ft_lstadd_front(t_list **alst, t_list *new) +{ + new->next = *alst; + *alst = new; +} diff --git a/testing/srcs/test_lstclear.c b/testing/srcs/test_lstclear.c new file mode 100644 index 0000000..a28d366 --- /dev/null +++ b/testing/srcs/test_lstclear.c @@ -0,0 +1,107 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstclear.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:13:30 by hulamy #+# #+# */ +/* Updated: 2019/11/28 17:06:48 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** delete and free an element of the list and all the followings +*/ + +/* +** #include +** +** typedef struct s_list +** { +** void *content; +** struct s_list *next; +** } t_list; +** +** t_list *ft_lstnew(void *content) +** { +** t_list *lst; +** +** if (!(lst = (t_list *)malloc(sizeof(*lst)))) +** return (NULL); +** if (!content) +** lst->content = NULL; +** else +** lst->content = content; +** lst->next = NULL; +** return (lst); +** } +** +** void ft_lstadd_back(t_list **alst, t_list *new) +** { +** t_list *tmp; +** +** if (alst) +** { +** tmp = *alst; +** if (!tmp) +** *alst = new; +** else +** { +** while (tmp->next) +** tmp = tmp->next; +** tmp->next = new; +** } +** new->next = NULL; +** } +** } +** +** void ft_delete(void *element) +** { +** *(char*)element = '\0'; +** } +** +** void ft_lstdelone(t_list *lst, void (*del)(void *)) +** { +** del(lst->content); +** free(lst); +** lst = NULL; +** } +** +** void ft_lstclear(t_list **lst, void (*del)(void *)); +** +** int main(void) +** { +** t_list *toto; +** void (ft_delete)(void*); +** +** printf("sizeof(t_list)%lu\n",sizeof(t_list)); +** toto = ft_lstnew("a"); +** toto->next = ft_lstnew("b"); +** toto->next->next = ft_lstnew("c"); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); +** printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); +** ft_lstclear(&(toto->next), ft_delete); +** printf("----------------------\n"); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt :%s\n",(char*)(toto->next->next)); +** return (0); +** } +*/ + +#include "libft.h" + +void ft_lstclear(t_list **lst, void (*del)(void *)) +{ + t_list *next; + + while (*lst != NULL) + { + next = (*lst)->next; + ft_lstdelone(*lst, del); + *lst = next; + } +} diff --git a/testing/srcs/test_lstdelone.c b/testing/srcs/test_lstdelone.c new file mode 100644 index 0000000..0cf925a --- /dev/null +++ b/testing/srcs/test_lstdelone.c @@ -0,0 +1,97 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstdelone.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:14:03 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:35:53 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** free an element and delete its content with del +** next is not free +*/ + +/* +** #include +** +** typedef struct s_list +** { +** void *content; +** struct s_list *next; +** } t_list; +** +** t_list *ft_lstnew(void *content) +** { +** t_list *lst; +** +** if (!(lst = (t_list *)malloc(sizeof(*lst)))) +** return (NULL); +** if (!content) +** lst->content = NULL; +** else +** lst->content = content; +** lst->next = NULL; +** return (lst); +** } +** +** void ft_lstadd_back(t_list **alst, t_list *new) +** { +** t_list *tmp; +** +** if (alst) +** { +** tmp = *alst; +** if (!tmp) +** *alst = new; +** else +** { +** while (tmp->next) +** tmp = tmp->next; +** tmp->next = new; +** } +** new->next = NULL; +** } +** } +** +** void ft_delete(void *element) +** { +** *(char*)element = '\0'; +** } +** +** void ft_lstdelone(t_list *lst, void (*del)(void *)); +** +** int main(void) +** { +** t_list *toto; +** void (ft_delete)(void*); +** +** toto = ft_lstnew("a"); +** toto->next = ft_lstnew("b"); +** toto->next->next = ft_lstnew("c"); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); +** printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); +** ft_lstdelone(toto->next, ft_delete); +** printf("----------------------\n"); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); +** printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); +** return (0); +** } +*/ + +#include "libft.h" + +void ft_lstdelone(t_list *lst, void (*del)(void *)) +{ + if (lst->content && del) + del(lst->content); + free(lst); + lst = NULL; +} diff --git a/testing/srcs/test_lstiter.c b/testing/srcs/test_lstiter.c new file mode 100644 index 0000000..ee67de6 --- /dev/null +++ b/testing/srcs/test_lstiter.c @@ -0,0 +1,85 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstiter.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:14:11 by hulamy #+# #+# */ +/* Updated: 2019/12/01 16:03:40 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** go through all elements of the list and apply the function f to each of them +*/ + +/* +** #include +** +** typedef struct s_list +** { +** void *content; +** struct s_list *next; +** } t_list; +** +** t_list *ft_lstnew(void *content) +** { +** t_list *lst; +** +** if (!(lst = (t_list *)malloc(sizeof(*lst)))) +** return (NULL); +** if (!content) +** lst->content = NULL; +** else +** lst->content = content; +** lst->next = NULL; +** return (lst); +** } +** +** void ft_lstiter(t_list *lst, void (*f)(void*)); +** +** void to_uppercase(void *element) +** { +** // *(char*)(((t_list*)element)->content) -= 32; +** // or : +** t_list *tmp; +** +** tmp = (t_list*)element; +** *(char*)(tmp->content) -= 32; +** } +** +** int main(void) +** { +** t_list *toto; +** void to_uppercase(void*); +** +** toto = ft_lstnew("a"); +** toto->next = ft_lstnew("b"); +** toto->next->next = ft_lstnew("c"); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); +** printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); +** printf("---------------------------\n"); +** ft_lstiter(toto, to_uppercase); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); +** printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); +** return (0); +** } +*/ + +#include "libft.h" + +void ft_lstiter(t_list *lst, void (*f)(void *)) +{ + if (!f) + return ; + while (lst) + { + f(lst->content); + lst = lst->next; + } +} diff --git a/testing/srcs/test_lstlast.c b/testing/srcs/test_lstlast.c new file mode 100644 index 0000000..e6173f2 --- /dev/null +++ b/testing/srcs/test_lstlast.c @@ -0,0 +1,100 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstlast.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:14:49 by hulamy #+# #+# */ +/* Updated: 2019/11/28 16:43:18 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** return a pointer to the last element of a list +*/ + +/* +** #include +** +** typedef struct s_list +** { +** void *content; +** struct s_list *next; +** } t_list; +** +** void *ft_memcpy(void *dst, const void *src, size_t n) +** { +** size_t i; +** char *ptr; +** char *ptr2; +** +** ptr = (char *)dst; +** ptr2 = (char *)src; +** i = -1; +** while (++i < n) +** ptr[i] = ptr2[i]; +** return (dst); +** } +** +** t_list *ft_lstnew(void *content) +** { +** t_list *lst; +** +** if (!(lst = (t_list *)malloc(sizeof(*lst)))) +** return (NULL); +** if (!content) +** lst->content = NULL; +** else +** { +** if (!(lst->content = malloc(sizeof(content)))) +** return (NULL); +** ft_memcpy(lst->content, content, sizeof(content)); +** } +** lst->next = NULL; +** return (lst); +** } +** +** void ft_lstadd_front(t_list **alst, t_list *new) +** { +** new->next = *alst; +** *alst = new; +** } +** +** t_list *ft_lstlast(t_list *lst); +** +** int main(void) +** { +** char tresor; +** t_list *toto; +** t_list *tmp; +** +** tresor = 'a'; +** toto = ft_lstnew(&tresor); +** tresor = 'b'; +** tmp = ft_lstnew(&tresor); +** ft_lstadd_front(&toto, tmp); +** tresor = 'c'; +** tmp = ft_lstnew(&tresor); +** ft_lstadd_front(&toto, tmp); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); +** tmp = ft_lstlast(toto); +** printf("%c\n",*(char*)(tmp->content)); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%c\n",*(char*)(toto->next->next->content)); +** return (0); +** } +*/ + +#include "libft.h" + +t_list *ft_lstlast(t_list *lst) +{ + if (lst) + while (lst->next) + lst = lst->next; + return (lst); +} diff --git a/testing/srcs/test_lstmap.c b/testing/srcs/test_lstmap.c new file mode 100644 index 0000000..41e7a25 --- /dev/null +++ b/testing/srcs/test_lstmap.c @@ -0,0 +1,145 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstmap.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:15:42 by hulamy #+# #+# */ +/* Updated: 2019/12/01 16:02:13 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** iterate trhough linked list and apply to each element a function f +** if necessary the function del is used to delete an element +*/ + +/* +** #include +** #include +** #include +** +** typedef struct s_list +** { +** void *content; +** struct s_list *next; +** } t_list; +** +** t_list *ft_lstnew(void *content) +** { +** t_list *lst; +** +** if (!(lst = (t_list *)malloc(sizeof(*lst)))) +** return (NULL); +** if (!content) +** lst->content = NULL; +** else +** lst->content = content; +** lst->next = NULL; +** return (lst); +** } +** +** void ft_lstadd_back(t_list **alst, t_list *new) +** { +** t_list *tmp; +** +** if (alst) +** { +** tmp = *alst; +** if (!tmp) +** *alst = new; +** else +** { +** while (tmp->next) +** tmp = tmp->next; +** tmp->next = new; +** } +** new->next = NULL; +** } +** } +** +** char *ft_strdup(const char *src) +** { +** int i; +** char *str; +** +** i = 0; +** while (src[i] != '\0') +** i++; +** if (!(str = (char*)malloc(sizeof(*str) * (i + 1)))) +** return (NULL); +** while (i-- >= 0) +** str[i + 1] = src[i + 1]; +** return (str); +** } +** +** void *to_uppercase(void *element) +** { +** char *i; +** +** if (!(i = ft_strdup((char*)element))) +** return (NULL); +** *i -= 32; +** return ((void *)i); +** } +** +** void ft_delete(void *element) +** { +** *(char*)element = '\0'; +** } +** +** t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *)); +** +** int main(void) +** { +** t_list *toto; +** void *(to_uppercase)(void *); +** void (ft_delete)(void*); +** +** toto = ft_lstnew("aa"); +** toto->next = ft_lstnew("b"); +** toto->next->next = ft_lstnew("c"); +** printf("toto->data :%s\n",(char*)(toto->content)); +** printf("toto->nxt->data :%s\n",(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%s\n",(char*)(toto->next->next->content)); +** printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); +** toto = ft_lstmap(toto, to_uppercase, ft_delete); +** printf("----------------------\n"); +** printf("toto->data :%s\n",(char*)(toto->content)); +** printf("toto->nxt->data :%s\n",(char*)(toto->next->content)); +** printf("toto->nxt->nxt->data:%s\n",(char*)(toto->next->next->content)); +** printf("toto->nxt->nxt->nxt :%s\n",(char*)(toto->next->next->next)); +** return (0); +** } +*/ + +#include "libft.h" + +t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *)) +{ + t_list *new; + t_list *tmp; + + if (!lst) + return (NULL); + if (!(tmp = ft_lstnew(f(lst->content)))) + { + del(tmp->content); + free(tmp); + return (NULL); + } + new = tmp; + while (lst->next) + { + lst = lst->next; + if (!(tmp->next = ft_lstnew(f(lst->content)))) + { + del(tmp->next->content); + free(tmp->next); + return (NULL); + } + tmp = tmp->next; + } + return (new); +} diff --git a/testing/srcs/test_lstnew.c b/testing/srcs/test_lstnew.c new file mode 100644 index 0000000..401f6c9 --- /dev/null +++ b/testing/srcs/test_lstnew.c @@ -0,0 +1,59 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstnew.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:16:20 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:29:46 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** create a new list +*/ + +/* +** #include +** +** typedef struct s_list +** { +** void *content; +** struct s_list *next; +** } t_list; +** +** t_list *ft_lstnew(void *content); +** +** int main(void) +** { +** char tresor; +** t_list *toto; +** +** tresor = 'd'; +** printf("tresor : %c\n",tresor); +** toto = ft_lstnew(&tresor); +** //toto->content was alocated as void* so it need cast +** printf("toto->content : %c\n",*(char*)(toto->content)); +** tresor = 'D'; +** printf("transform tresor : %c\n",tresor); +** printf("and also toto->content: %c\n",*(char*)(toto->content)); +** return (0); +** } +*/ + +#include "libft.h" + +t_list *ft_lstnew(void *content) +{ + t_list *lst; + + if (!(lst = (t_list *)malloc(sizeof(*lst)))) + return (NULL); + if (!content) + lst->content = NULL; + else + lst->content = content; + lst->next = NULL; + return (lst); +} diff --git a/testing/srcs/test_lstsize.c b/testing/srcs/test_lstsize.c new file mode 100644 index 0000000..5ff5f2d --- /dev/null +++ b/testing/srcs/test_lstsize.c @@ -0,0 +1,86 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstsize.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:31:48 by hulamy #+# #+# */ +/* Updated: 2019/11/25 16:06:41 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** return the size of the linked list +*/ + +/* +** #include +** +** typedef struct s_list +** { +** void *content; +** struct s_list *next; +** } t_list; +** +** t_list *ft_lstnew(void *content) +** { +** t_list *lst; +** +** if (!(lst = (t_list *)malloc(sizeof(*lst)))) +** return (NULL); +** if (!content) +** lst->content = NULL; +** else +** lst->content = content; +** lst->next = NULL; +** return (lst); +** } +** +** void ft_lstadd_front(t_list **alst, t_list *new) +** { +** new->next = *alst; +** *alst = new; +** } +** +** int ft_lstsize(t_list *lst); +** +** int main(void) +** { +** char tresor; +** t_list *toto; +** t_list *tmp; +** +** tresor = 'a'; +** toto = ft_lstnew(&tresor); +** tresor = 'b'; +** tmp = ft_lstnew(&tresor); +** ft_lstadd_front(&toto, tmp); +** tresor = 'c'; +** tmp = ft_lstnew(&tresor); +** ft_lstadd_front(&toto, tmp); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->dqta:%c\n",*(char*)(toto->next->next->content)); +** printf("%i\n",ft_lstsize(toto)); +** printf("toto->data :%c\n",*(char*)(toto->content)); +** printf("toto->nxt->data :%c\n",*(char*)(toto->next->content)); +** printf("toto->nxt->nxt->dqta:%c\n",*(char*)(toto->next->next->content)); +** return (0); +** } +*/ + +#include "libft.h" + +int ft_lstsize(t_list *lst) +{ + int size; + + size = 0; + while (lst) + { + size++; + lst = lst->next; + } + return (size); +} diff --git a/testing/srcs/test_memalloc.c b/testing/srcs/test_memalloc.c new file mode 100644 index 0000000..072e7f1 --- /dev/null +++ b/testing/srcs/test_memalloc.c @@ -0,0 +1,27 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memalloc.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/19 15:21:44 by hulamy #+# #+# */ +/* Updated: 2019/11/19 15:23:17 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** allocate size byte of memory and return a pointer to the allocated memory +*/ + +#include "libft.h" + +void *ft_memalloc(size_t size) +{ + void *tmp; + + if (!size || !(tmp = malloc(size))) + return (NULL); + ft_bzero(tmp, size); + return (tmp); +} diff --git a/testing/srcs/test_memccpy.c b/testing/srcs/test_memccpy.c new file mode 100644 index 0000000..fee3c2f --- /dev/null +++ b/testing/srcs/test_memccpy.c @@ -0,0 +1,36 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memccpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 15:24:51 by hulamy #+# #+# */ +/* Updated: 2019/11/25 15:25:09 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** copy string until character is found and place cursor in dst +** after last byte copied +*/ + +#include "libft.h" + +void *ft_memccpy(void *dst, const void *src, int c, size_t n) +{ + unsigned char *dest; + unsigned char *sourc; + size_t i; + + i = -1; + dest = (unsigned char *)dst; + sourc = (unsigned char *)src; + while (++i < n) + { + dest[i] = sourc[i]; + if (sourc[i] == (unsigned char)c) + return (dst + i + 1); + } + return (NULL); +} diff --git a/testing/srcs/test_memchr.c b/testing/srcs/test_memchr.c new file mode 100644 index 0000000..6a1c359 --- /dev/null +++ b/testing/srcs/test_memchr.c @@ -0,0 +1,51 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memchr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:55:51 by hulamy #+# #+# */ +/* Updated: 2019/12/12 21:50:32 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** locate character in string and return its position +*/ + +/* +** #include +** +** void *ft_memchr(const void *s, int c, size_t n); +** +** int main(void) +** { +** const char *str; +** +** char *pouet = "z"; +** char *lolzer = (char *)&pouet[2]; +** lolzer = "aaaaaaaaaa"; +** str = ft_memchr(pouet, 'a', 50); +** if (!str) +** printf("NULL"); +** else +** printf("%s\n", str); +** return (0); +** } +*/ + +#include "libft.h" + +void *ft_memchr(const void *s, int c, size_t n) +{ + unsigned char *sbis; + size_t i; + + sbis = (unsigned char *)s; + i = -1; + while (++i < n) + if (sbis[i] == (unsigned char)c) + return ((void *)sbis + i); + return (NULL); +} diff --git a/testing/srcs/test_memcmp.c b/testing/srcs/test_memcmp.c new file mode 100644 index 0000000..c05a028 --- /dev/null +++ b/testing/srcs/test_memcmp.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memcmp.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:56:05 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:07 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** compare two bytes strings (doesnt recognize a null terminated string) +** and return value of difference between first two different character +*/ + +#include "libft.h" + +int ft_memcmp(const void *s1, const void *s2, size_t n) +{ + unsigned char *frst; + unsigned char *scnd; + size_t i; + + i = 0; + frst = (unsigned char *)s1; + scnd = (unsigned char *)s2; + while (i < n && frst[i] == scnd[i]) + i++; + return ((i == n) ? 0 : frst[i] - scnd[i]); +} diff --git a/testing/srcs/test_memcpy.c b/testing/srcs/test_memcpy.c new file mode 100644 index 0000000..b9f0b38 --- /dev/null +++ b/testing/srcs/test_memcpy.c @@ -0,0 +1,46 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memcpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:56:16 by hulamy #+# #+# */ +/* Updated: 2019/12/01 14:54:14 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** copy n characters from src to dst and return dst +*/ + +/* +** #include +** +** void *ft_memcpy(void *dst, const void *src, size_t n); +** +** int main(int ac, char **av) +** { +** if (ac == 4) +** printf("%s\n", ft_memcpy(av[1], av[2], atoi(av[3]))); +** return (0); +** } +*/ + +#include "libft.h" + +void *ft_memcpy(void *dst, const void *src, size_t n) +{ + int i; + char *ptr; + char *ptr2; + + i = -1; + ptr = (char *)dst; + ptr2 = (char *)src; + if (dst == src) + return (dst); + while (++i < (int)n) + ptr[i] = ptr2[i]; + return (dst); +} diff --git a/testing/srcs/test_memdel.c b/testing/srcs/test_memdel.c new file mode 100644 index 0000000..f057043 --- /dev/null +++ b/testing/srcs/test_memdel.c @@ -0,0 +1,26 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memdel.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:13:26 by hulamy #+# #+# */ +/* Updated: 2019/04/03 15:44:12 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** free memory +*/ + +#include "libft.h" + +void ft_memdel(void **ap) +{ + if (ap && *ap) + { + free(*ap); + *ap = 0; + } +} diff --git a/testing/srcs/test_memmove.c b/testing/srcs/test_memmove.c new file mode 100644 index 0000000..d005136 --- /dev/null +++ b/testing/srcs/test_memmove.c @@ -0,0 +1,68 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memmove.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:56:25 by hulamy #+# #+# */ +/* Updated: 2019/12/10 23:53:40 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** copy n characters from src to dst in a non destructive way and return dst +*/ + +/* +** #include +** +** size_t ft_strlen(const char *str) +** { +** size_t i; +** +** i = 0; +** while (str[i]) +** i++; +** return (i); +** } +** +** void *ft_memmove(void *dst, const void *src, size_t len); +** +** //int main(int ac, char **av) +** int main(void) +** { +** char *src = "this is a good nyancat !\r\n"; +** char dst[0xF0]; +** int size = strlen(src); +** +** // if (ac == 4) +** // printf("%s\n", ft_memmove(av[1], av[2], atoi(av[3]))); +** +** ft_memmove(dst, src, size); +** printf("%s", dst); +** return (0); +** } +*/ + +#include "libft.h" + +void *ft_memmove(void *dst, const void *src, size_t len) +{ + size_t i; + char *cpsrc; + char *cpdst; + + i = -1; + cpsrc = (char *)src; + cpdst = (char *)dst; + if (dst == src) + return (dst); + if (cpsrc < cpdst) + while (len--) + cpdst[len] = cpsrc[len]; + else + while (++i < len) + cpdst[i] = cpsrc[i]; + return (dst); +} diff --git a/testing/srcs/test_memset.c b/testing/srcs/test_memset.c new file mode 100644 index 0000000..10c2d7c --- /dev/null +++ b/testing/srcs/test_memset.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memset.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:56:37 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:38 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** copy n time a character in a string and return the string +*/ + +#include "libft.h" + +void *ft_memset(void *b, int c, size_t len) +{ + char *ptr; + size_t i; + + ptr = (char *)b; + i = 0; + while (i < len) + ptr[i++] = c; + return (b); +} diff --git a/testing/srcs/test_printf.c b/testing/srcs/test_printf.c new file mode 100644 index 0000000..e69de29 diff --git a/testing/srcs/test_putchar.c b/testing/srcs/test_putchar.c new file mode 100644 index 0000000..b0aa9cb --- /dev/null +++ b/testing/srcs/test_putchar.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putchar.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:14:00 by hulamy #+# #+# */ +/* Updated: 2018/11/14 21:14:01 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_putchar(char c) +{ + write(1, &c, 1); +} diff --git a/testing/srcs/test_putchar_fd.c b/testing/srcs/test_putchar_fd.c new file mode 100644 index 0000000..a48c1d5 --- /dev/null +++ b/testing/srcs/test_putchar_fd.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putchar_fd.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:59:40 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:59:42 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_putchar_fd(char c, int fd) +{ + write(fd, &c, 1); +} diff --git a/testing/srcs/test_putendl.c b/testing/srcs/test_putendl.c new file mode 100644 index 0000000..c1d9a6a --- /dev/null +++ b/testing/srcs/test_putendl.c @@ -0,0 +1,19 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putendl.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:14:32 by hulamy #+# #+# */ +/* Updated: 2018/11/14 21:14:33 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_putendl(char const *s) +{ + ft_putstr(s); + ft_putchar('\n'); +} diff --git a/testing/srcs/test_putendl_fd.c b/testing/srcs/test_putendl_fd.c new file mode 100644 index 0000000..5a0ef44 --- /dev/null +++ b/testing/srcs/test_putendl_fd.c @@ -0,0 +1,23 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putendl_fd.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:59:47 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:59:48 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** write the string s on the given file descriptor fd, followed by a newline +*/ + +#include "libft.h" + +void ft_putendl_fd(char *s, int fd) +{ + ft_putstr_fd(s, fd); + ft_putchar_fd('\n', fd); +} diff --git a/testing/srcs/test_putnbr.c b/testing/srcs/test_putnbr.c new file mode 100644 index 0000000..bb8e2d7 --- /dev/null +++ b/testing/srcs/test_putnbr.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putnbr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:14:57 by hulamy #+# #+# */ +/* Updated: 2018/11/14 21:14:58 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_putnbr(int n) +{ + ft_putnbr_fd(n, 1); +} diff --git a/testing/srcs/test_putnbr_fd.c b/testing/srcs/test_putnbr_fd.c new file mode 100644 index 0000000..afc9e85 --- /dev/null +++ b/testing/srcs/test_putnbr_fd.c @@ -0,0 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putnbr_fd.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:59:56 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:59:57 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_putnbr_fd(int n, int fd) +{ + long l; + + l = n; + if (l < 0) + { + ft_putchar_fd('-', fd); + l *= -1; + } + if (l >= 10) + ft_putnbr_fd(l / 10, fd); + ft_putchar_fd((l % 10) + '0', fd); +} diff --git a/testing/srcs/test_putnbrbase.c b/testing/srcs/test_putnbrbase.c new file mode 100644 index 0000000..bf0d627 --- /dev/null +++ b/testing/srcs/test_putnbrbase.c @@ -0,0 +1,59 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putnbrbase.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/16 15:17:00 by hulamy #+# #+# */ +/* Updated: 2018/11/16 15:23:43 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +static int check(char *base) +{ + int i; + int j; + + i = 0; + while (base[i]) + { + j = i + 1; + while (base[j]) + { + if (base[i] == base[j]) + return (0); + j++; + } + if (base[i] == '-' || base[i] == '+') + return (0); + i++; + } + if (i >= 2) + return (1); + return (0); +} + +void ft_putnbrbase(int nbr, char *base) +{ + int i; + long n; + + i = 0; + n = nbr; + if (check(base)) + { + if (n < 0) + { + ft_putchar('-'); + n = -n; + } + while (base[i]) + i++; + if (n >= i) + ft_putnbrbase(n / i, base); + ft_putchar(base[n % i]); + } +} diff --git a/testing/srcs/test_putnbrendl.c b/testing/srcs/test_putnbrendl.c new file mode 100644 index 0000000..ddd05f6 --- /dev/null +++ b/testing/srcs/test_putnbrendl.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putnbrendl.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/02/19 10:38:07 by hulamy #+# #+# */ +/* Updated: 2019/02/19 10:42:46 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_putnbrendl(int n) +{ + ft_putnbrendl_fd(n, 1); +} diff --git a/testing/srcs/test_putnbrendl_fd.c b/testing/srcs/test_putnbrendl_fd.c new file mode 100644 index 0000000..266dc55 --- /dev/null +++ b/testing/srcs/test_putnbrendl_fd.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putnbrendl_fd.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/02/19 10:37:58 by hulamy #+# #+# */ +/* Updated: 2019/02/19 10:42:48 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_putnbrendl_fd(int n, int fd) +{ + long l; + + l = n; + if (l < 0) + { + ft_putchar_fd('-', fd); + l *= -1; + } + if (l >= 10) + ft_putnbr_fd(l / 10, fd); + ft_putchar_fd((l % 10) + '0', fd); + ft_putchar_fd('\n', fd); +} diff --git a/testing/srcs/test_putstr.c b/testing/srcs/test_putstr.c new file mode 100644 index 0000000..78617eb --- /dev/null +++ b/testing/srcs/test_putstr.c @@ -0,0 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putstr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:15:19 by hulamy #+# #+# */ +/* Updated: 2018/11/14 21:15:19 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_putstr(char const *s) +{ + int i; + + i = 0; + while (s && s[i]) + ft_putchar(s[i++]); +} diff --git a/testing/srcs/test_putstr_fd.c b/testing/srcs/test_putstr_fd.c new file mode 100644 index 0000000..cf6ad12 --- /dev/null +++ b/testing/srcs/test_putstr_fd.c @@ -0,0 +1,23 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_putstr_fd.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:00:04 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:00:05 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** write the string s on the given file descritor fd +*/ + +#include "libft.h" + +void ft_putstr_fd(char *s, int fd) +{ + while (s && *s) + ft_putchar_fd(*s++, fd); +} diff --git a/testing/srcs/test_sign.c b/testing/srcs/test_sign.c new file mode 100644 index 0000000..b665855 --- /dev/null +++ b/testing/srcs/test_sign.c @@ -0,0 +1,8 @@ +#include "libft.h" + +int ft_sign(int i) +{ + if (i < 0) + return (-1); + return (1); +} diff --git a/testing/srcs/test_smaller.c b/testing/srcs/test_smaller.c new file mode 100644 index 0000000..688f466 --- /dev/null +++ b/testing/srcs/test_smaller.c @@ -0,0 +1,8 @@ +#include "libft.h" + +int ft_smaller(int a, int b) +{ + if (a > b) + return (b); + return (a); +} diff --git a/testing/srcs/test_split.c b/testing/srcs/test_split.c new file mode 100644 index 0000000..4a27b9a --- /dev/null +++ b/testing/srcs/test_split.c @@ -0,0 +1,137 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_split.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/12/12 22:41:54 by hulamy #+# #+# */ +/* Updated: 2019/12/13 01:35:15 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** return an array of string with each word found in str, with c as separator +*/ + +/* +** #include +** #include +** #include +** +** size_t ft_strlen(const char *str) +** { +** size_t i; +** +** i = 0; +** while (str[i]) +** i++; +** return (i); +** } +** +** char *ft_substr(char const *s, unsigned int start, size_t len) +** { +** char *str; +** size_t i; +** +** if (!s) +** return (NULL); +** if (ft_strlen(s) < start) +** return (""); +** if (!(str = (char *)malloc(sizeof(char) * (len + 1)))) +** return (NULL); +** i = 0; +** while (i < len && s[start]) +** str[i++] = s[start++]; +** str[i] = '\0'; +** return (str); +** } +** +** char **ft_split(char const *s, char c); +** char **ft_strsplit(char const *s, char c); +** +** int main(void) +** { +** char **str; +** int i; +** +** char *s; +** char c; +** +** i = -1; +** s = NULL; +** c = ' '; +** str = ft_split(s, c); +** //if (str) +** //{ +** printf("s : '%s'\n", s); +** printf("*str : '%p'\n", str[0]); +** while (str[++i]) +** printf("str[%i] : '%s'\n", i, str[i]); +** //} +** return (0); +** } +*/ + +#include "libft.h" + +static int count(char const *s, char c) +{ + int i; + int words; + + i = -1; + words = 0; + while (s[++i] != '\0') + if (s[i] != c && ++words) + while (s[i + 1] != '\0' && s[i + 1] != c) + i++; + return (words); +} + +void *ft_free(char **array, int w) +{ + int i; + + i = 0; + while (array[i] != NULL && i < w) + free(array[i++]); + free(array); + return (NULL); +} + +char **empty_s(char **empty) +{ + if (!(empty = (char **)malloc(sizeof(char *) * 1))) + return (NULL); + empty[0] = NULL; + return (empty); +} + +char **ft_split(char const *s, char c) +{ + char **array; + int w; + int len; + + if (!s) + return (empty_s(NULL)); + if (!(array = (char **)malloc(sizeof(char *) * (count(s, c) + 1)))) + return (NULL); + w = 0; + while (*s != '\0') + { + len = 0; + if (*s != c) + { + while (s[len] != '\0' && s[len] != c) + len++; + if (!(array[w++] = ft_substr(s, 0, len))) + return (ft_free(array, w)); + s += len - 1; + } + s++; + } + array[w] = NULL; + return (array); +} diff --git a/testing/srcs/test_sqrt.c b/testing/srcs/test_sqrt.c new file mode 100644 index 0000000..04c1483 --- /dev/null +++ b/testing/srcs/test_sqrt.c @@ -0,0 +1,15 @@ +#include "libft.h" + +/* +** return the square root of nb +** or the integer value of it +*/ +int ft_sqrt(int nb) +{ + int i; + + i = 0; + while ((i*i) < nb) + i++; + return (i); +} diff --git a/testing/srcs/test_strcat.c b/testing/srcs/test_strcat.c new file mode 100644 index 0000000..d78543c --- /dev/null +++ b/testing/srcs/test_strcat.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcat.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:15:40 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:12:58 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** append src to dest (dest must have sufficient space) and return dest +*/ + +#include "libft.h" + +char *ft_strcat(char *dest, const char *src) +{ + int i; + int j; + + i = 0; + j = 0; + while (dest[i]) + i++; + while (src[j]) + dest[i++] = src[j++]; + dest[i] = '\0'; + return (dest); +} diff --git a/testing/srcs/test_strchr.c b/testing/srcs/test_strchr.c new file mode 100644 index 0000000..b220565 --- /dev/null +++ b/testing/srcs/test_strchr.c @@ -0,0 +1,33 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strchr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:56:46 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:47 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** locate the first occurence of character c in string s +** and return pointer to its location +*/ + +#include "libft.h" + +char *ft_strchr(const char *s, int c) +{ + int i; + int j; + + i = 0; + j = -1; + while (s[i]) + i++; + while (++j < i + 1) + if (s[j] == c) + return ((char *)s + j); + return (NULL); +} diff --git a/testing/srcs/test_strchrset.c b/testing/srcs/test_strchrset.c new file mode 100644 index 0000000..103e857 --- /dev/null +++ b/testing/srcs/test_strchrset.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strchrset.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/16 15:07:11 by hulamy #+# #+# */ +/* Updated: 2020/03/10 15:24:14 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** if any character of the character set is found in s +** return a pointer to the first found, else return 0 +*/ + +#include "libft.h" + +char *ft_strchrset(const char *s, const char *set) +{ + int i; + + i = 0; + while (set[i] != '\0') + { + if (ft_strchr(s, set[i]) != NULL) + return ((char *)set + i); + i++; + } + return (NULL); +} diff --git a/testing/srcs/test_strclr.c b/testing/srcs/test_strclr.c new file mode 100644 index 0000000..5e3952c --- /dev/null +++ b/testing/srcs/test_strclr.c @@ -0,0 +1,23 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strclr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:15:58 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:17:42 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** fill string with zeros +*/ + +#include "libft.h" + +void ft_strclr(char *s) +{ + if (s) + ft_bzero(s, ft_strlen(s)); +} diff --git a/testing/srcs/test_strcmp.c b/testing/srcs/test_strcmp.c new file mode 100644 index 0000000..f6603c3 --- /dev/null +++ b/testing/srcs/test_strcmp.c @@ -0,0 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcmp.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:16:08 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:18:30 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** compare two null terminated strings and return value +** of difference between first two different character +*/ + +#include "libft.h" + +int ft_strcmp(const char *s1, const char *s2) +{ + int i; + + i = 0; + while (s1[i] && s1[i] == s2[i]) + i++; + return ((unsigned char)s1[i] - (unsigned char)s2[i]); +} diff --git a/testing/srcs/test_strcpy.c b/testing/srcs/test_strcpy.c new file mode 100644 index 0000000..7d2a45b --- /dev/null +++ b/testing/srcs/test_strcpy.c @@ -0,0 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:16:17 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:19:19 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** copy string src to dst including '\0' and return dst +*/ + +#include "libft.h" + +char *ft_strcpy(char *dest, const char *src) +{ + int i; + + i = -1; + while (src[++i]) + dest[i] = src[i]; + dest[i] = '\0'; + return (dest); +} diff --git a/testing/srcs/test_strdel.c b/testing/srcs/test_strdel.c new file mode 100644 index 0000000..82cbc2e --- /dev/null +++ b/testing/srcs/test_strdel.c @@ -0,0 +1,26 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strdel.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:16:25 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:19:54 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** free memory +*/ + +#include "libft.h" + +void ft_strdel(char **as) +{ + if (as && *as) + { + free(*as); + *as = 0; + } +} diff --git a/testing/srcs/test_strdup.c b/testing/srcs/test_strdup.c new file mode 100644 index 0000000..b917ac9 --- /dev/null +++ b/testing/srcs/test_strdup.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strdup.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:56:54 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:56:55 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** save a copy of string src by allocating memory and return pointer to copy +*/ + +#include "libft.h" + +char *ft_strdup(const char *src) +{ + int i; + char *str; + + i = 0; + while (src[i] != '\0') + i++; + if (!(str = (char*)malloc(sizeof(*str) * (i + 1)))) + return (NULL); + while (i-- >= 0) + str[i + 1] = src[i + 1]; + return (str); +} diff --git a/testing/srcs/test_strequ.c b/testing/srcs/test_strequ.c new file mode 100644 index 0000000..fa4d4e4 --- /dev/null +++ b/testing/srcs/test_strequ.c @@ -0,0 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strequ.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:16:44 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:21:02 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** return 0 if strings s1 and s2 are identical and 1 if not +*/ + +#include "libft.h" + +int ft_strequ(char const *s1, char const *s2) +{ + if (!s1 || !s2) + return (0); + return (ft_strcmp(s1, s2) == 0); +} diff --git a/testing/srcs/test_striter.c b/testing/srcs/test_striter.c new file mode 100644 index 0000000..9d3b21f --- /dev/null +++ b/testing/srcs/test_striter.c @@ -0,0 +1,23 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_striter.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:16:53 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:21:14 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** apply function f to each element of string s +*/ + +#include "libft.h" + +void ft_striter(char *s, void (*f)(char *)) +{ + while (s && *s && f) + f(s++); +} diff --git a/testing/srcs/test_striteri.c b/testing/srcs/test_striteri.c new file mode 100644 index 0000000..60fd7f6 --- /dev/null +++ b/testing/srcs/test_striteri.c @@ -0,0 +1,26 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_striteri.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:17:04 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:21:27 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** apply function f to each element of string s with index specified +*/ + +#include "libft.h" + +void ft_striteri(char *s, void (*f)(unsigned int, char *)) +{ + int i; + + i = 0; + while (s && *s && f) + f(i++, s++); +} diff --git a/testing/srcs/test_strjoin.c b/testing/srcs/test_strjoin.c new file mode 100644 index 0000000..0dfad46 --- /dev/null +++ b/testing/srcs/test_strjoin.c @@ -0,0 +1,79 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strjoin.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:01:26 by hulamy #+# #+# */ +/* Updated: 2019/12/09 21:38:35 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** create a new string by concatenating the two strings s1 and s2 +*/ + +/* +** #include +** +** size_t ft_strlen(const char *str) +** { +** size_t i; +** +** i = 0; +** while (str[i]) +** i++; +** return (i); +** } +** +** char *ft_strjoin(char const *s1, char const *s2); +** +** int main(int ac, char **av) +** { +** char *s1; +** char *s2; +** char *str; +** +** if (ac == 0) +** return (0); +** else if (ac == 3) +** { +** s1 = strdup(av[1]); +** s2 = strdup(av[2]); +** } +** else +** { +** s1 = malloc(sizeof(char*) * 100); +** s1 = "sdf"; +** s2 = "tref"; +** } +** str = ft_strjoin(s1, s2); +** printf("%s\n", str); +** return (0); +** } +*/ + +#include "libft.h" + +char *ft_strjoin(char const *s1, char const *s2) +{ + char *str; + int len; + int i; + + if (!s1 || !s2) + return (NULL); + len = ft_strlen(s1) + ft_strlen(s2); + if (!(str = (char *)malloc(sizeof(char) * (len + 1)))) + return (NULL); + len = 0; + i = 0; + while (s1[i] != '\0') + str[len++] = s1[i++]; + i = 0; + while (s2[i] != '\0') + str[len++] = s2[i++]; + str[len] = '\0'; + return (str); +} diff --git a/testing/srcs/test_strjoinfree.c b/testing/srcs/test_strjoinfree.c new file mode 100644 index 0000000..66c8b50 --- /dev/null +++ b/testing/srcs/test_strjoinfree.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strjoinfree.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/03/05 15:05:28 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:22:28 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** create a new string by concatenating the two strings s1 and s2 +** then free s1 and s2 +*/ + +#include "libft.h" + +char *ft_strjoinfree(char *s1, char *s2) +{ + char *str; + + if (!(str = ft_strjoin(s1, s2))) + return (NULL); + free(s1); + free(s2); + return (str); +} diff --git a/testing/srcs/test_strlcat.c b/testing/srcs/test_strlcat.c new file mode 100644 index 0000000..91d14d8 --- /dev/null +++ b/testing/srcs/test_strlcat.c @@ -0,0 +1,108 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strlcat.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:57:02 by hulamy #+# #+# */ +/* Updated: 2019/11/25 14:23:18 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** append src to sized dest and return size of final dest +*/ + +/* +** #include +** +** size_t ft_strlcat(char *dest, const char *src, size_t size); +** +** size_t ft_strlcat2(char *dest, char *src, size_t size); +** +** int ft_strlen(char *str) +** { +** int i; +** +** i = 0; +** while (str[i]) +** i++; +** return (i); +** } +** +** int main(int ac, char **av) +** { +** char tmp1[100]; +** char tmp2[100]; +** int i; +** +** i = atoi(av[3]); +** strcpy(tmp1, av[1]); +** strcpy(tmp2, av[2]); +** +** if (ac == 4) +** { +** printf("----strlcat: %zu - %s - %s\n", strlcat(tmp1, tmp2, i), +** tmp1, tmp2); +** +** strcpy(tmp1, av[1]); +** strcpy(tmp2, av[2]); +** +** printf("-ft_strlcat: %zu - %s - %s\n", ft_strlcat(tmp1, tmp2, i), +** tmp1, tmp2); +** +** strcpy(tmp1, av[1]); +** strcpy(tmp2, av[2]); +** +** printf("ft_strlcat2: %zu - %s - %s\n", ft_strlcat2(tmp1, tmp2, i), +** tmp1, tmp2); +** } +** } +** +** size_t ft_strlcat2(char *dest, char *src, size_t size) +** { +** size_t i; +** size_t dest_length; +** size_t src_length; +** +** i = 0; +** dest_length = ft_strlen(dest); +** src_length = ft_strlen(src); +** if (size > dest_length + 1) +** { +** while (i < (size - dest_length - 1)) +** { +** dest[i + dest_length] = src[i]; +** i++; +** } +** dest[dest_length + i] = '\0'; +** } +** if (size >= dest_length) +** return (dest_length + src_length); +** return (src_length + size); +** } +*/ + +#include "libft.h" + +size_t ft_strlcat(char *dest, const char *src, size_t size) +{ + size_t i; + size_t j; + + i = 0; + j = 0; + while (dest[i] && i < size) + i++; + while (src[j]) + { + if (j + i < size - 1 && size) + { + dest[i + j] = src[j]; + dest[i + j + 1] = '\0'; + } + j++; + } + return (i + j); +} diff --git a/testing/srcs/test_strlcpy.c b/testing/srcs/test_strlcpy.c new file mode 100644 index 0000000..48ef5b8 --- /dev/null +++ b/testing/srcs/test_strlcpy.c @@ -0,0 +1,70 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strlcpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:57:19 by hulamy #+# #+# */ +/* Updated: 2019/12/01 16:12:57 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** copy size - 1 length of src into dest, +** terminate it with a '\0' +** and return size of src +** this way, if you try to copy a name in a variable with an available size +** of 5 for exemple, if you use ft_strlcpy(variable, name, sizeof(variable)) +** you will know if the name was too long for the variable by looking at the +** return value (which is size of name) +*/ + +/* +** #include +** +** size_t ft_strlcpy(char *dest, const char *src, size_t size); +** +** int main(int argc, char **argv) +** { +** char str[100]; +** int i; +** unsigned int u; +** unsigned int v; +** +** i = atoi(argv[3]); +** strcpy(str, argv[2]); +** if (argc > 3) +** { +** u = strlcpy(argv[2], argv[1], i); +** printf("strlcpy : %s - %s - %d",argv[1], argv[2], i); +** printf(" - return:%d\n",u); +** strcpy(argv[2], str); +** printf("(re-init : %s - %s - %d)\n",argv[1], argv[2], i); +** v = ft_strlcpy(argv[2], argv[1], i); +** printf("ft_strlcpy: %s - %s - %d",argv[1], argv[2], i); +** printf(" - return:%d\n",v); +** } +** return (0); +** } +*/ + +#include "libft.h" + +size_t ft_strlcpy(char *dest, const char *src, size_t size) +{ + size_t i; + size_t j; + + i = 0; + j = 0; + while (src[i] != '\0') + { + if (i + 1 < size) + dest[i] = src[j++]; + i++; + } + if (size > 0) + dest[j] = '\0'; + return (i); +} diff --git a/testing/srcs/test_strlen.c b/testing/srcs/test_strlen.c new file mode 100644 index 0000000..8af143b --- /dev/null +++ b/testing/srcs/test_strlen.c @@ -0,0 +1,27 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strlen.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:57:48 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:57:49 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** return length of of string +*/ + +#include "libft.h" + +size_t ft_strlen(const char *str) +{ + size_t i; + + i = 0; + while (str[i]) + i++; + return (i); +} diff --git a/testing/srcs/test_strmap.c b/testing/srcs/test_strmap.c new file mode 100644 index 0000000..ef82f97 --- /dev/null +++ b/testing/srcs/test_strmap.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strmap.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:17:49 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:23:12 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** create a new array with the result of function f on every element of s +*/ + +#include "libft.h" + +char *ft_strmap(char const *s, char (*f)(char)) +{ + char *str; + int i; + + if (!s) + return (NULL); + if (!(str = ft_strnew(ft_strlen(s)))) + return (NULL); + i = -1; + while (s[++i]) + str[i] = f(s[i]); + return (str); +} diff --git a/testing/srcs/test_strmapi.c b/testing/srcs/test_strmapi.c new file mode 100644 index 0000000..7fa1a06 --- /dev/null +++ b/testing/srcs/test_strmapi.c @@ -0,0 +1,75 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strmapi.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:01:40 by hulamy #+# #+# */ +/* Updated: 2019/12/09 21:44:07 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** create a new array with the result of function f on every element of +** s by index i +*/ + +/* +** #include +** +** size_t ft_strlen(const char *str) +** { +** size_t i; +** +** i = 0; +** while (str[i]) +** i++; +** return (i); +** } +** char touppercase(unsigned int i, char c) +** { +** if (i < 3 && c >= 'a' && c <= 'z') +** c -= 32; +** return (c); +** } +** +** char *ft_strmapi(char const *s, char (*f)(unsigned int, char)); +** +** int main(int ac, char **av) +** { +** char *str; +** char touppercase(unsigned int, char); +** +** if (ac > 2) +** return (0); +** if (ac == 2) +** str = strdup(av[1]); +** if (ac == 1) +** str = NULL; +** //str = ft_strmapi(str, touppercase); +** str = ft_strmapi(str, NULL); +** printf("%s\n",str); +** return (0); +** } +*/ + +#include "libft.h" + +char *ft_strmapi(char const *s, char (*f)(unsigned int, char)) +{ + char *str; + int i; + int size; + + if (!s || !f) + return (NULL); + size = ft_strlen(s); + if (!(str = (char *)malloc(sizeof(char) * (size + 1)))) + return (NULL); + str[size] = '\0'; + i = -1; + while (s[++i]) + str[i] = f(i, s[i]); + return (str); +} diff --git a/testing/srcs/test_strmultisplit.c b/testing/srcs/test_strmultisplit.c new file mode 100644 index 0000000..ed2ed98 --- /dev/null +++ b/testing/srcs/test_strmultisplit.c @@ -0,0 +1,83 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strmultisplit.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/16 15:18:29 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:23:57 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** return an array of string with each word found in str +** with any character of charset difining a separator +*/ + +#include "libft.h" + +static int ft_is_separator(char c, char *charset, int i) +{ + while (charset[i]) + { + if (c == charset[i]) + return (1); + i++; + } + c = charset[i]; + return (0); +} + +static int ft_count(char *str, int word, char **tab, char *charset) +{ + int i; + int j; + int k; + + k = 0; + i = 0; + while (ft_is_separator(str[k], charset, 0) == 1) + k++; + while (str[k] != '\0' && i != word) + { + j = 0; + while (!ft_is_separator(str[k + j], charset, 0) && str[k + j] != '\0') + { + if (word == -2) + tab[i][j] = str[k + j]; + j++; + } + k += j; + while (ft_is_separator(str[k], charset, 0)) + k++; + i++; + } + if (word == -1) + return (i); + return (j); +} + +char **ft_strmultisplit(char *str, char *charset) +{ + char **tab; + int i; + int j; + int k; + + k = 0; + tab = 0; + i = ft_count(str, -1, tab, charset); + if (!(tab = (char**)malloc(sizeof(tab) * (i + 1)))) + return (NULL); + tab[i] = 0; + while (k < i) + { + j = ft_count(str, k + 1, tab, charset); + tab[k] = (char*)malloc(sizeof(*tab) * (j + 1)); + tab[k][j] = '\0'; + k++; + } + ft_count(str, -2, tab, charset); + return (tab); +} diff --git a/testing/srcs/test_strncat.c b/testing/srcs/test_strncat.c new file mode 100644 index 0000000..cf52aae --- /dev/null +++ b/testing/srcs/test_strncat.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strncat.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:18:24 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:24:11 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** append n character of src to dest and return dest +*/ + +#include "libft.h" + +char *ft_strncat(char *dest, const char *src, size_t nb) +{ + size_t i; + size_t j; + + i = 0; + j = 0; + while (dest[i]) + i++; + while (src[j] && j < nb) + dest[i++] = src[j++]; + dest[i] = '\0'; + return (dest); +} diff --git a/testing/srcs/test_strncmp.c b/testing/srcs/test_strncmp.c new file mode 100644 index 0000000..7022624 --- /dev/null +++ b/testing/srcs/test_strncmp.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strncmp.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:57:59 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:58:00 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** compare size first character of two null terminated strings +** and return value of difference between first two different character +*/ + +#include "libft.h" + +int ft_strncmp(const char *s1, const char *s2, size_t n) +{ + size_t i; + int res; + + i = 0; + res = 0; + while (s1[i] && s1[i] == s2[i] && i < n - 1) + i++; + if (n != 0) + res = (unsigned char)s1[i] - (unsigned char)s2[i]; + return (res); +} diff --git a/testing/srcs/test_strncpy.c b/testing/srcs/test_strncpy.c new file mode 100644 index 0000000..91ea1b3 --- /dev/null +++ b/testing/srcs/test_strncpy.c @@ -0,0 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strncpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:18:44 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:24:59 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** copy n characters from string src to dst including '\0' +** if space remain it's filled zith '\0', and return dst +*/ + +#include "libft.h" + +char *ft_strncpy(char *dest, const char *src, size_t n) +{ + size_t i; + + i = -1; + while (++i < n && src[i]) + dest[i] = src[i]; + while (i < n) + dest[i++] = '\0'; + return (dest); +} diff --git a/testing/srcs/test_strnequ.c b/testing/srcs/test_strnequ.c new file mode 100644 index 0000000..668f3fa --- /dev/null +++ b/testing/srcs/test_strnequ.c @@ -0,0 +1,25 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strnequ.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:18:55 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:25:20 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** return 0 if n first character of strings s1 and s2 are identical +** and 1 if not +*/ + +#include "libft.h" + +int ft_strnequ(char const *s1, char const *s2, size_t n) +{ + if (!s1 || !s2) + return (0); + return (ft_strncmp(s1, s2, n) == 0); +} diff --git a/testing/srcs/test_strnew.c b/testing/srcs/test_strnew.c new file mode 100644 index 0000000..645feff --- /dev/null +++ b/testing/srcs/test_strnew.c @@ -0,0 +1,27 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strnew.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:19:08 by hulamy #+# #+# */ +/* Updated: 2019/11/21 17:00:30 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** create a new string of length size, fill with zero, and return pointer to it +*/ + +#include "libft.h" + +char *ft_strnew(size_t size) +{ + char *str; + + if (!(str = (char *)malloc(sizeof(char) * (size + 1)))) + return (NULL); + ft_bzero(str, size + 1); + return (str); +} diff --git a/testing/srcs/test_strnstr.c b/testing/srcs/test_strnstr.c new file mode 100644 index 0000000..52ff0d2 --- /dev/null +++ b/testing/srcs/test_strnstr.c @@ -0,0 +1,42 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strnstr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:58:10 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:58:11 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** locate the first occurence of the string little in len first characters +** of big and return a pointer to this occurence if found +*/ + +#include "libft.h" + +char *ft_strnstr(const char *big, const char *little, size_t len) +{ + size_t i; + size_t j; + + j = 0; + i = 0; + if (!ft_strlen(little)) + return ((char *)big); + while (i == 0 && j <= len) + { + while (little[i] == big[j + i] && little[i] && j + i <= len) + i++; + if (little[i]) + { + j++; + if (!big[j] || j >= len) + return (0); + i = 0; + } + } + return ((char *)big + j); +} diff --git a/testing/srcs/test_strrchr.c b/testing/srcs/test_strrchr.c new file mode 100644 index 0000000..1c8faa8 --- /dev/null +++ b/testing/srcs/test_strrchr.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strrchr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:58:20 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:58:21 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** locate the last occurence of character c in string s +** and return pointer to its location +*/ + +#include "libft.h" + +char *ft_strrchr(const char *s, int c) +{ + int i; + + i = 0; + while (s[i]) + i++; + i++; + while (i--) + if (s[i] == c) + return ((char *)s + i); + return (NULL); +} diff --git a/testing/srcs/test_strstr.c b/testing/srcs/test_strstr.c new file mode 100644 index 0000000..c7a3535 --- /dev/null +++ b/testing/srcs/test_strstr.c @@ -0,0 +1,42 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strstr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/11/14 21:19:45 by hulamy #+# #+# */ +/* Updated: 2019/03/25 15:26:59 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** locate the first occurence of the string little in big +** and return a pointer to this occurence if found +*/ + +#include "libft.h" + +char *ft_strstr(const char *str, const char *to_find) +{ + int i; + int j; + + j = 0; + i = 0; + if (!ft_strlen(to_find)) + return ((char *)str); + while (i == 0) + { + while (to_find[i] && to_find[i] == str[j + i]) + i++; + if (to_find[i]) + { + j++; + if (str[j] == '\0' && to_find[i]) + return (0); + i = 0; + } + } + return ((char *)str + j); +} diff --git a/testing/srcs/test_strtrim.c b/testing/srcs/test_strtrim.c new file mode 100644 index 0000000..0e9ede9 --- /dev/null +++ b/testing/srcs/test_strtrim.c @@ -0,0 +1,101 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strtrim.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 14:01:49 by hulamy #+# #+# */ +/* Updated: 2019/12/09 21:46:54 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** create a copy of s without the firsts and lasts set of characters +*/ + +/* +** #include +** +** char *ft_substr(char const *s, unsigned int start, size_t len) +** { +** char *str; +** size_t i; +** +** if (!s) +** return (NULL); +** if (!(str = (char *)malloc(sizeof(char) * (len + 1)))) +** return (NULL); +** str[len] = '\0'; +** i = 0; +** while (i < len) +** str[i++] = s[start++]; +** return (str); +** } +** +** size_t ft_strlen(const char *str) +** { +** size_t i; +** +** i = 0; +** while (str[i]) +** i++; +** return (i); +** } +** +** char *ft_strchr(const char *s, int c) +** { +** int i; +** int j; +** +** i = 0; +** j = -1; +** while (s[i]) +** i++; +** while (++j < i + 1) +** if (s[j] == c) +** return ((char *)s + j); +** return (NULL); +** } +** +** char *ft_strtrim(char const *s1, char const *set); +** +** int main(int ac, char **av) +** { +** char *s1; +** char *s2; +** +** if (ac == 3) +** { +** s1 = strdup(av[1]); +** s2 = strdup(av[2]); +** } +** if (ac == 1) +** { +** s1 = "fuehf"; +** s2 = NULL; +** } +** printf("%s\n",ft_strtrim(s1, s2)); +** return (0); +** } +*/ + +#include "libft.h" + +char *ft_strtrim(char const *s1, char const *set) +{ + int len; + char *str; + + if (!s1 || !set) + return (NULL); + while (s1[0] && ft_strchr(set, s1[0])) + s1++; + len = ft_strlen(s1) - 1; + while (len >= 0 && ft_strchr(set, s1[len])) + len--; + len++; + if (!(str = ft_substr(s1, 0, len))) + return (NULL); + return (str); +} diff --git a/testing/srcs/test_substr.c b/testing/srcs/test_substr.c new file mode 100644 index 0000000..4ffd069 --- /dev/null +++ b/testing/srcs/test_substr.c @@ -0,0 +1,104 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_substr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/12/01 16:00:10 by hulamy #+# #+# */ +/* Updated: 2019/12/09 22:04:26 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** create a copy of a portion of s, begining at start and of length len +*/ + +/* +** #include +** #include +** #include +** +** char *ft_substr(char const *s, unsigned int start, size_t len); +** +** char *ft_strdup(const char *src) +** { +** int i; +** char *str; +** +** i = 0; +** while (src[i] != '\0') +** i++; +** if (!(str = (char*)malloc(sizeof(*str) * (i + 1)))) +** return (NULL); +** while (i-- >= 0) +** str[i + 1] = src[i + 1]; +** return (str); +** } +** +** int ft_strncmp(const char *s1, const char *s2, size_t n) +** { +** size_t i; +** int res; +** +** i = 0; +** res = 0; +** while (s1[i] && s1[i] == s2[i] && i < n - 1) +** i++; +** if (n != 0) +** res = (unsigned char)s1[i] - (unsigned char)s2[i]; +** return (res); +** } +** +** size_t ft_strlen(const char *str) +** { +** size_t i; +** +** i = 0; +** while (str[i]) +** i++; +** return (i); +** } +** +** int main(int ac, char **av) +** { +** char *str; +** size_t size; +** int start; +** +** str = "frgehr"; +** start = 2; +** size = 5; +** if (ac == 4) +** { +** str = strdup(av[1]); +** start = atoi(av[2]); +** size = atoi(av[3]); +** } +** char *ret = ft_substr(str, start, size); +** printf("%s, %i, %zu\n", str, start, size); +** printf("%s\n", ret); +** free(ret); +** return (0); +** } +*/ + +#include "libft.h" + +char *ft_substr(char const *s, unsigned int start, size_t len) +{ + char *str; + size_t i; + + if (!s) + return (NULL); + if (ft_strlen(s) < start) + return (ft_strdup("")); + if (!(str = (char *)malloc(sizeof(char) * (len + 1)))) + return (NULL); + i = 0; + while (i < len && s[start]) + str[i++] = s[start++]; + str[i] = '\0'; + return (str); +} diff --git a/testing/srcs/test_tolower.c b/testing/srcs/test_tolower.c new file mode 100644 index 0000000..2cd5cb6 --- /dev/null +++ b/testing/srcs/test_tolower.c @@ -0,0 +1,20 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_tolower.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/25 13:58:30 by hulamy #+# #+# */ +/* Updated: 2019/11/25 13:58:32 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_tolower(int c) +{ + if (c >= 'A' && c <= 'Z') + return (c + 32); + return (c); +} diff --git a/testing/srcs/test_toupper.c b/testing/srcs/test_toupper.c new file mode 100644 index 0000000..cb6f5c8 --- /dev/null +++ b/testing/srcs/test_toupper.c @@ -0,0 +1,7 @@ + +char touppercase(unsigned int i, char c) +{ + if (i < 3 && c >= 'a' && c <= 'z') + c -= 32; + return (c); +} diff --git a/testing/srcs/test_utoa.c b/testing/srcs/test_utoa.c new file mode 100644 index 0000000..e47f898 --- /dev/null +++ b/testing/srcs/test_utoa.c @@ -0,0 +1,74 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_utoa.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: hulamy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/03/12 22:36:50 by hulamy #+# #+# */ +/* Updated: 2020/03/12 22:36:56 by hulamy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* +** take an unsigned integer and give a string +*/ + +/* +** #include // for printf +** #include // for atoi +** +** char *ft_utoa(unsigned long int n); +** +** int main(int ac, char **av) +** { +** if (ac == 0) +** return (0); +** else if (ac == 2) +** printf("%s\n",ft_utoa(atoi(av[1]))); +** else +** { +** unsigned long int i; +** i = 0; +** printf(" %lu\n %s\n\n",i,ft_utoa(i)); +** i = 237683; +** printf(" %lu\n %s\n\n",i,ft_utoa(i)); +** i = 1234567; +** printf(" %lu\n %s\n\n",i,ft_utoa(i)); +** i = 12345678; +** printf(" %lu\n %s\n\n",i,ft_utoa(i)); +** i = 2147483646; +** printf(" %lu\n %s\n\n",i,ft_utoa(i)); +** i = 2147483647; +** printf(" %lu\n %s\n\n",i,ft_utoa(i)); +** i = 2147483648; +** printf(" %lu\n %s\n\n",i,ft_utoa(i)); +** i = 2147483649; +** printf(" %lu\n %s\n\n",i,ft_utoa(i)); +** i = 9223372036854775807; +** printf("| %lu\n| %s\n\n",i,ft_utoa(i)); +** } +** return 0; +** } +*/ + +#include "libft.h" + +char *ft_utoa(unsigned long int n) +{ + char *str; + int len; + unsigned long int cpy; + + cpy = n; + len = 1; + while (n /= 10) + len++; + if (!(str = (char *)malloc(sizeof(char) * (len + 1)))) + return (NULL); + str[len] = '\0'; + str[--len] = cpy % 10 + '0'; + while (cpy /= 10) + str[--len] = cpy % 10 + '0'; + return (str); +}