42/get_next_line.git
2 years agoPatch invalid write
Lukas Jiriste [Fri, 27 Oct 2023 08:32:42 +0000 (10:32 +0200)]
Patch invalid write

Move "buffer[i] = '\0'" after a branch that handles i < 0.

2 years agoPatch delete_file_node function, create bonus (copy)
Lukas Jiriste [Wed, 25 Oct 2023 13:33:14 +0000 (15:33 +0200)]
Patch delete_file_node function, create bonus (copy)

The function delete_file_node made the static list NULL when deleting
the first entry. When there is more than a single entry in the list this
leads to loss the rest of the list. When get_next_line would be called
on file descriptor saved in such a "forgotten" list, it would not be
able to retrieve the data previously loaded to the files buffer.

Because bonus functions were implemented in the basic files, bonus files
are created by their duplication. This is needed to let moulinette
recognize bonus.

2 years agoFix bug that makes lines stick together
Lukas Jiriste [Fri, 13 Oct 2023 14:03:41 +0000 (16:03 +0200)]
Fix bug that makes lines stick together

This bug is caused by ignoring newline character that appears exactly
on the end of buffer. It is ignored because of a wrong logical operator.

2 years agoChanged ft_strncat_alloc argument to const char *.
Lukas Jiriste [Wed, 11 Oct 2023 16:22:48 +0000 (18:22 +0200)]
Changed ft_strncat_alloc argument to const char *.
Added a commentary on a function.

2 years agoIncluded <stddef.h> for size_t to be defined for a function prototype.
Lukas Jiriste [Mon, 11 Sep 2023 16:45:31 +0000 (18:45 +0200)]
Included <stddef.h> for size_t to be defined for a function prototype.

2 years agoMade everything pass norminette (split functions and files).
Lukas Jiriste [Mon, 11 Sep 2023 16:40:22 +0000 (18:40 +0200)]
Made everything pass norminette (split functions and files).
Lightly tested (single file, multiple files, empty file).
Everything seems to work and not leak.

2 years agoWhole solution of get_next_line.
Lukas Jiriste [Mon, 28 Aug 2023 11:40:13 +0000 (13:40 +0200)]
Whole solution of get_next_line.
Needs testing and splitting to multiple files.