The aim of this project is to code a C library regrouping usual functions that can be used in all your other projects
0th ring Codam project
This project intended to re-codes a set of the libc functions, as defined in their man. The functions will need to present the same prototype and behaviors as the originals. The functions’ names must be prefixed by “ft_”. For instance strlen becomes ft_strlen. As a bonus linked list functions are added to the library.
The project needs to comply with the following rules/functionalities.
- It is forbidden to use global variables.
- If you need subfunctions to write a complex function, you should define these subfunctions as static to avoid publishing them with your library. It would be a good habit to do this in your future projects as well.
- Submit all files in the root of your repository.
- You must use the command ar to create your librairy, using the command libtool is forbidden.
Create a main to use the library functions, for example
// main.c
#include "libft.h"
#include <stdio.h>
int main(void)
{
int length;
length = ft_strlen("This is a test string");
printf("Length = %d\n", length);
return (0);
}Run the following commands in the terminal
$ git clone https://github.com/rbakker96/libft.git libft
$ cd libft
$ make
$ gcc -Wall -Wextra -Werror main.c libft.a
$ ./a.outMost noteworthy resources used during this project
- Man pages of re-coded functions
