aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--.libftignore1
-rw-r--r--.travis.yml4
-rw-r--r--LICENSE21
-rw-r--r--Makefile88
-rw-r--r--README.md32
-rw-r--r--include/libft.h143
-rw-r--r--include/libft_algo.h (renamed from include/ft_algo.h)6
-rw-r--r--include/libft_bt.h (renamed from include/get_next_line.h)33
-rw-r--r--include/libft_ctype.h35
-rw-r--r--include/libft_ht.h56
-rw-r--r--include/libft_io.h44
-rw-r--r--include/libft_lst.h47
-rw-r--r--include/libft_mem.h31
-rw-r--r--include/libft_printf.h27
-rw-r--r--include/libft_str.h66
-rw-r--r--include/libft_types.h30
-rw-r--r--libft.conf11
-rwxr-xr-xscript/find_src.sh20
-rwxr-xr-x[-rw-r--r--]script/generate_rendu.sh (renamed from scripts/generate_rendu.sh)0
-rw-r--r--script/generate_rendu_makefile.sh5
-rw-r--r--script/template.makefile38
-rw-r--r--src/bt/ft_btdestroy.c23
-rw-r--r--src/bt/ft_btnew.c25
-rw-r--r--src/ctype/ft_isascii.c6
-rw-r--r--src/ht/ft_htcontent_new.c31
-rw-r--r--src/ht/ft_htdelone.c21
-rw-r--r--src/ht/ft_htdelone_key.c (renamed from src/io/ft_printf.c)17
-rw-r--r--src/ht/ft_htdestroy.c24
-rw-r--r--src/ht/ft_htdestroy_all.c26
-rw-r--r--src/ht/ft_htdestroy_key.c26
-rw-r--r--src/ht/ft_htget.c28
-rw-r--r--src/ht/ft_hthash.c28
-rw-r--r--src/ht/ft_htnew.c32
-rw-r--r--src/ht/ft_htset.c34
-rw-r--r--src/ht/ft_inter_htkey_equal.c21
-rw-r--r--src/io/ft_next_line.c (renamed from src/io/get_next_line/get_next_line.c)58
-rw-r--r--src/io/ft_printf/ft_asprintf.c (renamed from src/io/ft_asprintf.c)0
-rw-r--r--src/io/ft_printf/ft_dprintf.c (renamed from src/io/ft_dprintf.c)0
-rw-r--r--src/io/ft_printf/ft_printf.c88
-rw-r--r--src/io/ft_printf/ft_snprintf.c (renamed from src/io/ft_snprintf.c)0
-rw-r--r--src/io/ft_printf/ft_sprintf.c (renamed from src/io/ft_sprintf.c)0
-rw-r--r--src/io/ft_printf/ft_vasprintf.c (renamed from src/io/ft_vasprintf.c)0
-rw-r--r--src/io/ft_printf/ft_vdprintf.c (renamed from src/io/ft_vdprintf.c)0
-rw-r--r--src/io/ft_printf/ft_vprintf.c (renamed from src/io/ft_vprintf.c)0
-rw-r--r--src/io/ft_printf/ft_vsnprintf.c (renamed from src/io/ft_vsnprintf.c)0
-rw-r--r--src/io/ft_printf/ft_vsprintf.c (renamed from src/io/ft_vsprintf.c)0
-rw-r--r--src/io/ft_printf/internals/convert.c (renamed from src/io/ft_printf/convert.c)0
-rw-r--r--src/io/ft_printf/internals/convert_char.c (renamed from src/io/ft_printf/convert_char.c)0
-rw-r--r--src/io/ft_printf/internals/convert_hex.c (renamed from src/io/ft_printf/convert_hex.c)0
-rw-r--r--src/io/ft_printf/internals/convert_int.c (renamed from src/io/ft_printf/convert_int.c)0
-rw-r--r--src/io/ft_printf/internals/convert_none.c (renamed from src/io/ft_printf/convert_none.c)0
-rw-r--r--src/io/ft_printf/internals/convert_percent.c (renamed from src/io/ft_printf/convert_percent.c)0
-rw-r--r--src/io/ft_printf/internals/convert_ptr.c (renamed from src/io/ft_printf/convert_ptr.c)0
-rw-r--r--src/io/ft_printf/internals/convert_str.c (renamed from src/io/ft_printf/convert_str.c)0
-rw-r--r--src/io/ft_printf/internals/convert_uint.c (renamed from src/io/ft_printf/convert_uint.c)0
-rw-r--r--src/io/ft_printf/internals/convert_written.c (renamed from src/io/ft_printf/convert_written.c)0
-rw-r--r--src/io/ft_printf/internals/extract.c (renamed from src/io/ft_printf/extract.c)0
-rw-r--r--src/io/ft_printf/internals/length_modifier.c (renamed from src/io/ft_printf/length_modifier.c)0
-rw-r--r--src/io/ft_printf/internals/list.c (renamed from src/io/ft_printf/list.c)0
-rw-r--r--src/io/ft_printf/internals/parse.c (renamed from src/io/ft_printf/parse.c)0
-rw-r--r--src/io/ft_printf/internals/utils.c (renamed from src/io/ft_printf/utils.c)0
-rw-r--r--src/lst/ft_lstadd_back.c3
-rw-r--r--src/lst/ft_lstadd_front.c3
-rw-r--r--src/lst/ft_lstbsearch.c57
-rw-r--r--src/lst/ft_lstclear.c3
-rw-r--r--src/lst/ft_lstdelone.c3
-rw-r--r--src/lst/ft_lstiter.c3
-rw-r--r--src/lst/ft_lstlast.c3
-rw-r--r--src/lst/ft_lstmap.c9
-rw-r--r--src/lst/ft_lstnew.c7
-rw-r--r--src/lst/ft_lstpop_front.c6
-rw-r--r--src/lst/ft_lstremove_if.c33
-rw-r--r--src/lst/ft_lstreverse.c3
-rw-r--r--src/lst/ft_lstreverse_ret.c7
-rw-r--r--src/lst/ft_lstsize.c3
-rw-r--r--src/lst/ft_lstsort.c40
-rw-r--r--src/lst/ft_lstsorted_merge.c36
-rw-r--r--src/mem/ft_memccpy.c12
-rw-r--r--src/mem/ft_memchr.c8
-rw-r--r--src/mem/ft_memcmp.c12
-rw-r--r--src/mem/ft_memcpy.c15
-rw-r--r--src/mem/ft_memmove.c34
-rw-r--r--src/mem/ft_memset.c18
-rw-r--r--src/str/ft_atoi_strict.c2
-rw-r--r--src/str/ft_strcpy.c2
-rw-r--r--src/str/ft_strlen.c2
-rw-r--r--src/str/ft_strncpy.c4
-rw-r--r--src/str/ft_strrchr.c2
-rw-r--r--src/str/ft_strtol.c12
-rw-r--r--test/Makefile63
-rw-r--r--test/include/helper/helper_segfault.h19
-rw-r--r--test/include/libft_test.h14
-rwxr-xr-xtest/libft_testbin0 -> 45308 bytes
-rw-r--r--test/src/ht/test_ft_htcontent_new.c0
-rw-r--r--test/src/ht/test_ft_htdelone.c0
-rw-r--r--test/src/ht/test_ft_htdelone_key.c0
-rw-r--r--test/src/ht/test_ft_htdestroy.c0
-rw-r--r--test/src/ht/test_ft_htdestroy_all.c0
-rw-r--r--test/src/ht/test_ft_htdestroy_key.c0
-rw-r--r--test/src/ht/test_ft_htget.c35
-rw-r--r--test/src/ht/test_ft_hthash.c0
-rw-r--r--test/src/ht/test_ft_htnew.c38
-rw-r--r--test/src/ht/test_ft_htset.c51
-rw-r--r--test/src/main.c14
-rw-r--r--test/src/runner/test_runner_ht.c22
-rw-r--r--test/src/runner/test_runner_str.c6
-rw-r--r--test/src/str/test_ft_strlen.c14
-rw-r--r--vendor/_unity/LICENSE.txt21
-rw-r--r--vendor/_unity/Makefile41
-rw-r--r--vendor/_unity/README.md191
-rw-r--r--vendor/_unity/include/unity.h617
-rw-r--r--vendor/_unity/include/unity_fixture.h83
-rw-r--r--vendor/_unity/include/unity_fixture_internals.h50
-rw-r--r--vendor/_unity/include/unity_internals.h1007
-rw-r--r--vendor/_unity/include/unity_memory.h60
-rw-r--r--vendor/_unity/src/unity.c2088
-rw-r--r--vendor/_unity/src/unity_fixture.c310
-rw-r--r--vendor/_unity/src/unity_memory.c202
119 files changed, 6098 insertions, 422 deletions
diff --git a/.gitignore b/.gitignore
index f84848e..35d1ada 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,8 @@
*.so
*.a
*.ghc
+*.dSYM
a.out
-main.c
-build/*
+test_libft
+obj/*
+rendu.makefile
diff --git a/.libftignore b/.libftignore
new file mode 100644
index 0000000..68d827a
--- /dev/null
+++ b/.libftignore
@@ -0,0 +1 @@
+*ft_printf*
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..94e4879
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,4 @@
+language: c
+compiler: gcc
+
+script: make all && make test
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..476120d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 HappyTramp
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Makefile b/Makefile
index 97138dc..8cea428 100644
--- a/Makefile
+++ b/Makefile
@@ -6,75 +6,71 @@
# By: cacharle <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/10/08 15:45:53 by cacharle #+# #+# #
-# Updated: 2020/01/19 08:17:08 by cacharle ### ########.fr #
+# Updated: 2020/02/10 02:18:58 by cacharle ### ########.fr #
# #
# **************************************************************************** #
LIB = ar rcs
RM = rm -f
+NORM = norminette
+MAKE = make
+MAKE_ARGS = --no-print-directory
+
+SRC_DIR = src