/libft

First project of 42 school, creating a .h library of C functions we'll use later.

Primary LanguageC

libft

First project of 42 school, creating a .h library of C functions we'll use later.

You must create the following functions in the order you believe makes most sense. We encourage you to use the functions you have already coded to write the next ones. The difficulty level does not increase by assignment and the project has not been structured in any specific way. It is similar to a video game, where you can complete quests in the order of your choosing and use the loot from the previous quests to solve the next ones.

• Your project must be written in accordance with the Norm.

• Your functions should not quit unexpectedly (segmentation fault, bus error, double free, etc) apart from undefined behaviors. If this happens, your project will be considered non functional and will receive a 0 during the defence.

• All heap allocated memory space must be properly freed when necessary.

• You must submit a file named author containing your username followed by a ’\n’ at the root of your repository

• You must submit a C file for each function you create, as well as a libft.h file, which will contain all the necessary prototypes as well as macros and typedefs you might need. All those files must be at the root of your repository.

• You must submit a Makefile which will compile your source files to a static library libft.a.

• Your Makefile must at least contain the rules $(NAME), all, clean, fclean et re in the order that you will see fit.

• Your Makefile must compile your work with the flags -Wall, -Wextra and -Werror.

• Only the following libc functions are allowed : malloc(3), free(3) and write(2), and their usage is restricted. See below.

• You must include the necessary include system files to use one or more of the three authorized functions in your .c files. The only additional system include file you are allowed to use is string.h to have access to the constant NULL and to the type size_t. Everything else if forbidden.

• We encourage you to create test programs for your library even though this work won’t have to be submitted and won’t be graded. It will give you a chance to easily test your work and your peers’ work. You will find those tests especially useful during your defence. Indeed, during defence, you are free to use your tests and/or the tests of the peer you are evaluating.