Skip to content

AGolz/Libft_42Yerevan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libft 🗂️

Libft (42cursus) 2023

Actual Status : Finished

Result : 125%

This project is about coding a C library. It contains many general-purpose functions that my next programs written for School 42 in C will rely on. This project is dedicated to understanding how standard functions work in С, their implementation and training in their use.

Part 1 - Libc functions:

This is a set of functions from libc. The functions have the same prototypes and the same behavior as the originals. They are fully consistent with how they are defined in their man. The only difference is their names. They start with the prefix ’ft_’. For example, strlen becomes ft_strlen.

Screen Shot 2023-01-18 at 5 48 46 AM

Part 2 - Additional Functions:

This is a set of functions that either do not exist in libc, or that are part of it, but in a different form.

Their detailed description can be found here, page 7.

Run make to compile the libft library .

$>make
libft.a:   object files are created
libft.a:   libft.a created

The makefile also contains the rules clean - delete object files, fclean - delete everything, including libft.a, and re - delete everything, including lift.a and compile again.

Bonus part:

This is a set of functions for manipulating lists. To represent the list node, the following structure was used, declared in the libfdt.h file:

typedef struct	s_list
{
	void		*content;
	struct s_list	*next;
}			t_list;

The members of the t_list structure are:

• content: data contained in the node. void * allows you to store any data.

• next: the address of the next node, or NULL if the next node is the last.

Their detailed description can be found here, page 11.

Run make bonus to compile the bonus functions from libft.

$>make bonus
bonus object files are created

Unit-test results:

libft-unit-test

Screen Shot 2023-01-18 at 6 50 32 AM

Screen Shot 2023-01-18 at 6 51 29 AM

Screen Shot 2023-01-18 at 6 52 01 AM

Project instructions

Need help: elmaksim@student.42yerevan.am

Special thanks: tripouille for the libftTester, aleliver for the libft-unit-test and jtoty for the Libftest (:

About

🗂️ C library project for 42 Yerevan

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published