Commit graph

61 commits

Author SHA1 Message Date
Khaïs COLIN
7acdc05a62 ft_lstsize: initial implementation 2024-10-21 11:50:55 +02:00
Khaïs COLIN
a620c3606d ft_lstadd_front: initial implementation 2024-10-21 11:40:47 +02:00
Khaïs COLIN
8777bfc3c3 ft_lstnew: initial implementation 2024-10-21 11:28:06 +02:00
Khaïs COLIN
1126640edc Revert "Makefile: separate sources by allowed functions"
This reverts commit 55ee770fa8.
2024-10-21 11:14:20 +02:00
Khaïs COLIN
2f2623c7bb libft.a: add s_list structure for bonus 2024-10-21 11:12:31 +02:00
Khaïs COLIN
eeac617b02 Makefile: fix rule re not working reliably with multiple jobs 2024-10-21 10:50:49 +02:00
Khaïs COLIN
55ee770fa8 Makefile: separate sources by allowed functions 2024-10-21 10:46:19 +02:00
Khaïs COLIN
fb498eca6d Makefile: do not set compiler 2024-10-19 18:39:54 +02:00
Khaïs COLIN
26618f40b1 ft_substr: don't allocate too much mem + handle start outside of str 2024-10-19 18:36:17 +02:00
Khaïs COLIN
29f2cc104a ft_calloc: do not memset if malloc returns NULL 2024-10-19 18:13:22 +02:00
Khaïs COLIN
afcddc5e14 ft_atoi: correctly handle +/- at start 2024-10-19 18:11:30 +02:00
Khaïs COLIN
9b93b1c909 ft_atoi: fix leading whitespace parsing 2024-10-18 18:01:46 +02:00
Khaïs COLIN
045f9a9012 ft_strncmp: fix returning wrong value with n=0 2024-10-18 17:55:41 +02:00
Khaïs COLIN
6f22d1eb36 ft_strrchr: fix 2 small bugs
1. Compairing was done with ints, not bytes
2. did not correctly give pointer to null terminator
2024-10-18 17:47:30 +02:00
Khaïs COLIN
d517a05f90 ft_strchr: fix 2 small bugs
1. Compairing was done with ints, not bytes
2. did not correctly give pointer to null terminator
2024-10-18 17:44:41 +02:00
Khaïs COLIN
99bd5cc4cd ignore libftTester 2024-10-18 17:38:48 +02:00
Khaïs COLIN
07704a2d59 ft_putnbr_fd: initial implementation
NOTE: When compiling with gcc and checking the produced library with nm,
we get the following output:

ft_putnbr_fd.o:
                 U ft_putchar_fd
0000000000000000 T ft_putnbr_fd
                 U __stack_chk_fail
                 U write

As you can see, there is an undefined function that is used in this
object file, "__stack_chk_fail". This function is not allowed by the
subject! Only write is allowed!

I am told that the moulinette compiles with clang, which does not
exhibit this behaviour. However, it may be that gcc is used instead,
which may cause my project to fail. (Also, an evaluator may mark me down
for that). I don't want either of those two things to happen, so I will
code another implementation which uses recursion, as this kind of
impelmentation does not seem to cause this behaviour with gcc.

Thanks to tchampio for his help debugging this issue.
2024-10-18 16:31:16 +02:00
Khaïs COLIN
b1f1b8a13f ft_putendl_fd: initial implementation 2024-10-18 15:25:40 +02:00
Khaïs COLIN
81343980be ft_putstr_fd: initial implementation 2024-10-18 15:20:56 +02:00
Khaïs COLIN
28cadf55f1 ft_putchar_fd: initial implementation 2024-10-18 14:30:13 +02:00
Khaïs COLIN
6a186f7527 ft_striteri: initial implementation 2024-10-18 12:11:55 +02:00
Khaïs COLIN
f2f363518c ft_strmapi: initial implementation 2024-10-18 11:55:40 +02:00
Khaïs COLIN
08bae77518 ft_itoa: initial implementation
I wrote this in a single session, with 0 errors on the first try!
2024-10-17 17:37:10 +02:00
Khaïs COLIN
d1b5c7b687 ft_split: initial implementation 2024-10-17 17:02:35 +02:00
Khaïs COLIN
5ec841de7f ft_strtrim: initial implementation 2024-10-17 14:11:16 +02:00
Khaïs COLIN
c795a9bab1 ft_calloc: correctly set allocated memory to zero 2024-10-17 13:53:44 +02:00
Khaïs COLIN
d8ec79480f ft_strjoin: initial implementation 2024-10-17 12:11:30 +02:00
Khaïs COLIN
7d896b939c ft_substr: initial implementation 2024-10-17 12:00:30 +02:00
Khaïs COLIN
a20611c09a ft_strdup: initial implementation 2024-10-17 11:03:37 +02:00
Khaïs COLIN
df37e074f3 ft_strlcpy: fix incorrect name 2024-10-17 10:43:33 +02:00
Khaïs COLIN
a38e9e5f94 ft_calloc: initial implementation 2024-10-17 10:42:43 +02:00
Khaïs COLIN
fce032ce2f ft_atoi: initial implementation 2024-10-16 16:14:58 +02:00
Khaïs COLIN
0a1e2f2b37 ft_strnstr: initial implementation 2024-10-16 15:59:48 +02:00
Khaïs COLIN
1c3df31518 ft_memcmp: initial implementation
also fix a small clarity issue in ft_strncmp
2024-10-16 15:34:30 +02:00
Khaïs COLIN
b81ad331b5 chore: use correct size_t instead of t_size 2024-10-16 15:20:28 +02:00
Khaïs COLIN
aad909fe23 ft_memchr: initial implementation 2024-10-16 14:21:59 +02:00
Khaïs COLIN
b176bdaebe ft_strncmp: initial implementation 2024-10-16 13:47:09 +02:00
Khaïs COLIN
10cf338cbf ft_strrchr: intial implementation 2024-10-16 10:52:03 +02:00
Khaïs COLIN
3754c47e8c ft_strchr: initial implementation 2024-10-16 10:46:16 +02:00
Khaïs COLIN
1eb276c8cf ft_tolower: initial implementation 2024-10-16 10:32:29 +02:00
Khaïs COLIN
21e04cc22c ft_toupper: initial implementation 2024-10-16 10:28:00 +02:00
Khaïs COLIN
870ce44765 ft_strlcat: initial implementation 2024-10-15 16:17:49 +02:00
Khaïs COLIN
a7ffedf420 ft_strlcpy: initial implementation 2024-10-15 14:54:04 +02:00
Khaïs COLIN
29fbed55a3 correct different arg names in linux and bsd man pages 2024-10-15 14:44:11 +02:00
Khaïs COLIN
b86949e284 ft_memmove: initial implementation
This was tricky to visualize, consider bringing pen and paper next time
2024-10-15 14:29:15 +02:00
Khaïs COLIN
fc5aa8e037 ft_bzero: norminette 2024-10-15 14:14:56 +02:00
Khaïs COLIN
2d1581d68d ft_memcpy: initial implementation 2024-10-15 13:51:09 +02:00
Khaïs COLIN
c820425285 ft_bzero: initial implementation 2024-10-15 11:55:56 +02:00
Khaïs COLIN
872595f75b ft_memset: initial implementation 2024-10-15 11:19:02 +02:00
Khaïs COLIN
8e87d9f316 norminette: fix it 2024-10-15 10:44:30 +02:00