Skip to content

My LIBFT project for the 42 Cursus. A C library containing general purpose functions for future projects. All bonuses complete. 125/100

Notifications You must be signed in to change notification settings

lachlanstephen/LIBFT_42

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

LIBFT

Mark: 125/100

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:

  1. Standard C Library (libc) Functions - Same protoypes and comply with definition as in the man
  2. Additional Functions - Functions not in libc, or are part of it, but in an altered form
  3. Bonus Functions - List manipulation functions

Creating the library

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

Testing LIBFT functions

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.

Future Use of LIBFT

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

Plan for repository

  • Complete test cases in main.c for mandatory functions
  • Create test functions for bonus functions
  • Return whether diff of output is same or different

About

My LIBFT project for the 42 Cursus. A C library containing general purpose functions for future projects. All bonuses complete. 125/100

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published