This is the second project at 42 Madrid. The aim is to learn about variadic functions in C. The goal is to recode the printf() function from libc with the following prototype int ft_printf(const char *, ...);
The requirements are:
- Don’t implement the buffer management of the original printf()
- The function has to handle the following conversions: cspdiuxX%
- The aim is to create a libftprintf.a file
The detailed conversions are:
- %c Prints a single character
- %s Prints a string (as defined by the common C convention)
- %p The void * pointer argument has to be printed in hexadecimal format
- %d Prints a decimal (base 10) number
- %i Prints an integer in base 10
- %u Prints an unsigned decimal (base 10) number
- %x Prints a number in hexadecimal (base 16) lowercase format
- %X Prints a number in hexadecimal (base 16) uppercase format
- %% Prints a percent sign
With the Makefile you can compile directly. The rules that it allows are:
- Make: it compiles directly
- Make re: if the project is already compiled, it does it again
- Make clean. Deletes all .o files but the library .a remains
- make fclean: deletes all .o files and the library .a