Skip to content

Libft 42 project. Bonus included. Achieved April 2023.

Notifications You must be signed in to change notification settings

ulyssegerkens/libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Simple Libft

This project helped you? Give it a 🌟!

🧰 General information

Version: 15. Bonus included.
I did my best to create a codebase that is as clean and efficient as possible, while also maximizing the reuse of basic functions in more complex ones.

⚙️ Implementation details

In libft_docs.md some personal notes that delve into specific aspects of my implementation and detailed theoretical explanations. Special mention for an argument about why atoi should not handle overflow.
Most of the explanations were generated by GPT-4, with edits by me.

🚀 Extended version

This repo is an extended version my libft.
The original project is stored in the .tar archive.

Change log:

  • Makefile create obj/ directory.
  • Functions classified in directories.
  • Header in a new include/ directory.
  • Implementation of ft_strcmp.
  • Implementation of ft_write_fd (as ft_putstr_fd, but return the write syscall return).
  • Now, linked lists are doubly linked. Nodes have a 'prev' pointer in addition to 'next'.
  • Modification of ft_lstclear and ft_lstdelone to accept a NULL pointer as delete function. Useful to delete the structure list without it's content. Use with caution, if the content of the list has not been kept somewhere, it may lead to leaks!
  • ft_lstclear set the lst pointer to NULL to avoid dangling pointer.

📋 Testing

Tested by moulinette (125%) and the following tester, in their strictest version.