LIBFT, the first project in the 42 Cursus, set about teaching us how standard functions in C work, by implementing our own versions, whilst matching the original functions functionality as per their manual entries. From these functions, we create our own library to use in future projects.
This project was split into 3 parts:
- Standard C Library (libc) Functions - Same protoypes and comply with definition as in the man
- Additional Functions - Functions not in libc, or are part of it, but in an altered form
- Bonus Functions - List manipulation functions
Run the following command:
# Make using the default Makefile
make re
# This creates the function library libft.a at the root
# Make with bonuses (separate as per subject requirements)
make bonus
To test your own LIBFT, download the main.c
and testing_Makefile
files from my repo, and move into your libft project folder.
Run these commands to test your libft functionality:
# Make using the specific Makefile with the -f flag
make re -f testing_Makefile
# Run compiled program
./test_libft
Compare the user output with the expected output.
Note: My test files aren't fully complete currently. On my to-do list.
Important: Make sure to run make fclean -f testing_Makefile
to clean up files before submitting for evaluation.
libft.a
can be linked with compilations in future using:
-L<LIBFT_directory> -lft
# e.g. cc -Wall -Wextra -Werror *.o -L./libft/ -lft -o program
- Complete test cases in
main.c
for mandatory functions - Create test functions for bonus functions
- Return whether diff of output is same or different